TIP: redirect on filename extension

From: Nottingham, Mark (Australia) <mark_nottingham@dont-contact.us>
Date: Tue, 1 Jun 1999 10:48:15 +1000

Many people seem to be filtering on filename extension to restrict what type
of content is available through a corporate proxy. For instance, filtering
on the regex
\.mp3$
will keep mpeg audio from being downloaded through the proxy. (with a
redirector program such as the fantastic Squirm).

This isn't the most reliable method, mostly because the content provider can
easily give the filename another extension, while keeping the mime type the
same. Despite this, it does work for most cases, because the user doesn't
have control over the content.

HOWEVER, it is possible for users to bypass this redirection in some cases.
Because Web servers will ignore the query (?), parameter (;) and fragment
(#) portions of the URL, including them can bypass the redirector regex,
while still downloading the content. For instance,
http://www.foo.com/bar.mp3?
will, in many cases, get around the above regex.

If you'd like to be The Man and keep the people down, try a regex like this:

\.mp3([;#\?].*)*$

Cheers,

Mark Nottingham
Internet Project Manager
Merrill Lynch Australasia (Melbourne)
Received on Mon May 31 1999 - 18:29:33 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:46:31 MST