Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying .ico files in browser
Message
De
10/05/2001 06:50:28
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00504434
Message ID:
00505655
Vues:
22
I my knowledge, there is no any terminator in http protocol.
End of tcp packet terminates the image.

>You are doing some stuff that's way past me on the webserver. I was only posting that local file to prove/disprove that IE can natively display a .ico file. IE5.5 does.
>
>Do you need some sort of terminator at the end of the byte stream you are creating for the .ico file when you do the filetostr()?
>
>>David, I need to display .ico files through http protocol, not
>>from my local C: disk.
>>
>>I made a file test.htm :
>>
>> HTML> body>
>> img src='arw01up.ico'>
>> /body> /HTML>
>>
>>If I type localhost/test.htm in IE, IE reads this page using GET request.
>>After that, it invokes a http GET request to retrieve ico file:
>>
>>GET /arw01up.ico HTTP/1.1
>>Accept: */*
>>Referer: http://localhost/test.htm
>>Accept-Language: et
>>Accept-Encoding: gzip, deflate
>>User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows 98)
>>...
>>
>>My vfp winsocket server responds to this request:
>>
>>this.SendData('HTTP/1.0 200 OK' + chr(13)+chr(10) + ;
>> 'Content-Type: image/ico' + chr(13)+chr(10) + ;
>> chr(13)+chr(10) + FILETOSTR('arw01up.ico') )
>>
>>Internet Exporer shows an empty icon with red cross instead a
>>image!
>>If I open test.htm file directly from c: or use .bmp files instead of
>>.ico files, all is OK.
>>Why browser will not display .ico files through http ?
>>I removed < and chanhged double quotes from message because UT does'nt allow
>>to send them.
>>
>>>This HTML works fine for me
>>>
>>>>I have a lot of .ico files and want to show them in Browser.
>>>>
>>>>Internet Explorer 5 displays .bmp files if I return them
>>>>using http
>>>>
>>>>Content-type: image/bmp
>>>>
>>>>header from web server.
>>>>
>>>>However IE will not disply .ico files if I use
>>>>Content-type: image/ico
>>>>http header .
>>>>
>>>>Is it possible to display .ico files in browser ?
Andrus
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform