Error Handler: URL protocol becomes httpss! | Community
Skip to main content
JS_Bournival
Level 3
October 16, 2015
Solved

Error Handler: URL protocol becomes httpss!

  • October 16, 2015
  • 4 replies
  • 1443 views


We're having a hard time finding the cause of a strange problem.  After we have enabled SSL on our publish instance, the error handler is page for 404s is behaving in a weird fashion: the JSP is receiving the original request, but the protocol is "httpss" (yes, another 'S', this is not a typo)

Have you ever seen something like this? I mean, the error handler mechanism is Sling and we haven't tampered with it other than enabling our own 404.jsp in /apps/sling/servlet/errorhandler

Again, if I inspect, inside the 404 JSP, the request URL:

request.getRequestURL().toString();

the URL protocol is httpss://..

Thanks you.

JS.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sham_HC

 stop the bundle org.apache.felix.org.apache.felix.http.sslfilter and verify. If solves the issue file daycare with dispatcher version, wheather ssl is used and sslfilter version number. 

4 replies

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

 stop the bundle org.apache.felix.org.apache.felix.http.sslfilter and verify. If solves the issue file daycare with dispatcher version, wheather ssl is used and sslfilter version number. 

JS_Bournival
Level 3
October 16, 2015

it worked.

we are using version 0.0.1.R1394715.

were you aware of this already?

JS_Bournival
Level 3
October 16, 2015

Ok got it.

In bundle version 0.0.1.R1394715, the class SslFilterRequest has a method:

public StringBuffer getRequestURL() { if (this.requestURL == null) { // insert an 's' after the http scheme StringBuffer tmp = super.getRequestURL(); tmp.insert(4, 's'); this.requestURL = tmp.toString(); } return new StringBuffer(this.requestURL); }

This method have been fixed in 0.0.1:

public StringBuffer getRequestURL() { if (this.requestURL == null) { StringBuffer tmp = super.getRequestURL(); if (tmp.indexOf(HTTP_SCHEME_PREFIX) == 0) { this.requestURL = HTTPS_SCHEME.concat(tmp.substring(4)); } else { this.requestURL = tmp.toString(); } } return new StringBuffer(this.requestURL); }
Sham_HC
Level 10
October 16, 2015

JS Bournival wrote...

it worked.

we are using version 0.0.1.R1394715.

were you aware of this already?

 

Was aware of it. But there was no hotfix I can share with you and hence asked to file daycare so that we can file official hotfix request along with jar.  Not all users are familiar like you to take latest jars & build/deploy yourself. hence did not proposed other ways.