[ jetty-Bugs-1280537 ] HttpFields.getDateField exception

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[ jetty-Bugs-1280537 ] HttpFields.getDateField exception

Bugs item #1280537, was opened at 2005-09-02 11:21
Message generated for change (Comment added) made by gregwilkins
You can respond by visiting:

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: HTTP protocol
Group: None
Status: Open
>Resolution: Invalid
Priority: 5
Submitted By: Dara O'Donnell (daraodonnell)
>Assigned to: Greg Wilkins (gregwilkins)
Summary: HttpFields.getDateField exception  

Initial Comment:
When trying to retrieve the 'IfModifiedSince' date
field from a HttpRequest using the getDateField method
like this:


the following exception was thrown

org.mortbay.http.HttpConnection exception
WARNING: GET /utilities.js HTTP/1.0
java.lang.IllegalArgumentException: Tue, 0? Jul 2005

From the trace it can be seen that the problem is
caused by the division character appearing in the date
field. Regardless of why the date field arrived at the
server in an illegal state, would it be better to have
the HttpMessage.getDateField method return a value of
-1 instead of throwing an exception?  


>Comment By: Greg Wilkins (gregwilkins)
Date: 2005-09-11 19:35

Logged In: YES

While I may agree that -1 would be better, unfortunately the
javadoc of the javax.servlet headers says:

     * <p>If the request did not have a header of the
     * specified name, this method returns -1. If the header
     * can't be converted to a date, the method throws
     * an <code>IllegalArgumentException</code>.


You can respond by visiting:

SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
jetty-discuss mailing list
[hidden email]