summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/c-hyper.c
diff options
context:
space:
mode:
authordartraiden <wowemuh@gmail.com>2022-07-02 23:09:35 +0300
committerdartraiden <wowemuh@gmail.com>2022-07-02 23:09:35 +0300
commit5882ac58f5d5cbcfa9f9d4015285d4f5d2b7c755 (patch)
treeab1c3cd0b9893ecfef62702fbb9811f610b8b224 /libs/libcurl/src/c-hyper.c
parent59efa751fe2e8189c625b67d9c98b7155e59022e (diff)
libcurl: update to 7.84.0
Diffstat (limited to 'libs/libcurl/src/c-hyper.c')
-rw-r--r--libs/libcurl/src/c-hyper.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/libs/libcurl/src/c-hyper.c b/libs/libcurl/src/c-hyper.c
index 69082982cf..69b904e531 100644
--- a/libs/libcurl/src/c-hyper.c
+++ b/libs/libcurl/src/c-hyper.c
@@ -18,6 +18,8 @@
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
+ * SPDX-License-Identifier: curl
+ *
***************************************************************************/
#include "curl_setup.h"
@@ -288,7 +290,7 @@ static CURLcode status_line(struct Curl_easy *data,
len);
if(!data->state.hconnect || !data->set.suppress_connect_headers) {
- writetype = CLIENTWRITE_HEADER;
+ writetype = CLIENTWRITE_HEADER|CLIENTWRITE_STATUS;
if(data->set.include_header)
writetype |= CLIENTWRITE_BODY;
result = Curl_client_write(data, writetype,
@@ -1047,6 +1049,21 @@ CURLcode Curl_http(struct Curl_easy *data, bool *done)
goto error;
}
+#ifndef CURL_DISABLE_ALTSVC
+ if(conn->bits.altused && !Curl_checkheaders(data, STRCONST("Alt-Used"))) {
+ char *altused = aprintf("Alt-Used: %s:%d\r\n",
+ conn->conn_to_host.name, conn->conn_to_port);
+ if(!altused) {
+ result = CURLE_OUT_OF_MEMORY;
+ goto error;
+ }
+ result = Curl_hyper_header(data, headers, altused);
+ if(result)
+ goto error;
+ free(altused);
+ }
+#endif
+
#ifndef CURL_DISABLE_PROXY
if(conn->bits.httpproxy && !conn->bits.tunnel_proxy &&
!Curl_checkheaders(data, STRCONST("Proxy-Connection")) &&