aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-01-27 12:54:22 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-01-27 12:54:22 +0000
commitdc932f739a340cdbf38653182a31a3e96c0b3482 (patch)
tree79ce76f8a47598ebb6b57bf445695ba6a82b0ef8 /lib
parent7d15651115d9590e89eb35dec8d090f083e352c6 (diff)
CONNECT response headers are now passed back as "regular" headers
Diffstat (limited to 'lib')
-rw-r--r--lib/http.c19
1 files changed, 15 insertions, 4 deletions
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 */