packages feed

http-client 0.4.24 → 0.4.25

raw patch · 6 files changed

+28/−1 lines, 6 filesdep ~base

Dependency ranges changed: base

Files

ChangeLog.md view
@@ -1,3 +1,7 @@+## 0.4.25++* Don't error out when response body flushing fails [#169](https://github.com/snoyberg/http-client/issues/169)+ ## 0.4.24  * Use a new `TlsExceptionHostPort` exception to indicate the host and port of the server we were trying to connect to when a TLS exception occurred. See [commercialhaskell/stack#1010](https://github.com/commercialhaskell/stack/issues/1010)
Network/HTTP/Client/Core.hs view
@@ -190,6 +190,9 @@             responseClose res             return (Just exc')   where+#ifndef MIN_VERSION_bytestring+#define MIN_VERSION_bytestring(x,y,z) 1+#endif #if MIN_VERSION_bytestring(0,10,0)     toStrict' = L.toStrict #else@@ -215,6 +218,12 @@                 -- instead just close the connection.                 let maxFlush = 1024                 lbs <- brReadSome (responseBody res) maxFlush+                    -- Ignore IO exceptions at this point. A server may+                    -- terminate the connection immediately in some cases, such+                    -- as when using withResponseHistory (where the response+                    -- body may be flushed before getting this far). See:+                    -- https://github.com/snoyberg/http-client/issues/169+                    `catch` \(_ :: IOException) -> return L.empty                 responseClose res                  -- And now perform the actual redirect
Network/HTTP/Client/Manager.hs view
@@ -22,6 +22,9 @@     , dropProxyAuthSecure     ) where +#ifndef MIN_VERSION_base+#define MIN_VERSION_base(x,y,z) 1+#endif #if !MIN_VERSION_base(4,6,0) import Prelude hiding (catch) #endif
Network/HTTP/Client/Request.hs view
@@ -87,6 +87,9 @@ -- it as per 'setUri'; if it is relative, merge it with the existing request. setUriRelative :: MonadThrow m => Request -> URI -> m Request setUriRelative req uri =+#ifndef MIN_VERSION_network+#define MIN_VERSION_network(x,y,z) 1+#endif #if MIN_VERSION_network(2,4,0)     setUri req $ uri `relativeTo` getUri req #else
Network/HTTP/Client/Util.hs view
@@ -16,6 +16,11 @@ import Data.Monoid (Monoid, mappend)  import qualified Data.ByteString.Char8 as S8++#ifndef MIN_VERSION_bytestring+#define MIN_VERSION_bytestring(x,y,z) 1+#endif+ #if MIN_VERSION_bytestring(0,10,0) import Data.ByteString.Lazy (fromStrict) #else@@ -35,6 +40,9 @@ import Data.Function (fix) import Data.Typeable (Typeable) +#ifndef MIN_VERSION_base+#define MIN_VERSION_base(x,y,z) 1+#endif #if MIN_VERSION_base(4,3,0) import Data.ByteString (hGetSome) #else
http-client.cabal view
@@ -1,5 +1,5 @@ name:                http-client-version:             0.4.24+version:             0.4.25 synopsis:            An HTTP client engine, intended as a base layer for more user-friendly packages. description:         Hackage documentation generation is not reliable. For up to date documentation, please see: <http://www.stackage.org/package/http-client>. homepage:            https://github.com/snoyberg/http-client