From d006850c3ce8abe51bebc8dc8df4a0cf6676c680 Mon Sep 17 00:00:00 2001 From: Eric Lindblad Date: Sun, 13 Mar 2022 11:00:39 -0500 Subject: [PATCH 1/2] typos --- Network/Browser.hs | 8 ++++---- Network/HTTP/Base.hs | 4 ++-- Network/HTTP/MD5Aux.hs | 2 +- Network/StreamSocket.hs | 2 +- test/get.hs | 2 +- test/getb.hs | 2 +- test/httpTests.hs | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Network/Browser.hs b/Network/Browser.hs index 9283c07..404d4d6 100644 --- a/Network/Browser.hs +++ b/Network/Browser.hs @@ -307,7 +307,7 @@ getAllowBasicAuth :: BrowserAction t Bool getAllowBasicAuth = gets bsAllowBasicAuth -- | @setMaxAuthAttempts mbMax@ sets the maximum number of authentication attempts --- to do. If @Nothing@, rever to default max. +-- to do. If @Nothing@, revert to default max. setMaxAuthAttempts :: Maybe Int -> BrowserAction t () setMaxAuthAttempts mb | fromMaybe 0 mb < 0 = return () @@ -515,7 +515,7 @@ setAllowRedirects bl = modify (\b -> b {bsAllowRedirects=bl}) getAllowRedirects :: BrowserAction t Bool getAllowRedirects = gets bsAllowRedirects --- | @setMaxRedirects maxCount@ sets the maxiumum number of forwarding hops +-- | @setMaxRedirects maxCount@ sets the maximum number of forwarding hops -- we are willing to jump through. A no-op if the count is negative; if zero, -- the max is set to whatever default applies. Notice that setting the max -- redirects count does /not/ enable following of redirects itself; use @@ -587,7 +587,7 @@ setCheckForProxy flg = modify (\ b -> b{bsCheckProxy=flg}) getCheckForProxy :: BrowserAction t Bool getCheckForProxy = gets bsCheckProxy --- | @setDebugLog mbFile@ turns off debug logging iff @mbFile@ +-- | @setDebugLog mbFile@ turns off debug logging if @mbFile@ -- is @Nothing@. If set to @Just fStem@, logs of browser activity -- is appended to files of the form @fStem-url-authority@, i.e., -- @fStem@ is just the prefix for a set of log files, one per host/authority. @@ -600,7 +600,7 @@ setDebugLog v = modify (\b -> b {bsDebug=v}) -- A common form of user agent string is @\"name\/version (details)\"@. For -- example @\"cabal-install/0.10.2 (HTTP 4000.1.2)\"@. Including the version -- of this HTTP package can be helpful if you ever need to track down HTTP --- compatability quirks. This version is available via 'httpPackageVersion'. +-- compatibility quirks. This version is available via 'httpPackageVersion'. -- For more info see . -- setUserAgent :: String -> BrowserAction t () diff --git a/Network/HTTP/Base.hs b/Network/HTTP/Base.hs index de1ac67..858061a 100644 --- a/Network/HTTP/Base.hs +++ b/Network/HTTP/Base.hs @@ -332,7 +332,7 @@ type ResponseCode = (Int,Int,Int) type ResponseData = (ResponseCode,String,[Header]) -- | @RequestData@ contains the head of a HTTP request; method, --- its URL along with the auxillary/supporting header data. +-- its URL along with the auxiliary/supporting header data. type RequestData = (RequestMethod,URI,[Header]) -- | An HTTP Response. @@ -792,7 +792,7 @@ normalizeUserAgent opts req = _ -> replaceHeader HdrUserAgent ua req -- | @normalizeConnectionClose opts req@ sets the header @Connection: close@ --- to indicate one-shot behavior iff @normDoClose@ is @True@. i.e., it then +-- to indicate one-shot behavior if @normDoClose@ is @True@. i.e., it then -- _replaces_ any an existing @Connection:@ header in @req@. normalizeConnectionClose :: RequestNormalizer ty normalizeConnectionClose opts req diff --git a/Network/HTTP/MD5Aux.hs b/Network/HTTP/MD5Aux.hs index 3ccfce0..c3577ae 100644 --- a/Network/HTTP/MD5Aux.hs +++ b/Network/HTTP/MD5Aux.hs @@ -106,7 +106,7 @@ md5 :: (MD5 a) => a -> ABCD md5 m = md5_main False 0 magic_numbers m --- Returns a hex number ala the md5sum program +-- Returns a hex number à la md5sum program md5s :: (MD5 a) => a -> String md5s = abcd_to_string . md5 diff --git a/Network/StreamSocket.hs b/Network/StreamSocket.hs index 398c0cb..6755bed 100644 --- a/Network/StreamSocket.hs +++ b/Network/StreamSocket.hs @@ -17,7 +17,7 @@ -- - Created separate module for instance Stream Socket. -- -- * Changes by Simon Foster: --- - Split module up into to sepearate Network.[Stream,TCP,HTTP] modules +-- - Split module up into to separate Network.[Stream,TCP,HTTP] modules -- ----------------------------------------------------------------------------- module Network.StreamSocket diff --git a/test/get.hs b/test/get.hs index 0961965..25760bf 100644 --- a/test/get.hs +++ b/test/get.hs @@ -1,4 +1,4 @@ --- A simple test program which takes a url on the commandline +-- A simple test program which takes a url on the command line -- and outputs the contents to stdout. -- ghc --make -package HTTP get.hs -o get diff --git a/test/getb.hs b/test/getb.hs index 59259e6..5627952 100644 --- a/test/getb.hs +++ b/test/getb.hs @@ -1,4 +1,4 @@ --- A simple test program which takes a url on the commandline +-- A simple test program which takes a url on the command line -- and outputs the contents to stdout. -- ghc --make -package HTTP get.hs -o get diff --git a/test/httpTests.hs b/test/httpTests.hs index fdc4a0c..24ed35f 100644 --- a/test/httpTests.hs +++ b/test/httpTests.hs @@ -147,7 +147,7 @@ browserExample = do return (take 100 (rspBody rsp)) assertEqual "Receiving expected response" (take 100 haskellOrgText) result --- A vanilla HTTP request using Browser shouln't send a cookie header +-- A vanilla HTTP request using Browser shouldn't send a cookie header browserNoCookie :: (?testUrl :: ServerAddress) => Assertion browserNoCookie = do (_, response) <- browse $ do From e0d51a28e1d0e538e4a46b760977f0292f211008 Mon Sep 17 00:00:00 2001 From: Eric Lindblad Date: Sun, 13 Mar 2022 12:26:34 -0500 Subject: [PATCH 2/2] reinsert --- Network/Browser.hs | 2 +- Network/HTTP/Base.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Network/Browser.hs b/Network/Browser.hs index 404d4d6..d8cfad2 100644 --- a/Network/Browser.hs +++ b/Network/Browser.hs @@ -587,7 +587,7 @@ setCheckForProxy flg = modify (\ b -> b{bsCheckProxy=flg}) getCheckForProxy :: BrowserAction t Bool getCheckForProxy = gets bsCheckProxy --- | @setDebugLog mbFile@ turns off debug logging if @mbFile@ +-- | @setDebugLog mbFile@ turns off debug logging iif @mbFile@ -- is @Nothing@. If set to @Just fStem@, logs of browser activity -- is appended to files of the form @fStem-url-authority@, i.e., -- @fStem@ is just the prefix for a set of log files, one per host/authority. diff --git a/Network/HTTP/Base.hs b/Network/HTTP/Base.hs index 858061a..26f82fa 100644 --- a/Network/HTTP/Base.hs +++ b/Network/HTTP/Base.hs @@ -792,7 +792,7 @@ normalizeUserAgent opts req = _ -> replaceHeader HdrUserAgent ua req -- | @normalizeConnectionClose opts req@ sets the header @Connection: close@ --- to indicate one-shot behavior if @normDoClose@ is @True@. i.e., it then +-- to indicate one-shot behavior iif @normDoClose@ is @True@. i.e., it then -- _replaces_ any an existing @Connection:@ header in @req@. normalizeConnectionClose :: RequestNormalizer ty normalizeConnectionClose opts req