Ticket #3456 (closed defect: fixed)
Issue with SVG file and tracd standalone daemon
| Reported by: | eblot | Owned by: | eblot |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.10 |
| Component: | web frontend/tracd | Version: | devel |
| Severity: | normal | Keywords: | review |
| Cc: |
Description
I'm playing with the RevTree plugin which relies itself on the GraphvizPlugin.
When Trac is run with the tracd standalone daemon and the GraphvizPlugin outputs SVG data my browser only offers to save the file, rather than displaying the SVG graphics as an embedded image.
Using the LiveHttpHeaders extension for Firefox, it appears that tracd sends the SVG graphic as application/octet-stream content type, which is not a valid MIME type for SVG data.
Trac only relies on the Python mimetypes library to detect the MIME type of a file, whereas Trac implements a more powerful MIME type recognition scheme in trac.mimeview.api
I'm not sure whether the attached patch is valid, but it makes tracd to serve and identify properly the SVG files and eventually allows the GraphvizPlugin to work with the standalone tracd daemon.
Please comment.


