mirror of
https://github.com/curl/curl.git
synced 2026-08-24 21:43:32 +03:00
http-proxy: verify CONNECT response headers
Verifed by test 2107 Closes #21927
This commit is contained in:
parent
c7cba2fd2d
commit
62b118cf22
3 changed files with 56 additions and 1 deletions
|
|
@ -476,6 +476,12 @@ static CURLcode single_header(struct Curl_cfilter *cf,
|
|||
/* output debug if that is requested */
|
||||
Curl_debug(data, CURLINFO_HEADER_IN, linep, line_len);
|
||||
|
||||
/* a CONNECT response line is handed to the client as a header, so it must
|
||||
pass the same checks as a regular response header before delivery */
|
||||
result = Curl_verify_header(data, linep, line_len);
|
||||
if(result)
|
||||
return result;
|
||||
|
||||
/* send the header to the callback */
|
||||
writetype = CLIENTWRITE_HEADER | CLIENTWRITE_CONNECT |
|
||||
(ts->headerlines == 1 ? CLIENTWRITE_STATUS : 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue