Hi Rob,

Thanks for suggestion, I've just implemented it in SVN (1.0 and trunk).

I think it would be interesting to open a RFE in the issues list to cover
all the features that are required/helpful to implement WebDAV clients and
servers. The goal would not be to provide such applications which are out of
the Restlet API and NRE scope.

Best regards,
Jerome  

> -----Message d'origine-----
> De : Rob Heittman [mailto:[EMAIL PROTECTED] 
> Envoyé : mardi 14 août 2007 20:35
> À : [email protected]
> Objet : Proposed OPTIONS compliance patch
> 
> 
> Hello,
> 
> We've been greatly enjoying migrating our WCM and commerce platform  
> to the Restlet API.  We have a versioned filesystem historically  
> exposed via a WebDAV Servlet, which was reasonably 
> straightforward to  
> adapt to Restlet.
> 
> One issue, however, seemed to require a patch to get past; the NRE  
> does not seem to respond in a compliant way to OPTIONS requests,  
> since the Allow: header is only included when  
> Status.CLIENT_ERROR_METHOD_NOT_ALLOWED.  This causes trouble with  
> (the woefully rare) polite WebDAV clients that actually ask for  
> allowed methods prior to attempting to use them.  Since OPTIONS is  
> part of the HTTP/1.1 specification and not just DAV specific, 
> I think  
> support for this seems reasonable in core NRE.
> 
> I've had success with the following patch to  
> com.noelios.restlet.http.HttpServerConverter.java -- any chance of  
> committing it?  Happy to open an issue for it if you concur it's  
> worthwhile.  I imagine other converters might need similar surgery,  
> but we're only using the HttpServerConverter right now, so 
> this is my  
> first priority!
> 
> In related matters ... I saw mention in the blog that full WebDAV  
> exposure is on the roadmap; if you need more resources to 
> assist with  
> this, my team and I would be pleased to help; we have a lot of  
> practical experience coping with the behavior and misbehavior of the  
> myriad DAV user-agents out there.
> 
> Cheers,
> 
> - Rob
> 
> 
> Index: .
> ===================================================================
> --- . (revision 2129)
> +++ . (working copy)
> @@ -129,7 +129,9 @@
>                       .getResponseHeaders();
> 
>               if (response.getStatus().equals(
> -                    Status.CLIENT_ERROR_METHOD_NOT_ALLOWED)) {
> +                    Status.CLIENT_ERROR_METHOD_NOT_ALLOWED) ||
> +                response.getRequest().getMethod().equals(
> +                     Method.OPTIONS)) {
>                   // Format the "Allow" header
>                   StringBuilder sb = new StringBuilder();
>                   boolean first = true;

Reply via email to