httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Kline <>
Subject Re: [users@httpd] Apache sending back incorrect Content-length and Content-type values for ErrorDocument
Date Sun, 25 Feb 2007 12:17:08 GMT
Nick Kew wrote:

> Insufficient information.  What's the actual error here?
> Can't run the script (if so why?)  Runs but crashes?
> Runs OK but generates an HTTP error within the script?
> Or???

The script throws an exception before sending any output to the standard
output file.  Here's what's in the error log (with the prefixes stripped
so it fits on the lines):

Traceback (most recent call last):
  File "/usr/lib/cgi-bin/", line 2, in ?
    raise Exception("barfing on purpose")
Exception: barfing on purpose
Premature end of script headers:

The script itself consists of 2 lines:

raise Exception("barfing on purpose")

Apache does recognize that an error has occurred for which it should
send back the document specified in the ErrorDocument directive, it's
just failing to send back the right header values for that document.
Again, the older version of Apache does it correctly (for exactly the
same repro script).

Please let me know if any other information is needed.

Bob Kline

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message