PHP4 sends wrong headers?
| From: | Ryan Morgan | Date: | Mon, 06 Mar 2000 18:52:19 +0000 |
| Subject: | PHP4 sends wrong headers? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-16467@lists.php.net to get a copy of this message | ||
Has anyone had problems using mod_auth_* with php4? Everything seems to
work fine if I do basic authentication from the root directory, but if i try
to setup authentication from within a directory like /secure, Apache sends
the 401 Auth required page without ever prompting for a username and
password.
I examined the headers by telnetting to the webserver and issuing a HEAD
request. Here is what I got.
HTTP/1.1 200 OK
Date: Mon, 06 Mar 2000 18:01:00 GMT
Server: Apache/1.3.6 PHP/4.0b3
WWW-Authenticate: Basic realm="My Realm"
Connection: close
Content-Type: text/html
But shouldnt the Authorization Required header be sent? It should look like
the following:
HTTP/1.1 401 Authorization Required
Date: Mon, 06 Mar 2000 18:12:37 GMT
Server: Apache/1.3.6 PHP/4.0b3
WWW-Authenticate: Basic realm="My Realm"
Connection: close
Content-Type: text/html
Am I just doing something wrong here, or is this a bug in PHP4? Sorry that
I'm still stuck with using the Beta3 release, but Beta4 will not compile run
on my machine. See bug #3589
Any advice would be appreciated.
-Ryan