diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2011-12-02 10:32:54 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2011-12-02 10:32:54 +0000 |
commit | bd3166176fdb7ed96211eb539316f47843e0faa7 (patch) | |
tree | b5a07651578665954e929e4bccc7db112dc089b2 /lib/http_client.c | |
parent | 191ac9d7c7f38d4450a2f4f173c5a34be368fd2f (diff) |
Somewhat improve debug logging of HTTP/SOAP stuff.
Diffstat (limited to 'lib/http_client.c')
-rw-r--r-- | lib/http_client.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/http_client.c b/lib/http_client.c index 8bd543af..56a6f376 100644 --- a/lib/http_client.c +++ b/lib/http_client.c @@ -278,6 +278,9 @@ got_reply: *end1 = 0; + if( getenv( "BITLBEE_DEBUG" ) ) + printf( "HTTP response headers:\n%s", req->reply_headers ); + if( evil_server ) req->reply_body = end1 + 1; else @@ -414,6 +417,9 @@ got_reply: req->fd = -1; req->ssl = NULL; + if( getenv( "BITLBEE_DEBUG" ) ) + printf( "New headers for redirected HTTP request:\n%s", new_request ); + if( new_proto == PROTO_HTTPS ) { req->ssl = ssl_connect( new_host, new_port, http_ssl_connected, req ); @@ -455,6 +461,10 @@ cleanup: else closesocket( req->fd ); + if( getenv( "BITLBEE_DEBUG" ) && req ) + printf( "Finishing HTTP request with status: %s", + req->status_string ? req->status_string : "NULL" ); + req->func( req ); http_free( req ); return FALSE; |