diff options
| author | Chris McDonough <chrism@plope.com> | 2011-11-18 05:35:42 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-11-18 05:35:42 -0500 |
| commit | bdfc09e7ea6ffd7569dd8a671523c5652057884e (patch) | |
| tree | a7eedd9a6095918f2a35427026b4ff1f0833030f | |
| parent | 4f47e7cd2fea3f656fd17e6180c6ee30c0753bd2 (diff) | |
| parent | e9a71dfd96bb42791ff97a5e6da5b0c8aa4a606e (diff) | |
| download | pyramid-bdfc09e7ea6ffd7569dd8a671523c5652057884e.tar.gz pyramid-bdfc09e7ea6ffd7569dd8a671523c5652057884e.tar.bz2 pyramid-bdfc09e7ea6ffd7569dd8a671523c5652057884e.zip | |
fix conflicts
| -rw-r--r-- | CONTRIBUTORS.txt | 2 | ||||
| -rw-r--r-- | pyramid/static.py | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 2654801c3..a449333cb 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -156,3 +156,5 @@ Contributors - Ken Manheimer, 2011/11/07 - Reed O'Brien, 2011/11/07 + +- Klee Dienes, 2011/10/30 diff --git a/pyramid/static.py b/pyramid/static.py index 50a8b918b..2a9abbd8f 100644 --- a/pyramid/static.py +++ b/pyramid/static.py @@ -43,10 +43,11 @@ class _FileResponse(Response): def __init__(self, path, cache_max_age): super(_FileResponse, self).__init__(conditional_response=True) self.last_modified = getmtime(path) - content_type = mimetypes.guess_type(path, strict=False)[0] + content_type, content_encoding = mimetypes.guess_type(path, strict=False) if content_type is None: content_type = 'application/octet-stream' self.content_type = content_type + self.content_encoding = content_encoding content_length = getsize(path) self.app_iter = _FileIter(open(path, 'rb'), content_length) # assignment of content_length must come after assignment of app_iter |
