diff --git a/Frameworks/Core/ERExtensions/Sources/er/extensions/components/_private/ERXWOForm.java b/Frameworks/Core/ERExtensions/Sources/er/extensions/components/_private/ERXWOForm.java index e63963c256a..31737b65a47 100644 --- a/Frameworks/Core/ERExtensions/Sources/er/extensions/components/_private/ERXWOForm.java +++ b/Frameworks/Core/ERExtensions/Sources/er/extensions/components/_private/ERXWOForm.java @@ -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 { @@ -405,7 +407,7 @@ else if (_directActionName != null || _actionClass != null) { } } finally { - if (secure && !generatingCompleteURLs) { + if (switchToCompleteURLs && !generatingCompleteURLs) { context.generateRelativeURLs(); } }