diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/http_client.c | 10 | ||||
| -rw-r--r-- | lib/xmltree.c | 2 | 
2 files changed, 10 insertions, 2 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; diff --git a/lib/xmltree.c b/lib/xmltree.c index c4f34cd9..7dd7b6a3 100644 --- a/lib/xmltree.c +++ b/lib/xmltree.c @@ -322,7 +322,6 @@ char *xt_to_string( struct xt_node *node )  	return real;  } -#ifdef DEBUG  void xt_print( struct xt_node *node )  {  	int i; @@ -381,7 +380,6 @@ void xt_print( struct xt_node *node )  	/* Non-empty tag is now finished. */  	printf( "</%s>\n", node->name );  } -#endif  struct xt_node *xt_dup( struct xt_node *node )  {  | 
