Re: Newbie (possible) css/xhtml oddity..

Zak Johnson <[email protected]> Mon, 28 Jul 2003 20:31:05 -0400
Newsgroups gmane.comp.djb.publicfile
Message-ID <[email protected]>
On 2003-07-28 19:36-0400, Angelica wrote:
> I have an xhtml page that I have been working on, and well.. It shows up
> great in Internet Explorer and Netscape from an apache server but when I
> put it on publicfile the css's don't show and the page doesn't look
> right in mozilla and it's offspring.. (firebird, mozilla, and netscape).

publicfile as distributed does not know anything about *.css files, and
so serves them with a text/plain Content-Type header.  Uwe Ohse has a
patch which allows publicfile to read variables from its environment and
alter the default filetype:

	<URL:http://www.ohse.de/uwe/patches/publicfile-0.52-filetype-diff>

You'll also need to add the appropriate variable to publicfile's
environment (the following is untested, but should work):

	mkdir /service/httpd/env
	echo text/css >/service/httpd/env/CT_css
	sed -e 's}^exec e}exec envdir ./env e}' <run >run.tmp
	mv run.tmp run
	svc -t /service/httpd

> IE always looks correct no matter what server its on.

IE doesn't always (ever?) respect the Content-Type header.

-Zak