Search squid archive

Re: urlpath_regex doesn't match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christoph Haas wrote:

On Thursday 16 March 2006 14:50, Marco Berizzi wrote:
> Christoph Haas wrote:
> >On Thursday 16 March 2006 14:19, Marco Berizzi wrote:
> > > I'm blocking download of .wmv files with acl urlpath_regex,
> > > but, for example, this wmv isn't catched by this rule:
> > >
> > > http://www.gametrailers.com/download.php?id=7174&type=wmv&f=
> > >
> > > squid.conf:
> > > acl trojans urlpath_regex \.wmv$
> > > http_access deny trojans
> >
> >The URL path here is probably: /download.php?
> >
> >And you are looking for anything that ends in ".wmv".
> >
> >So this doesn't match. Try http_reply_access with content type ACLs.
>
> What kind of acl should I implement?

Search your squid.conf for "rep_mime_type".

This the reply from the server:

Resolving www.gametrailers.com... 66.17.214.20, 66.17.214.37, 66.17.214.38
Connecting to www.gametrailers.com|66.17.214.20|:80... connected.
HTTP request sent, awaiting response...
 HTTP/1.1 200 OK
 Date: Thu, 16 Mar 2006 16:24:07 GMT
 Server: Apache/1.3.33 (Unix) PHP/4.3.11
 X-Powered-By: PHP/4.3.11
 Content-Length: 14773618
 Content-Disposition: attachment; filename="t_hl2_aftermath_hd.wmv"
 Keep-Alive: timeout=2, max=100
 Connection: Keep-Alive
 Content-Type: application/octet-stream
Length: 14,773,618 (14M) [application/octet-stream]

I cannot block all "octet-stream" with rep_mime_type, so I have tried
with "acl marcotrojans rep_header Content-Disposition -i \.wmv\"$
and it works. The is a problem with the " character. There some web
server (windoze) that doesn't put that char in the filename field. So
I have modified the regex to \.wmv?$ but it doesn't match.
Hints?



[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux