Re: NSURLConnection upload to iDisk works with iPhone OS 2.x but fails on 3.x
Re: NSURLConnection upload to iDisk works with iPhone OS 2.x but fails on 3.x
- Subject: Re: NSURLConnection upload to iDisk works with iPhone OS 2.x but fails on 3.x
- From: Sergey Shapovalov <email@hidden>
- Date: Mon, 28 Sep 2009 01:35:08 +0400
Jens, thank you for your answer.
On Sep 27, 2009, at 7:59 PM, Jens Alfke wrote:
On Sep 27, 2009, at 2:25 AM, Sergey Shapovalov wrote:
This makes me think that chunked upload from stream via
NSURLConnection has been broken in iPhone OS 3.x. Unfortunately, in
real life I can't upload my file by using setHTTPBody instead of
setHTTPBodyStream because it's too big to store in memory.
That sounds plausible :( Is there a way you can capture the HTTP
traffic to see exactly what's going on? Ordinarily I use the tcpflow
utility for this, but it's not possible to install that on an
iPhone. I think tcpdump can be used from a Mac/PC to capture packets
from other devices on the LAN.
Yes, I can try running the code in iPhone Simulator and capturing the
traffic, or run it on iPhone and use the Mac as wi-fi proxy... Well,
I'll try and compare the traffic generated with 2.2.1 and 3.0
executables.
In any case, you should repost your questions on the macnetworkprog
mailing list — this looks like a CFNetwork problem, and some of the
engineers who work on that read that list.
Thanks for the advice! Will try doing so.
Unfortunately, in real life I can't upload my file by using
setHTTPBody instead of setHTTPBodyStream because it's too big to
store in memory.
Have you tried memory-mapping? Use [NSData
dataWithContentsOfMappedFile:].
No, I haven't... Well, that is definitely another option worth of
trying. Thank you, this idea didn't come to my mind before!
Best regards,
Sergey._______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden