Add nghttp2_hd_inflate_hd2() and deprecate nghttp2_hd_inflate_hd()

The difference between them are former has const qualifier to the |in|
parameter, which is desirable since it is effectively read-only.
This commit is contained in:
Tatsuhiro Tsujikawa
2016-05-14 18:25:20 +09:00
parent 796160cb77
commit 2a96d433ec
8 changed files with 125 additions and 29 deletions

View File

@@ -3475,8 +3475,8 @@ static int inflate_header_block(nghttp2_session *session, nghttp2_frame *frame,
DEBUGF(fprintf(stderr, "recv: decoding header block %zu bytes\n", inlen));
for (;;) {
inflate_flags = 0;
proclen = nghttp2_hd_inflate_hd2(&session->hd_inflater, &nv, &inflate_flags,
in, inlen, final);
proclen = nghttp2_hd_inflate_hd_nv(&session->hd_inflater, &nv,
&inflate_flags, in, inlen, final);
if (nghttp2_is_fatal((int)proclen)) {
return (int)proclen;
}