shiro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kao...@apache.org
Subject svn commit: r821251 - /incubator/shiro/trunk/web/src/main/java/org/apache/shiro/web/filter/authz/AuthorizationFilter.java
Date Sat, 03 Oct 2009 05:18:10 GMT
Author: kaosko
Date: Sat Oct  3 05:18:09 2009
New Revision: 821251

URL: http://svn.apache.org/viewvc?rev=821251&view=rev
Log:
Fix issue SHIRO-106, call sendError instead of setStatus for setting 401 to invoke container's
ERROR dispatcher

Modified:
    incubator/shiro/trunk/web/src/main/java/org/apache/shiro/web/filter/authz/AuthorizationFilter.java

Modified: incubator/shiro/trunk/web/src/main/java/org/apache/shiro/web/filter/authz/AuthorizationFilter.java
URL: http://svn.apache.org/viewvc/incubator/shiro/trunk/web/src/main/java/org/apache/shiro/web/filter/authz/AuthorizationFilter.java?rev=821251&r1=821250&r2=821251&view=diff
==============================================================================
--- incubator/shiro/trunk/web/src/main/java/org/apache/shiro/web/filter/authz/AuthorizationFilter.java
(original)
+++ incubator/shiro/trunk/web/src/main/java/org/apache/shiro/web/filter/authz/AuthorizationFilter.java
Sat Oct  3 05:18:09 2009
@@ -115,7 +115,7 @@
         } else {
             // If subject is known but not authorized, redirect to the unauthorized URL if
there is one
             // If no unauthorized URL is specified, just return an unauthorized HTTP status
code
-            WebUtils.toHttp(response).setStatus(HttpServletResponse.SC_UNAUTHORIZED);
+            WebUtils.toHttp(response).sendError(HttpServletResponse.SC_UNAUTHORIZED);
             if (StringUtils.hasText(getUnauthorizedUrl())) {
                 WebUtils.issueRedirect(request, response, getUnauthorizedUrl());
             }



Mime
View raw message