summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/http.c
diff options
context:
space:
mode:
authordartraiden <wowemuh@gmail.com>2023-10-11 18:36:33 +0300
committerdartraiden <wowemuh@gmail.com>2023-10-11 18:38:34 +0300
commitb7dfc6fda6f6b461f45a2ce457911bf128160208 (patch)
tree795d58d5d6d83c483022c3e14640f5999d0c0623 /libs/libcurl/src/http.c
parentf40b2ce583f05b0756c4552f2e46535bea2c0c39 (diff)
libcurl: update to 8.4.0
Diffstat (limited to 'libs/libcurl/src/http.c')
-rw-r--r--libs/libcurl/src/http.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libs/libcurl/src/http.c b/libs/libcurl/src/http.c
index 68d4bb3655..9b935d88e1 100644
--- a/libs/libcurl/src/http.c
+++ b/libs/libcurl/src/http.c
@@ -1139,6 +1139,8 @@ CURLcode Curl_http_input_auth(struct Curl_easy *data, bool proxy,
data->state.authproblem = TRUE;
}
}
+#else
+ ;
#endif
/* there may be multiple methods on one line, so keep reading */
@@ -1157,8 +1159,6 @@ CURLcode Curl_http_input_auth(struct Curl_easy *data, bool proxy,
* http_should_fail() determines whether an HTTP response has gotten us
* into an error state or not.
*
- * @param conn all information about the current connection
- *
* @retval FALSE communications should continue
*
* @retval TRUE communications should not continue
@@ -1602,8 +1602,6 @@ CURLcode Curl_http_done(struct Curl_easy *data,
data->state.authhost.multipass = FALSE;
data->state.authproxy.multipass = FALSE;
- Curl_unencode_cleanup(data);
-
/* set the proper values (possibly modified on POST) */
conn->seek_func = data->set.seek_func; /* restore */
conn->seek_client = data->set.seek_client; /* restore */
@@ -3970,18 +3968,23 @@ CURLcode Curl_bump_headersize(struct Curl_easy *data,
bool connect_only)
{
size_t bad = 0;
+ unsigned int max = MAX_HTTP_RESP_HEADER_SIZE;
if(delta < MAX_HTTP_RESP_HEADER_SIZE) {
+ data->info.header_size += (unsigned int)delta;
+ data->req.allheadercount += (unsigned int)delta;
if(!connect_only)
data->req.headerbytecount += (unsigned int)delta;
- data->info.header_size += (unsigned int)delta;
- if(data->info.header_size > MAX_HTTP_RESP_HEADER_SIZE)
+ if(data->req.allheadercount > max)
+ bad = data->req.allheadercount;
+ else if(data->info.header_size > (max * 20)) {
bad = data->info.header_size;
+ max *= 20;
+ }
}
else
- bad = data->info.header_size + delta;
+ bad = data->req.allheadercount + delta;
if(bad) {
- failf(data, "Too large response headers: %zu > %u",
- bad, MAX_HTTP_RESP_HEADER_SIZE);
+ failf(data, "Too large response headers: %zu > %u", bad, max);
return CURLE_RECV_ERROR;
}
return CURLE_OK;
@@ -4231,7 +4234,6 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data,
/* now, only output this if the header AND body are requested:
*/
writetype = CLIENTWRITE_HEADER |
- (data->set.include_header ? CLIENTWRITE_BODY : 0) |
((k->httpcode/100 == 1) ? CLIENTWRITE_1XX : 0);
headerlen = Curl_dyn_len(&data->state.headerb);
@@ -4563,8 +4565,6 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data,
/*
* End of header-checks. Write them to the client.
*/
- if(data->set.include_header)
- writetype |= CLIENTWRITE_BODY;
if(k->httpcode/100 == 1)
writetype |= CLIENTWRITE_1XX;