Search squid archive

Re: Trying to trouble-shot a squid redirector error

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

 



On Fri, 2007-11-02 at 12:01 -0500, ying lcs wrote:

> I am trying to setup squid redirector on squid 2.6 STABLE 16 based on
> content type. i.e. if squid sees content type == text/plain redirects
> to 'http://127.0.0.1/dummy.txt'.
> 
> A kind person helped me with this configuration for my needs:
> acl plain_content rep_mime_type -i text/plain
> redirect_program /usr/local/bin/myscript
> redirector_access allow plain_content
> #http_reply_access allow all
> icp_access allow all
> 
> 
> But I am still not able to get that to work.
> For example, when i request 127.0.0.1/plain.txt via squid, I expect I
> get the content of 127.0.0.1/dummy.txt (since squid redirect it based
> on content type), but I am getting content of 127.0.0.1/plain.txt.
> 
> Here is my access.log:
> 
> 1193971388.409     15 127.0.0.1 TCP_MISS/200 357 GET http://127.0.0.1/plain.txt
> - DIRECT/127.0.0.1 text/plain

Redirector programs work on HTTP requests. The reply content type is an
HTTP response property. By the time Squid knows the type, it is too late
to redirect anything.

Alex.



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

  Powered by Linux