on master help sign in
Using http-types v0.9. (#439)
commitcb51a69e5c2b0c644478047061b3aa2ee5602ed5 authorKazu Yamamoto <kazu@iij.ad.jp> dateTue 13 Oct 2015, 14:54 (11 years ago) parent1549898
3 files changed+5−17
warp/Network/Wai/Handler/Warp/Response.hs+3−2 warp/Network/Wai/Handler/Warp/Types.hs−13 warp/warp.cabal+2−2
warp/Network/Wai/Handler/Warp/Response.hs+3−2
@@ -48,6 +48,7 @@ import Data.Streaming.Blaze (newBlazeRecv, reuseBufferStrategy)
4848import Data.Version (showVersion)
4949import Data.Word8 (_cr, _lf)
5050import qualified Network.HTTP.Types as H
51+import qualified Network.HTTP.Types.Header as H
5152import Network.Wai
5253import Network.Wai.Handler.Warp.Buffer (toBuilderBuffer)
5354import qualified Network.Wai.Handler.Warp.Date as D
@@ -379,7 +380,7 @@ hasBody s = sc /= 204
379380----------------------------------------------------------------
380381
381382addTransferEncoding :: H.ResponseHeaders -> H.ResponseHeaders
382−addTransferEncoding hdrs = (hTransferEncoding, "chunked") : hdrs
383+addTransferEncoding hdrs = (H.hTransferEncoding, "chunked") : hdrs
383384
384385addDate :: D.DateCache -> IndexedHeader -> H.ResponseHeaders -> IO H.ResponseHeaders
385386addDate dc rspidxhdr hdrs = case rspidxhdr ! idxDate of
@@ -399,7 +400,7 @@ defaultServerValue = B.pack $ "Warp/" ++ warpVersion
399400
400401addServer :: HeaderValue -> IndexedHeader -> H.ResponseHeaders -> H.ResponseHeaders
401402addServer defaultServerValue' rspidxhdr hdrs = case rspidxhdr ! idxServer of
402− Nothing -> (hServer, defaultServerValue') : hdrs
403+ Nothing -> (H.hServer, defaultServerValue') : hdrs
403404 _ -> hdrs
404405
405406----------------------------------------------------------------
warp/Network/Wai/Handler/Warp/Types.hs−13
@@ -11,7 +11,6 @@ import Data.IORef (IORef, readIORef, writeIORef, newIORef)
1111import Data.Typeable (Typeable)
1212import Data.Word (Word16, Word8)
1313import Foreign.Ptr (Ptr)
14−import Network.HTTP.Types.Header
1514import qualified Network.Wai.Handler.Warp.Date as D
1615import qualified Network.Wai.Handler.Warp.FdCache as F
1716import qualified Network.Wai.Handler.Warp.Timeout as T
@@ -30,18 +29,6 @@ type Port = Int
3029-- | The type for header value used with 'HeaderName'.
3130type HeaderValue = ByteString
3231
33−hTransferEncoding :: HeaderName
34−hTransferEncoding = "Transfer-Encoding"
35−
36−hContentRange :: HeaderName
37−hContentRange = "Content-Range"
38−
39−hAcceptRanges :: HeaderName
40−hAcceptRanges = "Accept-Ranges"
41−
42−hServer :: HeaderName
43−hServer = "Server"
44−
4532----------------------------------------------------------------
4633
4734-- | Error types for bad 'Request'.
warp/warp.cabal+2−2
@@ -40,7 +40,7 @@ Library
4040 , case-insensitive >= 0.2
4141 , containers
4242 , ghc-prim
43− , http-types >= 0.8.5
43+ , http-types >= 0.9
4444 , iproute >= 1.3.1
4545 , http2 >= 1.1
4646 , simple-sendfile >= 0.2.7 && < 0.3
@@ -139,7 +139,7 @@ Test-Suite spec
139139 , case-insensitive >= 0.2
140140 , ghc-prim
141141 , HTTP
142− , http-types >= 0.8.4
142+ , http-types >= 0.9
143143 , iproute >= 1.3.1
144144 , lifted-base >= 0.1
145145 , simple-sendfile >= 0.2.4 && < 0.3