[issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers

Daniel Stutzbach report at bugs.python.org
Fri May 14 15:06:37 CEST 2010

Daniel Stutzbach <daniel at stutzbachenterprises.com> added the comment:

It displays correctly in some browsers, yes, but not everything that speaks HTTP is a browser.  For example, the invalid header makes C#'s WebRequest throw an exception.

I hadn't noticed the 'Content-Type' on the next line of the string output by reset().  That does make things more complicated.

We could put the "Content-Type: text/html" first, but the downside is that it will be output as visible content if a script crashes after the headers have been emitted.

I'm not sure if that's better or worse than emitting an invalid header.


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list