Re: Fwd: Re: pf: BAD state happens often with portsnap fetch update
- From: Chuck Swiger <cswiger@xxxxxxx>
- Date: Wed, 27 Dec 2006 19:47:32 -0500
Colin Percival wrote:
Chuck Swiger wrote:FYI, if you pass a:
Connection: keep-alive
...header in the request, Squid will not close the client->proxy
connection and you ought to be able to re-use it to make additional
requests.
In HTTP/1.1, connections are assumed to be persistent unless declared otherwise.
Yeah.
PS: Squid "supports HTTP/1.0 persistent connections", from which the HTTP/1.1
style keepalives derive-- and quick testing suggests these persistent
connections work with either HTTP/1.0 or 1.1 specified in the request.
Grr. I hate adding workarounds to improve compatibility with hopelessly
antique code (seriously, why doesn't squid support http/1.1 yet?),
See src/HttpMsg.c and/or grep for proxy_keepalive:
/* returns true if connection should be "persistent"
* after processing this message */
int
httpMsgIsPersistent(http_version_t http_ver, const HttpHeader * hdr)
{
#if WHEN_SQUID_IS_HTTP1_1
if ((http_ver.major >= 1) && (http_ver.minor >= 1)) {
/*
* for modern versions of HTTP: persistent unless there is
* a "Connection: close" header.
*/
return !httpHeaderHasConnDir(hdr, "close");
} else {
#else
[ ... ]
but I guess I'll make phttpget emit a completely bogus "Connection: Keep-Alive"
header to go along with its HTTP/1.1 requests.
There are lots of proxies and firewalls which restrict connections to HTTP/1.0 behavior besides Squid. It's not that horrible to have to request persistent connections explicitly if it solves the problem...and I hope it does.
--
-Chuck
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"
- References:
- Fwd: Re: pf: BAD state happens often with portsnap fetch update
- From: Adam McDougall
- Re: Fwd: Re: pf: BAD state happens often with portsnap fetch update
- From: Adam McDougall
- Re: Fwd: Re: pf: BAD state happens often with portsnap fetch update
- From: Colin Percival
- Re: Fwd: Re: pf: BAD state happens often with portsnap fetch update
- From: Max Laier
- Re: Fwd: Re: pf: BAD state happens often with portsnap fetch update
- From: Colin Percival
- Re: Fwd: Re: pf: BAD state happens often with portsnap fetch update
- From: Chuck Swiger
- Re: Fwd: Re: pf: BAD state happens often with portsnap fetch update
- From: Colin Percival
- Fwd: Re: pf: BAD state happens often with portsnap fetch update
- Prev by Date: Lots of READ_BIG errors on my new cd drive
- Next by Date: Re: Lots of READ_BIG errors on my new cd drive
- Previous by thread: Re: Fwd: Re: pf: BAD state happens often with portsnap fetch update
- Next by thread: Re: Fwd: Re: pf: BAD state happens often with portsnap fetch update
- Index(es):
Relevant Pages
|
|