on master help sign in
adding comment.
commit70ad779a6523cf3098d4bc99b8a762fca7dd010c authorKazu Yamamoto <kazu@iij.ad.jp> dateThu 31 Oct 2013, 20:36 (13 years ago) parent28e8274
1 file changed+5−1
warp/Network/Wai/Handler/Warp/Response.hs+5−1
warp/Network/Wai/Handler/Warp/Response.hs+5−1
@@ -216,7 +216,8 @@ connSink Connection { connSendAll = send } th =
216216
217217----------------------------------------------------------------
218218
219−infoFromRequest :: Request -> IndexedHeader -> (Bool,Bool)
219+infoFromRequest :: Request -> IndexedHeader -> (Bool -- isPersist
220+ ,Bool) -- isChunked
220221infoFromRequest req reqidxhdr = (checkPersist req reqidxhdr, checkChunk req)
221222
222223checkPersist :: Request -> IndexedHeader -> Bool
@@ -242,6 +243,9 @@ checkChunk req = httpVersion req == H.http11
242243-- Don't use this for ResponseFile since this logic does not fit
243244-- for ResponseFile. For instance, isKeepAlive should be True in some cases
244245-- even if the response header does not have Content-Length.
246+--
247+-- Content-Length is specified by a reverse proxy.
248+-- Note that CGI does not specify Content-Length.
245249infoFromResponse :: IndexedHeader -> (Bool,Bool) -> (Bool,Bool)
246250infoFromResponse rspidxhdr (isPersist,isChunked) = (isKeepAlive, needsChunked)
247251 where