-
Bug
-
Resolution: Won't Fix
-
Low
-
None
-
1.0
-
None
-
None
If the Accept header contains any of application/json, application/x-json, text/json, or text/x-json the request will return JSON. This is regardless of the quality or order specified. This does not match the expected behavior based on the spec at http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
$ curl -v -H 'Accept: application/json' 'https://stash.company.com/projects' 2>&1 | grep ' Content-Type' < Content-Type: application/json;charset=UTF-8
$ curl -v -H 'Accept: text/html' 'https://stash.company.com/projects' 2>&1 | grep ' Content-Type' < Content-Type: text/html;charset=UTF-8
$ curl -v -H 'Accept: text/html, application/json' 'https://stash.company.com/projects' 2>&1 | grep ' Content-Type' < Content-Type: application/json;charset=UTF-8
$ curl -v -H 'Accept: application/json;q=0.5,text/html' 'https://stash.company.com/projects' 2>&1 | grep ' Content-Type' < Content-Type: application/json;charset=UTF-8
$ curl -v -H 'Accept: text/html;q=0.9,application/json;q=0.5' 'https://stash.company.com/projects' 2>&1 | grep ' Content-Type' < Content-Type: application/json;charset=UTF-8
- duplicates
-
BSERV-4751 Stash responds with json if application/json is in Accept header
- Closed