Description
When moin used as standalone server ?action=AttachFile&do=get function returns Content-Disposition: attachment; statement.
When EmbedObject macro is used to handle svg file Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7 popups "Open With" dialog.
The desired reaction is embed svg image into the page. Namely, when
[[EmbedObject(test.svg)]]
is used, and
import mimetypes mimetypes.add_type("image/svg+xml;", ".svg", True)
added to wikiconfig.py, then page contains
<OBJECT WIDTH="100%" HEIGHT="100%" TYPE="image/svg+xml" DATA="/MwFlow?action=AttachFile&do=get&target=test.svg" CODEBASE="http://purl.org/dc/dcmitype/StillImage"> <EMBED SRC="/MoinMoinBugs/ContentDispositionHandling?action=AttachFile&do=get&target=test.svg" WIDTH="100%" HEIGHT="100%" TYPE="image/svg+xml"> </EMBED> </OBJECT>
but instead of embeding Firefox opens "Open With" dialog window. The reason for this is Content-Disposition: attachment; statement in HTTP header.
Example
Current configuration does not allow embedding of the file test.svg because of its mimetype image/svg+xml.: test.svg
moinmoin.wikiwikiweb.de uses lighttpd, which sends Content-Disposition: inline;
Details
MoinMoin Version |
1.5.4 |
OS and Version |
Linux 2.6.9-34.ELsmp #1 SMP Fri Feb 24 16:54:53 EST 2006 i686 i686 i386 GNU/Linux |
Python Version |
Python 2.4.3 |
Server Setup |
standalone |
Server Details |
|
Language you are using the wiki in (set in the browser/UserPreferences) |
|
Workaround
change Content-Disposition: attachment; to Content-Disposition: inline; in action/AttachFile.py file.
Discussion
Plan
- Priority:
- Assigned to:
Status: Please upgrade to 1.5.5 or later (there is a workaround); related to ../CantOpenAttachmentsWithInternetExplorer