]> git.ipfire.org Git - thirdparty/tornado.git/commit
Content-Type for compressed StaticFileHandler file 1468/head
authorAli Ebrahim <aebrahim@ucsd.edu>
Thu, 30 Jul 2015 20:57:27 +0000 (13:57 -0700)
committerAli Ebrahim <aebrahim@ucsd.edu>
Thu, 30 Jul 2015 20:57:27 +0000 (13:57 -0700)
commit1ea6e91bd9d21972247af53fa2361597573859c8
tree24b65af7742bdca4cd27df2db148594f94633c7a
parent3a881d9cb568456c0023ec07e4626b1a3a30612c
Content-Type for compressed StaticFileHandler file

The python mimetypes module used by StaticFileHandler will recognize
compression (gzip, bz2, etc.) as the file encoding, and will give the
mime type for the uncompressed file. This commit will fix this
behavior, so a gzip file will end up as application/gzip.
Additionally, unknown file types (or known file types compressed with
anything other than gzip) are served as application/octet-stream.
tornado/web.py