diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-04-12 07:21:11 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-04-12 07:21:11 +0000 |
commit | 3f6133be2735936631c4bfe5aedd28ae9b084f3f (patch) | |
tree | c77945364d0d160199188bd96d6a23725d394a62 /lib/http.c | |
parent | c3bfb355c56178d23a5fc2d8706a1da472800da4 (diff) |
Jean-Philippe Barrette-LaPierre provided his patch that introduces
CURLOPT_DEBUGFUNCTION and CURLOPT_DEBUGDATA.
Diffstat (limited to 'lib/http.c')
-rw-r--r-- | lib/http.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/http.c b/lib/http.c index 9e0275f70..42c167275 100644 --- a/lib/http.c +++ b/lib/http.c @@ -133,12 +133,6 @@ CURLcode add_buffer_send(int sockfd, struct connectdata *conn, send_buffer *in, char *ptr; int size; - if(conn->data->set.verbose) { - fputs("> ", conn->data->set.err); - /* this data _may_ contain binary stuff */ - fwrite(in->buffer, in->size_used, 1, conn->data->set.err); - } - /* The looping below is required since we use non-blocking sockets, but due to the circumstances we will just loop and try again and again etc */ @@ -150,6 +144,10 @@ CURLcode add_buffer_send(int sockfd, struct connectdata *conn, send_buffer *in, if(CURLE_OK != res) break; + if(conn->data->set.verbose) + /* this data _may_ contain binary stuff */ + Curl_debug(conn->data, CURLINFO_DATA_OUT, ptr, amount); + if(amount != size) { size -= amount; ptr += amount; @@ -364,11 +362,8 @@ CURLcode Curl_ConnectHTTPProxyTunnel(struct connectdata *conn, the line isn't really terminated until the LF comes */ /* output debug output if that is requested */ - if(data->set.verbose) { - fputs("< ", data->set.err); - fwrite(line_start, perline, 1, data->set.err); - /* no need to output LF here, it is part of the data */ - } + if(data->set.verbose) + Curl_debug(data, CURLINFO_DATA_IN, line_start, perline); if('\r' == line_start[0]) { /* end of headers */ |