Closed
Bug 563021
Opened 16 years ago
Closed 16 years ago
Accept header ignored
Categories
(Webtools Graveyard :: BzAPI, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: briemers+bugzilla.mozilla.org, Assigned: gerv)
References
(
URL
)
Details
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.5.9-1.fc11 Firefox/3.5.9 GTB7.0
Build Identifier: 0.6
When uploading JSON the returned result is in JSON as well, regardless of the Accept header used in the request.
Reproducible: Always
Steps to Reproduce:
1. Create a file, say bug4.json which contains a request like the following:
{"classification":"Server Software","component":"Integrations","op_sys":"Windows XP","platform":"x86","product":"Testopia","severity":"major","status":"UNCONFIRMED","summary":"this is a test bug","version":"unspecified","comments":[{"is_private":false,"text":"this is a description"}]}
2. Issue a command like:
curl --compressed --data-binary @bug4.json -H 'Accept:application/xml' -H 'Content-Type:application/json' 'https://api-dev.bugzilla.mozilla.org/stage/latest/bug?username=...&password=...
3. Examine the output
Actual Results:
{"ref":"https://api-dev.bugzilla.mozilla.org/stage/latest/bug/552075","id":"552075"}
Expected Results:
<opt>
<data id="552075" ref="https://api-dev.bugzilla.mozilla.org/latest/bug/552075" />
</opt>
This is not the end of the world, since the JSON return value is simple enough to parse with a regular expression.... However, it would be nice if this was fixed.
| Assignee | ||
Comment 1•16 years ago
|
||
This is https://rt.cpan.org/Public/Bug/Display.html?id=46974 . I've fixed it by shipping yet more of Catalyst::Controller::REST directly with the app. The order is now:
1) URL parameter ("content-type")
2) Accept header
3) Content-Type header
4) application/json
Gerv
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•