aboutsummaryrefslogtreecommitdiff
path: root/lib/http.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/http.c')
-rw-r--r--lib/http.c17
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 */