luetzkendorf 2004/06/28 03:16:28
Modified: src/webdav/server/org/apache/slide/webdav/filter
LogFilter.java
Log:
added fix for principal with null name
Revision Changes Path
1.10 +7 -5
jakarta-slide/src/webdav/server/org/apache/slide/webdav/filter/LogFilter.java
Index: LogFilter.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/filter/LogFilter.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- LogFilter.java 13 May 2004 10:42:03 -0000 1.9
+++ LogFilter.java 28 Jun 2004 10:16:28 -0000 1.10
@@ -130,7 +130,9 @@
String method = req.getMethod();
String uri = req.getRequestURI();
Principal p = req.getUserPrincipal();
- String principal = (p != null ? p.getName() : "");
+ String principal = (p != null ? p.getName() : null);
+ // with tomcat p.getName() may be null too
+ if (principal == null) principal = "unauthenticated";
String contentlength = req.getHeader( "Content-Length" );
if( contentlength == null )
contentlength = "-";
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]