remm 01/05/17 01:38:32 Modified: catalina/src/share/org/apache/catalina/valves RequestDumperValve.java Log: - getCookies() will return null now if no cookies are set. Revision Changes Path 1.3 +9 -7 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/RequestDumperValve.java Index: RequestDumperValve.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/RequestDumperValve.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- RequestDumperValve.java 2001/01/23 02:53:03 1.2 +++ RequestDumperValve.java 2001/05/17 08:38:30 1.3 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/RequestDumperValve.java,v 1.2 2001/01/23 02:53:03 craigmcc Exp $ - * $Revision: 1.2 $ - * $Date: 2001/01/23 02:53:03 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/RequestDumperValve.java,v 1.3 2001/05/17 08:38:30 remm Exp $ + * $Revision: 1.3 $ + * $Date: 2001/05/17 08:38:30 $ * * ==================================================================== * @@ -97,7 +97,7 @@ * of the logging you wish to perform.</p> * * @author Craig R. McClanahan - * @version $Revision: 1.2 $ $Date: 2001/01/23 02:53:03 $ + * @version $Revision: 1.3 $ $Date: 2001/05/17 08:38:30 $ */ public class RequestDumperValve @@ -174,9 +174,11 @@ log(" contentType=" + hreq.getContentType()); log(" contextPath=" + hreq.getContextPath()); Cookie cookies[] = hreq.getCookies(); - for (int i = 0; i < cookies.length; i++) - log(" cookie=" + cookies[i].getName() + "=" + - cookies[i].getValue()); + if (cookies != null) { + for (int i = 0; i < cookies.length; i++) + log(" cookie=" + cookies[i].getName() + "=" + + cookies[i].getValue()); + } Enumeration hnames = hreq.getHeaderNames(); while (hnames.hasMoreElements()) { String hname = (String) hnames.nextElement();