1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-24 00:58:48 -05:00

tests: fix some http/2 tests for older versions of nghttpx

- Add regex that strips http/2 server header name to those http/2 tests
  that don't already have it.

- Improve that regex in all http/2 tests.

Tests 358 and 359 were failing for me before this change on a system
that uses an older version of nghttpx which includes its version number
in the server header.

Closes https://github.com/curl/curl/pull/6139
This commit is contained in:
Jay Satiro 2020-10-29 00:06:27 -04:00
parent c80d510a1f
commit e4d38014cd
5 changed files with 5 additions and 11 deletions

View File

@ -82,7 +82,6 @@ accept-ranges: bytes
content-length: 6
content-type: text/html
funny-head: yesyes
server: cut-out
via: 1.1 nghttpx
-foo-
@ -90,13 +89,12 @@ HTTP/2 200
date: Thu, 09 Nov 2010 14:49:00 GMT
content-length: 6
content-type: text/html
server: cut-out
via: 1.1 nghttpx
-maa-
</stdout>
<stripfile>
s/^server:.*/server: cut-out /
s/^server: nghttpx.*\r?\n//
</stripfile>
</verify>
</testcase>

View File

@ -71,13 +71,12 @@ accept-ranges: bytes
content-length: 6
content-type: text/html
funny-head: yesyes
server: cut-out
via: 1.1 nghttpx
-foo-
</stdout>
<stripfile>
s/^server:.*/server: cut-out /
s/^server: nghttpx.*\r?\n//
</stripfile>
</verify>
</testcase>

View File

@ -67,12 +67,11 @@ accept-ranges: bytes
content-length: 6
content-type: text/html
funny-head: yesyes
server: cut-out
via: 1.1 nghttpx
</stdout>
<stripfile>
s/^server:.*/server: cut-out /
s/^server: nghttpx.*\r?\n//
</stripfile>
</verify>
</testcase>

View File

@ -65,7 +65,6 @@ content-length: 6
content-type: text/html
funny-head: yesyes
alt-svc: h2=":%HTTP2PORT", ma=315360000; persist=0
server: nghttpx
via: 1.1 nghttpx
-foo-
@ -75,12 +74,12 @@ content-length: 6
content-type: text/html
funny-head: yesyes
alt-svc: h2=":%HTTP2PORT", ma=315360000; persist=0
server: nghttpx
via: 1.1 nghttpx
-foo-
</stdout>
<stripfile>
s/^server: nghttpx.*\r?\n//
# strip out the (dynamic) expire date from the file so that the rest
# matches
s/\"2([^\"]*)\"/TIMESTAMP/

View File

@ -65,7 +65,6 @@ content-length: 6
content-type: text/html
funny-head: yesyes
alt-svc: h2=":%HTTP2PORT", ma=315360000; persist=0
server: nghttpx
via: 1.1 nghttpx
-foo-
@ -75,12 +74,12 @@ content-length: 6
content-type: text/html
funny-head: yesyes
alt-svc: h2=":%HTTP2PORT", ma=315360000; persist=0
server: nghttpx
via: 1.1 nghttpx
-foo-
</stdout>
<stripfile>
s/^server: nghttpx.*\r?\n//
# strip out the (dynamic) expire date from the file so that the rest
# matches
s/\"2([^\"]*)\"/TIMESTAMP/