mirror of
https://github.com/curl/curl.git
synced 2026-08-25 10:53:37 +03:00
hsts: support "implied LWS" properly around max-age
Adjust test 780 to verify. Reported-by: newfunction Closes #15330
This commit is contained in:
parent
288cfcbe38
commit
5ea61a0b54
2 changed files with 9 additions and 4 deletions
|
|
@ -159,7 +159,7 @@ CURLcode Curl_hsts_parse(struct hsts *h, const char *hostname,
|
|||
do {
|
||||
while(*p && ISBLANK(*p))
|
||||
p++;
|
||||
if(strncasecompare("max-age=", p, 8)) {
|
||||
if(strncasecompare("max-age", p, 7)) {
|
||||
bool quoted = FALSE;
|
||||
CURLofft offt;
|
||||
char *endp;
|
||||
|
|
@ -167,9 +167,14 @@ CURLcode Curl_hsts_parse(struct hsts *h, const char *hostname,
|
|||
if(gotma)
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
|
||||
p += 8;
|
||||
p += 7;
|
||||
while(*p && ISBLANK(*p))
|
||||
p++;
|
||||
if(*p++ != '=')
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
while(*p && ISBLANK(*p))
|
||||
p++;
|
||||
|
||||
if(*p == '\"') {
|
||||
p++;
|
||||
quoted = TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue