C (133/304)

From:Alexander Niven-Jenkins
Date:14 Aug 2000 at 19:32:03
Subject:Re: TCP/IP access & autoupdate

Hiya Charlie,

On 15-Aug-00, you wrote:

>> Ok, thanks a lot! The URL is...?-)

> http://www.blackfive.redhotant.com/amiga-c/

> well I got that httpget code to compile and run. It downloads a file form
> my server ok. Only one problem. the header remains in the file, which is
> not too bad for html files but for lha files, it messes them up.

> Is there anyway I could get round this?

If you mean my httpget that quickly rushed off :-) I think the source
contains a routine called GetDataOffset which will return the offset that
the data starts, so for example:

Assuming data is in char *buffer;

long dataoffset = GetDataOffset( buffer );
Write( handle, buffer + dataoffset, lengthofdata - dataoffset );

Yeah? I really did rush that code and it really is crap :-) I am
working on a better version but all I want it for is to download a few
bytes file off my server for version checking and the new archive if
available, that's why it has no fancy features etc...

Kind regards...

Alex



Cremlin Software - http://www.cremlinsoftware.org
Founder, lead programmer - ghandi@cremlinsoftware.org
Production, programmer - anj@cremlinsoftware.org