packages feed

http-conduit 1.5.0 → 1.5.0.1

raw patch · 4 files changed

+22/−24 lines, 4 filesdep ~http-typesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: http-types

API changes (from Hackage documentation)

- Network.HTTP.Conduit: Cookie :: Ascii -> Ascii -> UTCTime -> Ascii -> Ascii -> UTCTime -> UTCTime -> Bool -> Bool -> Bool -> Bool -> Cookie
+ Network.HTTP.Conduit: Cookie :: ByteString -> ByteString -> UTCTime -> ByteString -> ByteString -> UTCTime -> UTCTime -> Bool -> Bool -> Bool -> Bool -> Cookie
- Network.HTTP.Conduit: Proxy :: Ascii -> Int -> Proxy
+ Network.HTTP.Conduit: Proxy :: ByteString -> Int -> Proxy
- Network.HTTP.Conduit: computeCookieString :: Request m -> CookieJar -> UTCTime -> Bool -> (Ascii, CookieJar)
+ Network.HTTP.Conduit: computeCookieString :: Request m -> CookieJar -> UTCTime -> Bool -> (ByteString, CookieJar)
- Network.HTTP.Conduit: cookie_domain :: Cookie -> Ascii
+ Network.HTTP.Conduit: cookie_domain :: Cookie -> ByteString
- Network.HTTP.Conduit: cookie_name :: Cookie -> Ascii
+ Network.HTTP.Conduit: cookie_name :: Cookie -> ByteString
- Network.HTTP.Conduit: cookie_path :: Cookie -> Ascii
+ Network.HTTP.Conduit: cookie_path :: Cookie -> ByteString
- Network.HTTP.Conduit: cookie_value :: Cookie -> Ascii
+ Network.HTTP.Conduit: cookie_value :: Cookie -> ByteString
- Network.HTTP.Conduit: defaultCheckCerts :: Ascii -> [X509] -> IO TLSCertificateUsage
+ Network.HTTP.Conduit: defaultCheckCerts :: ByteString -> [X509] -> IO TLSCertificateUsage
- Network.HTTP.Conduit: host :: Request m -> Ascii
+ Network.HTTP.Conduit: host :: Request m -> ByteString
- Network.HTTP.Conduit: managerCheckCerts :: ManagerSettings -> Ascii -> [X509] -> IO TLSCertificateUsage
+ Network.HTTP.Conduit: managerCheckCerts :: ManagerSettings -> ByteString -> [X509] -> IO TLSCertificateUsage
- Network.HTTP.Conduit: path :: Request m -> Ascii
+ Network.HTTP.Conduit: path :: Request m -> ByteString
- Network.HTTP.Conduit: proxyHost :: Proxy -> Ascii
+ Network.HTTP.Conduit: proxyHost :: Proxy -> ByteString
- Network.HTTP.Conduit: queryString :: Request m -> Ascii
+ Network.HTTP.Conduit: queryString :: Request m -> ByteString

Files

Network/HTTP/Conduit/Cookies.hs view
@@ -1,7 +1,6 @@ -- | This module implements the algorithms described in RFC 6265 for the Network.HTTP.Conduit library. module Network.HTTP.Conduit.Cookies where -import qualified Network.HTTP.Types as W import qualified Data.ByteString as BS import qualified Data.ByteString.UTF8 as U import Text.Regex@@ -20,7 +19,7 @@ slash :: Integral a => a slash = 47 -- '/' -isIpAddress :: W.Ascii -> Bool+isIpAddress :: BS.ByteString -> Bool isIpAddress a = case strs of   Just strs' -> helper strs'   Nothing -> False@@ -32,7 +31,7 @@  -- | This corresponds to the subcomponent algorithm entitled \"Domain Matching\" detailed -- in section 5.1.3-domainMatches :: W.Ascii -> W.Ascii -> Bool+domainMatches :: BS.ByteString -> BS.ByteString -> Bool domainMatches string domainString   | string == domainString = True   | BS.length string < BS.length domainString + 1 = False@@ -42,7 +41,7 @@  -- | This corresponds to the subcomponent algorithm entitled \"Paths\" detailed -- in section 5.1.4-defaultPath :: Req.Request m -> W.Ascii+defaultPath :: Req.Request m -> BS.ByteString defaultPath req   | BS.null uri_path = U.fromString "/"   | BS.singleton (BS.head uri_path) /= U.fromString "/" = U.fromString "/"@@ -52,7 +51,7 @@  -- | This corresponds to the subcomponent algorithm entitled \"Path-Match\" detailed -- in section 5.1.4-pathMatches :: W.Ascii -> W.Ascii -> Bool+pathMatches :: BS.ByteString -> BS.ByteString -> Bool pathMatches requestPath cookiePath   | cookiePath == requestPath = True   | cookiePath `BS.isPrefixOf` requestPath && BS.singleton (BS.last cookiePath) == U.fromString "/" = True@@ -62,11 +61,11 @@  -- This corresponds to the description of a cookie detailed in Section 5.3 \"Storage Model\" data Cookie = Cookie-  { cookie_name :: W.Ascii-  , cookie_value :: W.Ascii+  { cookie_name :: BS.ByteString+  , cookie_value :: BS.ByteString   , cookie_expiry_time :: UTCTime-  , cookie_domain :: W.Ascii-  , cookie_path :: W.Ascii+  , cookie_domain :: BS.ByteString+  , cookie_path :: BS.ByteString   , cookie_creation_time :: UTCTime   , cookie_last_access_time :: UTCTime   , cookie_persistent :: Bool@@ -123,7 +122,7 @@ rejectPublicSuffixes :: Bool rejectPublicSuffixes = True -isPublicSuffix :: W.Ascii -> Bool+isPublicSuffix :: BS.ByteString -> Bool isPublicSuffix _ = False  -- | This corresponds to the eviction algorithm described in Section 5.3 \"Storage Model\"@@ -149,7 +148,7 @@                     -> CookieJar             -- ^ Current cookie jar                     -> UTCTime               -- ^ Value that should be used as \"now\"                     -> Bool                  -- ^ Whether or not this request is coming from an \"http\" source (not javascript or anything like that)-                    -> (W.Ascii, CookieJar)  -- ^ (Contents of a \"Cookie\" header, Updated cookie jar (last-access-time is updated))+                    -> (BS.ByteString, CookieJar)  -- ^ (Contents of a \"Cookie\" header, Updated cookie jar (last-access-time is updated)) computeCookieString request cookie_jar now is_http_api = (output_line, cookie_jar')   where matching_cookie cookie = condition1 && condition2 && condition3 && condition4           where condition1
Network/HTTP/Conduit/Manager.hs view
@@ -46,7 +46,6 @@ import Network.Socket (socketToHandle) import Data.Certificate.X509 (X509, encodeCertificate) -import qualified Network.HTTP.Types as W import Network.TLS.Extra (certificateVerifyChain, certificateVerifyDomain)  import Network.HTTP.Conduit.ConnInfo@@ -63,7 +62,7 @@ data ManagerSettings = ManagerSettings     { managerConnCount :: Int       -- ^ Number of connections to a single host to keep alive. Default: 10.-    , managerCheckCerts :: W.Ascii -> [X509] -> IO TLSCertificateUsage+    , managerCheckCerts :: S8.ByteString -> [X509] -> IO TLSCertificateUsage       -- ^ Check if the server certificate is valid. Only relevant for HTTPS.     } @@ -76,7 +75,7 @@         }  -- | Check certificates using the operating system's certificate checker.-defaultCheckCerts :: W.Ascii -> [X509] -> IO TLSCertificateUsage+defaultCheckCerts :: S8.ByteString -> [X509] -> IO TLSCertificateUsage defaultCheckCerts host' certs =     case certificateVerifyDomain (S8.unpack host') certs of         CertificateUsageAccept -> certificateVerifyChain certs@@ -89,9 +88,9 @@     -- ^ @Nothing@ indicates that the manager is closed.     , mMaxConns :: !Int     -- ^ This is a per-@ConnKey@ value.-    , mCheckCerts :: W.Ascii -> [X509] -> IO TLSCertificateUsage+    , mCheckCerts :: S8.ByteString -> [X509] -> IO TLSCertificateUsage     -- ^ Check if a certificate is valid.-    , mCertCache :: !(I.IORef (Map.Map W.Ascii (Map.Map X509Encoded UTCTime)))+    , mCertCache :: !(I.IORef (Map.Map S8.ByteString (Map.Map X509Encoded UTCTime)))     -- ^ Cache of validated certificates. The @UTCTime@ gives the expiration     -- time for the validity of the certificate. The @Ascii@ is the hostname.     }@@ -149,7 +148,7 @@  -- | Collect and destroy any stale connections. reap :: I.IORef (Maybe (Map.Map ConnKey (NonEmptyList ConnInfo)))-     -> I.IORef (Map.Map W.Ascii (Map.Map X509Encoded UTCTime))+     -> I.IORef (Map.Map S8.ByteString (Map.Map X509Encoded UTCTime))      -> IO () reap mapRef certCacheRef =     mask_ loop@@ -394,7 +393,7 @@             (True, False) -> getSslConn $ checkCerts m h             (True, True) -> getSslProxyConn (checkCerts m h) h (port req) -checkCerts :: Manager -> W.Ascii -> [X509] -> IO TLSCertificateUsage+checkCerts :: Manager -> S8.ByteString -> [X509] -> IO TLSCertificateUsage checkCerts man host' certs = do #if DEBUG     putStrLn $ "checkCerts for host: " ++ show host'
Network/HTTP/Conduit/Request.hs view
@@ -76,11 +76,11 @@     -- ^ HTTP request method, eg GET, POST.     , secure :: Bool     -- ^ Whether to use HTTPS (ie, SSL).-    , host :: W.Ascii+    , host :: S.ByteString     , port :: Int-    , path :: W.Ascii+    , path :: S.ByteString     -- ^ Everything from the host to the query string.-    , queryString :: W.Ascii+    , queryString :: S.ByteString     , requestHeaders :: W.RequestHeaders     , requestBody :: RequestBody m     , proxy :: Maybe Proxy@@ -122,7 +122,7 @@ -- | Define a HTTP proxy, consisting of a hostname and port number.  data Proxy = Proxy-    { proxyHost :: W.Ascii -- ^ The host name of the HTTP proxy.+    { proxyHost :: S.ByteString -- ^ The host name of the HTTP proxy.     , proxyPort :: Int -- ^ The port number of the HTTP proxy.     } 
http-conduit.cabal view
@@ -1,5 +1,5 @@ name:            http-conduit-version:         1.5.0+version:         1.5.0.1 license:         BSD3 license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>@@ -30,7 +30,7 @@                  , attoparsec            >= 0.8.0.2 && < 0.11                  , utf8-string           >= 0.3.4   && < 0.4                  , blaze-builder         >= 0.2.1   && < 0.4-                 , http-types            >= 0.6     && < 0.7+                 , http-types            >= 0.6     && < 0.8                  , cprng-aes             >= 0.2     && < 0.3                  , tls                   >= 0.9.3   && < 0.10                  , tls-extra             >= 0.4.5   && < 0.5