cookie: improve TAB handling
No binary (build failed)
—
(log yok)
| @@ -611,7 +611,7 @@ parse_cookie_header(struct Curl_easy *data, | |
| struct Curl_str name; | |
| /* we have a <name>=<value> pair or a stand-alone word here */ | |
| - | if(!curlx_str_cspn(&ptr, &name, ";\t\r\n=")) { |
| + | if(!curlx_str_cspn(&ptr, &name, ";\r\n=")) { |
| struct Curl_str val; | |
| bool sep = FALSE; | |
| curlx_str_trimblanks(&name); | |
| @@ -1997,7 +1997,7 @@ TESTCASES = \ | |
| test2721 \ | |
| test2722 \ | |
| test2723 \ | |
| - | \ |
| + | test2885 \ |
| test3000 \ | |
| test3001 \ | |
| test3002 \ | |
| @@ -0,0 +1,52 @@ | |
| + | <?xml version="1.0" encoding="US-ASCII"?> |
| + | <testcase> |
| + | <info> |
| + | <keywords> |
| + | HTTP |
| + | cookies |
| + | </keywords> |
| + | </info> |
| + | |
| + | <reply> |
| + | <data crlf="headers"> |
| + | HTTP/1.1 200 OK |
| + | Content-Length: 0 |
| + | Set-Cookie: thisis=SECRET;%TABSecure |
| + | Set-Cookie: also=notab; Secure |
| + | |
| + | </data> |
| + | </reply> |
| + | |
| + | <client> |
| + | <features> |
| + | cookies |
| + | </features> |
| + | <server> |
| + | https |
| + | </server> |
| + | <name> |
| + | Cookies with TAB before 'secure' |
| + | </name> |
| + | <command> |
| + | https://cookie.example:%HTTPSPORT/%TESTNUMBER -c %LOGDIR/cookies.txt --resolve cookie.example:%HTTPSPORT:%HOSTIP --insecure |
| + | </command> |
| + | </client> |
| + | |
| + | <verify> |
| + | <protocol crlf="headers"> |
| + | GET /%TESTNUMBER HTTP/1.1 |
| + | Host: cookie.example:%HTTPSPORT |
| + | User-Agent: curl/%VERSION |
| + | Accept: */* |
| + | |
| + | </protocol> |
| + | <file name="%LOGDIR/cookies.txt" mode="text"> |
| + | # Netscape HTTP Cookie File |
| + | # https://curl.se/docs/http-cookies.html |
| + | # This file was generated by libcurl! Edit at your own risk. |
| + | |
| + | cookie.example%TABFALSE%TAB/%TABTRUE%TAB0%TABalso%TABnotab |
| + | cookie.example%TABFALSE%TAB/%TABTRUE%TAB0%TABthisis%TABSECRET |
| + | </file> |
| + | </verify> |
| + | </testcase> |