diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-01-27 12:54:22 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-01-27 12:54:22 +0000 |
commit | dc932f739a340cdbf38653182a31a3e96c0b3482 (patch) | |
tree | 79ce76f8a47598ebb6b57bf445695ba6a82b0ef8 | |
parent | 7d15651115d9590e89eb35dec8d090f083e352c6 (diff) | |
download | curl-dc932f739a340cdbf38653182a31a3e96c0b3482.tar.gz |
CONNECT response headers are now passed back as "regular" headers
-rw-r--r-- | CHANGES | 10 | ||||
-rw-r--r-- | lib/http.c | 19 | ||||
-rw-r--r-- | tests/data/test503 | 9 | ||||
-rw-r--r-- | tests/data/test80 | 11 | ||||
-rw-r--r-- | tests/data/test82 | 2 | ||||
-rw-r--r-- | tests/data/test83 | 11 | ||||
-rw-r--r-- | tests/data/test95 | 11 |
7 files changed, 68 insertions, 5 deletions
@@ -6,7 +6,17 @@ Changelog +Daniel(27 January 2004) +- Made the response-headers during a CONNECT request to a proxy get passed on + as regular headers, so they appear with -i/-I options and similar. + +- Based on a patch by Gisle Vanem, I've made the progress meter display + properly switch to a GB-display when more than 9999MB have been transfered. + Daniel(23 January 2004) +- Gisle Vanem pointed out a curlrc parser problem/crash when an option with a + required didn't have one and was on the last line of a file. + - More Windows fixes for large files. We now build and link with ../lib/strtoofft.c in the app code since Curl_strtoll() is not a provided libcurl function... Perhaps we should consider a 'common' dir or similar diff --git a/lib/http.c b/lib/http.c index 2d8e87b65..0dcaf7866 100644 --- a/lib/http.c +++ b/lib/http.c @@ -869,6 +869,21 @@ CURLcode Curl_ConnectHTTPProxyTunnel(struct connectdata *conn, perline++; /* amount of bytes in this line so far */ if(*ptr=='\n') { char letter; + int writetype; + + /* output debug output if that is requested */ + if(data->set.verbose) + Curl_debug(data, CURLINFO_HEADER_IN, line_start, perline); + + /* send the header to the callback */ + writetype = CLIENTWRITE_HEADER; + if(data->set.http_include_header) + writetype |= CLIENTWRITE_BODY; + + result = Curl_client_write(data, writetype, line_start, perline); + if(result) + return result; + /* Newlines are CRLF, so the CR is ignored as the line isn't really terminated until the LF comes. Treat a following CR as end-of-headers as well.*/ @@ -880,10 +895,6 @@ CURLcode Curl_ConnectHTTPProxyTunnel(struct connectdata *conn, break; /* breaks out of for-loop, not switch() */ } - /* output debug output if that is requested */ - if(data->set.verbose) - Curl_debug(data, CURLINFO_HEADER_IN, line_start, perline); - /* keep a backup of the position we are about to blank */ letter = line_start[perline]; line_start[perline]=0; /* zero terminate the buffer */ diff --git a/tests/data/test503 b/tests/data/test503 index a6727424e..10daf828d 100644 --- a/tests/data/test503 +++ b/tests/data/test503 @@ -8,6 +8,15 @@ Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT ETag: "21025-dc7-39462498" </data> +<datacheck> +HTTP/1.1 200 Mighty fine indeed +HTTP/1.1 200 OK swsclose +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT +ETag: "21025-dc7-39462498" + +</datacheck> </reply> # Client-side diff --git a/tests/data/test80 b/tests/data/test80 index dd012fd2a..893ed85ea 100644 --- a/tests/data/test80 +++ b/tests/data/test80 @@ -10,6 +10,17 @@ Funny-head: yesyes contents </data> +<datacheck> +HTTP/1.1 200 Mighty fine indeed + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake swsclose +Content-Type: text/html +Funny-head: yesyes + +contents +</datacheck> </reply> # diff --git a/tests/data/test82 b/tests/data/test82 index 9fef0fabd..1e967f016 100644 --- a/tests/data/test82 +++ b/tests/data/test82 @@ -9,7 +9,7 @@ Content-Length: 34 Proxy-Authenticate: NTLM This is not the real page either! -</data1001> +</data> </reply> diff --git a/tests/data/test83 b/tests/data/test83 index cbcd47a3c..64a69fc87 100644 --- a/tests/data/test83 +++ b/tests/data/test83 @@ -10,6 +10,17 @@ Funny-head: yesyes contents </data> +<datacheck> +HTTP/1.1 200 Mighty fine indeed + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake swsclose +Content-Type: text/html +Funny-head: yesyes + +contents +</datacheck> </reply> # diff --git a/tests/data/test95 b/tests/data/test95 index 4af2f70af..b83735d65 100644 --- a/tests/data/test95 +++ b/tests/data/test95 @@ -10,6 +10,17 @@ Funny-head: yesyes contents </data> +<datacheck> +HTTP/1.1 200 Mighty fine indeed + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake swsclose +Content-Type: text/html +Funny-head: yesyes + +contents +</datacheck> </reply> # |