Would anyone care to comment on why two (believed equivalent) programs give different results on Linux and Windows? Using a SPARC Red Hat 6.2 server with Apache/1.3.12 and Python 1.5.2 the following cgi script shows a pretty Apache logo in the browser window: #!/usr/bin/python ## ## image.py: serve a GIF image ## import sys, base64 o = open("/home/httpd/html/apache_pb.gif","rb").read() sys.stdout.write('Content-Type: image/gif\r\n') sys.stdout.write('Content-Length: %d\r\n\r\n' % len(o)) sys.stdout.write(o) Under Windows 95 using Apache/1.3.19 and ActivePython (original build) I get something which IE 5.5 reports as being a 2326-byte GIF file containing a 259 x 32-pixel image whose appearance bears no relation to the Apache logo: #!C:\Python20\python ## ## image.py: serve a GIF image ## import sys, base64 o = open("C:/Program Files/Apache Group/Apache/htdocs/apache_pb.gif","rb").read() sys.stdout.write('Content-Type: image/gif\r\n') sys.stdout.write('Content-Length: %d\r\n\r\n' % len(o)) sys.stdout.write(o) In case it helps (since they are smallish) I have attached the two graphics as imageLin.gif and ImageWin.gif respectivley.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4