aboutsummaryrefslogtreecommitdiff
path: root/lib/http.c
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2015-05-18 20:53:58 -0400
committerJay Satiro <raysatiro@yahoo.com>2015-05-18 20:53:58 -0400
commit7da064fdd233a801de433a42dd80c6125fa5d6f5 (patch)
treee7a98144707f1c98cb26378d5f5d0884023427f2 /lib/http.c
parent897a7b3a13138468fb8bb98b8d54cdd5eef7ae9d (diff)
http: Add some include guards for the new HTTP/2 stuff
Diffstat (limited to 'lib/http.c')
-rw-r--r--lib/http.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/http.c b/lib/http.c
index e16f6de5c..63b014896 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -172,10 +172,12 @@ static CURLcode http_disconnect(struct connectdata *conn, bool dead_connection)
{
struct HTTP *http = conn->data->req.protop;
(void)dead_connection;
+#ifdef USE_NGHTTP2
if(http) {
Curl_add_buffer_free(http->header_recvbuf);
http->header_recvbuf = NULL; /* clear the pointer */
}
+#endif
return CURLE_OK;
}
@@ -1484,11 +1486,13 @@ CURLcode Curl_http_done(struct connectdata *conn,
http->send_buffer = NULL; /* clear the pointer */
}
+#ifdef USE_NGHTTP2
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 */
}
+#endif
if(HTTPREQ_POST_FORM == data->set.httpreq) {
data->req.bytecount = http->readbytecount + http->writebytecount;