@@ -179,8 +179,8 @@ def get(self):
179
179
** self .r_params )
180
180
181
181
182
- class StaticFileGzHandler (tornado .web .StaticFileHandler ):
183
- """Handle files which may be gzip-compressed on the filesystem .
182
+ class StaticFileHandler (tornado .web .StaticFileHandler ):
183
+ """Handle static files in a multi-contest aware way .
184
184
185
185
"""
186
186
def is_multi_contest (self ):
@@ -195,24 +195,3 @@ def get_absolute_path(self, root, path_or_contest_name):
195
195
else :
196
196
# Otherwise, we can just use the second argument.
197
197
return os .path .abspath (os .path .join (root , path_or_contest_name ))
198
-
199
- def validate_absolute_path (self , root , absolute_path ):
200
- self .is_gzipped = False
201
- try :
202
- return tornado .web .StaticFileHandler .validate_absolute_path (
203
- self , root , absolute_path )
204
- except tornado .web .HTTPError as e :
205
- if e .status_code != 404 :
206
- raise
207
- self .is_gzipped = True
208
- self .absolute_path = \
209
- tornado .web .StaticFileHandler .validate_absolute_path (
210
- self , root , absolute_path + ".gz" )
211
- self .set_header ("Content-encoding" , "gzip" )
212
- return self .absolute_path
213
-
214
- def get_content_type (self ):
215
- if self .is_gzipped :
216
- return "text/plain"
217
- else :
218
- return tornado .web .StaticFileHandler .get_content_type (self )
0 commit comments