From 9bc2582c31d10b49f9070a99848e96951f6b66c5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 30 Oct 2014 14:54:59 +0100 Subject: resume: consider a resume from [content-length] to be OK Basically since servers often then don't respond well to this and instead send the full contents and then libcurl would instead error out with the assumption that the server doesn't support resume. As the data is then already transfered, this is now considered fine. Test case 1434 added to verify this. Test case 1042 slightly modified. Reported-by: hugo Bug: http://curl.haxx.se/bug/view.cgi?id=1443 --- tests/data/test1434 | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 tests/data/test1434 (limited to 'tests/data/test1434') diff --git a/tests/data/test1434 b/tests/data/test1434 new file mode 100644 index 000000000..fba104b83 --- /dev/null +++ b/tests/data/test1434 @@ -0,0 +1,90 @@ + + + +HTTP +HTTP GET +Resume + + + +# Server-side + +# Some servers (e.g. Apache 1.2) respond this way to an invalid byte range + +HTTP/1.1 200 OK +Connection: close +Content-Length: 100 +Content-Type: text/plain + +012345678 +012345678 +012345678 +012345678 +012345678 +012345678 +012345678 +012345678 +012345678 +012345678 + + +# The file data that exists at the start of the test must be included in +# the verification. + +012345678 +012345678 +012345678 +012345678 +012345678 +012345678 +012345678 +012345678 +012345678 +012345678 +HTTP/1.1 200 OK +Connection: close +Content-Length: 100 +Content-Type: text/plain + + + + +# Client-side + + +http + + +HTTP GET resume at exactly the existing file size is fine + + +http://%HOSTIP:%HTTPPORT/1434 -C 100 + + +012345678 +012345678 +012345678 +012345678 +012345678 +012345678 +012345678 +012345678 +012345678 +012345678 + + + +# Verify data after the test has been "shot" + + +^User-Agent:.* + + +GET /1434 HTTP/1.1 +Range: bytes=100- +Host: %HOSTIP:%HTTPPORT +Accept: */* + + + + -- cgit v1.2.3