Old Proxomitron Forums
October 21, 2014, 01:01:45 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: No activity here! This forum is read-only. Go to http://prxbx.com/forums/index.php.
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Fix Mime Type Fixes :)  (Read 975 times)
sidki3003

Sr. Member
****
Posts: 476


View Profile WWW Email
« on: July 25, 2002, 06:32:45 PM »

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
Logged

 
Arne

Administrator
Hero Member
*****
Posts: 778

1448105 aflaaten arneflaa
View Profile WWW Email
« Reply #1 on: July 25, 2002, 06:50:35 PM »

It is an old experiment I did a few months ago. It sneaked in while I had to reupload files getting damaged on the server. I have found the original one now and uploaded the correct one.

The other one I had been experimenting with locally, was not finished. I had even forgotten about it LOL. I might take it up again one day and finish it. It did look kind of good though And this reminded me where I left off that night - at the editing point.

Best wishes
Arne
Imici username= Arne
Logged

Best wishes
Arne
Imici username= Arne
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!