Feature #615
closedmod_ssi has a hardcoded MIME type.
Description
mimetype.assign = ( ".xhtml" => "application/xhtml+xml", ".sxhtml" => "application/xhtml+xml") $HTTP[[useragent]] =~ "MSIE" { mimetype.assign = ( ".xhtml" => "text/html", ".sxhtml" => "text/html") } ssi.extension = (".shtm", ".shtml", ".sxhtml")
.XHTML is sent as application/xhtml+xml
.SXHTML is sent as text/html
-- SpookyET
Updated by Anonymous over 17 years ago
Will this be fixed in 1.5? If I use #include SSI directives I do not need to use PHP at all on my site, but not being able to send out the correct MIME type prevents me from doing this (in my case, I cannot use inline SVG without sending out an application/xhtml+xml MIME type).
-- evan
Updated by Anonymous over 17 years ago
I just peeked at the code for mod_ssi.c and saw a line like this:
response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_STR_LEN("text/html"))
Since it looked like lighttpd was just overwriting whatever header was previously there, I commented out the line and recompiled. Sure enough, lighttpd serves the correct MIME type for my pages now. I'm obviously not familiar with the lighttpd codebase, but it could be the case that this line was just thrown in during the initial coding of mod_ssi to get things working, and can now be safely removed.
I did the modification with 1.4.13, but the code for 1.5.0-r1691 (the latest release on the download page) is exactly the same.
-- evan
Updated by stbuehler about 16 years ago
- Target version changed from 1.4.20 to 1.4.21
Updated by icy almost 16 years ago
- Target version changed from 1.4.21 to 1.4.22
- Patch available set to No
Updated by jannewmarch almost 16 years ago
I have an XML file (content-type type application/xml) with server-side includes. It gets its content-type set to text/html which stuffs up the XSLT stylesheets since the browser gets the wrong type. I tried removing the offending line in mod_ssi.c that sets the content-type and now it is fine. Is there some issue with removing that line from the production source, since it has been suggested several times and nothing has happened?
Cheers,
Jan
Updated by stbuehler almost 16 years ago
- Target version changed from 1.4.22 to 1.4.23
Updated by stbuehler over 15 years ago
- Assignee deleted (
jan) - Priority changed from High to Normal
Not setting the content-type is a bad idea.
Updated by stbuehler over 15 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset r2519.
Also available in: Atom