Chris Robertson wrote:
Amos Jeffries wrote:
Youenn Boussard wrote:
Hello the list,

  I put this directive in my squid.conf :

acl redirect rep_header Location .
no_cache deny redirect

So I expect that all response with Location header will be not cache.

Or when the first url is
HTTP/1.1 302 Moved Temporarily
Date: Thu, 28 Jan 2010 10:42:26 GMT
...
Expires: Fri, 29 Jan 2010 10:42:22 GMT
Location: ...
Cache-Control: max-age=3D86400, s-maxage=3D86400, public, proxy-revalidate
Content-Type: text/html;charset=3Dutf-8
...
X-Cache: MISS from ...
X-Cache-Lookup: MISS from ...:3128
Via: 1.0 ...:3128 (squid/2.6.STABLE23)

And the second :
HTTP/1.1 302 Moved Temporarily
Date: Thu, 28 Jan 2010 10:42:26 GMT
...
Expires: Fri, 29 Jan 2010 10:42:22 GMT
Location: ...
Cache-Control: max-age=3D86400, s-maxage=3D86400, public, proxy-revalidate
Content-Type: text/html;charset=3Dutf-8
Age: 30
X-Cache: HIT from frdplirzof1
X-Cache-Lookup: HIT from frdplirzof1:3128
Via: 1.0 ... (squid/2.6.STABLE23)

So the rule doesn't work. I don't why ?

Does .* instead of . in the rule work better?

Probably not. There appears to be a space between "Location" and the period.

Yeah. The squid.conf doc syntax says 'Header-Name regex-pattern" as two separate items. Which in Squid is space separated. I was just wondering if regex did something nasty and took a single . and omitted the otherwise implicit .* pre/suff-ix when a plain . was given.

A single dot does work for refresh_pattern though so no I was thinking badly when I wrote that.



(Not sure myself, your version is supposed to match)

Wouldn't "acl redirect http_status 302" work as an alternative (without the need to run the regex engine).

Not in 2.6. That old obsolete release we don't support anymore.

Amos
--
Please be using
  Current Stable Squid 2.7.STABLE7 or 3.0.STABLE21
  Current Beta Squid 3.1.0.15

Reply via email to