Download PNG per http StreamFactory

BlitzMax Forums/BlitzMax Programming/Download PNG per http StreamFactory

Hummelpups(Posted 2010) [#1]
Hi there,

i have a problem with my testsource. Until now i always used BNetEx
for Webser communication and tried the StreamFactory first time today.

It seems that it isn't able to download some filetypes? BMP works
well. In my TXT files it seems that Windows Newline 13,10 is replaced
with 12 from Unix systems?

I tried to track down this bug or SetUp the streamoptions for
other communicationtypes. I don't know if this would do the trick.
In my FTP program, there's an option to set the communication type
from ASCII to Binary. I don't now if the Encoding is set properly
by HTTP Header? in httpstream.mod, the http header is skipped by loop



'Local remstream:TStream=ReadStream("http::zombiepanic.de/rc/gfx/achievements/blank.png")
Local remstream:TStream=ReadStream("http::zombiepanic.de/rc/gfx/achievements/claymorekills_10.bmp")
While Not remstream.Eof()
Print remstream.ReadByte()
Wend


Excuse my bad english, please ;)

Michael


Brucey(Posted 2010) [#2]
In my TXT files it seems that Windows Newline 13,10 is replaced
with 12 from Unix systems?

12? I wouldn't think so.
10 is usual for Linux.

But in a standard stream, no data will be changed. You should receive the data as it was sent to you originally.