• Tatsuhiro Tsujikawa's avatar
    Workaround HTTP upgrade with HEAD request · 5e7e479c
    Tatsuhiro Tsujikawa authored
    By default, we check the length of response body matches
    content-length.  For HEAD request, this is not necessarily true, so we
    sniff request method, and if it is HEAD, make sure that response body
    length is 0.  But this does not work for HTTP Upgrade, since
    nghttp2_session_upgrade() has no parameter to tell the request method
    was HEAD.  This commit disables this response body length validation
    for the stream upgraded by HTTP Upgrade.  We will add new version of
    nghttp2_session_upgrade with the parameter to pass the request method
    information so that we can handle this situation properly.
    5e7e479c
nghttp2_session_test.h 7.29 KB