I created an HTTP server that returns images, texts and also icons. The images & text work as required and they look okay. However, the icon doesn't appear at all.
It looks that my HTTP server sends the decoded icon to the client but the icon doesn't appear. I checked and the file exists. I think that decode way doesn't correct so the client can't see the icon on his website.
I decode the icon (.ico file) in that way:
file_des = open(file_name, 'rb') # as binary
icon_stream = file_des.read()
# then send to the client socket and it gets the data, but no icon is appears.
How can I solve this?
Thank you very much.