Closed
Bug 568500
Opened 15 years ago
Closed 15 years ago
Bugzilla does not send correct Content-Type for JSON template
Categories
(Bugzilla :: Extensions, enhancement)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.6
People
(Reporter: gerv, Assigned: gerv)
Details
(Whiteboard: bzapi)
Attachments
(1 file)
|
709 bytes,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
Bugzilla can be extended in a supported fashion by dropping in new templates.
http://www.bugzilla.org/docs/tip/en/html/cust-templates.html
The template to be used for a given request is chosen using the "ctype" parameter. However, Bugzilla currently only knows the correct Content Type for a few ctypes. The list is in Bugzilla/Constants.pm, the constant "contenttypes".
It knows: html, rdf, atom, xml, js, csv, png and ics.
If an admin adds a new template which is not one of those types, Bugzilla will not send a Content-Type at all. :-(( This means that, among other things, client software may default to guessing the type as text/html and also the charset as ISO-8859-1, both of which are incorrect, and the latter of which could lead to data corruption.
For these reasons Bugzilla should know about a good set of common content types admins may use. In particular, JSON.
Gerv
| Assignee | ||
Comment 1•15 years ago
|
||
Trivial patch.
Gerv
Comment 2•15 years ago
|
||
Comment on attachment 447769 [details] [diff] [review]
Patch v.1
Reasonable.
Attachment #447769 -
Flags: review?(mkanat) → review+
Updated•15 years ago
|
Flags: approval3.6+
Flags: approval+
Target Milestone: --- → Bugzilla 3.6
| Assignee | ||
Comment 3•15 years ago
|
||
http://bzr.mozilla.org/bugzilla/3.6/revision/7103
http://bzr.mozilla.org/bugzilla/trunk/revision/7200
(I've fixed the bug in my scripts which seems to have recorded the author as ''.)
Gerv
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•