aboutsummaryrefslogtreecommitdiff
path: root/lib/http2.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-04-28 20:39:47 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-05-18 08:57:17 +0200
commit5fe71975e428f41f10bc367b1753ed7ebc4e5205 (patch)
tree19ae878da6c918e1afecafecc5b9e5c564cb4df9 /lib/http2.c
parent77f1029ecda8ff03c3a022e67098b39408b1ac66 (diff)
HTTP: partial start at fixing up hash-lookups on http2 frame receival
Diffstat (limited to 'lib/http2.c')
-rw-r--r--lib/http2.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/http2.c b/lib/http2.c
index 210960157..6d25efc98 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -84,9 +84,6 @@ static CURLcode http2_disconnect(struct connectdata *conn,
nghttp2_session_del(c->h2);
- Curl_safefree(c->header_recvbuf->buffer);
- Curl_safefree(c->header_recvbuf);
-
Curl_safefree(c->inbuf);
DEBUGF(infof(conn->data, "HTTP/2 DISCONNECT done\n"));
@@ -167,7 +164,7 @@ static ssize_t send_callback(nghttp2_session *h2,
(void)flags;
written = ((Curl_send*)c->send_underlying)(conn, FIRSTSOCKET,
- data, length, &result);
+ data, length, &result);
if(result == CURLE_AGAIN) {
return NGHTTP2_ERR_WOULDBLOCK;
@@ -249,6 +246,9 @@ static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame,
c->status_code = -1;
+ /* get the stream from the hash based on Stream ID */
+ rv = Curl_hash_pick()
+
Curl_add_buffer(c->header_recvbuf, "\r\n", 2);
left = c->header_recvbuf->size_used - c->nread_header_recvbuf;
@@ -619,8 +619,7 @@ CURLcode Curl_http2_init(struct connectdata *conn)
nghttp2_session_callbacks_set_on_header_callback(callbacks, on_header);
/* The nghttp2 session is not yet setup, do it */
- rc = nghttp2_session_client_new(&conn->proto.httpc.h2,
- callbacks, conn);
+ rc = nghttp2_session_client_new(&conn->proto.httpc.h2, callbacks, conn);
nghttp2_session_callbacks_del(callbacks);