[Top][All Lists]

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

Re: NSURLProtocol and WebDAV

From: Richard Frith-Macdonald
Subject: Re: NSURLProtocol and WebDAV
Date: Sat, 15 Jan 2011 06:45:38 +0000

On 14 Jan 2011, at 22:01, Philippe Roussel wrote:

> 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.

I agree ... and more testing/improving of NSURLConnection in GNUstep would be a 
good thing.

> I have no idea how Apple implemented NSHTTPURLProtocol and no way to
> test it.

I have an OSX system I could run tests for you on, and I'd be very pleased to 
do that if you could add tests to the testsuite at
My problem with writing tests for a class is that I need to be familiar with 
how the class is used (in order to write tests), and getting that familiarity 
means I need to be working on code which uses the class, or spend a lot of time 
reading the documentation ... running testcases for someone else who *is*  
working with the classes, is very quick/easy by comparison.

> 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 ?

I don't know that either ... perhaps it shouldn't be preventing you from doing 
it?  From looking at the Apple documentation it seems to me that another place 
to check for these methods might be in the +canInitWithRequest: method, and I 
don't know which Apple actually does.

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

That's fine ... we add such code to the gnustep-additions library (built into 
the base library on gnustep, but standalone on OSX) but we'd want to make sure 
that the addition/subclass worked with the Apple foundation as well as with 
gnustep-base, so we'd need to understand how you would go about changing the 
accepted methods on OSX before we start.

reply via email to

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