From 19793d4eed557accc5870cc4985b0d33134f077b Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 26 Feb 2003 04:57:50 +0000 Subject: [PATCH] open static files using binary mode (sf bug 693208) git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1549 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 1 + roundup/cgi/client.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 6744631..b37db62 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -64,6 +64,7 @@ are given with the most recent entry first. - added support for last-modified and if-modified-since headers for static file serving - added Node.get() method +- open static files using binary mode (sf bug 693208) 2003-??-?? 0.5.6 diff --git a/roundup/cgi/client.py b/roundup/cgi/client.py index 174e4e8..e109baf 100644 --- a/roundup/cgi/client.py +++ b/roundup/cgi/client.py @@ -1,4 +1,4 @@ -# $Id: client.py,v 1.99 2003-02-26 04:51:41 richard Exp $ +# $Id: client.py,v 1.100 2003-02-26 04:57:49 richard Exp $ __doc__ = """ WWW request handler (also used in the stand-alone server). @@ -449,7 +449,7 @@ class Client: mt = 'text/plain' self.additional_headers['Content-Type'] = mt self.additional_headers['Last-Modifed'] = rfc822.formatdate(lmt) - self.write(open(filename).read()) + self.write(open(filename, 'rb').read()) def renderContext(self): ''' Return a PageTemplate for the named page -- 2.39.5