Henry,

Good catch, I've just fixed it in SVN (trunk and 1.0 branch). I've also
added a unit test to prevent future regressions.

Best regards,
Jerome  

> -----Message d'origine-----
> De : Story Henry [mailto:[EMAIL PROTECTED] 
> Envoyé : jeudi 25 octobre 2007 18:16
> À : [email protected]
> Objet : barfing on misformed headers
> 
> Hi,
> 
> I have just found that the restlet library breaks down on a 
> misformed  
> header. When reading
> Danny Ayers' foaf file, which has the following headers
> 
> [EMAIL PROTECTED]:0$ curl -I  http://dannyayers.com/me.rdf
> HTTP/1.1 200 OK
> Date: Thu, 25 Oct 2007 12:58:18 GMT
> Server: WYMIWYG RWCF (the KnoBot foundation) 0.3
> Content-Type: application/rdf+xml
> Cache-Control:  must-revalidate
> Expires: -1
> Set-Cookie: lang=; path=/
> Pragma: no-cache
> Content-Length: 17092
> 
> Now I think it is likely, that Expires: -1 is wrong, though I have  
> not checked the specs. But is it reasonable for the
> whole download to stop and throw the following exception?
> 
> java.lang.NullPointerException
>          at org.restlet.util.DateUtils$ImmutableDate.<init> 
> (DateUtils.java:249)
>          at org.restlet.util.DateUtils$ImmutableDate.valueOf 
> (DateUtils.java:234)
>          at 
> org.restlet.util.DateUtils.unmodifiable(DateUtils.java:195)
>          at org.restlet.resource.Variant.setExpirationDate 
> (Variant.java:321)
>          at com.noelios.restlet.http.HttpClientCall.getResponseEntity 
> (HttpClientCall.java:251)
>          at com.noelios.restlet.http.HttpClientConverter.commit 
> (HttpClientConverter.java:110)
>          at com.noelios.restlet.http.HttpClientHelper.handle 
> (HttpClientHelper.java:79)
>          at org.restlet.Client.handle(Client.java:110)
>          at org.restlet.Uniform.handle(Uniform.java:97)
>          at net.java.sommer.addressbook.AgentResourceObject$1 
> $1.cacheUrlToFile(AgentResourceObject.java:263)
>          at net.java.sommer.addressbook.AgentResourceObject$1 
> $1.doInBackground(AgentResourceObject.java:177)
>          at net.java.sommer.addressbook.AgentResourceObject$1 
> $1.doInBackground(AgentResourceObject.java:303)
>          at 
> org.jdesktop.swingworker.SwingWorker$1.call(Unknown Source)
>          at java.util.concurrent.FutureTask$Sync.innerRun 
> (FutureTask.java:269)
>          at java.util.concurrent.FutureTask.run(FutureTask.java:123)
>          at org.jdesktop.swingworker.SwingWorker.run(Unknown Source)
>          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask 
> (ThreadPoolExecutor.java:650)
>          at java.util.concurrent.ThreadPoolExecutor$Worker.run 
> (ThreadPoolExecutor.java:675)
>          at java.lang.Thread.run(Thread.java:613)
> 
> 
> 
> 
> Home page: http://bblfish.net/
> Sun Blog: http://blogs.sun.com/bblfish/
> Foaf name: http://bblfish.net/people/henry/card#me
> 
> 
> 
> 

Reply via email to