hyper: use 'alt-used'

Makes test 412+413 work

Closes #8898
This commit is contained in:
Daniel Stenberg 2022-05-23 16:47:17 +02:00
parent 6e489e00a5
commit 5a4dbb8ae3
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -1047,6 +1047,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")) &&