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

Lorenzo Tejera fidojones at ...805...
Wed Feb 21 16:03:07 CET 2007


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)
WRITE #gFichero, Buffer, Lof(HttpDescarga)
END IF

If I read with this code I read good, but not entire buffer.

READ #HttpDescarga, Buffer


I use gambas 1.9.47. Why I obtain this unsolicited two bytes when I read the
buffer? it's a bug?

regards
lorenzo



More information about the User mailing list