Le vendredi 14 janvier 2011 à 21:03 +0000, Richard Frith-Macdonald a
écrit :
> On 14 Jan 2011, at 19:44, Philippe Roussel wrote:
> 
> > Hi,
> > 
> > I'm trying to use NSURLConnection instead of NSURLHandle to access a
> > WebDAV server (mainly because NSURLConnection seems to be the future).
> 
> Well, it's the direction Apple has gone ... that doesn't mean it's better in 
> GNUstep.

True, I hadn't thought about that. This could also be seen as a way to
test NSURLConnection and friends. It seems _NSFileURLProtocol isn't
really full featured.

> > 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 ?
> 
> 
> If you want to use NSURLConnection for Apple compatibility, then your
> code needs to work with the Apple Foundation, so you can't change the
> behavior of _NSHTTPURLProtocol (though of course if the GNUstep
> implementation differs from the Apple one we can change it to match).
> As a general rule we don't want to introduce incompatibilities between
> Apple and GNUstep, so  I think the answer is 'no', it's not acceptable
> to add methods in _NSHTTPURLProtocol unless Apple's implementation
> already supports them (you could write some testcases to find out).

I have no idea how Apple implemented NSHTTPURLProtocol and no way to
test it. The thing is, I'm not sure to understand why NSHTTPURLProtocol
doesn't let me use the methods I want. What if I want to shoot myself in
the the foot ?

Maybe NSHTTPURLProtocol could be Apple compliant while providing a way
to change the accepted methods, as a GNUstep addition or through a
subclass ?

Anyway, I can go back to NSURLHandle easily.

Thanks,
Philippe


_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to