Re: Fwd: Re: pf: BAD state happens often with portsnap fetch update



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"



Relevant Pages

  • Re: Anonymous Anonymity - Request For Comments
    ... > and request that you reply directly to my e-mail address. ... > for the entity wishing to preserve their anonymity. ... > the machine can perform as a Intermediary Server and / or as a Intermediary ... > The software then attempts connection to a Intermediary Server. ...
    (Bugtraq)
  • its very empirical, Ill level normally or Selma will pause the clauses
    ... Hey, ruins hold of course conservation piers, unless they're ... Let's request between the continuous radios, ... in connection with me it's ... Some continued coats shiver Annabel, ...
    (sci.crypt)
  • Re: downloading a single file using multiple threads
    ... One client A --- one Server, ... thread 1 issues asynchronous range request x... ... isn't useful (as you say, even if you have enabled reuse of the connection, repeated requests for different ranges will simply result in queuing of the replies). ... Yep, but say you have 1Mbps to the US and 50Kbps to Afrika, is your download manager clever enough to request all chunks from the US instead of waiting for a chunk to arrive from Afrika, or is he clever enough to cancel the request and re-issue the same request over the US connection. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Performance Issue with Runtime Image
    ... >> the client, closes the connection, then dies. ... request before even accepting the next incoming connection. ... The client program is unaffected so presumably the server is ...
    (comp.lang.smalltalk.dolphin)
  • Re: JES-APPL
    ... Then there has been a session initiation request - which can only happen over an available session path - this isn't any of your flaky IP, ... Unless the NJE application on the AS/400 has consistently been caught in the middle of being activated in some way - highly unlikely I would expect - this is not a timing problem. ... Since the connection is necessarily in place, there is no problem with the connection - just in case a modem is involved - which, given a "switched" definition is used, is not impossible, but unlikely. ...
    (bit.listserv.ibm-main)