From beadf24610907d5b6ad94f0c124c974e02807f26 Mon Sep 17 00:00:00 2001 From: Ben Alex Date: Sun, 13 Feb 2005 00:59:48 +0000 Subject: [PATCH] Use static HttpServletResponse.SC_UNAUTHORIZED instead of 401 HTTP response code. --- .../ui/basicauth/BasicProcessingFilterEntryPoint.java | 4 ++-- doc/xdocs/changes.xml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/acegisecurity/ui/basicauth/BasicProcessingFilterEntryPoint.java b/core/src/main/java/org/acegisecurity/ui/basicauth/BasicProcessingFilterEntryPoint.java index 00bda24770..f4fd0b8196 100644 --- a/core/src/main/java/org/acegisecurity/ui/basicauth/BasicProcessingFilterEntryPoint.java +++ b/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 } } diff --git a/doc/xdocs/changes.xml b/doc/xdocs/changes.xml index 28ee90775a..a26aa1cbd4 100644 --- a/doc/xdocs/changes.xml +++ b/doc/xdocs/changes.xml @@ -37,6 +37,7 @@ Contacts sample web.xml no longer expect Log4j to be in classpath JaasAuthenticatinProvider now uses System.property "java.security.auth.login.config" JaasAuthenticationCallbackHandler Authentication is passed to handle method setAuthenticatoin removed + Use static HttpServletResponse.SC_UNAUTHORIZED instead of 401 HTTP response code Major CVS repository restructure to support Maven and eliminate libraries