wai-extra 3.0.6 → 3.0.6.1
raw patch · 4 files changed
+11/−3 lines, 4 files
Files
- ChangeLog.md +5/−0
- Network/Wai/Test.hs +4/−1
- test/Network/Wai/TestSpec.hs +1/−1
- wai-extra.cabal +1/−1
ChangeLog.md view
@@ -1,3 +1,8 @@+## 3.0.6.1++* Test code: only include a Cookie header if there are cookies. Without this+ patch, yesod-test cookie handling is broken.+ ## 3.0.6 * Add Cookie Handling to Network.Wai.Test [#356](https://github.com/yesodweb/wai/pull/356)
Network/Wai/Test.hs view
@@ -154,7 +154,10 @@ | c <- map snd $ Map.toList cookiesForRequest ] let cookieValue = toByteString $ Cookie.renderCookies cookiePairs- return $ req { requestHeaders = ("Cookie", cookieValue):requestHeaders req }+ addCookieHeader rest+ | null cookiePairs = rest+ | otherwise = ("Cookie", cookieValue) : rest+ return $ req { requestHeaders = addCookieHeader $ requestHeaders req } where checkCookieTime t c = case Cookie.setCookieExpires c of Nothing -> True
test/Network/Wai/TestSpec.hs view
@@ -187,7 +187,7 @@ deleteClientCookie "cookie_name" request $ setPath defaultRequest "/get"- simpleBody sresp `shouldBe` "[\"\"]"+ simpleBody sresp `shouldBe` "[]"
wai-extra.cabal view
@@ -1,5 +1,5 @@ Name: wai-extra-Version: 3.0.6+Version: 3.0.6.1 Synopsis: Provides some basic WAI handlers and middleware. description: Provides basic WAI handler and middleware functionality: