mirror of
https://github.com/curl/curl.git
synced 2026-07-24 19:07:17 +03:00
tests: add HTTP/3 test case, custom location for proper nghttpx
- adding support for HTTP/3 test cases via a nghttpx server that is
build with ngtcp2 and nghttp3.
- test2500 is the first test case, performing a simple GET.
- nghttpx is checked for support and the 'feature' nghttpx-h3
is set accordingly. test2500 will only run, when supported.
- a specific nghttpx location can be given in the environment
variable NGHTTPX or via the configure option
--with-test-nghttpx=<path>
Extend NGHTTPX config to H2 tests as well
* use $ENV{NGHTTPX} and the configured default also in http2 server starts
* always provide the empty test/nghttpx.conf to nghttpx. as it defaults to
reading /etc/nghttpx/nghttpx.conf otherwise.
Added nghttpx to CI ngtcp2 jobs to run h3 tests.
Closes #9031
This commit is contained in:
parent
0186ec41b1
commit
ca15b7512e
16 changed files with 582 additions and 24 deletions
|
|
@ -243,6 +243,8 @@ test2200 test2201 test2202 test2203 test2204 test2205 \
|
|||
\
|
||||
test2300 test2301 test2302 test2303 \
|
||||
\
|
||||
test2500 \
|
||||
\
|
||||
test3000 test3001 test3002 test3003 test3004 test3005 test3006 test3007 \
|
||||
test3008 test3009 test3010 test3011 test3012 test3013 test3014 test3015 \
|
||||
test3016 test3017 test3018 test3019 test3020 test3021 test3022 test3023 \
|
||||
|
|
|
|||
78
tests/data/test2500
Normal file
78
tests/data/test2500
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
<testcase http-crlf="yes">
|
||||
<info>
|
||||
<keywords>
|
||||
HTTP
|
||||
HTTP GET
|
||||
HTTP/3
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<data nocheck="yes">
|
||||
HTTP/1.1 200 OK
|
||||
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
||||
Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
|
||||
ETag: "21025-dc7-39462498"
|
||||
Accept-Ranges: bytes
|
||||
Content-Length: 6
|
||||
Connection: close
|
||||
Content-Type: text/html
|
||||
Funny-head: yesyes
|
||||
|
||||
-foo-
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
#
|
||||
# Client-side
|
||||
<client>
|
||||
<features>
|
||||
http/3
|
||||
nghttpx-h3
|
||||
</features>
|
||||
<server>
|
||||
http
|
||||
http/3
|
||||
</server>
|
||||
<name>
|
||||
HTTP/3 GET:
|
||||
</name>
|
||||
<command>
|
||||
--cacert %SRCDIR/certs/EdelCurlRoot-ca.crt --http3 --resolve localhost:%HTTP3PORT:%HOSTIP https://localhost:%HTTP3PORT/%TESTNUMBER
|
||||
</command>
|
||||
</client>
|
||||
|
||||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<strip>
|
||||
^X-Forwarded-Proto:.*
|
||||
^Via:.*
|
||||
</strip>
|
||||
<protocol>
|
||||
GET https://localhost:%HTTP3PORT/%TESTNUMBER HTTP/1.1
|
||||
Host: localhost:%HTTP3PORT
|
||||
User-Agent: curl/%VERSION
|
||||
Accept: */*
|
||||
|
||||
</protocol>
|
||||
<stdout crlf="yes">
|
||||
HTTP/3 200
|
||||
date: Tue, 09 Nov 2010 14:49:00 GMT
|
||||
last-modified: Tue, 13 Jun 2000 12:10:00 GMT
|
||||
etag: "21025-dc7-39462498"
|
||||
accept-ranges: bytes
|
||||
content-length: 6
|
||||
content-type: text/html
|
||||
funny-head: yesyes
|
||||
via: 1.1 nghttpx
|
||||
|
||||
-foo-
|
||||
</stdout>
|
||||
<stripfile>
|
||||
s/^server: nghttpx.*\r?\n//
|
||||
</stripfile>
|
||||
</verify>
|
||||
</testcase>
|
||||
Loading…
Add table
Add a link
Reference in a new issue