Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 406554

Summary: URI unqualification fails for HTTPS
Product: [ECD] Orion Reporter: Michael Ochmann <michael.ochmann>
Component: ServerAssignee: Simon Kaegi <simon_kaegi>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mamacdon, simon_kaegi
Version: 3.0Flags: simon_kaegi: review+
Target Milestone: 3.0 RC2   
Hardware: All   
OS: All   
Whiteboard:

Description Michael Ochmann CLA 2013-04-25 09:18:34 EDT
org.eclipse.orion.server.servlets.JsonURIUnqualificationStrategy assumes that default port is always 80 (HTTP). However, if the Orion server is configured for HTTPS default port is 443 and URIs are not properly unqualified in JSON responses.
Comment 1 John Arthorne CLA 2013-04-25 09:29:04 EDT
There were significant changes in this class in the past two weeks to support WAR file deployment. Can you confirm exactly what version of Orion you are running on, and can you check if it is still reproducible. I see the unqualifyURI method is using port 80 if no port is specified. This may be the problem, but I would think any URL using a non-standard port would be specifying this in the URL.
Comment 2 Michael Ochmann CLA 2013-04-25 09:31:00 EDT
Working on the latest origin/master. Problem is that if server is running on SSL, implicit default port is 443, not 80.

Patch prosal:

repo:    https://github.com/mochmann/orion.server
branch:  bug406554
commit:  https://github.com/mochmann/orion.server/commit/7672ba1f4fe9ee46a4cb7f92f84fdb1799d44cb6

I assert that I authored 100% of the content of this contribution and have the rights to donate the content to Eclipse under the EPL .
Comment 3 Simon Kaegi CLA 2013-04-25 16:28:11 EDT
I can take a look at this. To be honest my hope is that we can remove this code altogether.
Comment 4 Simon Kaegi CLA 2013-06-17 14:21:32 EDT
Fixed in Master
Comment 5 Simon Kaegi CLA 2013-06-17 14:21:51 EDT
And of course... thanks Michael!