diff --git a/features/http-auth.xml b/features/http-auth.xml
index d7d9457dcac6..56a6d4503385 100644
--- a/features/http-auth.xml
+++ b/features/http-auth.xml
@@ -29,8 +29,8 @@
- Compatibility Note
+ Compatibility
Please be careful when coding the HTTP header lines. In order to guarantee maximum
compatibility with all clients, the keyword "Basic" should be written with an
uppercase "B", the realm string must be enclosed in double (not single) quotes,
and exactly one space should precede the 401 code in the
- HTTP/1.0 401 header line. Authentication parameters have
+ HTTP/1.1 401 header line. Authentication parameters have
to be comma-separated.
@@ -63,16 +63,8 @@ if (!isset($_SERVER['PHP_AUTH_USER'])) {
user in a dbm file.
-
- Watch out for buggy Internet Explorer browsers out there. They
- seem very picky about the order of the headers. Sending the
- WWW-Authenticate header before the
- HTTP/1.0 401 header seems to do the trick
- for now.
-
-
- Configuration Note
+ Apache Configuration
PHP uses the presence of an AuthType directive
to determine whether external authentication is in effect.
@@ -84,65 +76,32 @@ if (!isset($_SERVER['PHP_AUTH_USER'])) {
controls a non-authenticated URL from stealing passwords from
authenticated URLs on the same server.
-
- Both Netscape Navigator and Internet Explorer will clear the local browser
- window's authentication cache for the realm upon receiving a
- server response of 401. This can effectively "log out" a user,
- forcing them to re-enter their username and password. Some people
- use this to "time out" logins, or provide a "log-out" button.
-
-
-
- HTTP Authentication example forcing a new name/password
-
-Welcome: " . htmlspecialchars($_SERVER['PHP_AUTH_USER']) . " ";
- echo "Old: " . htmlspecialchars($_REQUEST['OldAuth']);
- echo "
\n";
-}
-?>
-]]>
-
-
-
-
- This behavior is not required by the HTTP Basic
- authentication standard, so you should never depend on this. Testing with
- Lynx has shown that Lynx does not clear
- the authentication credentials with a 401 server response, so pressing back
- and then forward again will open the resource as long as the credential
- requirements haven't changed. The user can press the
- '_' key to clear their authentication information, however.
-
-
- In order to get HTTP Authentication to work using IIS server with the CGI version
- of PHP you must edit your IIS configuration "Directory Security".
- Click on "Edit" and only check
- "Anonymous Access", all other fields
- should be left unchecked.
-
+
+
+ Browser behavior
+
+ HTTP Basic authentication really is basic, and it wasn't designed to support
+ logouts. Because HTTP is a stateless protocol, most browsers will cache the
+ provided credentials as soon as a 2xx status code is seen,
+ and will send them in every request, until the browser is closed. There is no
+ defined way for a server to request a new prompt for credentials.
+
+ Over the years, various workarounds for this have spread as advice on the internet,
+ but they all depend on how different browsers have chosen to handle undefined edge
+ cases (or even violations of the HTTP standard). It is best to avoid such
+ workarounds and not use Basic authentication for anything serious.
+
+
+
- IIS Note:
+ IIS Configuration
- For HTTP Authentication to work with IIS, the PHP directive
- cgi.rfc2616_headers must
- be set to 0 (the default value).
+ In order to get HTTP Authentication to work on IIS server with the CGI version of
+ PHP, the php.ini directive cgi.rfc2616_headers
+ must be set to 0 (the default value), and you must edit your IIS
+ configuration "Directory Security".
+ Click on "Edit" and only check "Anonymous Access",
+ all other fields should be left unchecked.