def test(name): t = Table('user.db') filename = '/%s' % name.encode('utf-8') b = t.find(filename) f = Response(StreamBlock(b,t), mimetype='application/octet-stream') f.content_language = str(b.length) return f
def get(name): t = Table('user.db') filename = '/%s' % name.encode('utf-8') b = t.find(filename) if b: x = t.read(b) else: x = '', 404 del t return x