• 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: NSData downloaded over socket is bigger than it should be...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSData downloaded over socket is bigger than it should be...


  • Subject: Re: NSData downloaded over socket is bigger than it should be...
  • From: Jean-Nicolas Jolivet <email@hidden>
  • Date: Fri, 19 Dec 2008 13:24:53 -0500

Well after comparing the data that I am receiving with the data that I SHOULD be receiving, it turns out that dots (yes, the dot character (.) ) are added all over the place in the data.... if I have 10 extra bytes, it means 10 extra dots were added to my data, so for example, a line that SHOULD read:

.m;{äMã‰P#ü1–TMë&L>ÆÖ-«½4i¯àÚPëýgêæ¯Ø

Instead reads:
..m;{äMã‰P#ü1–TMë&L>ÆÖ-«½4i¯àÚPëýgêæ¯Ø

Notice the extra dot at the beginning of the line... it turns out that ALL the extra dots that gets added are at the beginning of lines, when there is already a dot there....

Now, that data is downloaded straight from the socket and saved to disk, I am not adding/merging nor doing anything with it so I wonder if it's not a bug with AsyncSocket?? but I guess if it were adding dots all over the place people would've notice it already... I'm out of ideas here really!



On 19-Dec-08, at 12:20 PM, Jean-Nicolas Jolivet wrote:

I would love to give you an answer! The problem is that every newsreader out there that download binary files automatically decode and join the parts... I can't download just one part to test it against the part that my app downloaded!... I'm still trying to find another app that might be able to download parts of multiparts email attachment WITHOUT joining the parts once its done but ... well it's just not that easy to find unfortunately!....



On 19-Dec-08, at 12:07 PM, Michael Ash wrote:

On Fri, Dec 19, 2008 at 11:43 AM, Jean-Nicolas Jolivet
<email@hidden> wrote:
Well after doing more tests...

It happens even if I only have 1 active connection.... and it also happens
even if only download 1 part of the multiparts file (i.e. the part is still
slightly bigger than it should be) so basically the files that were ending
up ok with multiple connections are still fine, the files that were ending
up bigger than they should... are still bigger....


What I *don't* understand is how the data can be bigger .... I would
understand if some bytes were lost... but added?? I just don't see why it's
happening... I'm tempted to re-write my ConnectionController with NetSocket
to see if I get the same result...

I'll ask again: where do these extra bytes appear, and what do they contain? That will give you a big clue.

If that's not enough, instrument your code. Log the data being
downloaded at every step of the way. At some point it will change from
being good to being bad. Then you have your answer.


Mike
_______________________________________________

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

Jean-Nicolas Jolivet email@hidden http://www.silverscripting.com _______________________________________________

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

Jean-Nicolas Jolivet email@hidden http://www.silverscripting.com

_______________________________________________

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


  • Follow-Ups:
    • Re: NSData downloaded over socket is bigger than it should be...
      • From: Andrew Farmer <email@hidden>
    • Re: NSData downloaded over socket is bigger than it should be...
      • From: glenn andreas <email@hidden>
References: 
 >Re: NSData downloaded over socket is bigger than it should be... (From: Jean-Nicolas Jolivet <email@hidden>)

  • Prev by Date: Re: Is NSKeyedArchiver portable / reliable?
  • Next by Date: Re: Optimizing NSRectFill
  • Previous by thread: Re: NSData downloaded over socket is bigger than it should be...
  • Next by thread: Re: NSData downloaded over socket is bigger than it should be...
  • Index(es):
    • Date
    • Thread