• 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
Broken Connections to Apple Server
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Broken Connections to Apple Server


  • Subject: Broken Connections to Apple Server
  • From: "Jonathan Levi, M.D." <email@hidden>
  • Date: Mon, 18 Dec 2006 04:49:30 -0500

Hi,

By way of introduction, I'm having two problems using my dial-up modem (stubbornly, I know) to download Apple's nearly-gigabyte Developer Documentation and other .dmg's. There seem to be two reasons: 1) the Internet connection breaks, and 2) the Internet connection may hold but the server connection may be lost, a different problem.

I've written an AppleScript to try to handle these two problems automatically. The script has been successful for some time at detecting and restoring broken Internet connections before the connection to Apple's server times out. Recently, I've brought my script to the point where it will detect a lost server connection and restore this as well; however, from the moment downloading resumes, there is now a big (>100MB) discrepancy between the length of the download as reported by Safari, the browser I use for this purpose, and the actual file length reported by the Finder.

A more detailed description follows: I'll be downloading a .dmg file (example: Apple's December Developer Documentation in PDF, dec06devdocpdf.dmg). Safari saves the partial download as a package file, dec06devdocpdf.dmg.download, on the Desktop. I then run my script:

1. The script makes a backup copy of the partially downloaded file and names the copy, "dec06devdocpdf.dmg.bak.download"

2. Every minute, in an infinite loop, the script checks the Internet connection and the server connection; every 5 minutes, the script deletes the backup copy and makes a fresh one from the original.

3. If, during one of its iterations, the script detects that the Internet connection is down, it calls Internet Connect to reconnect, then tells Safari to resume downloading.

4. If the script detects that the server connection is down, it
   a) Deletes the "group" containing dec06devdocpdf.dmg in Safari's
      Downloads window;
   b) Deletes the download files dec06devdocpdf.dmg.download. (Sometimes
      the download file has already been converted to the disk-image file
      dec06devdocpdf.dmg; the script deletes this as well.)
   c) Renames package file dec06devdocpdf.dmg.bak.download to
      dec06devdocpdf.dmg.download and has Safari open it.

Sometimes Step 4 almost works: downloading resumes. However, when this happens, Safari has a much too small notion of the download file's length, as I mentioned before. At other times, Safari's Downloads window simply reads, "File doesn't exist", by which I assume Apple's server is no longer willing to resume downloading. I can't explain the variation in response.

Can anyone help me identify the most likely source of the problem? Script? Safari? Something else? I haven't posted the script. because it's fairly long and I don't want to ask people to wade through it, if the problem seems likely to be elsewhere. If you think the problem isn't with the script (I suspect it isn't) can you think of a more appropriate list for this problem?

TIA,

Jonathan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden
  • Prev by Date: Re: Preserve the resource files
  • Next by Date: Re: Preserve the resource files
  • Previous by thread: Re: Mail.app scripting is very unreliable....
  • Next by thread: Scripting shadows in CS2 text layer
  • Index(es):
    • Date
    • Thread