aboutsummaryrefslogtreecommitdiff
path: root/lib/http2.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-05-18 14:09:32 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-05-18 14:09:32 +0200
commit155b1f5df9b772e861da2b72aafd8342013b76a2 (patch)
tree1aa2494db493af6785d111296eee961bb17c9f57 /lib/http2.c
parent979670988a4a3bbed2d77e48541f06e781a19ac1 (diff)
http2: fix build when NOT h2-enabled
Diffstat (limited to 'lib/http2.c')
-rw-r--r--lib/http2.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/http2.c b/lib/http2.c
index 961750c7e..867162a76 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -96,8 +96,23 @@ static CURLcode http2_disconnect(struct connectdata *conn,
/* called from Curl_http_setup_conn */
void Curl_http2_setup_conn(struct connectdata *conn)
{
+ struct HTTP *http = conn->data->req.protop;
+
conn->proto.httpc.settings.max_concurrent_streams =
DEFAULT_MAX_CONCURRENT_STREAMS;
+
+ http->nread_header_recvbuf = 0;
+ http->bodystarted = FALSE;
+ http->status_code = -1;
+ http->pausedata = NULL;
+ http->pauselen = 0;
+ http->error_code = NGHTTP2_NO_ERROR;
+ http->closed = FALSE;
+
+ /* where to store incoming data for this stream and how big the buffer is */
+ http->mem = conn->data->state.buffer;
+ http->len = BUFSIZE;
+ http->memlen = 0;
}
/*