Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 512061 - File locations returned from the status API are not URL encoded
Summary: File locations returned from the status API are not URL encoded
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Git (show other bugs)
Version: 13.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 14.0   Edit
Assignee: Remy Suen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-11 07:23 EST by Remy Suen CLA
Modified: 2017-02-16 03:55 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2017-02-11 07:23:55 EST
orion.eclipse.org

1. Create an untracked file named 'a%b.txt' in a folder that's under Git version control.
2. Open the 'Git' page.
3. Try to expand the untracked file's node to look at its diff. You will stay in the 'fetching...' state forever.

There's a 400 in the console because the % is not being URL encoded. This is a bug in lib/git/status.js where the returned DiffLocation is not correctly returning a URL encoded file path in its JSON response.

GET http://localhost:8081/gitapi/diff/Default/file/modules/orionode/a%b.txt?parts=diff&ignoreWS=true 400 (Bad Request)
_xhr @ xhr.js:175
getDiffContent @ gitPlugin.js:347