svn commit: r370985 - in /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/authenticator: BasicAuthenticator.java DigestAuthenticator.java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r370985 - in /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/authenticator: BasicAuthenticator.java DigestAuthenticator.java

Bill Barker-5
Author: billbarker
Date: Fri Jan 20 21:21:15 2006
New Revision: 370985

URL: http://svn.apache.org/viewcvs?rev=370985&view=rev
Log:
Use sendError instead of setStatus to send the 401 code.

This is per section 9.9.2 of the spec.  It doesn't seem to cause any problems in my testing, and it also allows (the mostly useless) custom 401 page.


Modified:
    tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java
    tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/authenticator/DigestAuthenticator.java

Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java?rev=370985&r1=370984&r2=370985&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java (original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/authenticator/BasicAuthenticator.java Fri Jan 20 21:21:15 2006
@@ -201,7 +201,7 @@
         }
         authenticateCC.append('\"');        
         authenticate.toChars();
-        response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
+        response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
         //response.flushBuffer();
         return (false);
 

Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/authenticator/DigestAuthenticator.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/authenticator/DigestAuthenticator.java?rev=370985&r1=370984&r2=370985&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/authenticator/DigestAuthenticator.java (original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/authenticator/DigestAuthenticator.java Fri Jan 20 21:21:15 2006
@@ -189,7 +189,7 @@
         String nOnce = generateNOnce(request);
 
         setAuthenticateHeader(request, response, config, nOnce);
-        response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
+        response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
         //      hres.flushBuffer();
         return (false);
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]