curl_easy_header: Add CURLH_PSEUDO to sanity check

Fixes #9235
Closes #9236
This commit is contained in:
Andrew Lambert 2022-07-31 14:21:09 -07:00 committed by Daniel Stenberg
parent ce8031d369
commit 4641575fcd
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -74,8 +74,8 @@ CURLHcode curl_easy_header(CURL *easy,
struct Curl_header_store *hs = NULL;
struct Curl_header_store *pick = NULL;
if(!name || !hout || !data ||
(type > (CURLH_HEADER|CURLH_TRAILER|CURLH_CONNECT|CURLH_1XX)) ||
!type || (request < -1))
(type > (CURLH_HEADER|CURLH_TRAILER|CURLH_CONNECT|CURLH_1XX|
CURLH_PSEUDO)) || !type || (request < -1))
return CURLHE_BAD_ARGUMENT;
if(!Curl_llist_count(&data->state.httphdrs))
return CURLHE_NOHEADERS; /* no headers available */