Revision: 3182
http://archive-access.svn.sourceforge.net/archive-access/?rev=3182&view=rev
Author: bradtofel
Date: 2010-07-20 23:54:26 +0000 (Tue, 20 Jul 2010)
Log Message:
-----------
FEATURE: adding WWW-Authenticate HTTP header, to allow user to add credentials
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AuthenticationControlException.java
Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AuthenticationControlException.java
===================================================================
--- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AuthenticationControlException.java 2010-07-20 23:53:12 UTC (rev 3181)
+++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AuthenticationControlException.java 2010-07-20 23:54:26 UTC (rev 3182)
@@ -56,10 +56,8 @@
super(message,"Authenication Problem",details);
id = ID;
}
- /**
- * @return the HTTP status code appropriate to this exception class.
- */
- public int getStatus() {
- return HttpServletResponse.SC_UNAUTHORIZED;
+ public void setupResponse(HttpServletResponse response) {
+ response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
+ response.addHeader("WWW-Authenticate","Basic realm=\"Secured-Wayback\"");
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|