abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James M Snell <jasn...@gmail.com>
Subject Re: svn commit: r429514 - /incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/cache/CachedResponseBase.java
Date Tue, 08 Aug 2006 00:46:53 GMT
Yep, saw that.  Cool stuff.

I'm continuing to make some tweaks in the implementation, largely to
clean it up and make it a bit more manageable.

- James

Garrett Rooney wrote:
> On 8/7/06, James M Snell <jasnell@gmail.com> wrote:
>> Yeah, I went back and checked :-) ... If the server Date header does not
>> exist, getServerDate should default to the moment that the
>> InMemoryCachedResponse instance was created.
>>
>> A quick fix is to add the following to ResponseBase
>>
>>   protected Date now = new Date();
>>
>> And change... (also in ResponseBase)
>>
>>   public Date getServerDate() {
>>     if (response_date == null) {
>>       Date date = getDateHeader("Date");
>>       response_date = (date != null) ? date : now;
>>     }
>>     return response_date;
>>   }
> 
> Works great, committed in r429521.
> 
> -garrett
> 

Mime
View raw message