summaryrefslogtreecommitdiffstats
path: root/lib/c-hyper.c
diff options
context:
space:
mode:
authorCurl Upstream <curl-library@lists.haxx.se>2022-05-11 06:11:15 (GMT)
committerBrad King <brad.king@kitware.com>2022-05-16 15:43:24 (GMT)
commit9d8f81f4f8ac4a234ced9c446958fdfcaed4faa3 (patch)
tree24a75f8e8a5f38c6d227189b3a76f4d35edb3dc0 /lib/c-hyper.c
parent2a9bc9ebf09fbafa5378d143083434204e9f233e (diff)
downloadCMake-9d8f81f4f8ac4a234ced9c446958fdfcaed4faa3.zip
CMake-9d8f81f4f8ac4a234ced9c446958fdfcaed4faa3.tar.gz
CMake-9d8f81f4f8ac4a234ced9c446958fdfcaed4faa3.tar.bz2
curl 2022-05-11 (462196e6)
Code extracted from: https://github.com/curl/curl.git at commit 462196e6b4a47f924293a0e26b8e9c23d37ac26f (curl-7_83_1).
Diffstat (limited to 'lib/c-hyper.c')
-rw-r--r--lib/c-hyper.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/c-hyper.c b/lib/c-hyper.c
index de09568..6908298 100644
--- a/lib/c-hyper.c
+++ b/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");