Hi all,
These fixes address two shortcomings in the "Fix MIME types" filter.
The first appears on pages with wrong mime types but no extension like:
www.somesite.com/
www.somesite.com/something
A thread about that is
here.
[HTTP headers]
In = TRUE
Out = FALSE
Key = "Content-Type:Fix MIME types (no extension) (LOG) (In)"
URL = "^([^/]+*.([a-z0-9]+{1,5})(?|(^?)))"
Match = "(text/*|^?|unknown)1&$LOG(CHDR_In CT_NoExt fixed: 1)"
Replace = "text/html"
The second is for URLs containing a query string with extension like:
http://www.somesite.com/something.htm?something.jpg
Since .jpeg is in the mime fix list of most config distributions (*not* the default one), the page won't be rendered as HTML.
This is the fix for
my version.
[HTTP headers]
In = TRUE
Out = FALSE
Key = "Content-Type: 1 Fix MIME types (mod S3) (LOG) (In)"
Match = "(text/*|^?|unknown)1 $URL([^/]+*.([a-z0-9]+{2,5}&&$LST(MIME-List))(?|(^?)))&$LOG(CHDR_In CT_Ext fixed: 1 to )"
Replace = " "
and this for the default version
[HTTP headers]
In = TRUE
Out = FALSE
Key = "Content-Type: Fix MIME types (In)"
Match = "text/* $URL([^/]+*.([a-z0-9]+{2,5}&&$LST(MIME-List))(?|(^?)))"
Replace = " "
Skip the &$LOG() thing for Prox below 4.3.
Watch out for word wrap.
BTW, the new code tag doesn't allow editing (but it's nice
).
regards, sidki
Edited by - sidki3003 on 26 Jul 2002 04:34:21