[ jetty-Bugs-1280537 ] HttpFields.getDateField exception

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

[ jetty-Bugs-1280537 ] HttpFields.getDateField exception

SourceForge.net
Bugs item #1280537, was opened at 2005-09-02 11:21
Message generated for change (Settings changed) made by gregwilkins
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107322&aid=1280537&group_id=7322

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: Closed
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:

request.getDateField(HttpFields.__IfModifiedSince);

the following exception was thrown

org.mortbay.http.HttpConnection exception
WARNING: GET /utilities.js HTTP/1.0
java.lang.IllegalArgumentException: Tue, 0? Jul 2005
11:21:00
at
org.mortbay.http.HttpFields.getDateField(HttpFields.java:1043)
at
org.mortbay.http.HttpMessage.getDateField(HttpMessage.java:371)
...

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

Message:
Logged In: YES
user_id=44062

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:
https://sourceforge.net/tracker/?func=detail&atid=107322&aid=1280537&group_id=7322


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
jetty-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-discuss