on master help sign in
defining hContentRange.
commit3b8782439ed29fb405a9e8e5f0f511b0c3dee823 authorKazu Yamamoto <kazu@iij.ad.jp> dateWed 30 Oct 2013, 14:07 (13 years ago) parent64be58b
2 files changed+4−1
warp/Network/Wai/Handler/Warp/Response.hs+1−1 warp/Network/Wai/Handler/Warp/Types.hs+3
warp/Network/Wai/Handler/Warp/Response.hs+1−1
@@ -75,7 +75,7 @@ sendResponse conn ii restore req reqidxhdr (ResponseFile s0 hs0 path mpart0) =
7575 | otherwise = addLength len hs
7676 return (s, addRange hs', beg, len)
7777
78− rangeRes cl from to = (H.status206, (("Content-Range", rangeHeader cl from to):), from, to - from + 1)
78+ rangeRes cl from to = (H.status206, ((hContentRange, rangeHeader cl from to):), from, to - from + 1)
7979
8080 rangeHeader total from to = B.pack
8181 $ 'b' : 'y': 't' : 'e' : 's' : ' '
warp/Network/Wai/Handler/Warp/Types.hs+3
@@ -33,6 +33,9 @@ type HeaderValue = ByteString
3333hTransferEncoding :: HeaderName
3434hTransferEncoding = "Transfer-Encoding"
3535
36+hContentRange :: HeaderName
37+hContentRange = "Content-Range"
38+
3639hAcceptRanges :: HeaderName
3740hAcceptRanges = "Accept-Ranges"
3841