costin 01/09/13 21:13:35
Modified: src/share/org/apache/tomcat/modules/aaa
AccessInterceptor.java
Log:
Remove the result of too much cut&paste - thanks Attila Szegedi
<[EMAIL PROTECTED]>
for pointing this out.
Revision Changes Path
1.16 +6 -19
jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa/AccessInterceptor.java
Index: AccessInterceptor.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/aaa/AccessInterceptor.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- AccessInterceptor.java 2001/09/10 06:43:02 1.15
+++ AccessInterceptor.java 2001/09/14 04:13:35 1.16
@@ -465,7 +465,10 @@
}
class BasicAuthHandler extends Handler {
- int sbNote=0;
+ // it goes back with the 401 response, not visible to the user
+ static final String errorMessage=
+ "<html><head><title>Not Authorized</title></head>"+
+ "<body>Not Authorized</body></html>";
BasicAuthHandler() {
// setOrigin( Handler.ORIGIN_INTERNAL );
@@ -485,24 +488,8 @@
// and notify the user they are not authorized if BasicAuth fails
res.setContentType("text/html"); // ISO-8859-1 default
- if( sbNote==0 ) {
- sbNote=req.getContextManager().getNoteId(ContextManager.REQUEST_NOTE,
- "BasicAuthHandler.buff");
- }
-
- // we can recycle it because
- // we don't call toString();
- StringBuffer buf=(StringBuffer)req.getNote( sbNote );
- if( buf==null ) {
- buf = new StringBuffer();
- req.setNote( sbNote, buf );
- }
-
- buf.append("<html><head><title>Not Authorized</title></head>");
- buf.append("<body>Not Authorized</body></html>");
-
- res.setContentLength(buf.length());
- res.getBuffer().write( buf );
+ res.setContentLength(errorMessage.length());
+ res.getBuffer().write( errorMessage );
}
}