aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-06-16 17:30:39 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-06-16 21:56:56 +0200
commit01811b67405c54960c2175075691f59a0d066068 (patch)
treec8f5fb21129257819acc52e90ce4dfd97546fdfc /lib
parent12ccaed2a53c07edb12f5b4e944d3a78e6a6fa0c (diff)
http-proxy: fix chunked-encoded CONNECT responses
Regression since 5113ad0424. ... and remove 'flaky' from test 1061 again Closes #1579
Diffstat (limited to 'lib')
-rw-r--r--lib/http_proxy.c5
-rw-r--r--lib/urldata.h1
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/http_proxy.c b/lib/http_proxy.c
index bb788bd2e..e1545ddf4 100644
--- a/lib/http_proxy.c
+++ b/lib/http_proxy.c
@@ -188,7 +188,6 @@ static CURLcode CONNECT(struct connectdata *conn,
CURLcode result;
curl_socket_t tunnelsocket = conn->sock[sockindex];
bool closeConnection = FALSE;
- bool chunked_encoding = FALSE;
time_t check;
struct http_connect_state *s = conn->connect_state;
@@ -454,7 +453,7 @@ static CURLcode CONNECT(struct connectdata *conn,
infof(data, "Ignore %" CURL_FORMAT_CURL_OFF_T
" bytes of response-body\n", s->cl);
}
- else if(chunked_encoding) {
+ else if(s->chunked_encoding) {
CHUNKcode r;
infof(data, "Ignore chunked response-body\n");
@@ -541,7 +540,7 @@ static CURLcode CONNECT(struct connectdata *conn,
else if(Curl_compareheader(s->line_start,
"Transfer-Encoding:", "chunked")) {
infof(data, "CONNECT responded chunked\n");
- chunked_encoding = TRUE;
+ s->chunked_encoding = TRUE;
/* init our chunky engine */
Curl_httpchunk_init(conn);
}
diff --git a/lib/urldata.h b/lib/urldata.h
index 23423e11b..62037d0f2 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -905,6 +905,7 @@ struct http_connect_state {
char *line_start;
char *ptr; /* where to store more data */
curl_off_t cl; /* size of content to read and ignore */
+ bool chunked_encoding;
enum {
TUNNEL_INIT, /* init/default/no tunnel state */
TUNNEL_CONNECT, /* CONNECT has been sent off */