• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSURLRequest WebDAV Upload Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURLRequest WebDAV Upload Problem


  • Subject: Re: NSURLRequest WebDAV Upload Problem
  • From: Mark Pauley <email@hidden>
  • Date: Mon, 27 Jul 2009 12:57:35 -0700

Your webdav server requires authentication, so there's some issue restarting the request even though you're using an NSData object which should be idempotent and therefore work.

I'll look into this.

Just to be pedantic: your operation would be expected to not work if you were attempting a streamed upload because we currently don't have any API that will allow the client to restart a stream.


On Jul 27, 2009, at 11:29 AM, Alexander von Below wrote:

Positive. Not only are they called when I am setting the body with an NSData object, but both

- (NSURLRequest *)connection:(NSURLConnection *)connection
			 willSendRequest:(NSURLRequest *)request
			redirectResponse:(NSURLResponse *)response

and

-(void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *) challenge {
NSURLCredential *newCredential;


are called in the failure case.

Alex


Am 27.07.2009 um 20:25 schrieb TomM:

Are you sure that you configured the delegates correctly?

On Mon, Jul 27, 2009 at 8:33 AM, Alexander von Below <email@hidden> wrote:
Hello,


I have an odd issue communicating with a specific WebDAV Server, and I am attempting to find out where exactly to find the problem:

* Is it the server?
* Is it my code?
* Is it the Apple SDK?
* All of the above?

The main problem is, that when I am using an NSMutableURLRequest with an HTTPBodyStream (emphasis on "Stream"), then apparently none of the completion delegate methods are ever called. Specifically, none of

- (void)connection:(NSURLConnection *)connection didReceiveResponse: (NSHTTPURLResponse *)response;
- (void)connectionDidFinishLoading:(NSURLConnection *)theConnection;
- (void)connection:(NSURLConnection *)theConnection didFailWithError:(NSError *)error;


are ever invoked, not even with a timeout.

On the Mac, or if I set the HTTPBody using an NSData object on the iPhone, everything works.

I have included a sample project with targets both for Mac OS X and the iPhone.

To reproduce, get a free account at http://mediencenter.t-online.de (or eMail me for help on that)

Build the PUTStreamTest Target for the iPhone Simulator or device, enter username and password, and select "Stream". Then press PUT

The expected result is that the completion delegate methods are called, and an alert informs you of failure or success.

The actual result is that the delegate methods are not called.

I would be very happy if someone could give me a hint where to look. I do have access to the people who maintain that server, but before I approach them I would like to make sure that my code is correct. Their WebDAV is running in production, and they claim it has no issues with other clients.

Sample at: http://software.vonbelow.com/PUTStreamTest.zip

Thanks,

Alex



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden

_Mark email@hidden




_______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: NSURLRequest WebDAV Upload Problem
      • From: Alexander von Below <email@hidden>
References: 
 >NSURLRequest WebDAV Upload Problem (From: Alexander von Below <email@hidden>)
 >Re: NSURLRequest WebDAV Upload Problem (From: TomM <email@hidden>)
 >Re: NSURLRequest WebDAV Upload Problem (From: Alexander von Below <email@hidden>)

  • Prev by Date: Re: NSURLRequest WebDAV Upload Problem
  • Next by Date: Re: NSURLRequest WebDAV Upload Problem
  • Previous by thread: Re: NSURLRequest WebDAV Upload Problem
  • Next by thread: Re: NSURLRequest WebDAV Upload Problem
  • Index(es):
    • Date
    • Thread