Loading docs/libcurl/symbols-in-versions +3 −0 Original line number Diff line number Diff line Loading @@ -558,6 +558,9 @@ CURLPAUSE_RECV 7.18.0 CURLPAUSE_RECV_CONT 7.18.0 CURLPAUSE_SEND 7.18.0 CURLPAUSE_SEND_CONT 7.18.0 CURLPIPE_HTTP1 7.43.0 CURLPIPE_MULTIPLEX 7.43.0 CURLPIPE_NOTHING 7.43.0 CURLPROTO_ALL 7.19.4 CURLPROTO_DICT 7.19.4 CURLPROTO_FILE 7.19.4 Loading lib/http.c +33 −10 Original line number Diff line number Diff line Loading @@ -86,6 +86,7 @@ * Forward declarations. */ static CURLcode http_disconnect(struct connectdata *conn, bool dead); static int http_getsock_do(struct connectdata *conn, curl_socket_t *socks, int numsocks); Loading Loading @@ -116,7 +117,7 @@ const struct Curl_handler Curl_handler_http = { http_getsock_do, /* doing_getsock */ ZERO_NULL, /* domore_getsock */ ZERO_NULL, /* perform_getsock */ ZERO_NULL, /* disconnect */ http_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ PORT_HTTP, /* defport */ CURLPROTO_HTTP, /* protocol */ Loading @@ -140,7 +141,7 @@ const struct Curl_handler Curl_handler_https = { http_getsock_do, /* doing_getsock */ ZERO_NULL, /* domore_getsock */ ZERO_NULL, /* perform_getsock */ ZERO_NULL, /* disconnect */ http_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ PORT_HTTPS, /* defport */ CURLPROTO_HTTPS, /* protocol */ Loading Loading @@ -179,6 +180,17 @@ CURLcode Curl_http_setup_conn(struct connectdata *conn) return CURLE_OK; } static CURLcode http_disconnect(struct connectdata *conn, bool dead_connection) { struct HTTP *http = conn->data->req.protop; (void)dead_connection; if(http) { Curl_add_buffer_free(http->header_recvbuf); http->header_recvbuf = NULL; /* clear the pointer */ } return CURLE_OK; } /* * checkheaders() checks the linked list of custom HTTP headers for a * particular header (prefix). Loading Loading @@ -1043,6 +1055,16 @@ Curl_send_buffer *Curl_add_buffer_init(void) return calloc(1, sizeof(Curl_send_buffer)); } /* * Curl_add_buffer_free() frees all associated resources. */ void Curl_add_buffer_free(Curl_send_buffer *buff) { if(buff) /* deal with NULL input */ free(buff->buffer); free(buff); } /* * Curl_add_buffer_send() sends a header buffer and frees all associated * memory. Body data may be appended to the header data if desired. Loading Loading @@ -1089,8 +1111,7 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in, /* Curl_convert_to_network calls failf if unsuccessful */ if(result) { /* conversion failed, free memory and return to the caller */ free(in->buffer); free(in); Curl_add_buffer_free(in); return result; } Loading Loading @@ -1192,8 +1213,7 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in, conn->writechannel_inuse = FALSE; } } free(in->buffer); free(in); Curl_add_buffer_free(in); return result; } Loading Loading @@ -1472,13 +1492,16 @@ CURLcode Curl_http_done(struct connectdata *conn, return CURLE_OK; if(http->send_buffer) { Curl_send_buffer *buff = http->send_buffer; free(buff->buffer); free(buff); Curl_add_buffer_free(http->send_buffer); http->send_buffer = NULL; /* clear the pointer */ } if(http->header_recvbuf) { DEBUGF(infof(data, "free header_recvbuf!!\n")); Curl_add_buffer_free(http->header_recvbuf); http->header_recvbuf = NULL; /* clear the pointer */ } if(HTTPREQ_POST_FORM == data->set.httpreq) { data->req.bytecount = http->readbytecount + http->writebytecount; Loading lib/http.h +1 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ struct Curl_send_buffer { typedef struct Curl_send_buffer Curl_send_buffer; Curl_send_buffer *Curl_add_buffer_init(void); void Curl_add_buffer_free(Curl_send_buffer *buff); CURLcode Curl_add_bufferf(Curl_send_buffer *in, const char *fmt, ...); CURLcode Curl_add_buffer(Curl_send_buffer *in, const void *inptr, size_t size); CURLcode Curl_add_buffer_send(Curl_send_buffer *in, Loading lib/http2.c +1 −1 Original line number Diff line number Diff line Loading @@ -85,8 +85,8 @@ static CURLcode http2_disconnect(struct connectdata *conn, DEBUGF(infof(conn->data, "HTTP/2 DISCONNECT starts now\n")); nghttp2_session_del(c->h2); Curl_safefree(c->inbuf); Curl_hash_clean(&c->streamsh); DEBUGF(infof(conn->data, "HTTP/2 DISCONNECT done\n")); Loading lib/http_proxy.c +4 −4 Original line number Diff line number Diff line Loading @@ -135,7 +135,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, host_port = aprintf("%s:%hu", hostname, remote_port); if(!host_port) { free(req_buffer); Curl_add_buffer_free(req_buffer); return CURLE_OUT_OF_MEMORY; } Loading @@ -155,7 +155,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, hostname, conn->bits.ipv6_ip?"]":"", remote_port); if(!hostheader) { free(req_buffer); Curl_add_buffer_free(req_buffer); return CURLE_OUT_OF_MEMORY; } Loading @@ -163,7 +163,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, host = aprintf("Host: %s\r\n", hostheader); if(!host) { free(hostheader); free(req_buffer); Curl_add_buffer_free(req_buffer); return CURLE_OUT_OF_MEMORY; } } Loading Loading @@ -212,7 +212,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, failf(data, "Failed sending CONNECT to proxy"); } free(req_buffer); Curl_add_buffer_free(req_buffer); if(result) return result; Loading Loading
docs/libcurl/symbols-in-versions +3 −0 Original line number Diff line number Diff line Loading @@ -558,6 +558,9 @@ CURLPAUSE_RECV 7.18.0 CURLPAUSE_RECV_CONT 7.18.0 CURLPAUSE_SEND 7.18.0 CURLPAUSE_SEND_CONT 7.18.0 CURLPIPE_HTTP1 7.43.0 CURLPIPE_MULTIPLEX 7.43.0 CURLPIPE_NOTHING 7.43.0 CURLPROTO_ALL 7.19.4 CURLPROTO_DICT 7.19.4 CURLPROTO_FILE 7.19.4 Loading
lib/http.c +33 −10 Original line number Diff line number Diff line Loading @@ -86,6 +86,7 @@ * Forward declarations. */ static CURLcode http_disconnect(struct connectdata *conn, bool dead); static int http_getsock_do(struct connectdata *conn, curl_socket_t *socks, int numsocks); Loading Loading @@ -116,7 +117,7 @@ const struct Curl_handler Curl_handler_http = { http_getsock_do, /* doing_getsock */ ZERO_NULL, /* domore_getsock */ ZERO_NULL, /* perform_getsock */ ZERO_NULL, /* disconnect */ http_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ PORT_HTTP, /* defport */ CURLPROTO_HTTP, /* protocol */ Loading @@ -140,7 +141,7 @@ const struct Curl_handler Curl_handler_https = { http_getsock_do, /* doing_getsock */ ZERO_NULL, /* domore_getsock */ ZERO_NULL, /* perform_getsock */ ZERO_NULL, /* disconnect */ http_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ PORT_HTTPS, /* defport */ CURLPROTO_HTTPS, /* protocol */ Loading Loading @@ -179,6 +180,17 @@ CURLcode Curl_http_setup_conn(struct connectdata *conn) return CURLE_OK; } static CURLcode http_disconnect(struct connectdata *conn, bool dead_connection) { struct HTTP *http = conn->data->req.protop; (void)dead_connection; if(http) { Curl_add_buffer_free(http->header_recvbuf); http->header_recvbuf = NULL; /* clear the pointer */ } return CURLE_OK; } /* * checkheaders() checks the linked list of custom HTTP headers for a * particular header (prefix). Loading Loading @@ -1043,6 +1055,16 @@ Curl_send_buffer *Curl_add_buffer_init(void) return calloc(1, sizeof(Curl_send_buffer)); } /* * Curl_add_buffer_free() frees all associated resources. */ void Curl_add_buffer_free(Curl_send_buffer *buff) { if(buff) /* deal with NULL input */ free(buff->buffer); free(buff); } /* * Curl_add_buffer_send() sends a header buffer and frees all associated * memory. Body data may be appended to the header data if desired. Loading Loading @@ -1089,8 +1111,7 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in, /* Curl_convert_to_network calls failf if unsuccessful */ if(result) { /* conversion failed, free memory and return to the caller */ free(in->buffer); free(in); Curl_add_buffer_free(in); return result; } Loading Loading @@ -1192,8 +1213,7 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in, conn->writechannel_inuse = FALSE; } } free(in->buffer); free(in); Curl_add_buffer_free(in); return result; } Loading Loading @@ -1472,13 +1492,16 @@ CURLcode Curl_http_done(struct connectdata *conn, return CURLE_OK; if(http->send_buffer) { Curl_send_buffer *buff = http->send_buffer; free(buff->buffer); free(buff); Curl_add_buffer_free(http->send_buffer); http->send_buffer = NULL; /* clear the pointer */ } if(http->header_recvbuf) { DEBUGF(infof(data, "free header_recvbuf!!\n")); Curl_add_buffer_free(http->header_recvbuf); http->header_recvbuf = NULL; /* clear the pointer */ } if(HTTPREQ_POST_FORM == data->set.httpreq) { data->req.bytecount = http->readbytecount + http->writebytecount; Loading
lib/http.h +1 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ struct Curl_send_buffer { typedef struct Curl_send_buffer Curl_send_buffer; Curl_send_buffer *Curl_add_buffer_init(void); void Curl_add_buffer_free(Curl_send_buffer *buff); CURLcode Curl_add_bufferf(Curl_send_buffer *in, const char *fmt, ...); CURLcode Curl_add_buffer(Curl_send_buffer *in, const void *inptr, size_t size); CURLcode Curl_add_buffer_send(Curl_send_buffer *in, Loading
lib/http2.c +1 −1 Original line number Diff line number Diff line Loading @@ -85,8 +85,8 @@ static CURLcode http2_disconnect(struct connectdata *conn, DEBUGF(infof(conn->data, "HTTP/2 DISCONNECT starts now\n")); nghttp2_session_del(c->h2); Curl_safefree(c->inbuf); Curl_hash_clean(&c->streamsh); DEBUGF(infof(conn->data, "HTTP/2 DISCONNECT done\n")); Loading
lib/http_proxy.c +4 −4 Original line number Diff line number Diff line Loading @@ -135,7 +135,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, host_port = aprintf("%s:%hu", hostname, remote_port); if(!host_port) { free(req_buffer); Curl_add_buffer_free(req_buffer); return CURLE_OUT_OF_MEMORY; } Loading @@ -155,7 +155,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, hostname, conn->bits.ipv6_ip?"]":"", remote_port); if(!hostheader) { free(req_buffer); Curl_add_buffer_free(req_buffer); return CURLE_OUT_OF_MEMORY; } Loading @@ -163,7 +163,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, host = aprintf("Host: %s\r\n", hostheader); if(!host) { free(hostheader); free(req_buffer); Curl_add_buffer_free(req_buffer); return CURLE_OUT_OF_MEMORY; } } Loading Loading @@ -212,7 +212,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, failf(data, "Failed sending CONNECT to proxy"); } free(req_buffer); Curl_add_buffer_free(req_buffer); if(result) return result; Loading