mirror of
https://github.com/moparisthebest/curl
synced 2025-02-28 17:31:46 -05:00
tests: more multiple headers checks
This commit is contained in:
parent
dbcaa00657
commit
20690e412d
@ -69,7 +69,7 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
|
|||||||
test569 test570 test571 test572 test804 test805 test806 test807 test573 \
|
test569 test570 test571 test572 test804 test805 test806 test807 test573 \
|
||||||
test313 test1115 test578 test579 test1116 test1200 test1201 test1202 \
|
test313 test1115 test578 test579 test1116 test1200 test1201 test1202 \
|
||||||
test1203 test1117 test1118 test1119 test1120 test1300 test1301 test1302 \
|
test1203 test1117 test1118 test1119 test1120 test1300 test1301 test1302 \
|
||||||
test1303 test320 test321 test322 test323 test324
|
test1303 test320 test321 test322 test323 test324 test1121 test581
|
||||||
|
|
||||||
filecheck:
|
filecheck:
|
||||||
@mkdir test-place; \
|
@mkdir test-place; \
|
||||||
|
49
tests/data/test1121
Normal file
49
tests/data/test1121
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<testcase>
|
||||||
|
<info>
|
||||||
|
<keywords>
|
||||||
|
HTTP
|
||||||
|
</keywords>
|
||||||
|
</info>
|
||||||
|
#
|
||||||
|
# Server-side
|
||||||
|
<reply>
|
||||||
|
<data>
|
||||||
|
HTTP/1.0 200 OK
|
||||||
|
Server: test-server/fake
|
||||||
|
Content-Type: text/html
|
||||||
|
Content-Length: 6
|
||||||
|
|
||||||
|
blaha
|
||||||
|
</data>
|
||||||
|
</reply>
|
||||||
|
|
||||||
|
#
|
||||||
|
# Client-side
|
||||||
|
<client>
|
||||||
|
<server>
|
||||||
|
http
|
||||||
|
</server>
|
||||||
|
<name>
|
||||||
|
HTTP multiple provided Host: headers
|
||||||
|
</name>
|
||||||
|
<command>
|
||||||
|
-H "Host: host1" -H "Host: host2" -H "Host: host3" http://%HOSTIP:%HTTPPORT/1121
|
||||||
|
</command>
|
||||||
|
</client>
|
||||||
|
|
||||||
|
#
|
||||||
|
# Verify data after the test has been "shot"
|
||||||
|
<verify>
|
||||||
|
<strip>
|
||||||
|
^User-Agent:.*
|
||||||
|
</strip>
|
||||||
|
<protocol>
|
||||||
|
GET /1121 HTTP/1.1
|
||||||
|
Accept: */*
|
||||||
|
Host: host1
|
||||||
|
Host: host2
|
||||||
|
Host: host3
|
||||||
|
|
||||||
|
</protocol>
|
||||||
|
</verify>
|
||||||
|
</testcase>
|
58
tests/data/test581
Normal file
58
tests/data/test581
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<testcase>
|
||||||
|
<info>
|
||||||
|
<keywords>
|
||||||
|
HTTP
|
||||||
|
HTTP GET
|
||||||
|
multi
|
||||||
|
Duplicate-header
|
||||||
|
</keywords>
|
||||||
|
</info>
|
||||||
|
|
||||||
|
# Server-side
|
||||||
|
<reply>
|
||||||
|
<data>
|
||||||
|
HTTP/1.1 200 all good!
|
||||||
|
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||||
|
Server: test-server/fake
|
||||||
|
Content-Type: text/html
|
||||||
|
Content-Length: 0
|
||||||
|
Connection: close
|
||||||
|
Content-Type: changed/my/mind
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</reply>
|
||||||
|
|
||||||
|
# Client-side
|
||||||
|
<client>
|
||||||
|
<server>
|
||||||
|
http
|
||||||
|
</server>
|
||||||
|
<features>
|
||||||
|
http
|
||||||
|
</features>
|
||||||
|
# tool is what to use instead of 'curl'
|
||||||
|
<tool>
|
||||||
|
lib507
|
||||||
|
</tool>
|
||||||
|
|
||||||
|
<name>
|
||||||
|
multi interface, multiple Content-Type: headers
|
||||||
|
</name>
|
||||||
|
<command>
|
||||||
|
http://%HOSTIP:%HTTPPORT/581
|
||||||
|
</command>
|
||||||
|
</client>
|
||||||
|
|
||||||
|
# Verify data after the test has been "shot"
|
||||||
|
<verify>
|
||||||
|
<strip>
|
||||||
|
^User-Agent:.*
|
||||||
|
</strip>
|
||||||
|
<protocol>
|
||||||
|
GET /581 HTTP/1.1
|
||||||
|
Host: %HOSTIP:%HTTPPORT
|
||||||
|
Accept: */*
|
||||||
|
|
||||||
|
</protocol>
|
||||||
|
</verify>
|
||||||
|
</testcase>
|
Loading…
x
Reference in New Issue
Block a user