aboutsummaryrefslogtreecommitdiff
path: root/tests/data/test1070
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-08-29 10:47:59 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-08-29 10:47:59 +0000
commitc67a99ff27036c824be15f01e21b91c3ec08da4a (patch)
treec2d84c831212e7b4f026764abadfa10b2312cf6e /tests/data/test1070
parentbae4e12302e783af59ad40cef3fb72c42a3bef17 (diff)
- When libcurl was doing a HTTP POST and the server would respond with
"Connection: close" and actually close the connection after the response-body, libcurl could still have outstanding data to send and it would not properly notice this and stop sending. This caused weirdness and sad faces. http://curl.haxx.se/bug/view.cgi?id=2080222 Note that there are still reasons to consider libcurl's behavior when getting a >= 400 response code while sending data, as Craig Perras' note "http upload: how to stop on error" specifies: http://curl.haxx.se/mail/archive-2008-08/0138.html
Diffstat (limited to 'tests/data/test1070')
-rw-r--r--tests/data/test107065
1 files changed, 65 insertions, 0 deletions
diff --git a/tests/data/test1070 b/tests/data/test1070
new file mode 100644
index 000000000..715e4a08d
--- /dev/null
+++ b/tests/data/test1070
@@ -0,0 +1,65 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 403 Go away and swsclose
+Server: test-server/fake
+Content-Type: text/html
+Content-Length: 55
+Connection: close
+
+you are not supposed to be allowed to send things here
+</data>
+<servercmd>
+skip: 2300
+</servercmd>
+</reply>
+
+#
+# Client-side
+<client>
+<server>
+http
+</server>
+ <name>
+HTTP POST with server sending error before (all) data is received
+ </name>
+ <command>
+ -d @log/input1070 http://%HOSTIP:%HTTPPORT/1070
+</command>
+<file name="log/input1070">
+This creates the named file with this content before the test case is run,
+which is useful if the test case needs a file to act on. We create this file
+rather large (larger than your typical TCP packet) so that not all of it can nor
+will be sent in one go as that is kind of the point of this test!
+
+Here's 2000 x 'O':
+OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO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OSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 2313
+Content-Type: application/x-www-form-urlencoded
+Expect: 100-continue
+
+This creates
+</protocol>
+</verify>
+</testcase>