[mod_python] debuging modpython publisher issues

Deron Meranda deron.meranda at gmail.com
Fri Jun 2 18:25:13 EDT 2006

To add some more general debugging tips (although I don't know if these
will help much in David's case in this thread)...

If you are using Internet Explorer, do yourself a huge favor and
turn off the "Show friendly error messages" under the advanced
internet options panel. ... or use a different browser.

If you suspect malformed HTML, just try forcing the content type
to be text/plain, but leave everything else the same.  (Note,
this may not work under IE since it sometimes overrides the
content type with it's own guess...so use some other browser).

Firefox's LiveHeaders plugin (while a VERY useful tool to have),
can trick you in some borderline HTTP senarios.  Such as
when your webserver returns a 304 Not Modified, the LiveHeaders
will continue to show the headers from the previous cached
response, and not the one that returned the 304 (although the
"sent" headers are updated, the "received" headers are not).

Also be aware that under all browsers, the View Source, option is
not always exact.

  * IE can not view source for a transfer-encoded message (e.g.,
    compressed bodies).

  * IE just launches an external file viewer (notepad), so it does not
    correctly handle different charsets, etc.

  * Firefox/Mozilla, while much better, shows the source *after* it's
    been parsed, so you're really viewing the source that is
    reconstructed from the DOM tree.  Things like <br></br> show
    up as <br> for example.

Also View Source always shows you the complete document
(entity).  If you're doing partial or byterange requests, view source
won't show you what's going on under the covers.

If you want to see everything byte-for-byte exactly, learn to use
curl or wget or something similarly low-level.
Deron Meranda

More information about the Mod_python mailing list