packages feed

http-client 0.4.4 → 0.4.5

raw patch · 4 files changed

+26/−6 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Network.HTTP.Client.Internal: openSocketConnectionSize :: (Socket -> IO ()) -> Int -> Maybe HostAddress -> String -> Int -> IO Connection

Files

ChangeLog.md view
@@ -1,3 +1,7 @@+## 0.4.5++Add `openSocketConnectionSize` and increase default chunk size to 8192.+ ## 0.4.4  Add `managerModifyRequest` field to `ManagerSettings`.
Network/HTTP/Client/Connection.hs view
@@ -7,6 +7,7 @@     , connectionDropTillBlankLine     , dummyConnection     , openSocketConnection+    , openSocketConnectionSize     , makeConnection     ) where @@ -95,9 +96,9 @@         , connectionClose = c         } -socketConnection :: Socket -> IO Connection-socketConnection socket = makeConnection-    (recv socket 4096)+socketConnection :: Socket -> Int -> IO Connection+socketConnection socket chunksize = makeConnection+    (recv socket chunksize)     (sendAll socket)     (sClose socket) @@ -106,7 +107,15 @@                      -> String -- ^ host                      -> Int -- ^ port                      -> IO Connection-openSocketConnection tweakSocket hostAddress host port = do+openSocketConnection f = openSocketConnectionSize f 8192++openSocketConnectionSize :: (Socket -> IO ())+                         -> Int -- ^ chunk size+                         -> Maybe HostAddress+                         -> String -- ^ host+                         -> Int -- ^ port+                         -> IO Connection+openSocketConnectionSize tweakSocket chunksize hostAddress host port = do     let hints = NS.defaultHints {                           NS.addrFlags = [NS.AI_ADDRCONFIG]                         , NS.addrSocketType = NS.Stream@@ -134,7 +143,7 @@                 NS.setSocketOption sock NS.NoDelay 1                 NS.connect sock (NS.addrAddress addr)                 tweakSocket sock-                socketConnection sock)+                socketConnection sock chunksize)  firstSuccessful :: [NS.AddrInfo] -> (NS.AddrInfo -> IO a) -> IO a firstSuccessful []     _  = error "getAddrInfo returned empty list"
Network/HTTP/Client/Manager.hs view
@@ -58,6 +58,13 @@                           -> IO (Maybe NS.HostAddress -> String -> Int -> IO Connection) rawConnectionModifySocket = return . openSocketConnection +-- | Same as @rawConnectionModifySocket@, but also takes in a chunk size.+--+-- Since 0.4.5+rawConnectionModifySocketSize :: (NS.Socket -> IO ())+                              -> IO (Int -> Maybe NS.HostAddress -> String -> Int -> IO Connection)+rawConnectionModifySocketSize = return . openSocketConnectionSize+ -- | Default value for @ManagerSettings@. -- -- Note that this value does /not/ have support for SSL/TLS. If you need to
http-client.cabal view
@@ -1,5 +1,5 @@ name:                http-client-version:             0.4.4+version:             0.4.5 synopsis:            An HTTP client engine, intended as a base layer for more user-friendly packages. description:         This codebase has been refactored from http-conduit. homepage:            https://github.com/snoyberg/http-client