Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#8680 closed defect (fixed)

trac uses uncommon mimetype for javascript

Reported by: Felix Schwarz <felix.schwarz@…> 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 Christian Boos, 15 years ago

Milestone: 0.11.6

According to RFC:4329#section-3, application/javascript should be preferred.

Would that also work for Firebug?

comment:2 by Felix Schwarz <felix.schwarz@…>, 15 years ago

application/javascript is perfectly ok as well.

comment:3 by Remy Blank, 15 years ago

Owner: set to Remy Blank

Ok, I'll do that.

comment:4 by Christian Boos, 15 years ago

Note that I had to do it as well while working on query.js…

  • trac/mimeview/api.py

     
    306306# Some common MIME types and their associated keywords and/or file extensions
    307307
    308308KNOWN_MIME_TYPES = {
     309    'application/javascript': ['js'],
    309310    'application/pdf':        ['pdf'],
    310311    'application/postscript': ['ps'],
    311312    'application/rtf':        ['rtf'],
     
    339340    'text/x-fortran':         ['f'],
    340341    'text/x-haskell':         ['hs'],
    341342    'text/x-ini':             ['ini', 'cfg'],
    342     'text/x-javascript':      ['js'],
    343343    'text/x-objc':            ['m', 'mm'],
    344344    'text/x-ocaml':           ['ml', 'mli'],
    345345    '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 Christian Boos, 15 years ago

Component: generalrendering
Keywords: mimetype added
Milestone: 0.11.60.12
Resolution: fixed
Status: newclosed

Ok, committed the above in r8617 (could eventually be backported).

comment:6 by Remy Blank, 15 years ago

Owner: changed from Remy Blank to Christian Boos

Too bad, lost the race ;-)

comment:7 by Felix Schwarz <felix.schwarz@…>, 15 years ago

you can still commit this to 0.11stable (would be great actually as I'm developing mostly on 0.11). :-)

in reply to:  7 comment:8 by Remy Blank, 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].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.