mirror of
https://github.com/curl/curl.git
synced 2026-08-24 13:03:35 +03:00
http2: allow CURLOPT_HTTPHEADER change ":scheme"
The only h2 psuedo header that wasn't previously possible to change by a user. This change also makes it impossible to send a HTTP/1 header that starts with a colon, which I don't think anyone does anyway. The other pseudo headers are possible to change indirectly by doing the rightly crafted request. Reported-by: siddharthchhabrap on github Fixes #8381 Closes #8393
This commit is contained in:
parent
136f3e9d68
commit
c85178a94c
2 changed files with 18 additions and 5 deletions
|
|
@ -1858,7 +1858,7 @@ CURLcode Curl_add_custom_headers(struct Curl_easy *data,
|
|||
ptr = optr;
|
||||
}
|
||||
}
|
||||
if(ptr) {
|
||||
if(ptr && (ptr != headers->data)) {
|
||||
/* we require a colon for this to be a true header */
|
||||
|
||||
ptr++; /* pass the colon */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue