From 3a499099af52ddc69a3647767521c99c9e9c42e4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 4 Aug 2008 22:00:22 +0000 Subject: - Test cases 1051, 1052 and 1055 were added by Daniel Fandrich on July 30 and proved how PUT and POST with a redirect could lead to a "hang" due to the data stream not being rewound properly when it had to in order to get sent properly (again) to the subsequent URL. This is now fixed and these test cases are no longer disabled. --- tests/data/test1052 | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'tests/data/test1052') diff --git a/tests/data/test1052 b/tests/data/test1052 index fac7e7d2f..10c16b4a7 100644 --- a/tests/data/test1052 +++ b/tests/data/test1052 @@ -27,12 +27,12 @@ Content-Length: 51 If this is received, the location following worked -HTTP/1.0 301 Redirect +HTTP/1.0 301 Redirect swsclose Date: Thu, 29 Jul 2008 14:49:00 GMT Server: test-server/fake Location: data/10520002.txt?coolsite=yes Content-Length: 0 -Connection: Keep-Alive +Connection: close HTTP/1.0 200 Followed here fine swsclose Date: Thu, 29 Jul 2008 14:49:00 GMT @@ -72,13 +72,27 @@ the ^User-Agent:.* + +# The primary reason libcurl sends the data part twice in this test is that +# the test HTTP server is blocking until it has read the entire request, +# including the full request-body before it responds. So in this test the +# server says 301 and 200 _after_ the entire PUT body has been sent. -PUT /want/1052 HTTP/1.1 +PUT /want/1052 HTTP/1.0 Host: %HOSTIP:%HTTPPORT Accept: */* Content-Length: 78 -PUT /want/data/10520002.txt?coolsite=yes HTTP/1.1 +Weird + file + to + upload +for + testing +the + PUT + feature +PUT /want/data/10520002.txt?coolsite=yes HTTP/1.0 Host: %HOSTIP:%HTTPPORT Accept: */* Content-Length: 78 -- cgit v1.2.3