conn->data->req.protop = http;
- 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;
-
Curl_http2_setup_conn(conn);
return CURLE_OK;
/* 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;
}
/*
infof(data, "Pipe is full, skip (%zu)\n", pipeLen);
continue;
}
-
+#ifdef USE_NGHTTP2
/* If multiplexed, make sure we don't go over concurrency limit */
if(check->bits.multiplex) {
/* Multiplexed connections can only be HTTP/2 for now */
continue;
}
}
-
+#endif
/* We can't use the connection if the pipe is penalized */
if(Curl_pipeline_penalized(data, check)) {
infof(data, "Penalized, skip\n");