aboutsummaryrefslogtreecommitdiff
path: root/tests/data/test1411
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-04-04 14:50:18 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-04-04 15:46:35 +0200
commit42937f87e65554ec4b887a5bd0b34abdbf2e0977 (patch)
tree30f1ac7aa9b7aac7c1cced638570637f5939223b /tests/data/test1411
parentc81021f74796a391be739665fec64431a66325c4 (diff)
HTTP: don't send Content-Length: 0 _and_ Expect: 100-continue
Without request body there's no point in asking for 100-continue. Bug: http://curl.haxx.se/bug/view.cgi?id=1349 Reported-by: JimS
Diffstat (limited to 'tests/data/test1411')
-rw-r--r--tests/data/test141160
1 files changed, 60 insertions, 0 deletions
diff --git a/tests/data/test1411 b/tests/data/test1411
new file mode 100644
index 000000000..3ffd586de
--- /dev/null
+++ b/tests/data/test1411
@@ -0,0 +1,60 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+PUT
+</keywords>
+</info>
+
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+
+# make sure there's no Expect: 100-continue when there's no file to send!
+ <name>
+HTTP with zero size file PUT
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/1411 -T log/empty1411
+</command>
+# create an empty file
+<file name="log/empty1411">
+</file>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+PUT /1411 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 0
+
+</protocol>
+</verify>
+</testcase>