comparison piecrust/serving/util.py @ 916:84ce51430346

pep8: Fix indenting.
author Ludovic Chabant <ludovic@chabant.com>
date Wed, 27 Sep 2017 19:07:55 -0700
parents 01458d3b646b
children 45ad976712ec
comparison
equal deleted inserted replaced
915:9d804fa186a0 916:84ce51430346
117 response = Response(wrapper) 117 response = Response(wrapper)
118 _, ext = os.path.splitext(path) 118 _, ext = os.path.splitext(path)
119 response.set_etag(etag) 119 response.set_etag(etag)
120 response.last_modified = datetime.datetime.fromtimestamp(mtime) 120 response.last_modified = datetime.datetime.fromtimestamp(mtime)
121 response.mimetype = mimetype_map.get( 121 response.mimetype = mimetype_map.get(
122 ext.lstrip('.'), 'text/plain') 122 ext.lstrip('.'), 'text/plain')
123 response.direct_passthrough = True 123 response.direct_passthrough = True
124 return response 124 return response
125 125
126 126
127 mimetype_map = load_mimetype_map() 127 mimetype_map = load_mimetype_map()
128 content_type_map = { 128 content_type_map = {
129 'html': 'text/html', 129 'html': 'text/html',
130 'xml': 'text/xml', 130 'xml': 'text/xml',
131 'txt': 'text/plain', 131 'txt': 'text/plain',
132 'text': 'text/plain', 132 'text': 'text/plain',
133 'css': 'text/css', 133 'css': 'text/css',
134 'xhtml': 'application/xhtml+xml', 134 'xhtml': 'application/xhtml+xml',
135 'atom': 'application/atom+xml', # or 'text/xml'? 135 'atom': 'application/atom+xml', # or 'text/xml'?
136 'rss': 'application/rss+xml', # or 'text/xml'? 136 'rss': 'application/rss+xml', # or 'text/xml'?
137 'json': 'application/json'} 137 'json': 'application/json'}
138 138