on master help sign in
Rename hpackEncodeTrailers to hpackEncodeCIHeaders
b755445Andrew Pritchard
warp/Network/Wai/Handler/Warp/HTTP2/HPACK.hs+2−2
@@ -33,8 +33,8 @@ hpackEncodeHeader ctx ii settings s h = do
33 defServer = S.settingsServerName settings
33 defServer = S.settingsServerName settings
34 addServerAndDate = addDate dc rspidxhdr . addServer defServer rspidxhdr
34 addServerAndDate = addDate dc rspidxhdr . addServer defServer rspidxhdr
35
35
36−hpackEncodeTrailers :: Context -> Trailers -> IO Builder
36+hpackEncodeCIHeaders :: Context -> [H.Header] -> IO Builder
37−hpackEncodeTrailers ctx = hpackEncodeRawHeaders ctx . map (first foldedCase)
37+hpackEncodeCIHeaders ctx = hpackEncodeRawHeaders ctx . map (first foldedCase)
38
38
39hpackEncodeRawHeaders :: Context -> [(B.ByteString, B.ByteString)] -> IO Builder
39hpackEncodeRawHeaders :: Context -> [(B.ByteString, B.ByteString)] -> IO Builder
40hpackEncodeRawHeaders Context{encodeDynamicTable} hdr = do
40hpackEncodeRawHeaders Context{encodeDynamicTable} hdr = do
warp/Network/Wai/Handler/Warp/HTTP2/Sender.hs+1−1
@@ -120,7 +120,7 @@ frameSender ctx@Context{outputQ,connectionWindow}
120 switch (OTrailers strm trailers) = do
120 switch (OTrailers strm trailers) = do
121 -- Trailers always indicate the end of a stream; send them in
121 -- Trailers always indicate the end of a stream; send them in
122 -- consecutive header+continuation frames and end the stream.
122 -- consecutive header+continuation frames and end the stream.
123− builder <- hpackEncodeTrailers ctx trailers
123+ builder <- hpackEncodeCIHeaders ctx trailers
124 off <- headerContinue (streamNumber strm) builder True
124 off <- headerContinue (streamNumber strm) builder True
125 closed ctx strm Finished
125 closed ctx strm Finished
126 flushN $ off + frameHeaderLength
126 flushN $ off + frameHeaderLength