php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4459 When ErrorDocument 401 is set to a php file, Status 200 is returned not 401
Submitted: 2000-05-15 22:57 UTC Modified: 2000-06-24 10:42 UTC
From: web at wildrhino dot com Assigned:
Status: Closed Package: Other
PHP Version: 4.0 Release Candidate 2 OS: FreeBSD 3-stable
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: web at wildrhino dot com
New email:
PHP Version: OS:

 

 [2000-05-15 22:57 UTC] web at wildrhino dot 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-24 10:42 UTC] stas at cvs dot php dot 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.
 [2003-02-03 15:41 UTC] cze at mxc dot ru
With changes it doesn't work again !!!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 21:01:36 2024 UTC