http-conduit 1.6.0.4 → 1.6.1
raw patch · 4 files changed
+13/−7 lines, 4 filesdep ~hspec
Dependency ranges changed: hspec
Files
- Network/HTTP/Conduit.hs +5/−1
- Network/HTTP/Conduit/Request.hs +4/−1
- http-conduit.cabal +2/−2
- test/main.hs +2/−3
Network/HTTP/Conduit.hs view
@@ -31,7 +31,11 @@ -- -- * Content-Length ----- * Host+-- Note: In previous versions, the Host header would be set by this module in+-- all cases. Starting from 1.6.1, if a Host header is present in+-- @requestHeaders@, it will be used in place of the header this module would+-- have generated. This can be useful for calling a server which utilizes+-- virtual hosting. -- -- Any network code on Windows requires some initialization, and the network -- library provides withSocketsDo to perform it. Therefore, proper usage of
Network/HTTP/Conduit/Request.hs view
@@ -248,7 +248,10 @@ Just "" -> filter (\(k, _) -> k /= "Accept-Encoding") Just _ -> id - hostHeader = (("Host", hh):)+ hostHeader x =+ case lookup "Host" x of+ Nothing -> ("Host", hh) : x+ Just{} -> x headerPairs :: W.RequestHeaders headerPairs = hostHeader
http-conduit.cabal view
@@ -1,5 +1,5 @@ name: http-conduit-version: 1.6.0.4+version: 1.6.1 license: BSD3 license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>@@ -79,7 +79,7 @@ cpp-options: -DDEBUG build-depends: base >= 4 && < 5 , HUnit- , hspec+ , hspec >= 1.3 , bytestring , transformers , failure
test/main.hs view
@@ -1,9 +1,8 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-}-import Test.Hspec.Monadic+import Test.Hspec import qualified Data.ByteString as S import qualified Data.ByteString.Char8 as S8-import Test.Hspec.HUnit () import Test.HUnit import Network.Wai hiding (requestBody) import qualified Network.Wai@@ -65,7 +64,7 @@ redir3 = (mk (fromString "Location"), fromString "/redir3") main :: IO ()-main = hspecX $ do+main = hspec $ do cookieTest describe "simpleHttp" $ do it "gets homepage" $ do