http://bugs.python.org/issue1097597
in my python 2.5.2, i still find these code in SimpleHTTPServer.py, is that deliberate? ctype = self.guess_type(path) if ctype.startswith('text/'): mode = 'r' else: mode = 'rb' try: f = open(path, mode) except IOError: self.send_error(404, "File not found") return None self.send_response(200) self.send_header("Content-type", ctype) fs = os.fstat(f.fileno()) self.send_header("Content-Length", str(fs[6])) # <-- obviously, this is not the same with len(f.read()) in windows. -- Best Regards, Leo Jay -- http://mail.python.org/mailman/listinfo/python-list