Mercurial > treepkg
changeset 155:236e91be522c
Serve log files ending with .html as text/html
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Tue, 10 Jun 2008 15:37:22 +0000 |
parents | a30351c91a68 |
children | 27e78096a3fe |
files | treepkg/web.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/treepkg/web.py Tue Jun 10 09:51:50 2008 +0000 +++ b/treepkg/web.py Tue Jun 10 15:37:22 2008 +0000 @@ -53,7 +53,11 @@ if len(rest) == 3: filename = self.determine_log_filename(*rest) if filename is not None: - return cptools.serveFile(filename, contentType="text/plain") + if filename.endswith(".html"): + content_type = "text/html" + else: + content_type = "text/plain" + return cptools.serveFile(filename, contentType=content_type) else: raise cherrypy.HTTPError(status="404")