diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-09-30 10:29:46 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-09-30 16:35:12 +0200 |
commit | c24cf6c64c9ecff09d86ed2ab334df8c327f07f5 (patch) | |
tree | 1ba5bb97e31520ea224b68e018830817ecf38db8 /tests/unit | |
parent | 666a22675d17e46607759a27968eb51a412241e4 (diff) | |
download | curl-c24cf6c64c9ecff09d86ed2ab334df8c327f07f5.tar.gz |
altsvc: accept quoted ma and persist values
As mandated by the spec. Test 1654 is extended to verify.
Closes #4443
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/unit1654.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/unit/unit1654.c b/tests/unit/unit1654.c index 51fc5d16f..a800d9c3a 100644 --- a/tests/unit/unit1654.c +++ b/tests/unit/unit1654.c @@ -97,6 +97,15 @@ UNITTEST_START } fail_unless(asi->num == 9, "wrong number of entries"); + /* quoted 'ma' value */ + result = Curl_altsvc_parse(curl, asi, "h2=\"example.net:443\"; ma=\"180\";", + ALPN_h2, "example.net", 80); + if(result) { + fprintf(stderr, "Curl_altsvc_parse(4) failed!\n"); + unitfail++; + } + fail_unless(asi->num == 10, "wrong number of entries"); + result = Curl_altsvc_parse(curl, asi, "h2=\":443\", h3=\":443\"; ma = 120; persist = 1", ALPN_h1, "curl.haxx.se", 80); @@ -104,7 +113,7 @@ UNITTEST_START fprintf(stderr, "Curl_altsvc_parse(5) failed!\n"); unitfail++; } - fail_unless(asi->num == 11, "wrong number of entries"); + fail_unless(asi->num == 12, "wrong number of entries"); /* clear that one again and decrease the counter */ result = Curl_altsvc_parse(curl, asi, "clear;", @@ -113,7 +122,7 @@ UNITTEST_START fprintf(stderr, "Curl_altsvc_parse(6) failed!\n"); unitfail++; } - fail_unless(asi->num == 9, "wrong number of entries"); + fail_unless(asi->num == 10, "wrong number of entries"); Curl_altsvc_save(asi, outname); |