summaryrefslogtreecommitdiffstats
path: root/contrib/libs/curl/lib/c-hyper.c
diff options
context:
space:
mode:
authorrobot-contrib <[email protected]>2022-05-15 13:30:59 +0300
committerrobot-contrib <[email protected]>2022-05-15 13:30:59 +0300
commit00e5165677c67bdda88ef5b51216688eac357a3a (patch)
tree230fc76cb76d47655f8481f9ae231c3590f55bfa /contrib/libs/curl/lib/c-hyper.c
parent7a146619b8d5b192fddae23c34605f0494256956 (diff)
Update contrib/libs/curl to 7.83.1
ref:e0fbfbe6faf65e15f45ef0f846e92356916e91cf
Diffstat (limited to 'contrib/libs/curl/lib/c-hyper.c')
-rw-r--r--contrib/libs/curl/lib/c-hyper.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/libs/curl/lib/c-hyper.c b/contrib/libs/curl/lib/c-hyper.c
index 08722ff65d1..15e7ec0bb9d 100644
--- a/contrib/libs/curl/lib/c-hyper.c
+++ b/contrib/libs/curl/lib/c-hyper.c
@@ -439,6 +439,13 @@ CURLcode Curl_hyper_stream(struct Curl_easy *data,
reasonp = hyper_response_reason_phrase(resp);
reason_len = hyper_response_reason_phrase_len(resp);
+ if(http_status == 417 && data->state.expect100header) {
+ infof(data, "Got 417 while waiting for a 100");
+ data->state.disableexpect = TRUE;
+ data->req.newurl = strdup(data->state.url);
+ Curl_done_sending(data, k);
+ }
+
result = status_line(data, conn,
http_status, http_version, reasonp, reason_len);
if(result)
@@ -951,6 +958,11 @@ CURLcode Curl_http(struct Curl_easy *data, bool *done)
goto error;
}
}
+ else {
+ if(!h2 && !data->state.disableexpect) {
+ data->state.expect100header = TRUE;
+ }
+ }
if(hyper_request_set_method(req, (uint8_t *)method, strlen(method))) {
failf(data, "error setting method");