Skip to content
This repository has been archived by the owner on May 9, 2020. It is now read-only.

Commit

Permalink
"Applied fix from trunk for revision: 1394995"
Browse files Browse the repository at this point in the history
------------------------------------------------------------------------
r1394995 | jleroux | 2012-10-06 12:59:12 +0200 (sam., 06 oct. 2012) | 9 lines

A modified patch from  Jyoti Sharma https://issues.apache.org/jira/browse/OFBIZ-5043

When i worked with Url Rewrite Filter, i faced the following issue:-
In case of http protocol in the url, https links on th epage were not being rewritten and when their was https url, http links were not rewritten.

The issue behind this what i found is that in RequestHandler.java encodeUrl() is not called in the above given case.
So, if we place response.encodeUrl() their the issue is resolved. 

jleroux: This makes sense since we are still in the "if (encode) {" block. I just noticed that response != null was checked above so I placed the same check before encoding
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/branches/release11.04@1395036 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
JacquesLeRoux committed Oct 6, 2012
1 parent aebe397 commit 9dcddb8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,11 @@ public String makeLink(HttpServletRequest request, HttpServletResponse response,
newURL.insert(questionIndex, sessionId);
}
}
encodedUrl = newURL.toString();
if (response != null) {
encodedUrl = response.encodeURL(newURL.toString());
} else {
encodedUrl = newURL.toString();
}
}
} else {
encodedUrl = newURL.toString();
Expand Down

0 comments on commit 9dcddb8

Please sign in to comment.