mirror of
https://github.com/curl/curl.git
synced 2026-04-15 00:01:41 +03:00
altsvc: accept ma/persist per alternative entry
The 'ma' and 'persist' keywords should be considered per list entry, not once per header. Expand test 1654 to verify such headers Reported-by: Hunt Darlener Closes #20160
This commit is contained in:
parent
003dddae2b
commit
03c9215e62
3 changed files with 50 additions and 40 deletions
|
|
@ -48,6 +48,8 @@ h1 3.example.org 8080 h2 example.com 8080 "20190125 22:34:21" 0 0
|
|||
h1 3.example.org 8080 h3 yesyes.com 8080 "20190125 22:34:21" 0 0
|
||||
h2 example.org 80 h2 example.com 443 "20190124 22:36:21" 0 0
|
||||
h2 example.net 80 h2 example.net 443 "20190124 22:37:21" 0 0
|
||||
h2 test.se 443 h2 test2.se 443 "20190124 22:37:21" 0 0
|
||||
h2 test.se 443 h2 test3.se 443 "20190124 22:36:21" 0 0
|
||||
</file>
|
||||
</verify>
|
||||
</testcase>
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ static CURLcode test_unit1654(const char *arg)
|
|||
fail_unless(Curl_llist_count(&asi->list) == 10, "wrong number of entries");
|
||||
|
||||
res = Curl_altsvc_parse(curl, asi,
|
||||
"h2=\":443\", h3=\":443\"; "
|
||||
"h2=\":443\"; ma=180, h3=\":443\"; "
|
||||
"persist = \"1\"; ma = 120;\r\n",
|
||||
ALPN_h1, "curl.se", 80);
|
||||
fail_if(res, "Curl_altsvc_parse(6) failed!");
|
||||
|
|
@ -131,6 +131,12 @@ static CURLcode test_unit1654(const char *arg)
|
|||
ALPN_h2, "8.example.net", 80);
|
||||
fail_if(res, "Curl_altsvc_parse(11) failed!");
|
||||
|
||||
res = Curl_altsvc_parse(curl, asi,
|
||||
"h2=\"test2.se:443\"; ma=\"180 \" ; unknown=2, "
|
||||
"h2=\"test3.se:443\"; ma = 120;\r\n",
|
||||
ALPN_h2, "test.se", 443);
|
||||
fail_if(res, "Curl_altsvc_parse(12) failed!");
|
||||
|
||||
Curl_altsvc_save(curl, asi, outname);
|
||||
|
||||
curl_easy_cleanup(curl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue