Skip to content

Commit e7f1d02

Browse files
author
Richard Jones
committed
open static files using binary mode [SF#693208]
1 parent 4b6c3cf commit e7f1d02

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ are given with the most recent entry first.
6464
- added support for last-modified and if-modified-since headers for static
6565
file serving
6666
- added Node.get() method
67+
- open static files using binary mode (sf bug 693208)
6768

6869

6970
2003-??-?? 0.5.6

roundup/cgi/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: client.py,v 1.99 2003-02-26 04:51:41 richard Exp $
1+
# $Id: client.py,v 1.100 2003-02-26 04:57:49 richard Exp $
22

33
__doc__ = """
44
WWW request handler (also used in the stand-alone server).
@@ -449,7 +449,7 @@ def serve_static_file(self, file):
449449
mt = 'text/plain'
450450
self.additional_headers['Content-Type'] = mt
451451
self.additional_headers['Last-Modifed'] = rfc822.formatdate(lmt)
452-
self.write(open(filename).read())
452+
self.write(open(filename, 'rb').read())
453453

454454
def renderContext(self):
455455
''' Return a PageTemplate for the named page

0 commit comments

Comments
 (0)