]> granicus.if.org Git - curl/commitdiff
test enforced chunked encoding with PUT on a local file
authorDaniel Stenberg <daniel@haxx.se>
Tue, 21 Dec 2004 20:19:05 +0000 (20:19 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 21 Dec 2004 20:19:05 +0000 (20:19 +0000)
tests/data/Makefile.am
tests/data/test218 [new file with mode: 0644]

index 1e8de001df355a5dea542dcdd54f98511ffae137..2374955436434536dd527a65b34b676b0f783ed8 100644 (file)
@@ -30,7 +30,7 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46        \
  test193 test194 test195 test196 test197 test198 test515 test516       \
  test517 test518 test210 test211 test212 test220 test221 test222       \
  test223 test224 test206 test207 test208 test209 test213 test240        \
- test241 test242 test519 test214 test215 test216 test217
+ test241 test242 test519 test214 test215 test216 test217 test218
 
 # The following tests have been removed from the dist since they no longer
 # work. We need to fix the test suite's FTPS server first, then bring them
diff --git a/tests/data/test218 b/tests/data/test218
new file mode 100644 (file)
index 0000000..73f193a
--- /dev/null
@@ -0,0 +1,51 @@
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.0 200 OK\r
+Server: test-server/fake\r
+Content-Type: text/html\r
+Content-Length: 6\r
+\r
+blaha
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP PUT from a file but enforce chunked transfer-encoding
+ </name>
+ <command>
+ -T log/file218 -H "Transfer-Encoding: chunked" http://%HOSTIP:%HTTPPORT/218
+</command>
+<file name="log/file218">
+just some tiny teeny contents
+</file>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+PUT /218 HTTP/1.1\r
+Host: 127.0.0.1:%HTTPPORT\r
+Pragma: no-cache\r
+Accept: */*\r
+Transfer-Encoding: chunked\r
+Expect: 100-continue\r
+\r
+1e\r
+just some tiny teeny contents
+\r
+0\r
+\r
+</protocol>
+</verify>