Browse Source

Use static HttpServletResponse.SC_UNAUTHORIZED instead of 401 HTTP response code.

Ben Alex 20 years ago
parent
commit
beadf24610

+ 2 - 2
core/src/main/java/org/acegisecurity/ui/basicauth/BasicProcessingFilterEntryPoint.java

@@ -1,4 +1,4 @@
-/* Copyright 2004 Acegi Technology Pty Limited
+/* Copyright 2004, 2005 Acegi Technology Pty Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -70,6 +70,6 @@ public class BasicProcessingFilterEntryPoint implements AuthenticationEntryPoint
         HttpServletResponse httpResponse = (HttpServletResponse) response;
         httpResponse.addHeader("WWW-Authenticate",
             "Basic realm=\"" + realmName + "\"");
-        httpResponse.sendError(401);
+        httpResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED); // 401
     }
 }

+ 1 - 0
doc/xdocs/changes.xml

@@ -37,6 +37,7 @@
       <action dev="benalex" type="fix">Contacts sample web.xml no longer expect Log4j to be in classpath</action>
       <action dev="raykrueger" type="update">JaasAuthenticatinProvider now uses System.property "java.security.auth.login.config"</action>
       <action dev="raykrueger" type="update">JaasAuthenticationCallbackHandler Authentication is passed to handle method setAuthenticatoin removed</action>
+      <action dev="benalex" type="update">Use static HttpServletResponse.SC_UNAUTHORIZED instead of 401 HTTP response code</action>
     </release>
     <release version="0.7.0" date="2005-01-16">
       <action dev="carlossg" type="add">Major CVS repository restructure to support Maven and eliminate libraries</action>