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

Bug 513537

Summary: Checking out branch with an encoded name leaves Git page inaccessible
Product: [ECD] Orion Reporter: Remy Suen <remy.suen>
Component: NodeAssignee: Remy Suen <remy.suen>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: Silenio_Quarti
Version: 13.0   
Target Milestone: 15.0   
Hardware: PC   
OS: Windows 10   
See Also: https://git.eclipse.org/r/92873
Whiteboard:

Description Remy Suen CLA 2017-03-13 01:39:24 EDT
orion.eclipse.org

1. File > New > Project > Git Repository
2. Use this link: https://github.com/octocat/Spoon-Knife.git
3. After the clone has completed, select the Spoon-Knife folder > Open Related > Git Log
4. Click the references drop down > New Branch > a%b
5. Click the references drop down > Delete your 'origin' remote.
6. Click the references drop down > Expand the local branches > Find a%b > Click the checkout icon.
7. This might succeed or it might fail. Regardless, try to refresh the page. You will now be stuck spinning forever.

The vast majority of users aren't going to hit this because they will have a remote Git repository somewhere. Still, there is no way to recover from this outside of using curl or something to send a request to the Orion server.
Comment 1 Eclipse Genie CLA 2017-03-13 02:09:00 EDT
New Gerrit change created: https://git.eclipse.org/r/92873
Comment 3 Silenio Quarti CLA 2017-03-22 17:28:40 EDT
I think this is causing an error when running the server behind an nginx proxy. I am not sure why the double encoding is needed. It may be a bug in the proxy.  The double encoding is done in other places.  We should figure out why it is needed. If there is a better soluction, remove it consistently.

GET https://dev-console.stage1.ng.bluemix.net/gitapi/commit/refs%252Fremotes%252Forigin%252Fmaster/devops/code/v6..master/file/org.eclipse.orion.client?page=1&pageSize=20&mergeBase=true 404 (Not Found)
i @ splash.js:1
(anonymous) @ git-repository.js:15
r @ splash.js:1
e @ splash.js:1
e @ splash.js:1
Comment 4 Remy Suen CLA 2017-03-22 19:09:51 EDT
(In reply to Silenio Quarti from comment #3)
> I think this is causing an error when running the server behind an nginx
> proxy.

Just to confirm, reverting the commit resolves the problem on your end, correct?
Comment 5 Silenio Quarti CLA 2017-03-23 09:54:24 EDT
yes, reverting fixes the problem
Comment 6 Silenio Quarti CLA 2017-03-23 15:41:18 EDT
I have released a alternative fix for the original problem which still works in the proxy case. 

https://git.eclipse.org/c/gerrit/orion/org.eclipse.orion.client.git/commit/?id=d92933359102e5a8fa34ee7d951c46f8fb78fd37