Show More
@@ -50,8 +50,8 b' def rawfile(web, req, tmpl):' | |||||
50 | path = fctx.path() |
|
50 | path = fctx.path() | |
51 | text = fctx.data() |
|
51 | text = fctx.data() | |
52 | mt = mimetypes.guess_type(path)[0] |
|
52 | mt = mimetypes.guess_type(path)[0] | |
53 |
if mt is None |
|
53 | if mt is None: | |
54 |
mt = |
|
54 | mt = binary(text) and 'application/octet-stream' or 'text/plain' | |
55 |
|
55 | |||
56 | req.respond(HTTP_OK, mt, path, len(text)) |
|
56 | req.respond(HTTP_OK, mt, path, len(text)) | |
57 | return [text] |
|
57 | return [text] |
General Comments 0
You need to be logged in to leave comments.
Login now