aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-06-14 12:05:30 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-06-14 12:05:30 +0000
commitfe67ba6d2b2a0ed9d86d99003d51691fce0ee69a (patch)
treed4fff8c6f31ffa0b8a4bfcafdf9d996f27f21859
parente39e6c537ed575e2480dea1ef656cce32d726d17 (diff)
three more HTTP tests added from the old test suite
-rw-r--r--tests/data/Makefile.am8
-rw-r--r--tests/data/test1544
-rw-r--r--tests/data/test1637
-rw-r--r--tests/data/test1742
4 files changed, 127 insertions, 4 deletions
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index 3a00b2d25..2d25741c9 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -5,7 +5,7 @@ test:
[ -f test1 ] || ln -s $(srcdir)/test* .
EXTRA_DIST = \
-test1 test102 test106 test13 test3 test400 test8 \
-test10 test103 test107 test14 test300 test5 test9 \
-test100 test104 test11 test2 test33 test6 \
-test101 test105 test12 test200 test4 test7
+test1 test102 test106 test13 test17 test300 test5 test9 \
+test10 test103 test107 test14 test2 test33 test6 \
+test100 test104 test11 test15 test200 test4 test7 \
+test101 test105 test12 test16 test3 test400 test8
diff --git a/tests/data/test15 b/tests/data/test15
new file mode 100644
index 000000000..4a8953739
--- /dev/null
+++ b/tests/data/test15
@@ -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>
diff --git a/tests/data/test16 b/tests/data/test16
new file mode 100644
index 000000000..eadcedd83
--- /dev/null
+++ b/tests/data/test16
@@ -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>
diff --git a/tests/data/test17 b/tests/data/test17
new file mode 100644
index 000000000..ae799bd62
--- /dev/null
+++ b/tests/data/test17
@@ -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>