httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Kline <bkl...@rksystems.com>
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/barf.py", line 2, in ?
    raise Exception("barfing on purpose")
Exception: barfing on purpose
Premature end of script headers: barf.py

The script itself consists of 2 lines:

#!/usr/bin/python
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
http://www.rksystems.com
mailto:bkline@rksystems.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message