packages feed

reqcatcher 0.1.0.0 → 0.1.0.1

raw patch · 2 files changed

+12/−12 lines, 2 filesdep ~HUnitdep ~basedep ~http-client

Dependency ranges changed: HUnit, base, http-client, lens, wreq

Files

reqcatcher.cabal view
@@ -1,5 +1,5 @@ name:                reqcatcher-version:             0.1.0.0+version:             0.1.0.1 synopsis:            A local http server to catch the HTTP redirect description:         Manage an http server in your local PC to catch the HTTP                      redirect request from the browser. Especially, you can@@ -17,7 +17,7 @@ library   hs-source-dirs:      src   exposed-modules:     Web.ReqCatcher-  build-depends:       base >= 4.7 && < 4.9+  build-depends:       base >= 4.7 && < 4.11                      , http-types >= 0.8 && < 1.0                      , network >= 2.6 && < 2.7                      , text >= 1.2 && < 1.3@@ -30,15 +30,15 @@   hs-source-dirs:      test   main-is:             reqcatcher-test.hs   build-depends:       base-                     , http-client >= 0.4 && < 0.5+                     , http-client >= 0.4 && < 0.6                      , http-types-                     , HUnit >= 1.2 && < 1.4-                     , lens >= 4.7 && < 4.14+                     , HUnit >= 1.2 && < 1.7+                     , lens >= 4.7 && < 4.16                      , reqcatcher                      , tasty >= 0.10 && < 0.12                      , tasty-hunit >= 0.9 && < 1.0                      , wai-                     , wreq >= 0.3 && < 0.5+                     , wreq >= 0.3 && < 0.6   ghc-options:         -threaded -rtsopts -with-rtsopts=-N   default-language:    Haskell2010 
src/Web/ReqCatcher.hs view
@@ -76,12 +76,12 @@ httpWorker mvar set app =   EX.bracket     (NW.socket NW.AF_INET NW.Stream NW.defaultProtocol)-    NW.sClose+    NW.close     (\socket -> do         -- TODO: set Close-On-Exec to socket         NW.setSocketOption socket NW.ReuseAddr 1         let addr = NW.SockAddrInet (toEnum $ WARP.getPort set) 0-        NW.bindSocket socket addr+        NW.bind socket addr         NW.listen socket 1 -- Handle Just 1 connection         CONC.putMVar mvar socket         WARP.runSettingsSocket set socket app@@ -92,19 +92,19 @@ catchRedirect :: Catcher -> IO WAI.Request catchRedirect catcher = do   req <- CONC.takeMVar (catcherCought catcher)-  NW.sClose (catcherSocket catcher)+  NW.close (catcherSocket catcher)   return req  pickPort :: IO WARP.Port pickPort =   EX.bracket     (NW.socket NW.AF_INET NW.Stream NW.defaultProtocol)-    NW.sClose+    NW.close     (\sock -> do         NW.setSocketOption sock NW.ReuseAddr 1-        NW.bindSocket sock (NW.SockAddrInet 0 0)+        NW.bind sock (NW.SockAddrInet 0 0)         port <- NW.socketPort sock-        NW.sClose sock+        NW.close sock         return (fromEnum port))  buildURL :: WARP.Port -> String