sapling/mercurial/hgweb
Gregory Szorc 9ccf5570f8 hgweb: send proper HTTP response after uncaught exception
This patch fixes a bug where hgweb would send an incomplete HTTP
response.

If an uncaught exception is raised when hgweb is processing a request,
hgweb attempts to send a generic error response and log that exception.

The server defaults to chunked transfer coding. If an uncaught exception
occurred, it was sending the error response string / chunk properly.
However, RFC 7230 Section 4.1 mandates a 0 size last chunk be sent to
indicate end of the entity body. hgweb was failing to send this last
chunk. As a result, properly written HTTP clients would assume more data
was coming and they would likely time out waiting for another chunk to
arrive.

Mercurial's own test harness was paving over the improper HTTP behavior
by not attempting to read the response body if the status code was 500.
This incorrect workaround was added in faced8f5c2af and has been removed
with this patch.
2014-11-28 10:59:02 -08:00
..
__init__.py hgweb: make hgweb.hgweb a unified interface to hgweb/hgwebdir 2010-04-26 11:03:40 -05:00
common.py hgweb: refresh hgweb.repo on phase change (issue4061) 2014-09-27 21:59:55 +09:00
hgweb_mod.py merge with stable 2014-09-29 17:23:38 -05:00
hgwebdir_mod.py templater: introduce templatepaths for getting paths searched for templates 2014-09-28 16:57:37 +02:00
protocol.py wireproto: introduce an abstractserverproto class 2014-03-28 11:10:33 -07:00
request.py hgweb: pass the actual response body to request.response, not just the length 2013-01-15 01:07:03 +01:00
server.py hgweb: send proper HTTP response after uncaught exception 2014-11-28 10:59:02 -08:00
webcommands.py hgweb: fix a crash when using web.archivesubrepos 2014-11-05 21:33:45 -05:00
webutil.py hgweb: show as same parents as "hg parents -r REV FILE" in pages for file 2014-04-17 09:36:08 +09:00
wsgicgi.py hgweb.cgi: fix internal WSGI emulation (issue3804) 2013-02-04 23:25:25 +01:00