Skip to content

Commit

Permalink
Merge PR #969
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu-yamamoto committed Jan 9, 2024
2 parents 142c679 + abe05cf commit 7846053
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions warp-tls/Network/Wai/Handler/WarpTLS.hs
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,9 @@ plainHTTP TLSSettings{..} set s bs0 = case onInsecure of
-- FIXME: Content-Length:
-- FIXME: TLS/<version>
sendAll s "HTTP/1.1 426 Upgrade Required\
\r\nUpgrade: TLS/1.0, HTTP/1.1\
\r\nConnection: Upgrade\
\r\nContent-Type: text/plain\r\n\r\n"
\\r\nUpgrade: TLS/1.0, HTTP/1.1\
\\r\nConnection: Upgrade\
\\r\nContent-Type: text/plain\r\n\r\n"
mapM_ (sendAll s) $ L.toChunks lbs
close s
throwIO InsecureConnectionDenied
Expand Down
4 changes: 1 addition & 3 deletions warp/Network/Wai/Handler/Warp/HTTP2/PushPromise.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ import Network.Wai.Handler.Warp.Types
fromPushPromises :: InternalInfo -> Request -> IO [H2.PushPromise]
fromPushPromises ii req = do
mh2data <- getHTTP2Data req
let pp = case mh2data of
Nothing -> []
Just h2data -> http2dataPushPromise h2data
let pp = maybe [] http2dataPushPromise mh2data
catMaybes <$> mapM (fromPushPromise ii) pp

fromPushPromise :: InternalInfo -> PushPromise -> IO (Maybe H2.PushPromise)
Expand Down

0 comments on commit 7846053

Please sign in to comment.