Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix xhrdrop option passthru

  • Loading branch information...
commit 9bb9516d68e8765f39de46c414c905e98a43958a 1 parent 27e67be
@parente authored
Showing with 9 additions and 3 deletions.
  1. +9 −3 hbag/xhrdrop.py
View
12 hbag/xhrdrop.py
@@ -6,7 +6,13 @@
import datetime
import urlparse
-class DropHandler(tornado.web.StaticFileHandler):
+class XHRDropHandler(tornado.web.StaticFileHandler):
+ def __init__(self, application, request, path, default_filename=None, **kwargs):
+ '''Override to accept additional kwargs.'''
+ tornado.web.RequestHandler.__init__(self, application, request, **kwargs)
+ self.root = os.path.abspath(path) + os.path.sep
+ self.default_filename = default_filename
+
def initialize(self, **options):
self.options = options
@@ -32,12 +38,12 @@ def post(self, *args, **kwargs):
def get(self, *args, **kwargs):
if not self.options['get_enabled']:
raise tornado.web.HTTPError(405)
- super(DropHandler, self).get(*args, **kwargs)
+ super(XHRDropHandler, self).get(*args, **kwargs)
def get_handler_map(app, webroot, **options):
tmp = {'path' : os.path.join(app.bagPath, 'xhrdrop')}
tmp.update(options)
- return [(webroot+'xhrdrop//?(.*)', DropHandler, tmp)]
+ return [(webroot+'xhrdrop/?(.*)', XHRDropHandler, tmp)]
def get_default_options(app):
return {'get_enabled' : False}
Please sign in to comment.
Something went wrong with that request. Please try again.