#23902 [Fbk->Opn]: header("HTTP/1.0 401 Authorization Required"); failed
| From: | noxter at web dot de | Date: | Mon, 02 Jun 2003 16:43:15 +0000 |
| Subject: | #23902 [Fbk->Opn]: header("HTTP/1.0 401 Authorization Required"); failed | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-40921@lists.php.net to get a copy of this message | ||
ID: 23902
User updated by: noxter at web dot de
-Summary: header("HTTP/1.0 401 Authorization Required"); faild
Reported By: noxter at web dot de
-Status: Feedback
+Status: Open
Bug Type: CGI related
Operating System: Windows 2000
PHP Version: 4.3.2
New Comment:
No difference. HTTP/1.0 or 1.1, the result is alike.
Previous Comments:
------------------------------------------------------------------------
[2003-06-01 21:01:55] sniper@php.net
What if you sent it as HTTP/1.1:
header("HTTP/1.1 401 Authorization Required");
Does it make any difference?
------------------------------------------------------------------------
[2003-05-30 12:16:33] noxter at web dot de
The follow example failed by php as common gateway interface
application. This problem is common and not specified of a server.
Testing with apache, iis, devwex ... . The option cgi.rfc2616_headers
= 1 is setting in the php.ini.
<?
header("HTTP/1.0 401 Authorization Required");
header("WWW-Authenticate: Basic realm=\"example\"");
?>
the response of Server :
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Fri, 30 May 2003 17:04:01 GMT
(null)
Content-type: text/html
X-Powered-By: PHP/4.3.2
WWW-Authenticate: Basic realm="example"
the respone of CGI:
(null)
Content-type: text/html
X-Powered-By: PHP/4.3.2
WWW-Authenticate: Basic realm="example"
...
the respone correct is:
HTTP/1.0 401 Authorization Required
Content-type: text/html
X-Powered-By: PHP/4.3.2
WWW-Authenticate: Basic realm="example"
...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23902&edit=1