• Tatsuhiro Tsujikawa's avatar
    Add nghttp2_session_upgrade2(), deprecate nghttp2_session_upgrade() · 269a1000
    Tatsuhiro Tsujikawa authored
    To validate actual response body length against the value declared in
    content-length response header field, we first check request method.
    If request method is HEAD, respose body must be 0 regardless of the
    value in content-length.  nghttp2_session_upgrade() has no parameter
    to indicate the request method is HEAD, so we failed to validate
    response body if HEAD is used with HTTP Upgrade.  New
    nghttp2_session_upgrade2() accepts new parameter to indicate that
    request method is HEAD or not to fix this issue.  Although, this issue
    affects client side only, we deprecate nghttp2_session_upgrade() in
    favor of nghttp2_session_upgrade2() for both client and server side.
    269a1000
nghttp2_session_test.c 304 KB