Closed
Bug 1496570
Opened 6 years ago
Closed 6 years ago
Bugzilla doesn't attempt to decode form-urlencoded data without a content-type header
Categories
(bugzilla.mozilla.org :: API, defect, P1)
Tracking
()
VERIFIED
FIXED
People
(Reporter: ericz, Assigned: dylan)
References
Details
Attachments
(1 file)
We have a script that synchronizes some data from Bugzilla to another service and it is currently logging this error:
[Thu Oct 04 20:00:18 2018] [ERROR] Error no=32000 talking to bugzilla: Could not parse the 'params' argument as valid JSON. Error: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "assigned_to=Rob@mozi...") at /app/Bugzilla/WebService/Server/REST.pm line 377. Value:
which I was told may be a bugzilla regression hence this bug.
Can you add the query you're using to fetch the data, and make the bug MoCo private if necessary?
Flags: needinfo?(eziegenhorn)
Assignee | ||
Comment 2•6 years ago
|
||
369 out of 14,273,121 requests seem to exhibit this bug.
We're going to get a fix out tomorrow, before Pacific Coast wakes up anyway.
Assignee: nobody → dylan
Priority: -- → P1
Updated•6 years ago
|
Component: General → API
Assignee | ||
Updated•6 years ago
|
Status: NEW → ASSIGNED
Summary: Possible API regression? → Bugzilla doesn't attempt to decode form-urlencoded data without a content-type header
Version: Staging → Production
Assignee | ||
Comment 3•6 years ago
|
||
Assignee | ||
Comment 4•6 years ago
|
||
The fix here is -- for the legacy CGI controller -- to assume 'application/x-www-form-urlencoded; charset=utf-8' when no content-type is present.
Comment 5•6 years ago
|
||
Merged to master.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 6•6 years ago
|
||
Works for me now, thanks! FWIW it took a while to track down but the app makes a POST to e.g. https://bugzilla.mozilla.org/rest/bug/1495719 with content like:
'assigned_to=johndoe@mozilla.com&token=23925-JfIavher'
Status: RESOLVED → VERIFIED
Flags: needinfo?(eziegenhorn)
You need to log in
before you can comment on or make changes to this bug.
Description
•