Hello community, here is the log from the commit of package ghc-http-client for openSUSE:Factory checked in at 2016-06-25 02:20:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-http-client (Old) and /work/SRC/openSUSE:Factory/.ghc-http-client.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-http-client" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-http-client/ghc-http-client.changes 2016-04-22 16:25:22.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-http-client.new/ghc-http-client.changes 2016-06-25 02:21:50.000000000 +0200 @@ -1,0 +2,10 @@ +Fri Jun 17 07:48:56 UTC 2016 - [email protected] + +- update to 0.4.29 +* Changed the order of connecting a socket and tweaking a socket, such that + the socket tweaking callback now happen before connecting. +* add setRequestIgnoreStatus +* Added missing Host: HTTP header for https CONNECT +* Fix: Redirects will be followed in httpRaw' when reusing a dead connection + +------------------------------------------------------------------- Old: ---- http-client-0.4.28.tar.gz New: ---- http-client-0.4.29.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-http-client.spec ++++++ --- /var/tmp/diff_new_pack.JtkQBc/_old 2016-06-25 02:21:51.000000000 +0200 +++ /var/tmp/diff_new_pack.JtkQBc/_new 2016-06-25 02:21:51.000000000 +0200 @@ -21,7 +21,7 @@ %bcond_with tests Name: ghc-http-client -Version: 0.4.28 +Version: 0.4.29 Release: 0 Summary: HTTP client engine, intended as a base layer License: MIT ++++++ http-client-0.4.28.tar.gz -> http-client-0.4.29.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-client-0.4.28/ChangeLog.md new/http-client-0.4.29/ChangeLog.md --- old/http-client-0.4.28/ChangeLog.md 2016-04-15 10:51:33.000000000 +0200 +++ new/http-client-0.4.29/ChangeLog.md 2016-06-16 14:06:36.000000000 +0200 @@ -1,3 +1,10 @@ +## 0.4.29 + +* Changed the order of connecting a socket and tweaking a socket, such that the socket tweaking callback now happen before connecting. +* add setRequestIgnoreStatus [#201](https://github.com/snoyberg/http-client/pull/201) +* Added missing Host: HTTP header for https CONNECT [#192](https://github.com/snoyberg/http-client/pull/192) +* Fix: Redirects will be followed in httpRaw' when reusing a dead connection [#195](https://github.com/snoyberg/http-client/issues/195) + ## 0.4.28 * Add support for including request method in URL diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-client-0.4.28/Network/HTTP/Client/Connection.hs new/http-client-0.4.29/Network/HTTP/Client/Connection.hs --- old/http-client-0.4.28/Network/HTTP/Client/Connection.hs 2016-04-15 10:51:33.000000000 +0200 +++ new/http-client-0.4.29/Network/HTTP/Client/Connection.hs 2016-06-16 14:06:36.000000000 +0200 @@ -41,7 +41,7 @@ go bs0 id 0 where go bs front total = - case S.breakByte charLF bs of + case S.break (== charLF) bs of (_, "") -> do let total' = total + S.length bs when (total' > 4096) $ throwIO OverlongHeaders @@ -165,8 +165,8 @@ (NS.sClose) (\sock -> do NS.setSocketOption sock NS.NoDelay 1 - NS.connect sock (NS.addrAddress addr) tweakSocket sock + NS.connect sock (NS.addrAddress addr) socketConnection sock chunksize) firstSuccessful :: [NS.AddrInfo] -> (NS.AddrInfo -> IO a) -> IO a diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-client-0.4.28/Network/HTTP/Client/Cookies.hs new/http-client-0.4.29/Network/HTTP/Client/Cookies.hs --- old/http-client-0.4.28/Network/HTTP/Client/Cookies.hs 2016-04-15 10:51:33.000000000 +0200 +++ new/http-client-0.4.29/Network/HTTP/Client/Cookies.hs 2016-06-16 14:06:36.000000000 +0200 @@ -47,7 +47,7 @@ Just (i, x') | BS.null x' && i >= 0 && i < 256 -> go (rest - 1) y _ -> False where - (x, y') = BS.breakByte 46 bs -- period + (x, y') = BS.break (== 46) bs -- period y = BS.drop 1 y' -- | This corresponds to the subcomponent algorithm entitled \"Domain Matching\" detailed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-client-0.4.28/Network/HTTP/Client/Core.hs new/http-client-0.4.29/Network/HTTP/Client/Core.hs --- old/http-client-0.4.28/Network/HTTP/Client/Core.hs 2016-04-15 10:51:33.000000000 +0200 +++ new/http-client-0.4.29/Network/HTTP/Client/Core.hs 2016-06-16 14:06:36.000000000 +0200 @@ -113,8 +113,7 @@ -- Connection was reused, and might have been closed. Try again (Left e, Reused) | mRetryableException m e -> do connRelease DontReuse - res <- responseOpen req m - return (req, res) + httpRaw' req m -- Not reused, or a non-retry, so this is a real exception (Left e, _) -> throwIO e -- Everything went ok, so the connection is good. If any exceptions get diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-client-0.4.28/Network/HTTP/Client/Headers.hs new/http-client-0.4.29/Network/HTTP/Client/Headers.hs --- old/http-client-0.4.28/Network/HTTP/Client/Headers.hs 2016-04-15 10:51:33.000000000 +0200 +++ new/http-client-0.4.29/Network/HTTP/Client/Headers.hs 2016-06-16 14:06:36.000000000 +0200 @@ -61,8 +61,8 @@ parseStatus :: Int -> S.ByteString -> IO (Status, HttpVersion) parseStatus i bs | S.null bs && i > 0 = connectionReadLine conn >>= parseStatus (i - 1) parseStatus _ bs = do - let (ver, bs2) = S.breakByte charSpace bs - (code, bs3) = S.breakByte charSpace $ S.dropWhile (== charSpace) bs2 + let (ver, bs2) = S.break (== charSpace) bs + (code, bs3) = S.break (== charSpace) $ S.dropWhile (== charSpace) bs2 msg = S.dropWhile (== charSpace) bs3 case (,) <$> parseVersion ver <*> readInt code of Just (ver', code') -> return (Status code' msg, ver') @@ -73,7 +73,7 @@ | otherwise = Nothing parseVersion bs0 = do bs1 <- stripPrefixBS "HTTP/" bs0 - let (num1, S.drop 1 -> num2) = S.breakByte charPeriod bs1 + let (num1, S.drop 1 -> num2) = S.break (== charPeriod) bs1 HttpVersion <$> readInt num1 <*> readInt num2 readInt bs = @@ -92,7 +92,7 @@ parseHeader :: S.ByteString -> IO Header parseHeader bs = do - let (key, bs2) = S.breakByte charColon bs + let (key, bs2) = S.break (== charColon) bs when (S.null bs2) $ throwIO $ InvalidHeader bs return (CI.mk $! strip key, strip $! S.drop 1 bs2) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-client-0.4.28/Network/HTTP/Client/Manager.hs new/http-client-0.4.29/Network/HTTP/Client/Manager.hs --- old/http-client-0.4.28/Network/HTTP/Client/Manager.hs 2016-04-15 10:51:33.000000000 +0200 +++ new/http-client-0.4.29/Network/HTTP/Client/Manager.hs 2016-06-16 14:06:36.000000000 +0200 @@ -434,6 +434,7 @@ let ultHost = host req ultPort = port req proxyAuthorizationHeader = maybe "" (\h -> S8.concat ["Proxy-Authorization: ", h, "\r\n"]) . lookup "Proxy-Authorization" $ requestHeaders req + hostHeader = S8.concat ["Host: ", ultHost, (S8.pack $ show ultPort), "\r\n"] connstr = S8.concat [ "CONNECT " , ultHost @@ -441,6 +442,7 @@ , S8.pack $ show ultPort , " HTTP/1.1\r\n" , proxyAuthorizationHeader + , hostHeader , "\r\n" ] parse conn = do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-client-0.4.28/Network/HTTP/Client/Request.hs new/http-client-0.4.29/Network/HTTP/Client/Request.hs --- old/http-client-0.4.28/Network/HTTP/Client/Request.hs 2016-04-15 10:51:33.000000000 +0200 +++ new/http-client-0.4.29/Network/HTTP/Client/Request.hs 2016-06-16 14:06:36.000000000 +0200 @@ -20,6 +20,7 @@ , needsGunzip , requestBuilder , useDefaultTimeout + , setRequestIgnoreStatus , setQueryString , streamFile , observedStreamFile @@ -469,6 +470,13 @@ <> fromByteString v <> fromByteString "\r\n" +-- | Modify the request so that non-2XX status codes do not generate a runtime +-- 'StatusCodeException'. +-- +-- @since 0.4.29 +setRequestIgnoreStatus :: Request -> Request +setRequestIgnoreStatus req = req { checkStatus = \_ _ _ -> Nothing } + -- | Set the query string to the given key/value pairs. -- -- Since 0.3.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-client-0.4.28/Network/HTTP/Client.hs new/http-client-0.4.29/Network/HTTP/Client.hs --- old/http-client-0.4.28/Network/HTTP/Client.hs 2016-04-15 10:51:33.000000000 +0200 +++ new/http-client-0.4.29/Network/HTTP/Client.hs 2016-06-16 14:06:36.000000000 +0200 @@ -132,6 +132,7 @@ , applyBasicAuth , urlEncodedBody , getUri + , setRequestIgnoreStatus , setQueryString -- ** Request type and fields , Request diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-client-0.4.28/http-client.cabal new/http-client-0.4.29/http-client.cabal --- old/http-client-0.4.28/http-client.cabal 2016-04-15 10:51:33.000000000 +0200 +++ new/http-client-0.4.29/http-client.cabal 2016-06-16 14:06:36.000000000 +0200 @@ -1,5 +1,5 @@ name: http-client -version: 0.4.28 +version: 0.4.29 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/http-client-0.4.28/publicsuffixlist/Network/PublicSuffixList/Serialize.hs new/http-client-0.4.29/publicsuffixlist/Network/PublicSuffixList/Serialize.hs --- old/http-client-0.4.28/publicsuffixlist/Network/PublicSuffixList/Serialize.hs 2016-04-15 10:51:33.000000000 +0200 +++ new/http-client-0.4.29/publicsuffixlist/Network/PublicSuffixList/Serialize.hs 2016-06-16 14:06:36.000000000 +0200 @@ -35,7 +35,7 @@ getText bs0 = (TE.decodeUtf8 v, BS.drop 1 bs1) where - (v, bs1) = BS.breakByte 0 bs0 + (v, bs1) = BS.break (== 0) bs0 getDataStructure :: BS.ByteString -> DataStructure getDataStructure bs0 =
