gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSURLProtocol and WebDAV


From: Philippe Roussel
Subject: NSURLProtocol and WebDAV
Date: Fri, 14 Jan 2011 20:44:19 +0100

Hi,

I'm trying to use NSURLConnection instead of NSURLHandle to access a
WebDAV server (mainly because NSURLConnection seems to be the future).

WebDAV only adds new methods to http so implementing a WebDAVURLProtocol
from scratch would mean a lot of code duplication. On the other hand,
subclassing _NSHTTPURLProtocol seems to be difficult as it is mostly
hidden.
As the only thing that needs to be modified is the list of accepted
methods, I propose the following patch to allow the use of WebDAV
specific methods.

Would that be acceptable ?

Thanks,
Philippe

Index: Source/NSURLProtocol.m
===================================================================
--- Source/NSURLProtocol.m      (révision 31888)
+++ Source/NSURLProtocol.m      (copie de travail)
@@ -610,6 +610,13 @@
        self, @"TRACE",
        self, @"OPTIONS",
        self, @"CONNECT",
+       self, @"PROPFIND",
+       self, @"PROPPATCH",
+       self, @"MKCOL",
+       self, @"COPY",
+       self, @"MOVE",
+       self, @"LOCK",
+       self, @"UNLOCK",
        nil];
       }
   if ([methods objectForKey: [this->request HTTPMethod]] == nil)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]