on master help sign in
Relax HTTP2 headers check.

HTTP/2-draft17 (e.g., used in gRPC) does not mandate an `:authority` pseudo header. In fact, this pseudo header MUST be omitted in some HTTP/1.1 translation cases. More details at https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-8.1.2.3 .

commitd8e5a6f6ab26d04782bef991421e6a1956f945b4 authorLucas DiCioccio <lucas@dicioccio.fr> dateWed 24 May 2017, 19:30 (9 years ago) parent78bb757
1 file changed−2
warp/Network/Wai/Handler/Warp/HTTP2/HPACK.hs−2
warp/Network/Wai/Handler/Warp/HTTP2/HPACK.hs−2
@@ -93,7 +93,6 @@ checkRequestHeader reqvt
9393 | mScheme == Nothing = False
9494 | mPath == Nothing = False
9595 | mPath == Just "" = False
96− | mAuthority == Nothing = False
9796 | mConnection /= Nothing = False
9897 | just mTE (/= "trailers") = False
9998 | otherwise = True
@@ -102,7 +101,6 @@ checkRequestHeader reqvt
102101 mScheme = getHeaderValue tokenScheme reqvt
103102 mPath = getHeaderValue tokenPath reqvt
104103 mMethod = getHeaderValue tokenMethod reqvt
105− mAuthority = getHeaderValue tokenAuthority reqvt
106104 mConnection = getHeaderValue tokenConnection reqvt
107105 mTE = getHeaderValue tokenTE reqvt
108106