hxt-curl 9.0.0 → 9.1.0
raw patch · 3 files changed
+15/−12 lines, 3 filesdep ~hxt
Dependency ranges changed: hxt
Files
- hxt-curl.cabal +3/−2
- src/Text/XML/HXT/Arrow/LibCurlInput.hs +7/−4
- src/Text/XML/HXT/IO/GetHTTPLibCurl.hs +5/−6
hxt-curl.cabal view
@@ -1,6 +1,6 @@ -- arch-tag: Haskell XML Toolbox main description file Name: hxt-curl-Version: 9.0.0+Version: 9.1.0 Synopsis: LibCurl interface for HXT Description: LibCurl interface for HXT License: OtherLicense@@ -25,6 +25,7 @@ hs-source-dirs: src ghc-options: -Wall+ ghc-prof-options: -auto-all -caf-all extensions: @@ -33,4 +34,4 @@ parsec >= 2.1 && < 4, bytestring >= 0.9 && < 1, curl >= 1.3 && < 2,- hxt >= 9 && < 10+ hxt >= 9.1 && < 10
src/Text/XML/HXT/Arrow/LibCurlInput.hs view
@@ -27,6 +27,9 @@ import Control.Arrow.ArrowTree import Control.Arrow.ArrowIO +import qualified Data.ByteString.Lazy as B+-- import qualified Data.ByteString.Lazy.Char8 as C+ import System.Console.GetOpt import Text.XML.HXT.Arrow.DocumentInput ( addInputError )@@ -76,11 +79,11 @@ : (a_redirect, show . fromEnum $ redirect) : options -addContent :: (Attributes, String) -> IOSArrow XmlTree XmlTree-addContent (al, c)- = replaceChildren (txt c) -- add the contents+addContent :: (Attributes, B.ByteString) -> IOSArrow XmlTree XmlTree+addContent (al, bc)+ = replaceChildren (blb bc) -- add the contents >>>- seqA (map (uncurry addAttr) al) -- add the meta info (HTTP headers, ...)+ seqA (map (uncurry addAttr) al) -- add the meta info (HTTP headers, ...) -- ------------------------------------------------------------
src/Text/XML/HXT/IO/GetHTTPLibCurl.hs view
@@ -27,8 +27,7 @@ import Control.Concurrent.MVar import Control.Monad ( when ) -import qualified Data.ByteString as B-import qualified Data.ByteString.Char8 as C+import qualified Data.ByteString.Lazy as B import Data.Char ( isDigit , isSpace@@ -113,8 +112,8 @@ -- will set the user agent and the referer URL for this request. getCont :: Bool -> [(String, String)] -> String ->- IO (Either ([(String, String)], String)- ([(String, String)], String))+ IO (Either ([(String, String)], String)+ ([(String, String)], B.ByteString)) getCont strictInput options uri = do initCurl@@ -165,13 +164,13 @@ ) | otherwise = Right ( contentT rsh ++ headers- , C.unpack body+ , body ) where body :: B.ByteString body | strictInput = B.length body' `seq` body'- | otherwise = body'+ | otherwise = body' where body' = respBody r