Skip to content

Instantly share code, notes, and snippets.

@xquery
Created April 11, 2020 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xquery/b61d135eff7aa2e2403c16ce224ea23c to your computer and use it in GitHub Desktop.
Save xquery/b61d135eff7aa2e2403c16ce224ea23c to your computer and use it in GitHub Desktop.
stripped down test
HTTP/1.1 400 Bad Request
Server: nghttpx
Content-Length: 129
Date: Sat, 11 Apr 2020 17:58:51 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
<!DOCTYPE html><html lang="en"><title>400 Bad Request</title><body><h1>400 Bad Request</h1><footer>nghttpx</footer></body></html>
<testcase>
<info>
<keywords>
HTTP
HTTP GET
Alt-Svc
HTTP/2
</keywords>
</info>
#
# Server-side
<reply>
<data nocheck="yes">
HTTP/1.1 200 OK
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
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>
alt-svc
debug
</features>
<server>
http
https
http/2
</server>
<name>
HTTP/2 GET with Upgrade:
</name>
<setenv>
# make debug-curl accept Alt-Svc over plain HTTP
CURL_ALTSVC_HTTP="yeah"
</setenv>
<command>
--alt-svc "log/altsvc-358" http://%HOSTIP:%HTTPSPORT/358 -v
</command>
<file name="log/altsvc-358">
h1 %HOSTIP %HTTPSPORT h2 %HOSTIP %HTTP2PORT "20290222 22:19:28" 0 0
</file>
</client>
#
# Verify data after the test has been "shot"
<verify>
</verify>
</testcase>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment