Skip to content

Commit

Permalink
setting isChunked to False in the case of isHead (#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu-yamamoto committed Apr 24, 2015
1 parent c74d569 commit 1e99cb6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions warp/Network/Wai/Handler/Warp/Response.hs
Expand Up @@ -192,8 +192,9 @@ sendResponse defServer conn ii req reqidxhdr src response = do
dc = dateCacher ii
addServerAndDate = addDate dc rspidxhdr . addServer defServer rspidxhdr
mRange = reqidxhdr ! idxRange
reqinfo@(isPersist,_) = infoFromRequest req reqidxhdr
(isKeepAlive, needsChunked) = infoFromResponse rspidxhdr reqinfo
(isPersist,isChunked0) = infoFromRequest req reqidxhdr
isChunked = if isHead then False else isChunked0
(isKeepAlive, needsChunked) = infoFromResponse rspidxhdr (isPersist,isChunked)
isHead = requestMethod req == H.methodHead
rsp = case response of
ResponseFile _ _ path mPart -> RspFile path mPart mRange isHead (T.tickle th)
Expand Down

0 comments on commit 1e99cb6

Please sign in to comment.