[squid-users] Proxy-Connection: Keep-Alive
Which RFC describes Proxy-Connection: Keep-Alive ? Thank you Markus
Re: [squid-users] Proxy-Connection: Keep-Alive
On Tue, 5 Apr 2011 22:55:07 +0100, Markus Moeller wrote: Which RFC describes Proxy-Connection: Keep-Alive ? Thank you Markus AFAICT there is no RFC or even draft. It was a failed experiment from way, way back. Current Squid will no longer send it but may (only sometimes) treat it like Connection: which is defined in RFC 2068 By request of the HTTPbiz working group, this header is to be avoided and if possible dropped on sight. Amos
Re: [squid-users] Proxy-Connection: Keep-Alive in POST Requests?
Hi, Amos For example, we can not browse the following site's flash movie via squid-3.1.8. squid-3.1.9 could be ok. http://www.yomiuri.co.jp/stream/ - the famous japanese newspaper site - please check the only flash movie parts Probably, the following is the same topic. [squid-users] Squid 3.1.7 cannot load flash video in news.yahoo.com Sincerely, -- Mikio Kishi On Mon, Nov 1, 2010 at 4:47 AM, Amos Jeffries squ...@treenet.co.nz wrote: On 30/10/10 00:45, Mikio Kishi wrote: Hi, Henrik Was the post handling specification modified on squid-3.1.9 ? On 3.1.9, multi post requests in a http connection became OK. I think we still misunderstand each other on this thread... * Multiple POST on a connection has always been allowed. * Requiring them within a single connection is BAD. From 3.1.8+ re-use of connections is tried more than earlier releases. If those broken apps have started working it is more luck than any specs. --mkishi 2010/9/9 Henrik Nordströmhen...@henriknordstrom.net: ons 2010-09-08 klockan 14:46 +0900 skrev Mikio Kishi: It's still a feature, right ? On the Internet, there are some web applications which requires multi post requests in a http connection... Applications which require some special relation between connection and requests are per definition broken. Connections in HTTP are hop-by-hop, not end-to-end. There is no relation between connections made by clients to proxy and connections made by the proxy to requested servers. You can have N clients connections getting multiplexed over 1 server connection. Or 1 persistent client connection getting it's requests distributed over M server connections. Exact result depends on the traffic and policy of client, proxy and webserver, but the key is that client-proxy and proxy-server connections are fully independent. An exception to this is if you are using NTLM or Negotiate(kerberos) authentication, as those authentication protocols is not HTTP authentication schemes but TCP connection authentication schemes in direct violation with HTTP messaging rules. Regards Henrik Amos -- Please be using Current Stable Squid 2.7.STABLE9 or 3.1.8 Beta testers wanted for 3.2.0.2
Re: [squid-users] Proxy-Connection: Keep-Alive in POST Requests?
On 30/10/10 00:45, Mikio Kishi wrote: Hi, Henrik Was the post handling specification modified on squid-3.1.9 ? On 3.1.9, multi post requests in a http connection became OK. I think we still misunderstand each other on this thread... * Multiple POST on a connection has always been allowed. * Requiring them within a single connection is BAD. From 3.1.8+ re-use of connections is tried more than earlier releases. If those broken apps have started working it is more luck than any specs. --mkishi 2010/9/9 Henrik Nordströmhen...@henriknordstrom.net: ons 2010-09-08 klockan 14:46 +0900 skrev Mikio Kishi: It's still a feature, right ? On the Internet, there are some web applications which requires multi post requests in a http connection... Applications which require some special relation between connection and requests are per definition broken. Connections in HTTP are hop-by-hop, not end-to-end. There is no relation between connections made by clients to proxy and connections made by the proxy to requested servers. You can have N clients connections getting multiplexed over 1 server connection. Or 1 persistent client connection getting it's requests distributed over M server connections. Exact result depends on the traffic and policy of client, proxy and webserver, but the key is that client-proxy and proxy-server connections are fully independent. An exception to this is if you are using NTLM or Negotiate(kerberos) authentication, as those authentication protocols is not HTTP authentication schemes but TCP connection authentication schemes in direct violation with HTTP messaging rules. Regards Henrik Amos -- Please be using Current Stable Squid 2.7.STABLE9 or 3.1.8 Beta testers wanted for 3.2.0.2
Re: [squid-users] Proxy-Connection: Keep-Alive in POST Requests?
Hi, Henrik Was the post handling specification modified on squid-3.1.9 ? On 3.1.9, multi post requests in a http connection became OK. --mkishi 2010/9/9 Henrik Nordström hen...@henriknordstrom.net: ons 2010-09-08 klockan 14:46 +0900 skrev Mikio Kishi: It's still a feature, right ? On the Internet, there are some web applications which requires multi post requests in a http connection... Applications which require some special relation between connection and requests are per definition broken. Connections in HTTP are hop-by-hop, not end-to-end. There is no relation between connections made by clients to proxy and connections made by the proxy to requested servers. You can have N clients connections getting multiplexed over 1 server connection. Or 1 persistent client connection getting it's requests distributed over M server connections. Exact result depends on the traffic and policy of client, proxy and webserver, but the key is that client-proxy and proxy-server connections are fully independent. An exception to this is if you are using NTLM or Negotiate(kerberos) authentication, as those authentication protocols is not HTTP authentication schemes but TCP connection authentication schemes in direct violation with HTTP messaging rules. Regards Henrik
Re: [squid-users] Proxy-Connection: Keep-Alive in POST Requests?
ons 2010-09-08 klockan 14:46 +0900 skrev Mikio Kishi: It's still a feature, right ? On the Internet, there are some web applications which requires multi post requests in a http connection... Applications which require some special relation between connection and requests are per definition broken. Connections in HTTP are hop-by-hop, not end-to-end. There is no relation between connections made by clients to proxy and connections made by the proxy to requested servers. You can have N clients connections getting multiplexed over 1 server connection. Or 1 persistent client connection getting it's requests distributed over M server connections. Exact result depends on the traffic and policy of client, proxy and webserver, but the key is that client-proxy and proxy-server connections are fully independent. An exception to this is if you are using NTLM or Negotiate(kerberos) authentication, as those authentication protocols is not HTTP authentication schemes but TCP connection authentication schemes in direct violation with HTTP messaging rules. Regards Henrik
Re: [squid-users] Proxy-Connection: Keep-Alive in POST Requests?
On 08/09/10 17:46, Mikio Kishi wrote: Hi, Henrik fre 2007-04-13 klockan 22:25 +0200 skrev Sebastian Weber: Hendrik, thank you - that solved the problem. Now, I have a new one however: The client - proxy connection is kept alive correctly. The proxy - server connection, however, is not. Squid closes the connection to the server after the client issues a second request. After that, Squid opens a new connection to the server and sends the second request over a new connection. For POSTs yes. This is a feature, not a bug. The reason Squid does this is because it can not be certain that the server really supports persistent connections or that it is willing to accept the request, and terminating a POST mid-way due to the server closing the connection is very bad.. because of this Squid do not reuse connections for POST requests instead opening a new connection. It's still a feature, right ? Mostly. We are working on HTTP/1.1 features to avoid closing them. A lot of servers still require it though. On the Internet, there are some web applications which requires multi post requests in a http connection... Ah, well. *requiring* things beyond the RFCs (agreed compatible standards) is a well known cause of failure. Just ask anyone trying to use NTLM on a public website. The IP layer itself requires that every application using it to communicate be able to cope with connections being closed early. Amos -- Please be using Current Stable Squid 2.7.STABLE9 or 3.1.8 Beta testers wanted for 3.2.0.2
Re: [squid-users] Proxy-Connection: Keep-Alive in POST Requests?
Hi, Amos Ah, well. *requiring* things beyond the RFCs (agreed compatible standards) is a well known cause of failure. Just ask anyone trying to use NTLM on a public website. Is multiple POST requests in a http connection using keep-alive RFC violation ? --mkishi On Wed, Sep 8, 2010 at 3:47 PM, Amos Jeffries squ...@treenet.co.nz wrote: On 08/09/10 17:46, Mikio Kishi wrote: Hi, Henrik fre 2007-04-13 klockan 22:25 +0200 skrev Sebastian Weber: Hendrik, thank you - that solved the problem. Now, I have a new one however: The client - proxy connection is kept alive correctly. The proxy - server connection, however, is not. Squid closes the connection to the server after the client issues a second request. After that, Squid opens a new connection to the server and sends the second request over a new connection. For POSTs yes. This is a feature, not a bug. The reason Squid does this is because it can not be certain that the server really supports persistent connections or that it is willing to accept the request, and terminating a POST mid-way due to the server closing the connection is very bad.. because of this Squid do not reuse connections for POST requests instead opening a new connection. It's still a feature, right ? Mostly. We are working on HTTP/1.1 features to avoid closing them. A lot of servers still require it though. On the Internet, there are some web applications which requires multi post requests in a http connection... Ah, well. *requiring* things beyond the RFCs (agreed compatible standards) is a well known cause of failure. Just ask anyone trying to use NTLM on a public website. The IP layer itself requires that every application using it to communicate be able to cope with connections being closed early. Amos -- Please be using Current Stable Squid 2.7.STABLE9 or 3.1.8 Beta testers wanted for 3.2.0.2
Re: [squid-users] Proxy-Connection: Keep-Alive in POST Requests?
On Thu, 9 Sep 2010 01:46:35 +0900, Mikio Kishi mki...@104.net wrote: Hi, Amos Ah, well. *requiring* things beyond the RFCs (agreed compatible standards) is a well known cause of failure. Just ask anyone trying to use NTLM on a public website. Is multiple POST requests in a http connection using keep-alive RFC violation ? Not a violation as such. The RFCs *permit* keep-alive, going beyond that and prohibiting Connection: close in any app is broken. If I tell you that you are allowed to drink water, does that mean you are forced to drink ONLY water? no. Amos
Re: [squid-users] Proxy-Connection: Keep-Alive in POST Requests?
Hi, Henrik fre 2007-04-13 klockan 22:25 +0200 skrev Sebastian Weber: Hendrik, thank you - that solved the problem. Now, I have a new one however: The client - proxy connection is kept alive correctly. The proxy - server connection, however, is not. Squid closes the connection to the server after the client issues a second request. After that, Squid opens a new connection to the server and sends the second request over a new connection. For POSTs yes. This is a feature, not a bug. The reason Squid does this is because it can not be certain that the server really supports persistent connections or that it is willing to accept the request, and terminating a POST mid-way due to the server closing the connection is very bad.. because of this Squid do not reuse connections for POST requests instead opening a new connection. It's still a feature, right ? On the Internet, there are some web applications which requires multi post requests in a http connection... Sincerely, -- Mikio Kishi
Re: [squid-users] Proxy-Connection: Keep-Alive in POST Requests?
Hendrik, thank you - that solved the problem. Now, I have a new one however: The client - proxy connection is kept alive correctly. The proxy - server connection, however, is not. Squid closes the connection to the server after the client issues a second request. After that, Squid opens a new connection to the server and sends the second request over a new connection. You can reproduce this using two netcats - a client and a server netcat. This is the client netcat output ('' at the beginning of the line means sent data, '' means received data) $ nc localhost 3128 POST http://127.0.0.1:300/ HTTP/1.1 Host: 127.0.0.1 Content-Type: application/x-www-form-urlencoded Proxy-Connection: Keep-Alive Content-Length: 40 d=%3e3900%0a10%3aeNrz8QwO4eUCAAWnAVQA%0a HTTP/1.0 200 OK Content-Type: text/html Content-Length: 8 X-Cache: MISS from badda X-Cache-Lookup: MISS from badda:3128 Via: 1.0 badda:3128 (squid/2.6.STABLE12) Proxy-Connection: keep-alive 3900 OK POST http://127.0.0.1:300/ HTTP/1.1 Host: 127.0.0.1 Content-Type: application/x-www-form-urlencoded Proxy-Connection: Keep-Alive Content-Length: 40 d=%3e3900%0a10%3aeNrz8QwO4eUCAAWnAVQA%0a HTTP/1.0 503 Service Unavailable .. Now squid sends an error page and ends the connection This is the server netcat output $ nc -l -p 300 POST / HTTP/1.0 Host: 127.0.0.1:300 Content-Type: application/x-www-form-urlencoded Content-Length: 40 Via: 1.1 badda:3128 (squid/2.6.STABLE12) X-Forwarded-For: 127.0.0.1 Cache-Control: max-age=259200 Connection: keep-alive d=%3e3900%0a10%3aeNrz8QwO4eUCAAWnAVQA%0a HTTP/1.1 200 OK Connection: Keep-Alive Content-Type: text/html Content-Length: 8 3900 OK here, the connection breaks and netcat returns to the command prompt. Squid breaks the proxy-server connection exactly at the moment when the second request is issued. Is this a bug or am I doing something wrong? Regards, Sebastian Henrik Nordstrom wrote: The response to the POST request must be HTTP/1.0 keep-alive compatible, i.e. have a Content-Length. Your response do not have a Content-Length, and therefore HTTP/1.0 keep-alive can not be used as the only method available for terminating the response is to close the connection. Regards Henrik
Re: [squid-users] Proxy-Connection: Keep-Alive in POST Requests?
fre 2007-04-13 klockan 22:25 +0200 skrev Sebastian Weber: Hendrik, thank you - that solved the problem. Now, I have a new one however: The client - proxy connection is kept alive correctly. The proxy - server connection, however, is not. Squid closes the connection to the server after the client issues a second request. After that, Squid opens a new connection to the server and sends the second request over a new connection. For POSTs yes. This is a feature, not a bug. The reason Squid does this is because it can not be certain that the server really supports persistent connections or that it is willing to accept the request, and terminating a POST mid-way due to the server closing the connection is very bad.. because of this Squid do not reuse connections for POST requests instead opening a new connection. Regards Henrik signature.asc Description: Detta är en digitalt signerad meddelandedel
[squid-users] Proxy-Connection: Keep-Alive in POST Requests?
Hi all, I'm running squid 2.6.STABLE12 and have the following question: When a client connects to the proxy and issues a POST request with HTTP header Proxy-Connection: Keep-Alive, Squid always answers with Proxy-Connection: close Is there any way to make Squid accept a Keep-Alive on POST requests? Any advice is greatly appreciated. Regards, Sebastian
Re: [squid-users] Proxy-Connection: Keep-Alive in POST Requests?
tor 2007-04-12 klockan 12:35 +0200 skrev Sebastian Weber: I'm running squid 2.6.STABLE12 and have the following question: When a client connects to the proxy and issues a POST request with HTTP header Proxy-Connection: Keep-Alive, Squid always answers with Proxy-Connection: close Does it? Not for me. Is there any way to make Squid accept a Keep-Alive on POST requests? The response to the POST request must be HTTP/1.0 keep-alive compatible, i.e. have a Content-Length. Regards Henrik signature.asc Description: Detta är en digitalt signerad meddelandedel
Re: [squid-users] Proxy-Connection: Keep-Alive in POST Requests?
This is my request: POST http://127.0.0.1:81/tun/tunnel.php5?a=s HTTP/1.1 Host: 127.0.0.1 Authorization: Basic Content-Type: application/x-www-form-urlencoded Proxy-Connection: Keep-Alive Content-Length: 47 d=%3e3591%0a0%3aeNoLDXYNUkhKTElJ5OUCABfsA2MA%0a This is what I get in response from Squid: HTTP/1.0 200 OK Content-Type: text/html X-Cache: MISS from badda X-Cache-Lookup: MISS from badda:3128 Via: 1.0 badda:3128 (squid/2.6.STABLE12) Proxy-Connection: close 3591 OK Why doesn't Squid accept my Keep-Alive?
Re: [squid-users] Proxy-Connection: Keep-Alive in POST Requests?
tor 2007-04-12 klockan 13:56 +0200 skrev Sebastian Weber: This is what I get in response from Squid: HTTP/1.0 200 OK Content-Type: text/html X-Cache: MISS from badda X-Cache-Lookup: MISS from badda:3128 Via: 1.0 badda:3128 (squid/2.6.STABLE12) Proxy-Connection: close The response to the POST request must be HTTP/1.0 keep-alive compatible, i.e. have a Content-Length. Your response do not have a Content-Length, and therefore HTTP/1.0 keep-alive can not be used as the only method available for terminating the response is to close the connection. Regards Henrik signature.asc Description: Detta är en digitalt signerad meddelandedel