Show More
@@ -38,7 +38,7 b' def staticfile(directory, fname, req):' | |||
|
38 | 38 | os.stat(path) |
|
39 | 39 | ct = mimetypes.guess_type(path)[0] or "text/plain" |
|
40 | 40 | req.header([('Content-type', ct), |
|
41 | ('Content-length', os.path.getsize(path))]) | |
|
41 | ('Content-length', str(os.path.getsize(path)))]) | |
|
42 | 42 | return file(path, 'rb').read() |
|
43 | 43 | except (TypeError, OSError): |
|
44 | 44 | # illegal fname or unreadable file |
General Comments 0
You need to be logged in to leave comments.
Login now