abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From calav...@apache.org
Subject svn commit: r711131 - /incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbstractClientResponse.java
Date Tue, 04 Nov 2008 00:05:44 GMT
Author: calavera
Date: Mon Nov  3 16:05:44 2008
New Revision: 711131

URL: http://svn.apache.org/viewvc?rev=711131&view=rev
Log:
[ABDERA-201]: Does not support HTTP header Expires -1 and throw org.apache.commons.httpclient.util.DateParseException:
Unable to parse the date -1

If the header is not valid the cache should be expired, fragment from the RFC 2616:

HTTP/1.1 clients and caches MUST treat other invalid date formats,
   especially including the value "0", as in the past (i.e., "already
   expired").

Modified:
    incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbstractClientResponse.java

Modified: incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbstractClientResponse.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbstractClientResponse.java?rev=711131&r1=711130&r2=711131&view=diff
==============================================================================
--- incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbstractClientResponse.java
(original)
+++ incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbstractClientResponse.java
Mon Nov  3 16:05:44 2008
@@ -201,7 +201,7 @@
         return DateUtil.parseDate(value);
       else return null;
     } catch (DateParseException e) {
-      throw new RuntimeException(e); // server likely returned a bad date format
+      return null; //treat other invalid date formats, especially including the value "0",
as in the past
     }
   }
 }



Mime
View raw message