http-reverse-proxy 0.1.1.3 → 0.1.1.4
raw patch · 2 files changed
+17/−3 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Network/HTTP/ReverseProxy.hs +15/−2
- http-reverse-proxy.cabal +2/−1
Network/HTTP/ReverseProxy.hs view
@@ -34,11 +34,13 @@ import Control.Concurrent.MVar.Lifted (newEmptyMVar, putMVar, takeMVar) import Control.Concurrent.Lifted (fork, killThread) import Control.Monad.Trans.Control (MonadBaseControl)-import Network.Wai.Handler.Warp (defaultSettings, Connection (..), parseRequest, sendResponse, dummyCleaner)+import Network.Wai.Handler.Warp import Data.Conduit.Binary (sourceFileRange) import qualified Data.IORef as I import Network.Socket (PortNumber (PortNum), SockAddr (SockAddrInet)) import Data.Default (Default (def))+import Data.Version (showVersion)+import qualified Paths_http_reverse_proxy -- | Host\/port combination to which we want to proxy. data ProxyDest = ProxyDest@@ -209,7 +211,18 @@ Left (_ :: SomeException) -> return Nothing Right (req, fromClient') -> do res <- app req- keepAlive <- sendResponse dummyCleaner req conn res+ keepAlive <- sendResponse+#if MIN_VERSION_warp(1, 3, 8)+ defaultSettings+ { settingsServerName = S8.pack $ concat+ [ "Warp/"+ , warpVersion+ , " + http-reverse-proxy/"+ , showVersion Paths_http_reverse_proxy.version+ ]+ }+#endif+ dummyCleaner req conn res (fromClient'', _) <- liftIO fromClient' >>= unwrapResumable return $ if keepAlive then Just fromClient'' else Nothing maybe (return ()) loop mfromClient
http-reverse-proxy.cabal view
@@ -1,5 +1,5 @@ name: http-reverse-proxy-version: 0.1.1.3+version: 0.1.1.4 synopsis: Reverse proxy HTTP requests, either over raw sockets or with WAI description: Provides a simple means of reverse-proxying HTTP requests. The raw approach uses the same technique as leveraged by keter, whereas the WAI approach performs full request/response parsing via WAI and http-conduit. homepage: https://github.com/fpco/http-reverse-proxy@@ -13,6 +13,7 @@ library exposed-modules: Network.HTTP.ReverseProxy+ other-modules: Paths_http_reverse_proxy build-depends: base >= 4 && < 5 , monad-control >= 0.3 , lifted-base >= 0.1