Expand my Community achievements bar.

SOLVED

Error Handler: URL protocol becomes httpss!

Avatar

Level 4


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.

1 Accepted Solution

Avatar

Correct answer by
Level 10

 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. 

View solution in original post

4 Replies

Avatar

Correct answer by
Level 10

 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. 

Avatar

Level 4

it worked.

we are using version 0.0.1.R1394715.

were you aware of this already?

Avatar

Level 4

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); }

Avatar

Level 10

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.