#4459 [Com]: When ErrorDocument 401 is set to a php file, Status 200 is returned not 401

From: Date: Mon, 03 Feb 2003 21:41:41 +0000
Subject: #4459 [Com]: When ErrorDocument 401 is set to a php file, Status 200 is returned not 401
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-32023@lists.php.net to get a copy of this message
 ID:               4459
 Comment by:       cze@mxc.ru
 Reported By:      web@wildrhino.com
 Status:           Closed
 Bug Type:         Other
 Operating System: FreeBSD 3-stable
 PHP Version:      4.0 Release Candidate 2
 New Comment:

With changes it doesn't work again !!!


Previous Comments:
------------------------------------------------------------------------

[2000-06-24 10:42:40] stas@cvs.php.net

Apache manual says:

If the ErrorDocument specifies a local redirect to a CGI script, the
script should include a "Status:" header field in its output in order
to ensure the
propagation all the way back to the client of the error condition that
caused it to be invoked.

------------------------------------------------------------------------

[2000-05-15 22:57:46] web@wildrhino.com

This is an elaboration of bug #1820 with enough info to hopefully allow
it to be fixed.

With apache, setting an ErrorDocument for 401 Auth Required to be a php
file causes a status of 200 to be returned to the client instead of the
correct status of 401.

This totally screws up password-protected websites!

Workaround is to manually set the 401 header with the header function.

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=4459&edit=1



Thread (1 message)

  • cze at mxc dot ru
  • Unknown Message
    • cze at mxc dot ru
« previous php.bugs (#32023) next »