-----BEGIN PGP SIGNED MESSAGE-----

Hi!

- From time to time I get an IllegalArgumentException from SimpleDate:

[28/04/1999 14:27:33:051] (ERROR) ajp11: 
Servlet Error: java.lang.IllegalArgumentException: 
Wed, 28 Apr 1999 12:24:19 GMT : Wed, 28 Apr 1999 12:24:19 GMT

The stack trace is:

[28/04/1999 14:27:33:052 GMT+02:00] java.lang.IllegalArgumentException:
Wed, 28 Apr 1999 12:24:19 GMT 
        at
org.apache.jserv.JServConnection.getDateHeader(JServConnection.java:1259)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:493)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
        at org.apache.jserv.JServConnection.run(JServConnection.java:359)
        at java.lang.Thread.run(Thread.java)

I can not force this error to a deterministic pattern. It occurses just
sometimes. By hitting 'Reload' on the Browser the error dissapears.

The result is a 'server config error' page. Which is just misleading :-/

I use java 1.1.7 under linux with JSDK 2.0

The comment for getDateHeader states:
     * Gets the value of the requested date header field of this
     * request.  If the header can't be converted to a date, the method
     * throws an IllegalArgumentException.  The case of the header
     * field name is ignored.

I don't understand the consequences of my following suggestion (I could
not find any documentation for developer of servlet engines like JServ
from sun, only the javadoc of javax.servlet.*):

Why not catching this Exception and return -1? -1 is returned when the
field is not found:

     * @return the value the requested date header field, or -1 if not
     * found.

If you agree, I will send a patch for that.

Cheers,
Patrick

- ---
Citrin, Feisthammel und Partner,                    Phone: +41 1 994 4038
Winterthurerstr. 43, CH-8610 Uster, Switzerland       Fax: +41 1 994 4036

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv

iQESAwUBNyce2ZVgYabdk0E5AQF/mgfjBv6lyJnfBRXtKX9knT5Bqcglik8rARX4
kqUCaguJd0a9/V0+MMoz4LBTrOEln5Ohx5D0cIlMccAw0ciEdGxATh+3QXsG1O8C
JxqJvp+RMq1/FaS7hpIoGFO4keKhG7pa1F9TXDe2H+WC+irgXkEsKzsRoaGaVOrN
7Kt9eW7CSdjHpr7zq6U6agMMrVnxPYZLVd619ADsNxB3k1XOl+2RPMiLS/YbzQ/C
+LDZivD45K8PuMuLbOcysEnv07ok91ohhxQCay1EhnR/mhgpG3xzauuy5a6hKcG5
A5viljpm62IpE7zFtVZkKvppsegwCfObAMPCLnR4MITLSEWl8w==
=3eWC
-----END PGP SIGNATURE-----



----------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
READ THE FAQ!!!!     <http://java.apache.org/faq/>
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to