Skip to content

Commit

Permalink
Preserve query string in generated long response urls if present (mai…
Browse files Browse the repository at this point in the history
…nly for GWT)
  • Loading branch information
johnthuss committed Dec 11, 2012
1 parent d578b2c commit 91318cc
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,12 @@ public void appendToResponse(WOResponse aResponse, WOContext aContext) {
// If the response is done and finished quickly (before the first branch of this conditional is invoked),
// make sure to refresh the page immediately.
String modifiedDynamicUrl = aContext.urlWithRequestHandlerKey(WOApplication.application().componentRequestHandlerKey(), null, null);

String header = interval + ";url=" +modifiedDynamicUrl+ "/" + aContext.session().sessionID()+ "/" +aContext.contextID()+ "." +WOMetaRefreshSenderId;
String query = "";
if (modifiedDynamicUrl.contains("?")) {
query = modifiedDynamicUrl.substring(modifiedDynamicUrl.indexOf("?"));
modifiedDynamicUrl = modifiedDynamicUrl.substring(0, modifiedDynamicUrl.indexOf("?"));
}
String header = interval + ";url=" +modifiedDynamicUrl+ "/" + aContext.session().sessionID()+ "/" +aContext.contextID()+ "." +WOMetaRefreshSenderId + query;

aResponse.setHeader(header, "Refresh");
if((doneButNotRefreshed)) {
Expand Down

0 comments on commit 91318cc

Please sign in to comment.