Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return correct status messages in HTTP2 client #31

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Network/HTTP2/Arch/Status.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ fromStatus status = unsafeCreate 3 $ \p -> do
toStatus :: ByteString -> Maybe H.Status
toStatus bs = case C8.readInt bs of
Nothing -> Nothing
Just (code,_) -> Just $ H.mkStatus code "fixme"
Just (code,_) -> Just $ toEnum code
1 change: 1 addition & 0 deletions test/HTTP2/ServerSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ client0 sendRequest = do
let req = C.requestNoBody methodGet "/" []
sendRequest req $ \rsp -> do
C.responseStatus rsp `shouldBe` Just ok200
fmap statusMessage (C.responseStatus rsp) `shouldBe` Just "OK"

client1 :: C.Client ()
client1 sendRequest = do
Expand Down