mirror of
https://github.com/curl/curl.git
synced 2026-04-11 12:01:42 +08:00
Prior to this, -G would override the scheme set with --proto-default and revert back to guessing the scheme based on the hostname. Add test 2008 to verify the fix Spotted by Codex Security Closes #20992
50 lines
764 B
XML
50 lines
764 B
XML
<?xml version="1.0" encoding="US-ASCII"?>
|
|
<testcase>
|
|
<info>
|
|
<keywords>
|
|
HTTP
|
|
-G
|
|
--proto-default
|
|
</keywords>
|
|
</info>
|
|
|
|
# Server-side
|
|
<reply>
|
|
<data crlf="headers">
|
|
HTTP/1.1 200 OK
|
|
Content-Length: 6
|
|
Funny-head: yesyes
|
|
|
|
-foo-
|
|
</data>
|
|
</reply>
|
|
|
|
# Client-side
|
|
<client>
|
|
<features>
|
|
proxy
|
|
</features>
|
|
<server>
|
|
http
|
|
</server>
|
|
<name>
|
|
-G with --proto-default=http and scheme-less URL starting with "ftp"
|
|
</name>
|
|
<command>
|
|
ftp.test --proto-default=http --resolve ftp.test:80:%HOSTIP -G -d hello -x http://%HOSTIP:%HTTPPORT/
|
|
</command>
|
|
</client>
|
|
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<protocol crlf="headers">
|
|
GET http://ftp.test/?hello HTTP/1.1
|
|
Host: ftp.test
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
Proxy-Connection: Keep-Alive
|
|
|
|
</protocol>
|
|
</verify>
|
|
</testcase>
|