diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2022-07-12 12:03:53 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2022-07-12 12:03:53 +0300 |
commit | eeebfbedb3ea4cab5c0aac178b683b7dd26b0bf6 (patch) | |
tree | 4783d362be8e22467d0f5eb581ce6f65e33acb04 /contrib/libs/curl/lib/c-hyper.c | |
parent | 4213b519b93b5e3d657bc362837adfea82579dcc (diff) | |
download | ydb-eeebfbedb3ea4cab5c0aac178b683b7dd26b0bf6.tar.gz |
Update contrib/libs/curl to 7.84.0
Diffstat (limited to 'contrib/libs/curl/lib/c-hyper.c')
-rw-r--r-- | contrib/libs/curl/lib/c-hyper.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/contrib/libs/curl/lib/c-hyper.c b/contrib/libs/curl/lib/c-hyper.c index 15e7ec0bb9d..527d7cf62e7 100644 --- a/contrib/libs/curl/lib/c-hyper.c +++ b/contrib/libs/curl/lib/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")) && |