1. [PatRat] Re: asyncHTTP vs IE file differences

On 8 Jul 2004, at 6:39, irv mullins wrote:

> 
> 
> posted by: irv mullins <irvm at ellijay.com>
> 
> Kat wrote:
> > 
> > I downloaded a file from the internet twice, once in IE, once in 
> > asyncHTTP.ew, and got different filesizes, even tho they display the same,,
> > or
> > at least look like the same to my two biological eyes. I saved both files to
> > disk, and went to Textpad, and ran a file compare, and got this:
> > 
> > -------
> > Compare: (<)U:\asynctest.jpg (1305697 bytes)
> >    with: (>)C:\goods_hstacs_f1.jpg (1305709 bytes)
> > 
> > The files are identical
> > ------
> > 
> > But they are plainly different sizes! 
> > I then saved to the same folder, with names asynctest1.jpg and 
> > asynctest2.jpg (to get the filename lengths the same), and the same 
> > compare results, same file lengths. It looks to me like asyncHTTP.ew lost 12
> > bytes, but i don't know where, or if they are important, or IE added 12
> > bytes,
> > or what? The file is at <a
> >
> > href="http://antwrp.gsfc.nasa.gov/apod/image/0306/goods_hstacs_f1.jpg">http://
> > antwrp.gsfc.nasa.gov/apod/image/0306/goods_hstacs_f1.jpg</a>
> 
> Looks like asyncHTTP.ew lost bytes. 
> The file as downloaded by Firefox is 1305709 bytes.

PatRat, is this a bug, or a feature, or ?

Kat

new topic     » topic index » view message » categorize

2. Re: [PatRat] Re: asyncHTTP vs IE file differences

On 8 Jul 2004, at 9:52, Kat wrote:

> 
> 
> On 8 Jul 2004, at 6:39, irv mullins wrote:
> 
> > 
> > posted by: irv mullins <irvm at ellijay.com>
> > 
> > Kat wrote:
> > > 
> > > I downloaded a file from the internet twice, once in IE, once in 
> > > asyncHTTP.ew, and got different filesizes, even tho they display the
> > > same,,
> > > or at least look like the same to my two biological eyes. I saved both
> > > files
> > > to disk, and went to Textpad, and ran a file compare, and got this:
> > > 
> > > -------
> > > Compare: (<)U:\asynctest.jpg (1305697 bytes)
> > >    with: (>)C:\goods_hstacs_f1.jpg (1305709 bytes)
> > > 
> > > The files are identical
> > > ------
> > > 
> > > But they are plainly different sizes! 
> > > I then saved to the same folder, with names asynctest1.jpg and 
> > > asynctest2.jpg (to get the filename lengths the same), and the same 
> > > compare results, same file lengths. It looks to me like asyncHTTP.ew lost
> > > 12
> > > bytes, but i don't know where, or if they are important, or IE added 12
> > > bytes, or what? The file is at <a
> > >
> > > href="http://antwrp.gsfc.nasa.gov/apod/image/0306/goods_hstacs_f1.jpg">http:
> > > // antwrp.gsfc.nasa.gov/apod/image/0306/goods_hstacs_f1.jpg</a>
> > 
> > Looks like asyncHTTP.ew lost bytes. 
> > The file as downloaded by Firefox is 1305709 bytes.
> 
> PatRat, is this a bug, or a feature, or ?

At location 82464, asyncHTTP.ew changes an $0D$0A to $0D.....
I know there is a InsertCRLFs() function, but i did this modification in 
example.exw to avoid that:

procedure onRecieve(sequence url, sequence headers, sequence body)
        junk = open("U:\\asynctest.jpg","wb")
        puts(junk,body)
        close(junk)
-- it's putz'd out before the InsertCRLFs() happens unto it
	setText(Win,url)
	setText(Result,InsertCRLFs(body))
end procedure

Yes, i used puts(), it worked when i read in the correct sized file with getc(),
and puts()'d it back out to another file correctly. The only other place 
asyncHTTP.ew is playing with "\n", it's not changing anything, and it's 
dealing only with the header. Right?

Where is asyncHTTP dropping bytes?

Kat

new topic     » goto parent     » topic index » view message » categorize

3. Re: [PatRat] Re: asyncHTTP vs IE file differences

Kat wrote:
> 
> 
> At location 82464, asyncHTTP.ew changes an $0D$0A to $0D.....
> I know there is a InsertCRLFs() function, but i did this modification in 
> example.exw to avoid that:
> 
> procedure onRecieve(sequence url, sequence headers, sequence body)
>         junk = open("U:\\asynctest.jpg","wb")
>         puts(junk,body)
>         close(junk)
> -- it's putz'd out before the InsertCRLFs() happens unto it
> 	setText(Win,url)
> 	setText(Result,InsertCRLFs(body))
> end procedure
> 
> Yes, i used puts(), it worked when i read in the correct sized file with
> getc(),
> and puts()'d it back out to another file correctly. The only other place 
> asyncHTTP.ew is playing with "\n", it's not changing anything, and it's 
> dealing only with the header. Right?
> 
> Where is asyncHTTP dropping bytes?

Interestingly, I count 12 "\n\r"s in the file, so that seems to be the
culprit (ReplaceCRLFs in assyncHTTP.ew).

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

4. Re: [PatRat] Re: asyncHTTP vs IE file differences

On 8 Jul 2004, at 11:57, Matt Lewis wrote:

> 
> 
> posted by: Matt Lewis <matthewwalkerlewis at yahoo.com>
> 
> Kat wrote:
> > 
> > 
> > At location 82464, asyncHTTP.ew changes an $0D$0A to $0D.....
> > I know there is a InsertCRLFs() function, but i did this modification in
> > example.exw to avoid that:
> > 
> > procedure onRecieve(sequence url, sequence headers, sequence body)
> >         junk = open("U:\\asynctest.jpg","wb")
> >         puts(junk,body)
> >         close(junk)
> > -- it's putz'd out before the InsertCRLFs() happens unto it
> > 	setText(Win,url)
> > 	setText(Result,InsertCRLFs(body))
> > end procedure
> > 
> > Yes, i used puts(), it worked when i read in the correct sized file with
> > getc(), and puts()'d it back out to another file correctly. The only other
> > place asyncHTTP.ew is playing with "\n", it's not changing anything, and
> > it's
> > dealing only with the header. Right?
> > 
> > Where is asyncHTTP dropping bytes?
> 
> Interestingly, I count 12 "\n\r"s in the file, so that seems to be the
> culprit (ReplaceCRLFs in assyncHTTP.ew).

That made it  worse! I did a simple:

function ReplaceCRLFs(sequence data)
	atom loc
return data

and ran the code again, and got a filesize of 1,285,453 bytes. It should be 
1,305,709 bytes.

Kat

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu