diff --git a/http-client-openssl/ChangeLog.md b/http-client-openssl/ChangeLog.md index 5e9309c4..4c21b8ed 100644 --- a/http-client-openssl/ChangeLog.md +++ b/http-client-openssl/ChangeLog.md @@ -22,7 +22,7 @@ ## 0.2.1.1 -* Fix a connection-bug with http-proxy(Previous version closes a connection before reading all respose-data.) +* Fix a connection-bug with http-proxy(Previous version closes a connection before reading all response-data.) ## 0.2.1.0 diff --git a/http-client-tls/test/Spec.hs b/http-client-tls/test/Spec.hs index 010a8c3d..09198952 100644 --- a/http-client-tls/test/Spec.hs +++ b/http-client-tls/test/Spec.hs @@ -16,7 +16,7 @@ main = hspec $ do -- the `supportedExtendedMainSecret` parameter `is `RequireEMS`, this means -- that all the connections to a server not supporting TLS1.2+EMS will fail. -- The badssl.com service does not yet support TLS1.2+EMS connections, so - -- let's switch to the value `AllowEMS`, ie: TLS1.2 conenctions without EMS. + -- let's switch to the value `AllowEMS`, ie: TLS1.2 connections without EMS. #if MIN_VERSION_crypton_connection(0,4,0) {settingClientSupported = def {TLS.supportedExtendedMainSecret = TLS.AllowEMS}} #endif diff --git a/http-client/Network/HTTP/Client/Cookies.hs b/http-client/Network/HTTP/Client/Cookies.hs index cfd6698c..9c1ff928 100644 --- a/http-client/Network/HTTP/Client/Cookies.hs +++ b/http-client/Network/HTTP/Client/Cookies.hs @@ -223,15 +223,15 @@ insertCheckedCookie :: Cookie -- ^ The 'SetCookie' the cookie jar is receivin -> Bool -- ^ Whether or not this request is coming from an \"http\" source (not javascript or anything like that) -> CookieJar -- ^ Updated (or not) cookie jar insertCheckedCookie c cookie_jar is_http_api = case (do - (cookie_jar', cookie') <- existanceTest c cookie_jar + (cookie_jar', cookie') <- existenceTest c cookie_jar return $ insertIntoCookieJar cookie' cookie_jar') of Just cj -> cj Nothing -> cookie_jar - where existanceTest cookie cookie_jar' = existanceTestHelper cookie $ removeExistingCookieFromCookieJar cookie cookie_jar' - existanceTestHelper new_cookie (Just old_cookie, cookie_jar') + where existenceTest cookie cookie_jar' = existenceTestHelper cookie $ removeExistingCookieFromCookieJar cookie cookie_jar' + existenceTestHelper new_cookie (Just old_cookie, cookie_jar') | not is_http_api && cookie_http_only old_cookie = Nothing | otherwise = return (cookie_jar', new_cookie {cookie_creation_time = cookie_creation_time old_cookie}) - existanceTestHelper new_cookie (Nothing, cookie_jar') = return (cookie_jar', new_cookie) + existenceTestHelper new_cookie (Nothing, cookie_jar') = return (cookie_jar', new_cookie) -- | Turn a SetCookie into a Cookie, if it is valid generateCookie :: SetCookie -- ^ The 'SetCookie' we are encountering diff --git a/http-client/Network/HTTP/Client/Headers.hs b/http-client/Network/HTTP/Client/Headers.hs index 7c436bd2..514c7fbd 100644 --- a/http-client/Network/HTTP/Client/Headers.hs +++ b/http-client/Network/HTTP/Client/Headers.hs @@ -107,7 +107,7 @@ parseStatusHeaders mhl mnh conn timeout' onEarlyHintHeaders cont Just header -> parseHeaders (count + 1) $ front . (header:) Nothing -> - -- Unparseable header line; rather than throwing + -- Unparsable header line; rather than throwing -- an exception, ignore it for robustness. parseHeaders count front diff --git a/http-client/Network/HTTP/Client/MultipartFormData.hs b/http-client/Network/HTTP/Client/MultipartFormData.hs index 31798aa9..0fb3cc15 100644 --- a/http-client/Network/HTTP/Client/MultipartFormData.hs +++ b/http-client/Network/HTTP/Client/MultipartFormData.hs @@ -247,7 +247,7 @@ renderParts :: Applicative m renderParts boundary parts = (fin . mconcat) <$> traverse (renderPart boundary) parts where fin = (<> cp "--" <> cp boundary <> cp "--\r\n") --- | Generate a boundary simillar to those generated by WebKit-based browsers. +-- | Generate a boundary similar to those generated by WebKit-based browsers. webkitBoundary :: IO BS.ByteString webkitBoundary = getStdRandom webkitBoundaryPure diff --git a/http-client/Network/HTTP/Client/Response.hs b/http-client/Network/HTTP/Client/Response.hs index 52c3eb58..6b5eb48a 100644 --- a/http-client/Network/HTTP/Client/Response.hs +++ b/http-client/Network/HTTP/Client/Response.hs @@ -175,7 +175,7 @@ hasNoBody _ 204 = True hasNoBody _ 304 = True hasNoBody _ i = 100 <= i && i < 200 --- | Retrieve the orignal 'Request' from a 'Response' +-- | Retrieve the original 'Request' from a 'Response' -- -- Note that the 'requestBody' is not available and always set to empty. -- diff --git a/http-client/Network/HTTP/Proxy.hs b/http-client/Network/HTTP/Proxy.hs index 1654ed36..8458b4da 100644 --- a/http-client/Network/HTTP/Proxy.hs +++ b/http-client/Network/HTTP/Proxy.hs @@ -118,11 +118,11 @@ headJust (Nothing:xs) = headJust xs headJust ((y@(Just _)):_) = y systemProxyHelper :: Maybe T.Text -> ProxyProtocol -> EnvHelper -> IO (Request -> Request) -systemProxyHelper envOveride prot eh = do +systemProxyHelper envOverride prot eh = do let envName' Nothing = envName prot envName' (Just name) = name - modifier <- envHelper (envName' envOveride) + modifier <- envHelper (envName' envOverride) -- Under Windows try first env. variables override then Windows proxy settings #if defined(mingw32_HOST_OS) diff --git a/http-conduit/Network/HTTP/Conduit.hs b/http-conduit/Network/HTTP/Conduit.hs index 7fb167ae..f826c8fa 100644 --- a/http-conduit/Network/HTTP/Conduit.hs +++ b/http-conduit/Network/HTTP/Conduit.hs @@ -120,7 +120,7 @@ -- By default, when connecting to websites using HTTPS, functions in this -- package will throw an exception if the TLS certificate doesn't validate. To -- continue the HTTPS transaction even if the TLS cerficate validation fails, --- you should use 'mkManagerSetttings' as follows: +-- you should use 'mkManagerSettings' as follows: -- -- > import Network.Connection (TLSSettings (..)) -- > import Network.HTTP.Conduit diff --git a/http-conduit/test/CookieTest.hs b/http-conduit/test/CookieTest.hs index db608889..f020151a 100644 --- a/http-conduit/test/CookieTest.hs +++ b/http-conduit/test/CookieTest.hs @@ -147,8 +147,8 @@ testCookieEqualitySuccess = assertEqual "The same cookies should be equal" cookie cookie where cookie = default_cookie -testCookieEqualityResiliance :: IO () -testCookieEqualityResiliance = assertBool "Cookies should still be equal if extra options are changed" $ +testCookieEqualityResilience :: IO () +testCookieEqualityResilience = assertBool "Cookies should still be equal if extra options are changed" $ (default_cookie {cookie_persistent = True}) `equivCookie` (default_cookie {cookie_host_only = True}) testDomainChangesEquality :: IO () @@ -159,8 +159,8 @@ testRemoveCookie :: IO () testRemoveCookie = assertEqual "Removing a cookie works" (Just default_cookie, createCookieJar []) (removeExistingCookieFromCookieJar default_cookie $ createCookieJar [default_cookie]) -testRemoveNonexistantCookie :: IO () -testRemoveNonexistantCookie = assertEqual "Removing a nonexistent cookie doesn't work" +testRemoveNonexistentCookie :: IO () +testRemoveNonexistentCookie = assertEqual "Removing a nonexistent cookie doesn't work" (Nothing, createCookieJar [default_cookie]) (removeExistingCookieFromCookieJar (default_cookie {cookie_name = fromString "key2"}) $ createCookieJar [default_cookie]) testRemoveCorrectCookie :: IO () @@ -503,13 +503,13 @@ pathMatchingTests = do equalityTests :: Spec equalityTests = do it "The same cookie should be equal to itself" testCookieEqualitySuccess - it "Changing extra options shouldn't change equality" testCookieEqualityResiliance + it "Changing extra options shouldn't change equality" testCookieEqualityResilience it "Changing a cookie's domain should change its equality" testDomainChangesEquality removeTests :: Spec removeTests = do it "Removing a cookie works" testRemoveCookie - it "Removing a nonexistent cookie doesn't work" testRemoveNonexistantCookie + it "Removing a nonexistent cookie doesn't work" testRemoveNonexistentCookie it "Removing the correct cookie" testRemoveCorrectCookie evictionTests :: Spec