From 9969288ddd36aada46c1d98a89dc4feaac18630b Mon Sep 17 00:00:00 2001 From: Johann Werner Date: Tue, 19 May 2015 20:11:28 +0200 Subject: [PATCH 1/2] generate complete URLs if secure mode changes --- .../er/extensions/components/_private/ERXWOForm.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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..c2a75fdfb0f 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) { context.generateCompleteURLs(); } try { @@ -405,7 +407,7 @@ else if (_directActionName != null || _actionClass != null) { } } finally { - if (secure && !generatingCompleteURLs) { + if (switchToCompleteURLs) { context.generateRelativeURLs(); } } From 6df92d91057de18ee675ad6c61a3da719a13117a Mon Sep 17 00:00:00 2001 From: Johann Werner Date: Tue, 19 May 2015 20:18:42 +0200 Subject: [PATCH 2/2] preserve complete URLs if context is set to --- .../Sources/er/extensions/components/_private/ERXWOForm.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 c2a75fdfb0f..31737b65a47 100644 --- a/Frameworks/Core/ERExtensions/Sources/er/extensions/components/_private/ERXWOForm.java +++ b/Frameworks/Core/ERExtensions/Sources/er/extensions/components/_private/ERXWOForm.java @@ -376,7 +376,7 @@ public void appendAttributesToResponse(WOResponse response, WOContext context) { boolean generatingCompleteURLs = context.doesGenerateCompleteURLs(); boolean requestIsSecure = context.secureMode(); boolean switchToCompleteURLs = secure ^ requestIsSecure; - if (switchToCompleteURLs) { + if (switchToCompleteURLs && !generatingCompleteURLs) { context.generateCompleteURLs(); } try { @@ -407,7 +407,7 @@ else if (_directActionName != null || _actionClass != null) { } } finally { - if (switchToCompleteURLs) { + if (switchToCompleteURLs && !generatingCompleteURLs) { context.generateRelativeURLs(); } }