Skip to content

Commit

Permalink
Merge pull request #649 from darkv/ERXWOForm_patch
Browse files Browse the repository at this point in the history
generate complete URLs if secure mode changes
  • Loading branch information
darkv committed May 22, 2015
2 parents 0b2e6cc + 6df92d9 commit 3a01f9d
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,9 @@ public void appendAttributesToResponse(WOResponse response, WOContext context) {
WOComponent wocomponent = context.component();
super.appendAttributesToResponse(response, context);
boolean generatingCompleteURLs = context.doesGenerateCompleteURLs();
if (secure && !generatingCompleteURLs) {
boolean requestIsSecure = context.secureMode();
boolean switchToCompleteURLs = secure ^ requestIsSecure;
if (switchToCompleteURLs && !generatingCompleteURLs) {
context.generateCompleteURLs();
}
try {
Expand Down Expand Up @@ -405,7 +407,7 @@ else if (_directActionName != null || _actionClass != null) {
}
}
finally {
if (secure && !generatingCompleteURLs) {
if (switchToCompleteURLs && !generatingCompleteURLs) {
context.generateRelativeURLs();
}
}
Expand Down

0 comments on commit 3a01f9d

Please sign in to comment.