warp 3.1.5 → 3.1.6
raw patch · 5 files changed
+19/−20 lines, 5 filesdep ~http-types
Dependency ranges changed: http-types
Files
- ChangeLog.md +4/−0
- Network/Wai/Handler/Warp/Conduit.hs +0/−5
- Network/Wai/Handler/Warp/Response.hs +12/−7
- Network/Wai/Handler/Warp/Run.hs +0/−5
- warp.cabal +3/−3
ChangeLog.md view
@@ -1,3 +1,7 @@+## 3.1.6++* Adding back http-types 0.8 support [#449](https://github.com/yesodweb/wai/pull/449)+ ## 3.1.5 * Using http-types v0.9.
Network/Wai/Handler/Warp/Conduit.hs view
@@ -64,11 +64,6 @@ assert (count' == 0) $ I.writeIORef ref count' return x --- | Extract the underlying @Source@ from an @IsolatedBSSource@, which will not--- perform any more isolation.-isourceDone :: ISource -> Source-isourceDone (ISource src _) = src- ---------------------------------------------------------------- data CSource = CSource !Source !(I.IORef ChunkState)
Network/Wai/Handler/Warp/Response.hs view
@@ -9,7 +9,6 @@ , sanitizeHeaderValue -- for testing , fileRange -- for testing , warpVersion- , defaultServerValue , addDate , addServer , hasBody@@ -19,6 +18,10 @@ #define MIN_VERSION_base(x,y,z) 1 #endif +#ifndef MIN_VERSION_http_types+#define MIN_VERSION_http_types(x,y,z) 1+#endif+ import Blaze.ByteString.Builder.HTTP (chunkedTransferEncoding, chunkedTransferTerminator) #if __GLASGOW_HASKELL__ < 709 import Control.Applicative@@ -31,7 +34,6 @@ import qualified Data.ByteString.Char8 as S8 import Data.ByteString.Builder (byteString, Builder) import Data.ByteString.Builder.Extra (flush)-import qualified Data.ByteString.Char8 as B (pack) import qualified Data.CaseInsensitive as CI import Data.Function (on) import Data.List (deleteBy)@@ -48,7 +50,9 @@ import Data.Version (showVersion) import Data.Word8 (_cr, _lf) import qualified Network.HTTP.Types as H+#if MIN_VERSION_http_types(0,9,0) import qualified Network.HTTP.Types.Header as H+#endif import Network.Wai import Network.Wai.Handler.Warp.Buffer (toBuilderBuffer) import qualified Network.Wai.Handler.Warp.Date as D@@ -380,7 +384,11 @@ ---------------------------------------------------------------- addTransferEncoding :: H.ResponseHeaders -> H.ResponseHeaders+#if MIN_VERSION_http_types(0,9,0) addTransferEncoding hdrs = (H.hTransferEncoding, "chunked") : hdrs+#else+addTransferEncoding hdrs = ("transfer-encoding", "chunked") : hdrs+#endif addDate :: D.DateCache -> IndexedHeader -> H.ResponseHeaders -> IO H.ResponseHeaders addDate dc rspidxhdr hdrs = case rspidxhdr ! idxDate of@@ -395,12 +403,9 @@ warpVersion :: String warpVersion = showVersion Paths_warp.version -defaultServerValue :: HeaderValue-defaultServerValue = B.pack $ "Warp/" ++ warpVersion- addServer :: HeaderValue -> IndexedHeader -> H.ResponseHeaders -> H.ResponseHeaders-addServer defaultServerValue' rspidxhdr hdrs = case rspidxhdr ! idxServer of- Nothing -> (H.hServer, defaultServerValue') : hdrs+addServer serverName rspidxhdr hdrs = case rspidxhdr ! idxServer of+ Nothing -> (H.hServer, serverName) : hdrs _ -> hdrs ----------------------------------------------------------------
Network/Wai/Handler/Warp/Run.hs view
@@ -370,11 +370,6 @@ -> Settings -> IO () --- Serve an HTTP\/2-aware application, rejecting clients that attempt to use an--- older protocol version.-serveHTTP2Only :: HTTP2Application -> ServeConnection-serveHTTP2Only = error "serveHTTP2Only not implemented"- -- Serve an HTTP\/2-unaware Application to a connection over any HTTP version. serveDefault :: Application -> ServeConnection serveDefault app = serveHTTP2 (promoteApplication app) app
warp.cabal view
@@ -1,5 +1,5 @@ Name: warp-Version: 3.1.5+Version: 3.1.6 Synopsis: A fast, light-weight web server for WAI applications. License: MIT License-file: LICENSE@@ -40,7 +40,7 @@ , case-insensitive >= 0.2 , containers , ghc-prim- , http-types >= 0.9+ , http-types >= 0.8.5 , iproute >= 1.3.1 , http2 >= 1.1 , simple-sendfile >= 0.2.7 && < 0.3@@ -139,7 +139,7 @@ , case-insensitive >= 0.2 , ghc-prim , HTTP- , http-types >= 0.9+ , http-types >= 0.8.5 , iproute >= 1.3.1 , lifted-base >= 0.1 , simple-sendfile >= 0.2.4 && < 0.3