From 0da79865b80cc43ca2078c303dec63a15b77418f Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 15 Feb 2014 17:12:17 +0900 Subject: [PATCH] Don't set PAD_HIGH and PAD_LOW flags to HEADERS/PUSH_PROMISE object to user cb --- lib/nghttp2_session.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/nghttp2_session.c b/lib/nghttp2_session.c index 8a29304b..60adfa18 100644 --- a/lib/nghttp2_session.c +++ b/lib/nghttp2_session.c @@ -1149,17 +1149,18 @@ static ssize_t session_headers_add_pad(nghttp2_session *session, before we access the missing part, we will allocate it in nghttp2_session_after_frame_sent(). */ } else if(frame->headers.padlen > 0) { + nghttp2_frame_hd hd = frame->hd; rv = nghttp2_frame_add_pad(&session->aob.framebuf, &session->aob.framebufmax, &session->aob.framebufoff, - &frame->hd.flags, + &hd.flags, frame->hd.length - frame->headers.padlen, frame->headers.padlen); if(nghttp2_is_fatal(rv)) { return rv; } nghttp2_frame_pack_frame_hd - (session->aob.framebuf + session->aob.framebufoff, &frame->hd); + (session->aob.framebuf + session->aob.framebufoff, &hd); } return session->aob.framebufoff + NGHTTP2_FRAME_HEAD_LENGTH + frame->hd.length;