# HG changeset patch # User Bernhard Herzog # Date 1213112242 0 # Node ID 236e91be522c7bf5579e16ed9d0c930cd51d8af3 # Parent a30351c91a68d4150b7b729f62d63f0d0687d52f Serve log files ending with .html as text/html diff -r a30351c91a68 -r 236e91be522c treepkg/web.py --- 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")