mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
three more HTTP tests added from the old test suite
This commit is contained in:
parent
e39e6c537e
commit
fe67ba6d2b
@ -5,7 +5,7 @@ test:
|
|||||||
[ -f test1 ] || ln -s $(srcdir)/test* .
|
[ -f test1 ] || ln -s $(srcdir)/test* .
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
test1 test102 test106 test13 test3 test400 test8 \
|
test1 test102 test106 test13 test17 test300 test5 test9 \
|
||||||
test10 test103 test107 test14 test300 test5 test9 \
|
test10 test103 test107 test14 test2 test33 test6 \
|
||||||
test100 test104 test11 test2 test33 test6 \
|
test100 test104 test11 test15 test200 test4 test7 \
|
||||||
test101 test105 test12 test200 test4 test7
|
test101 test105 test12 test16 test3 test400 test8
|
||||||
|
44
tests/data/test15
Normal file
44
tests/data/test15
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# Server-side
|
||||||
|
<reply>
|
||||||
|
<data nocheck=true>
|
||||||
|
HTTP/1.4 200 OK
|
||||||
|
Fake: yes
|
||||||
|
Fake: yes
|
||||||
|
Fake: yes
|
||||||
|
|
||||||
|
Repeated nonsense-headers
|
||||||
|
</data>
|
||||||
|
</reply>
|
||||||
|
|
||||||
|
# Client-side
|
||||||
|
<client>
|
||||||
|
<name>
|
||||||
|
--write-out test
|
||||||
|
</name>
|
||||||
|
<command>
|
||||||
|
http://%HOSTIP:%HOSTPORT/want/15 --write-out '%{url_effective} %{http_code} %{size_download}\n'
|
||||||
|
</command>
|
||||||
|
</test>
|
||||||
|
|
||||||
|
# Verify data after the test has been "shot"
|
||||||
|
<verify>
|
||||||
|
<stdout>
|
||||||
|
HTTP/1.4 200 OK
|
||||||
|
Fake: yes
|
||||||
|
Fake: yes
|
||||||
|
Fake: yes
|
||||||
|
|
||||||
|
Repeated nonsense-headers
|
||||||
|
http://127.0.0.1:8999/want/15 200 26
|
||||||
|
</stdout>
|
||||||
|
<strip>
|
||||||
|
^User-Agent:.*
|
||||||
|
</strip>
|
||||||
|
<protocol>
|
||||||
|
GET /want/15 HTTP/1.1
|
||||||
|
Host: 127.0.0.1:8999
|
||||||
|
Pragma: no-cache
|
||||||
|
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
|
||||||
|
|
||||||
|
</protocol>
|
||||||
|
</verify>
|
37
tests/data/test16
Normal file
37
tests/data/test16
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# Server-side
|
||||||
|
<reply>
|
||||||
|
<data>
|
||||||
|
HTTP/1.1 200 OK
|
||||||
|
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||||
|
Server: test-server/fake
|
||||||
|
Content-Type: text/html
|
||||||
|
Funny-head: yesyes
|
||||||
|
|
||||||
|
the content goes here
|
||||||
|
</data>
|
||||||
|
</reply>
|
||||||
|
|
||||||
|
# Client-side
|
||||||
|
<client>
|
||||||
|
<name>
|
||||||
|
HTTP with proxy athorization
|
||||||
|
</name>
|
||||||
|
<command>
|
||||||
|
-U fake@user:§§§looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong -x %HOSTIP:%HOSTPORT http://we.want.that.site.com/16
|
||||||
|
</command>
|
||||||
|
</test>
|
||||||
|
|
||||||
|
# Verify data after the test has been "shot"
|
||||||
|
<verify>
|
||||||
|
<strip>
|
||||||
|
^User-Agent:.*
|
||||||
|
</strip>
|
||||||
|
<protocol>
|
||||||
|
GET http://we.want.that.site.com/16 HTTP/1.1
|
||||||
|
Proxy-authorization: Basic ZmFrZUB1c2VyOqenp2xvb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb29vb28=
|
||||||
|
Host: we.want.that.site.com
|
||||||
|
Pragma: no-cache
|
||||||
|
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
|
||||||
|
|
||||||
|
</protocol>
|
||||||
|
</verify>
|
42
tests/data/test17
Normal file
42
tests/data/test17
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
# Server-side
|
||||||
|
<reply>
|
||||||
|
<data>
|
||||||
|
HTTP/1.1 200 OK
|
||||||
|
Funny-head: yesyes
|
||||||
|
|
||||||
|
This is the proof it works
|
||||||
|
</data>
|
||||||
|
</reply>
|
||||||
|
|
||||||
|
# Client-side
|
||||||
|
<client>
|
||||||
|
<name>
|
||||||
|
HTTP with config file on stdin
|
||||||
|
</name>
|
||||||
|
<stdin>
|
||||||
|
#
|
||||||
|
# Use a silly request without '--':
|
||||||
|
request MOOO
|
||||||
|
#
|
||||||
|
# Set the user-agent using a short-option:
|
||||||
|
-A "agent007 license to drill\t"
|
||||||
|
#
|
||||||
|
# long option *with* '--':
|
||||||
|
--max-time 180
|
||||||
|
</stdin>
|
||||||
|
<command>
|
||||||
|
-K - %HOSTIP:%HOSTPORT/that.site.com/17
|
||||||
|
</command>
|
||||||
|
</test>
|
||||||
|
|
||||||
|
# Verify data after the test has been "shot"
|
||||||
|
<verify>
|
||||||
|
<protocol>
|
||||||
|
MOOO /that.site.com/17 HTTP/1.1
|
||||||
|
User-Agent: agent007 license to drill
|
||||||
|
Host: 127.0.0.1:8999
|
||||||
|
Pragma: no-cache
|
||||||
|
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
|
||||||
|
|
||||||
|
</protocol>
|
||||||
|
</verify>
|
Loading…
Reference in New Issue
Block a user