mirror of
https://github.com/curl/curl.git
synced 2025-02-17 14:59:45 +08:00
http-proxy: fix chunked-encoded CONNECT responses
Regression since 5113ad0424
.
... and remove 'flaky' from test 1061 again
Closes #1579
This commit is contained in:
parent
12ccaed2a5
commit
01811b6740
@ -188,7 +188,6 @@ static CURLcode CONNECT(struct connectdata *conn,
|
|||||||
CURLcode result;
|
CURLcode result;
|
||||||
curl_socket_t tunnelsocket = conn->sock[sockindex];
|
curl_socket_t tunnelsocket = conn->sock[sockindex];
|
||||||
bool closeConnection = FALSE;
|
bool closeConnection = FALSE;
|
||||||
bool chunked_encoding = FALSE;
|
|
||||||
time_t check;
|
time_t check;
|
||||||
struct http_connect_state *s = conn->connect_state;
|
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
|
infof(data, "Ignore %" CURL_FORMAT_CURL_OFF_T
|
||||||
" bytes of response-body\n", s->cl);
|
" bytes of response-body\n", s->cl);
|
||||||
}
|
}
|
||||||
else if(chunked_encoding) {
|
else if(s->chunked_encoding) {
|
||||||
CHUNKcode r;
|
CHUNKcode r;
|
||||||
|
|
||||||
infof(data, "Ignore chunked response-body\n");
|
infof(data, "Ignore chunked response-body\n");
|
||||||
@ -541,7 +540,7 @@ static CURLcode CONNECT(struct connectdata *conn,
|
|||||||
else if(Curl_compareheader(s->line_start,
|
else if(Curl_compareheader(s->line_start,
|
||||||
"Transfer-Encoding:", "chunked")) {
|
"Transfer-Encoding:", "chunked")) {
|
||||||
infof(data, "CONNECT responded chunked\n");
|
infof(data, "CONNECT responded chunked\n");
|
||||||
chunked_encoding = TRUE;
|
s->chunked_encoding = TRUE;
|
||||||
/* init our chunky engine */
|
/* init our chunky engine */
|
||||||
Curl_httpchunk_init(conn);
|
Curl_httpchunk_init(conn);
|
||||||
}
|
}
|
||||||
|
@ -905,6 +905,7 @@ struct http_connect_state {
|
|||||||
char *line_start;
|
char *line_start;
|
||||||
char *ptr; /* where to store more data */
|
char *ptr; /* where to store more data */
|
||||||
curl_off_t cl; /* size of content to read and ignore */
|
curl_off_t cl; /* size of content to read and ignore */
|
||||||
|
bool chunked_encoding;
|
||||||
enum {
|
enum {
|
||||||
TUNNEL_INIT, /* init/default/no tunnel state */
|
TUNNEL_INIT, /* init/default/no tunnel state */
|
||||||
TUNNEL_CONNECT, /* CONNECT has been sent off */
|
TUNNEL_CONNECT, /* CONNECT has been sent off */
|
||||||
|
@ -8,7 +8,6 @@ HTTP proxy
|
|||||||
chunked Transfer-Encoding
|
chunked Transfer-Encoding
|
||||||
proxytunnel
|
proxytunnel
|
||||||
HTTP proxy Digest auth
|
HTTP proxy Digest auth
|
||||||
flaky
|
|
||||||
</keywords>
|
</keywords>
|
||||||
</info>
|
</info>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user