Description
Possibly logging this problem for posterity only given that it is only in 2.7.10
and doesn't seem to be an issue in 3.1.3.
If one has:
def index(req):
req.content_type = 'text/html'
req.send_http_header()
req.write('<html><head><title>Available Projects</title></head>')
req.write('<body><h1>Available Projects</h1><ul>')
req.write('Processing ')
req.write('</ul></body><html>')
Accessing the page results in something like:
Available Projects
Processing
HTTP/1.1 200 OK Date: Sat, 29 Jan 2005 04:10:55 GMT Server: Apache Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1
OK
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@dscpl.com.au and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/1.3.33 Server at www.dscpl.com.au Port 80
Ie., message text for 500 error gets stuck on end of output.
Workaround is to return a string with a one or more spaces in it from end of method.
return " "
Do this and it correctly yields:
Available Projects
Processing
This as a problem came up in mailing list thread:
http://www.modpython.org/pipermail/mod_python/2005-January/017266.html