misc: remove strlen for Curl_checkheaders + Curl_checkProxyheaders

Closes #8409
This commit is contained in:
HenrikHolst 2022-02-09 00:57:00 +01:00 committed by Daniel Stenberg
parent 3738de3bd1
commit 9bc3cebc92
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
11 changed files with 80 additions and 63 deletions

View file

@ -94,10 +94,10 @@
* Returns a pointer to the first matching header or NULL if none matched.
*/
char *Curl_checkheaders(const struct Curl_easy *data,
const char *thisheader)
const char *thisheader,
const size_t thislen)
{
struct curl_slist *head;
size_t thislen = strlen(thisheader);
DEBUGASSERT(thislen);
DEBUGASSERT(thisheader[thislen-1] != ':');