Re: [squid-users] Re: Does stale-if-error apply to a 400 status?

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 17 Nov 2010 16:50:48 +1300

> On Nov 16, 2010 5:31 PM, "Amos Jeffries" wrote:
> > On Tue, 16 Nov 2010 10:59:02 -0500, david robertson wrote:
> >> Sorry, I've forgotten the details again:
> >>
> >> Squid Cache: Version 2.7.STABLE9-20101104
> >> configure options: '--prefix=/squid2' '--enable-async-io'
> >> '--enable-icmp' '--enable-useragent-log' '--enable-snmp'
> >> '--enable-cache-digests' '--enable-follow-x-forwarded-for'
> >> '--enable-storeio=null,aufs' '--enable-removal-policies=heap,lru'
> >> '--with-maxfd=16384' '--enable-poll' '--disable-ident-lookups'
> >> '--enable-truncate' '--with-pthreads' 'CFLAGS=-DNUMS=60 -march=nocona
> >> -O3 -pipe -fomit-frame-pointer -funroll-loops -ffast-math
> >> -fno-exceptions' '--enable-htcp'
> >>
> >>
> >>
> >> On Tue, Nov 16, 2010 at 10:58 AM, david robertson wrote:
> >>> Hello, I have a bit of an urgent issue - Squid is serving 400
errors,
> >>> and I'd like to avoid that. Ideally, we want Squid to serve the
> >>> object that it has in cache, instead of the 400. I have
> >>> stale-if-error=1800 in the headers, but squid is still serving a 400
> >>> whenever it gets it from the origin (webserver). We don't want
400's
> >>> served at all.
> >>>
> >>> So, as the subject says, does a stale-if-error header apply to 400
> >>> status requests?
> >>>
> >
> > No, only 5xx retrieval errors
> > http://tools.ietf.org/html/draft-nottingham-http-stale-if-error-01
> > (section 3)
> >
> > 4xx are successful connections and updated responses from the server.
> >
> > Amos

On 17/11/10 15:38, david robertson wrote:
> Pretty sure the answerto my next question is no, but is there any way to
> specify which status codes are affected by negative_ttl? For example,
> cache 404 but not 400?

Correct. The answer is no.

Turning it off (0 seconds) lets Squid use the web server cache-control
and expires headers when present. Immediately discarding the page when
they are not present.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.9
   Beta testers wanted for 3.2.0.3
Received on Wed Nov 17 2010 - 03:50:53 MST

This archive was generated by hypermail 2.2.0 : Wed Nov 17 2010 - 12:00:03 MST