on master help sign in
adding a test case for addHeader.

Since addHeader is buggy, this fails.

commit9f329a65ff82bbf2ca3606fc491966a5457e665d authorKazu Yamamoto <kazu@iij.ad.jp> dateFri 7 Sep 2018, 13:41 (8 years ago) parent834720f
1 file changed+5
warp/test/ResponseHeaderSpec.hs+5
warp/test/ResponseHeaderSpec.hs+5
@@ -62,6 +62,11 @@ spec = do
6262 (thl, vt) <- toHeaderTable hdrs
6363 (thl1, _) <- toHeaderTable hdrs1
6464 addHeader tokenServer v vt thl `shouldBe` thl1
65+ it "keeps Server" $ do
66+ let v = ""
67+ hdrs = [("Server","MyServer"),("Content-Type","Text/HTML")]
68+ (thl, vt) <- toHeaderTable hdrs
69+ addHeader tokenContentType v vt thl `shouldBe` thl
6570
6671headers :: H.ResponseHeaders
6772headers = [