aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-08-30 12:51:32 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-08-30 12:51:32 +0000
commit05825a8a9f9ed6f4d3929f7f22b6fe10de02bf3f (patch)
treec7cf145bfb90c3a948110d9d047cf0c3dc555ef5
parent24353c4372a4ae7f084933a71150e0e90f91da4f (diff)
Make "Proxy-Connection: close" close the current proxy connection, as
Roman Koifman found out.
-rw-r--r--lib/transfer.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 7b22546a6..89985a724 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -735,6 +735,17 @@ CURLcode Curl_readwrite(struct connectdata *conn,
conn->bits.close = FALSE; /* don't close when done */
infof(data, "HTTP/1.0 proxy connection set to keep alive!\n");
}
+ else if((k->httpversion == 11) &&
+ conn->bits.httpproxy &&
+ Curl_compareheader(k->p,
+ "Proxy-Connection:", "close")) {
+ /*
+ * We get a HTTP/1.1 response from a proxy and it says it'll
+ * close down after this transfer.
+ */
+ conn->bits.close = TRUE; /* close when done */
+ infof(data, "HTTP/1.1 proxy connection set close!\n");
+ }
else if((k->httpversion == 10) &&
Curl_compareheader(k->p, "Connection:", "keep-alive")) {
/*