comparison roundup/cgi/client.py @ 1742:2223e184f9d2

fix file downloading
author Richard Jones <richard@users.sourceforge.net>
date Wed, 13 Aug 2003 23:51:59 +0000
parents 2c26b6cec950
children 14a2f1529759 f7e98ed53a48
comparison
equal deleted inserted replaced
1741:3d4ad125662b 1742:2223e184f9d2
1 # $Id: client.py,v 1.129 2003-08-12 01:26:08 richard Exp $ 1 # $Id: client.py,v 1.130 2003-08-13 23:51:59 richard Exp $
2 2
3 __doc__ = """ 3 __doc__ = """
4 WWW request handler (also used in the stand-alone server). 4 WWW request handler (also used in the stand-alone server).
5 """ 5 """
6 6
471 classname, nodeid = m.group(1), m.group(2) 471 classname, nodeid = m.group(1), m.group(2)
472 if classname != 'file': 472 if classname != 'file':
473 raise NotFound, designator 473 raise NotFound, designator
474 474
475 # we just want to serve up the file named 475 # we just want to serve up the file named
476 self.opendb('admin')
476 file = self.db.file 477 file = self.db.file
477 self.additional_headers['Content-Type'] = file.get(nodeid, 'type') 478 self.additional_headers['Content-Type'] = file.get(nodeid, 'type')
478 self.write(file.get(nodeid, 'content')) 479 self.write(file.get(nodeid, 'content'))
479 480
480 def serve_static_file(self, file): 481 def serve_static_file(self, file):

Roundup Issue Tracker: http://roundup-tracker.org/