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

Bug 388448

Summary: Can't open git-repository page through self hosting site
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ServerAssignee: John Arthorne <john.arthorne>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: Szymon.Brandys
Version: 1.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2012-08-30 11:33:48 EDT
1. Create a new site
2. Click 'convert to self hosting', choose your cloned client repo.
3. Access the site, and go to the Git-repository page for the client repo.
4. The page doesn't load correctly -- I see an (X) beside the repo name, and the JS console shows errors such as:
> Unable to load http://localhost:8080/gitapi/commit/refs%2Fremotes%2Forigin%2Fmaster..HEAD/file/D/org.eclipse.orion.client/ status:0

The cause appears to be some bogus Location headers returned by API calls, for example a POST to this URL:
> http://new_self_host.orion.eclipse.org:8080/gitapi/commit/refs%252Fremotes%252Forigin%252Fmaster/file/D/org.eclipse.orion.client/?page=1&pageSize=20

... returns these response headers:

> Cache-Control:no-store
> Content-Encoding:gzip
> Content-Length:112
> Content-Type:application/json; charset=UTF-8
> Location:http://localhost:8080/gitapi/commit/refs%252Fremotes%252Forigin%252Fmaster..HEAD/file/D/org.eclipse.orion.client/
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Server:Jetty(8.1.3.v20120522)
> Via:1.1 (jetty)

Note the hostname is wrong. This could indicate a problem with the site hosting code's rewriting of Location headers.
Comment 1 John Arthorne CLA 2012-08-30 13:51:38 EDT
Not reproducible. Possibly a case of stale scripts in cache.