c-hyper: CONNECT respones are not server responses
Together with d31915a8db it makes test 265 run fine.
Fixes #8853
Assisted-by: Prithvi MK
Assisted-by: Sean McArthur
Closes #10060
This commit is contained in:
parent
d31915a8db
commit
c8d24d4e77
@ -174,8 +174,8 @@ static int hyper_each_header(void *userdata,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
data->info.header_size += (long)len;
|
data->info.header_size += (curl_off_t)len;
|
||||||
data->req.headerbytecount += (long)len;
|
data->req.headerbytecount += (curl_off_t)len;
|
||||||
return HYPER_ITER_CONTINUE;
|
return HYPER_ITER_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,23 +264,25 @@ static CURLcode status_line(struct Curl_easy *data,
|
|||||||
int writetype;
|
int writetype;
|
||||||
vstr = http_version == HYPER_HTTP_VERSION_1_1 ? "1.1" :
|
vstr = http_version == HYPER_HTTP_VERSION_1_1 ? "1.1" :
|
||||||
(http_version == HYPER_HTTP_VERSION_2 ? "2" : "1.0");
|
(http_version == HYPER_HTTP_VERSION_2 ? "2" : "1.0");
|
||||||
|
|
||||||
|
/* We need to set 'httpcodeq' for functions that check the response code in
|
||||||
|
a single place. */
|
||||||
|
data->req.httpcode = http_status;
|
||||||
|
|
||||||
|
if(data->state.hconnect)
|
||||||
|
/* CONNECT */
|
||||||
|
data->info.httpproxycode = http_status;
|
||||||
|
else {
|
||||||
conn->httpversion =
|
conn->httpversion =
|
||||||
http_version == HYPER_HTTP_VERSION_1_1 ? 11 :
|
http_version == HYPER_HTTP_VERSION_1_1 ? 11 :
|
||||||
(http_version == HYPER_HTTP_VERSION_2 ? 20 : 10);
|
(http_version == HYPER_HTTP_VERSION_2 ? 20 : 10);
|
||||||
if(http_version == HYPER_HTTP_VERSION_1_0)
|
if(http_version == HYPER_HTTP_VERSION_1_0)
|
||||||
data->state.httpwant = CURL_HTTP_VERSION_1_0;
|
data->state.httpwant = CURL_HTTP_VERSION_1_0;
|
||||||
|
|
||||||
if(data->state.hconnect)
|
|
||||||
/* CONNECT */
|
|
||||||
data->info.httpproxycode = http_status;
|
|
||||||
|
|
||||||
/* We need to set 'httpcodeq' for functions that check the response code in
|
|
||||||
a single place. */
|
|
||||||
data->req.httpcode = http_status;
|
|
||||||
|
|
||||||
result = Curl_http_statusline(data, conn);
|
result = Curl_http_statusline(data, conn);
|
||||||
if(result)
|
if(result)
|
||||||
return result;
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
Curl_dyn_reset(&data->state.headerb);
|
Curl_dyn_reset(&data->state.headerb);
|
||||||
|
|
||||||
@ -303,9 +305,8 @@ static CURLcode status_line(struct Curl_easy *data,
|
|||||||
if(result)
|
if(result)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
data->info.header_size += (long)len;
|
data->info.header_size += (curl_off_t)len;
|
||||||
data->req.headerbytecount += (long)len;
|
data->req.headerbytecount += (curl_off_t)len;
|
||||||
data->req.httpcode = http_status;
|
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -64,7 +64,6 @@
|
|||||||
# hyper support remains EXPERIMENTAL as long as there's a test number
|
# hyper support remains EXPERIMENTAL as long as there's a test number
|
||||||
# listed below
|
# listed below
|
||||||
%if hyper
|
%if hyper
|
||||||
265
|
|
||||||
266
|
266
|
||||||
565
|
565
|
||||||
579
|
579
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user