[Gambas-user] Bug or bad use of gb.net.curl?

Benoit Minisini gambas at ...1...
Mon Feb 26 09:54:14 CET 2007


On mercredi 21 février 2007, Lorenzo Tejera wrote:
> I'm using the net.curl componente, but I have a problem that I can't
> resolv. I'm doing an application that retreive some .wma files from a
> specific web, but when I stored the file appears two bytes more that not
> belong to the file in the head of the file. But I did some probes and only
> occurs when I use the funcion Lof to define the size of the buffer I must
> to read. If lof is not use the head of file is saved perfect, but I not get
> all the buffer and the file is incompleted.
>
> For example:
>
> This is what I obtiain:
>
> „¥GIF89a
>
> But it should be:
>
> GIF89a
>
> The rest of file is saved perfect.
>
> This is the lines of code I used to read httpclient and write to a file in
> hard disk.
>
> IF Lof(HttpDescarga) THEN
> READ #HttpDescarga, Buffer, Lof(HttpDescarga)

Can you print the contents of Buffer at this place to see if the problem is in 
the READ command or in the WRITE command ?

> WRITE #gFichero, Buffer, Lof(HttpDescarga)
> END IF
> ...

Thanks in advance,

-- 
Benoit Minisini




More information about the User mailing list