first draft

formating

Co-authored-by: Viktor Szakats <vszakats@users.noreply.github.com>

Update lib/url.c

Co-authored-by: Viktor Szakats <vszakats@users.noreply.github.com>

Update docs/libcurl/opts/CURLOPT_ALTSVC_CTRL.md

Co-authored-by: Daniel Stenberg <daniel@haxx.se>
This commit is contained in:
User 2025-04-23 13:13:10 +03:00 committed by nevakrien
parent 0a96b878f7
commit 01603f988e
6 changed files with 106 additions and 4 deletions

View file

@ -280,5 +280,7 @@ test3100 test3101 test3102 test3103 test3104 test3105 \
test3200 test3201 test3202 test3203 test3204 test3205 test3207 test3208 \
test3209 test3210 test3211 test3212 test3213 test3214 test3215 \
test4000 test4001
test3209 test3210 test3211 test3212 test3213 test3214 \
test3300
EXTRA_DIST = $(TESTCASES) DISABLED

63
tests/data/test3300 Normal file
View file

@ -0,0 +1,63 @@
<testcase>
<info>
<keywords>
HTTP
HTTP GET
Alt-Svc
onion
</keywords>
</info>
#
# Server-side
<reply>
<data>
HTTP/1.1 200 OK
Date: Tue, 09 Nov 2010 14:49:00 GMT
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
</server>
<name>
alt-svc using to an onion server
</name>
<setenv>
# make debug-curl accept Alt-Svc over plain HTTP
CURL_ALTSVC_HTTP="yeah"
</setenv>
<command>
--alt-svc "%LOGDIR/altsvc-%TESTNUMBER" "http://%HOSTIP:%HTTPPORT/%TESTNUMBER"
</command>
<file name="%LOGDIR/altsvc-%TESTNUMBER">
h1 %HOSTIP %HTTPPORT h1 bad.onion %HTTPPORT "20290222 22:19:28" 0 0
</file>
</client>
#
# Verify data after the test has been "shot"
<verify>
<protocol>
GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
</protocol>
</verify>
</testcase>