#8680 closed defect (fixed)
trac uses uncommon mimetype for javascript
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | normal | Milestone: | 0.12 |
Component: | rendering | Version: | 0.11-stable |
Severity: | normal | Keywords: | mimetype |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
trac uses text/x-javascript in its HTTP headers for Javascript files. Apache's default is application/x-javascript, many others use text/javascript.
Due to this uncommon mimetype, Firebug does not know anything about it and you can not debug these files. Changing the mimetype in trac solves that issue.
Attachments (0)
Change History (8)
comment:1 by , 15 years ago
Milestone: | → 0.11.6 |
---|
comment:4 by , 15 years ago
Note that I had to do it as well while working on query.js…
-
trac/mimeview/api.py
306 306 # Some common MIME types and their associated keywords and/or file extensions 307 307 308 308 KNOWN_MIME_TYPES = { 309 'application/javascript': ['js'], 309 310 'application/pdf': ['pdf'], 310 311 'application/postscript': ['ps'], 311 312 'application/rtf': ['rtf'], … … 339 340 'text/x-fortran': ['f'], 340 341 'text/x-haskell': ['hs'], 341 342 'text/x-ini': ['ini', 'cfg'], 342 'text/x-javascript': ['js'],343 343 'text/x-objc': ['m', 'mm'], 344 344 'text/x-ocaml': ['ml', 'mli'], 345 345 'text/x-makefile': ['make', 'mk',
I had some trouble getting any script to be displayed in the Script list in Firebug, but after I disabled all other plugins, it works.
Now re-enabling them one by one, …
comment:5 by , 15 years ago
Component: | general → rendering |
---|---|
Keywords: | mimetype added |
Milestone: | 0.11.6 → 0.12 |
Resolution: | → fixed |
Status: | new → closed |
Ok, committed the above in r8617 (could eventually be backported).
follow-up: 8 comment:7 by , 15 years ago
you can still commit this to 0.11stable (would be great actually as I'm developing mostly on 0.11). :-)
comment:8 by , 15 years ago
Replying to Felix Schwarz <felix.schwarz@…>:
you can still commit this to 0.11stable (would be great actually as I'm developing mostly on 0.11). :-)
Done in [8619].
According to RFC:4329#section-3, application/javascript should be preferred.
Would that also work for Firebug?