http-reverse-proxy 0.4.5 → 0.5.0
raw patch · 3 files changed
+10/−4 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
- Network.HTTP.ReverseProxy: wpsProcessBody :: WaiProxySettings -> Response () -> Maybe (Conduit ByteString IO (Flush Builder))
+ Network.HTTP.ReverseProxy: wpsProcessBody :: WaiProxySettings -> Request -> Response () -> Maybe (Conduit ByteString IO (Flush Builder))
Files
- ChangeLog.md +4/−0
- Network/HTTP/ReverseProxy.hs +5/−3
- http-reverse-proxy.cabal +1/−1
ChangeLog.md view
@@ -1,3 +1,7 @@+## 0.5.0++* update `wpsProcessBody` to accept response's initial request+ ## 0.4.5 * add `Eq, Ord, Show, Read` instances to `ProxyDest`
Network/HTTP/ReverseProxy.hs view
@@ -249,8 +249,10 @@ -- Default: SIHFromSocket -- -- Since 0.2.0- , wpsProcessBody :: HC.Response () -> Maybe (Conduit ByteString IO (Flush Builder))+ , wpsProcessBody :: WAI.Request -> HC.Response () -> Maybe (Conduit ByteString IO (Flush Builder)) -- ^ Post-process the response body returned from the host.+ -- The API for this function changed to include the extra 'WAI.Request'+ -- parameter in version 0.5.0. -- -- Since 0.2.1 , wpsUpgradeToRaw :: WAI.Request -> Bool@@ -283,7 +285,7 @@ { wpsOnExc = defaultOnExc , wpsTimeout = Nothing , wpsSetIpHeader = SIHFromSocket- , wpsProcessBody = const Nothing+ , wpsProcessBody = \_ _ -> Nothing , wpsUpgradeToRaw = \req -> (CI.mk <$> lookup "upgrade" (WAI.requestHeaders req)) == Just "websocket" , wpsGetDest = Nothing@@ -415,7 +417,7 @@ Right res -> do let conduit = fromMaybe (awaitForever (\bs -> yield (Chunk $ fromByteString bs) >> yield Flush))- (wpsProcessBody wps $ const () <$> res)+ (wpsProcessBody wps req $ const () <$> res) src = bodyReaderSource $ HC.responseBody res sendResponse $ WAI.responseStream (HC.responseStatus res)
http-reverse-proxy.cabal view
@@ -1,5 +1,5 @@ name: http-reverse-proxy-version: 0.4.5+version: 0.5.0 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