tests: make sure CRLFs can't be used in URLs passed to proxy

Bug: http://curl.haxx.se/docs/adv_20150108B.html
This commit is contained in:
Daniel Stenberg
2014-12-25 23:51:43 +01:00
parent 178bd7db34
commit 3df8e78860
4 changed files with 109 additions and 3 deletions

43
tests/data/test1529 Normal file
View File

@@ -0,0 +1,43 @@
<testcase>
<info>
<keywords>
HTTP
HTTP GET
HTTP proxy
</keywords>
</info>
# Server-side
<reply>
<connect>
HTTP/1.1 200 OK
We-are: good
</connect>
</reply>
# Client-side
<client>
<server>
http
http-proxy
</server>
<tool>
lib1529
</tool>
<name>
HTTP request-injection in URL sent over proxy
</name>
<command>
"http://the.old.moo:%HTTPPORT/1529" %HOSTIP:%PROXYPORT
</command>
</client>
# it should be detected and an error should be reported
<verify>
# 3 == CURLE_URL_MALFORMAT
<errorcode>
3
</errorcode>
</verify>
</testcase>