hxt-curl 9.1.1 → 9.1.1.1
raw patch · 2 files changed
+31/−35 lines, 2 files
Files
- hxt-curl.cabal +7/−3
- src/Text/XML/HXT/IO/GetHTTPLibCurl.hs +24/−32
hxt-curl.cabal view
@@ -1,6 +1,6 @@ -- arch-tag: Haskell XML Toolbox main description file Name: hxt-curl-Version: 9.1.1+Version: 9.1.1.1 Synopsis: LibCurl interface for HXT Description: LibCurl interface for HXT License: OtherLicense@@ -9,7 +9,7 @@ Maintainer: Uwe Schmidt <uwe@fh-wedel.de> Stability: Stable Category: XML-Homepage: http://www.fh-wedel.de/~si/HXmlToolbox/index.html+Homepage: https://github.com/UweSchmidt/hxt Copyright: Copyright (c) 2010 Uwe Schmidt Build-type: Simple Cabal-version: >=1.6@@ -25,7 +25,7 @@ hs-source-dirs: src ghc-options: -Wall- ghc-prof-options: -auto-all -caf-all+ ghc-prof-options: -caf-all extensions: @@ -34,3 +34,7 @@ bytestring >= 0.9 && < 1, curl >= 1.3 && < 2, hxt >= 9.1 && < 10++Source-Repository head+ Type: git+ Location: git://github.com/UweSchmidt/hxt.git
src/Text/XML/HXT/IO/GetHTTPLibCurl.hs view
@@ -21,42 +21,34 @@ where -import Control.Arrow ( first- , (>>>)- )-import Control.Concurrent.MVar-import Control.Monad ( when )+import Control.Arrow (first, (>>>))+import Control.Concurrent.MVar+import Control.Monad (when) -import qualified Data.ByteString.Lazy as B+import qualified Data.ByteString.Lazy as B -import Data.Char ( isDigit- , isSpace- )-import Data.List ( isPrefixOf )+import Data.Char (isDigit, isSpace)+import Data.List (isPrefixOf) -import Network.Curl+import Network.Curl -import System.IO-import System.IO.Unsafe ( unsafePerformIO )+import System.IO+import System.IO.Unsafe (unsafePerformIO) -import Text.ParserCombinators.Parsec ( parse )+import Text.ParserCombinators.Parsec (parse) -import Text.XML.HXT.DOM.Util ( stringToLower )-import Text.XML.HXT.DOM.XmlKeywords ( transferStatus- , transferMessage- , transferVersion- , httpPrefix- )+import Text.XML.HXT.DOM.Util (stringToLower)+import Text.XML.HXT.DOM.XmlKeywords (httpPrefix,+ transferMessage,+ transferStatus,+ transferVersion) -import Text.XML.HXT.Arrow.XmlOptions ( a_proxy- , a_redirect- , a_if_modified_since- , a_if_unmodified_since- )+import Text.XML.HXT.Arrow.XmlOptions (a_if_modified_since,+ a_if_unmodified_since,+ a_proxy, a_redirect) -import Text.XML.HXT.Parser.ProtocolHandlerUtil- ( parseContentType )-import Text.XML.HXT.Version+import Text.XML.HXT.Parser.ProtocolHandlerUtil (parseContentType)+import Text.XML.HXT.Version -- ------------------------------------------------------------ --@@ -198,7 +190,7 @@ >>> concat - statusLine (vers : _code : msg) -- the status line of the curl response can be an old one, + statusLine (vers : _code : msg) -- the status line of the curl response can be an old one, -- e.g. in the case of a redirect, = [ mkH transferVersion vers -- so the return code is taken from that status field, , mkH transferMessage $ unwords msg -- which is contains the last status@@ -216,10 +208,10 @@ copt :: String -> String -> [CurlOption] copt k v- | "curl-" `isPrefixOf` k = copt (drop 4 k) v -- throw away curl prefix- | "--" `isPrefixOf` k = opt2copt (drop 2 k) v+ | "curl-" `isPrefixOf` k = copt (drop 4 k) v -- throw away curl prefix+ | "--" `isPrefixOf` k = opt2copt (drop 2 k) v | k `elem` [ a_proxy- , a_redirect] = opt2copt k v+ , a_redirect] = opt2copt k v | otherwise = opt2copt k v