[PATCH 4 of 4] hgweb: return content iterator instead of using write() callable
Shun-ichi GOTO
shunichi.goto at gmail.com
Mon Jun 30 05:33:20 UTC 2008
2008/6/29 Dirkjan Ochtman <dirkjan at ochtman.nl>:
> # HG changeset patch
> # User Dirkjan Ochtman <dirkjan at ochtman.nl>
> # Date 1214741934 -7200
> # Node ID 9cff682e57e0d699bfa79773afbdcc532540fa06
> # Parent 3fa9a03b874d0356911f78bbbf9b696cfb2cbca3
> hgweb: return content iterator instead of using write() callable
This change cause following traceback on accessing the page
against "hg serve" (run with python 2.5 for win32):
-------------------------------------------------------------------
[c:\develop\hg\crew]python25 hg serve -p 84
127.0.0.1 - - [30/Jun/2008 14:14:46] "GET /summary HTTP/1.1" 200 -
127.0.0.1 - - [30/Jun/2008 14:14:47] "GET /static/style-gitweb.css HTTP/1.1" 200
-
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 2486)
Traceback (most recent call last):
File "C:\python25\lib\SocketServer.py", line 464, in process_request_thread
self.finish_request(request, client_address)
File "C:\python25\lib\SocketServer.py", line 254, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\develop\hg\crew\mercurial\hgweb\server.py", line 45, in __init__
BaseHTTPServer.BaseHTTPRequestHandler.__init__(self, *args, **kargs)
File "C:\python25\lib\SocketServer.py", line 522, in __init__
self.handle()
File "C:\python25\lib\BaseHTTPServer.py", line 316, in handle
self.handle_one_request()
File "C:\python25\lib\BaseHTTPServer.py", line 310, in handle_one_request
method()
File "C:\develop\hg\crew\mercurial\hgweb\server.py", line 77, in do_GET
self.do_POST()
File "C:\develop\hg\crew\mercurial\hgweb\server.py", line 71, in do_POST
self._write("Internal Server Error")
File "C:\develop\hg\crew\mercurial\hgweb\server.py", line 167, in _write
raise AssertionError("Content-length header sent, but more bytes
than specified are being written.")
AssertionError: Content-length header sent, but more bytes than
specified are being written.
-------------------------------------------------------------------
By tiny print-debug, following are the values before assertion above:
len(data)=3990, self.length=0
len(data)=21, self.length=0
--
Shun-ichi GOTO
More information about the Mercurial-devel
mailing list