Ticket #615 (new defect)

Opened 2 years ago

Last modified 3 weeks ago

mod_ssi has a hardcoded MIME type.

Reported by: SpookyET Assigned to: jan
Priority: high Milestone: 1.4.20
Component: mod_ssi Version: 1.4.x-svn
Severity: major Keywords: mod_ssi; mime type
Cc: Blocking:
Need Feedback: 0

Description

mimetype.assign = (

".xhtml" => "application/xhtml+xml", ".sxhtml" => "application/xhtml+xml")

$HTTPuseragent? =~ "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

Attachments

Change History

04/09/2007 05:43:28 PM changed by evan

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).

04/09/2007 10:52:07 PM changed by evan

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.

04/25/2008 09:25:01 AM changed by stbuehler

  • version changed from 1.4.11 to 1.4.x-svn.
  • blocking changed.
  • pending changed.
  • milestone set to 1.4.20.

Add/Change #615 (mod_ssi has a hardcoded MIME type.)




Change Properties