site_archiver@lists.apple.com Delivered-To: macnetworkprog@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1263581426; bh=PNJilUYLrgVFX/5qUaCZhkkLTqHJFJuT4bzpkOTX3Ok=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=1haQ/52W9abUn7cWyKO0GTHZ6bX4WS8deQcoxEDUZ/3t8jy9uych/sxJ5XkZLOtDFuXpC9hBKua62OHUyjOomzlmG9RvtZM5KCtu6iGSJxTx0P4Z710x2rdC6CwtRYvxpswNQj1uTO/XZ3/0wXWRCxbGoCTGyHYRs/JQ2VwgX9Q= Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=NkMJ+B2sWu0tBq7GFb0Xim5QrTRz5wImIO+fd9NNNuoWPofBqPF8eZeyYU5WtATfz7LgnqQ1rfDqujg5mV2mJIzaG12arepuK8PBfa9kamgOF7wGo05Iph0tSCSjAzVJLg9DDQ5PBaCEj7l6cEZI9xcgZNUbDVWbsggp+WJuhlA=; Hi Mark, I downloaded Abyss http server and it seems to happen with this as well on localhost. It seems to stop after downloading about 4mb or so. I came across this while developing a larger app (App A) that also does some IPC through the run loop. I noticed while testing this that App A will pause at a certain time during the download. When I quit another app (App B) that was connected to App A via IPC, App A will get a message via the run loop and it seems to make the download continue a little more -- I added some NSLogs to the NSURLDownload callbacks and they seem to start up again briefly after the quit. The download will then hang again immediately. I couldn't find anywhere where I specifically stopped the run loop. Then I simplified it with the source I sent and it seemed to happen there as well. I was thinking that this was being caused by the download occurring too fast. I tried sprinkling in some sleeps but it doesn't seem to help. I also wonder if this is a Snow Leopard thing. I only started seeing this after I upgraded to Snow Leopard. Elliott --- On Thu, 1/14/10, Mark Pauley <mpauley@apple.com> wrote:
From: Mark Pauley <mpauley@apple.com> Subject: Re: NSURLDownload and web sharing server To: "Elliott" <beachhockey@yahoo.com> Cc: macnetworkprog@lists.apple.com Date: Thursday, January 14, 2010, 3:54 PM Thanks for reporting this issue, and thanks for the reproducible test case. Can you quickly confirm for me the version of Apache you're talking to on Port 127.0.0.1? IIRC, Apache 1.x has a known limit of 4GB despite it's HTTP 1.1 'compliance'
If you're using apache 2 and greater, then this may well be a bug in NSURLDownload (though the fact that it works with other servers is intriguing).
_Mark
On Jan 14, 2010, at 2:51 PM, Elliott wrote:
When downloading a large file (~6 GB) either on 127.0.0.1 or another machine on the same subnet via web sharing, NSURLDownload seems to hang at some point in the middle of the download. This doesn't seem to happen when using other servers. Also Safari seems to be able to download the file just fine. The client is using 10.6.2. I've tried web sharing on the local machine (127.0.0.1 and 10.6.2) and also on a remote machine using 10.5.8. I've written a simple tool to test this that looks like:
- (void)downloadDidFinish: (NSURLDownload *)download { NSLog(@"downloadDidFinish");
// release the connection [download release]; }
- (void)download: (NSURLDownload *)download didFailWithError: (NSError *)error { NSLog(@"download didFailWithError\n"); // release the connection [download release];
// inform the user NSLog(@"Download failed! Error - %@ %@", [error localizedDescription], [[error userInfo] objectForKey:NSErrorFailingURLStringKey]); }
- (void)download: (NSURLDownload *)download didReceiveResponse: (NSURLResponse *)response { NSLog(@"download didReceiveResponse\n"); }
- (void)download: (NSURLDownload *)download didReceiveDataOfLength: (unsigned)length { NSLog(@"download didReceiveDataOfLength %lld\n", length); }
int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; MyHandler *theHandler = [[MyHandler alloc] init];
NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL: [NSURL URLWithString: (NSString *)@"http://10.147.27.137/~elliott/winxp.hdd"]
cachePolicy: NSURLRequestReloadIgnoringCacheData/*NSURLRequestUseProtocolCachePolicy*/
timeoutInterval: 60.0];
// create the connection with the
request
// and start loading the data NSURLDownload *theDownload = [[NSURLDownload alloc] initWithRequest: theRequest delegate: theHandler];
[theDownload setDestination: (NSString *)@"/Users/elliott/Documents/testdownloadfile" allowOverwrite: YES]; CFRunLoopRun(); [pool drain]; return 0; }
At some point I stop getting download didReceiveDataOfLength and never get a downloadDidFinish nor didFailWithError. Am I doing something wrong?
Elliott
_______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (Macnetworkprog@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/macnetworkprog/mpauley%40apple.com
This email sent to mpauley@apple.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (Macnetworkprog@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/macnetworkprog/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com