On Jun 3, 10:11 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Might this be a bug in wsgiref ? I will hopefully be able to do some > more testing, ...
The following simple CGI script should, AFAIK, on any platform, output exactly the file specified in code. It does not on Apache 2 on Windows; I believe this to be a bug in wsgiref.handlers.CGIHandler. Can someone test this in a similar environment (Windows+a web server?) to confirm this ? (The first two lines need to be edited depending on the site) #!c:\python25\python.exe fname, type = r'c:\hdr.png', 'image/png' from wsgiref.handlers import CGIHandler def wsgiapp(env, start_response): f = file(fname, 'rb') start_response('200 OK', [('Content-Type', type)]) return [f.read()] CGIHandler().run(wsgiapp) -- http://mail.python.org/mailman/listinfo/python-list