From 91ff93803512e3438ce165b23bb5b9fb404df288 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Fri, 5 Sep 2008 17:58:53 +0000 Subject: Improved the logic the decides whether to use HTTP 1.1 features or not in a request. Detect cases where an upload must be sent chunked and the server supports only HTTP 1.0 and return CURLE_UPLOAD_FAILED. --- tests/data/DISABLED | 5 ----- tests/data/test1053 | 12 ++++++++---- tests/data/test1069 | 8 -------- tests/data/test1072 | 4 ++-- tests/data/test1073 | 1 + 5 files changed, 11 insertions(+), 19 deletions(-) (limited to 'tests') diff --git a/tests/data/DISABLED b/tests/data/DISABLED index dc68bd90f..2055e9f16 100644 --- a/tests/data/DISABLED +++ b/tests/data/DISABLED @@ -3,8 +3,3 @@ # test cases are run by runtests.pl. Just add the plain test case numbers, one # per line. # Lines starting with '#' letters are treated as comments. -1069 -1071 -1072 -1073 -1074 diff --git a/tests/data/test1053 b/tests/data/test1053 index dbc63e808..8c60e5ce3 100644 --- a/tests/data/test1053 +++ b/tests/data/test1053 @@ -12,7 +12,7 @@ followlocation # Server-side -HTTP/1.0 307 Redirect swsclose +HTTP/1.1 307 Redirect swsclose Date: Thu, 29 Jul 2008 14:49:00 GMT Server: test-server/fake Location: data/10530002.txt?coolsite=yes @@ -21,24 +21,28 @@ Connection: close -HTTP/1.0 200 OK swsclose +HTTP/1.1 200 OK swsclose Date: Thu, 09 Nov 2010 14:49:00 GMT Server: test-server/fake +Content-Length: 11 +Connection: close blablabla -HTTP/1.0 307 Redirect swsclose +HTTP/1.1 307 Redirect swsclose Date: Thu, 29 Jul 2008 14:49:00 GMT Server: test-server/fake Location: data/10530002.txt?coolsite=yes Content-Length: 0 Connection: close -HTTP/1.0 200 OK swsclose +HTTP/1.1 200 OK swsclose Date: Thu, 09 Nov 2010 14:49:00 GMT Server: test-server/fake +Content-Length: 11 +Connection: close blablabla diff --git a/tests/data/test1069 b/tests/data/test1069 index 5b0b1fa47..c47c357d7 100644 --- a/tests/data/test1069 +++ b/tests/data/test1069 @@ -9,14 +9,6 @@ HTTP/1.0 # Server-side - -HTTP/1.0 500 Impossible swsclose -Date: Thu, 09 Nov 2010 14:49:00 GMT -Server: test-server/fake - -blablabla - - # Client-side diff --git a/tests/data/test1072 b/tests/data/test1072 index 9a04224f4..14b6d804c 100644 --- a/tests/data/test1072 +++ b/tests/data/test1072 @@ -22,10 +22,9 @@ WWW-Authenticate: Blackmagic realm="gimme all yer s3cr3ts" WWW-Authenticate: Basic realm="gimme all yer s3cr3ts" WWW-Authenticate: Digest realm="gimme all yer s3cr3ts", nonce="11223344" Content-Type: text/plain -Content-Length: 35 +Content-Length: 0 Connection: close -Try again on this HTTP 1.0 server! @@ -71,6 +70,7 @@ This is data we upload with PUT it comes from stdin so MUST be sent with chunked encoding which is impossible in HTTP/1.0 + 0 diff --git a/tests/data/test1073 b/tests/data/test1073 index 00e7feb0c..0f4fa0fe8 100644 --- a/tests/data/test1073 +++ b/tests/data/test1073 @@ -64,6 +64,7 @@ This is data we upload with PUT it comes from stdin so MUST be sent with chunked encoding which is impossible in HTTP/1.0 + 0 -- cgit v1.2.3