Skip to content

Commit

Permalink
Merge pull request #4891 from TomTJarosz/FixFileHandler
Browse files Browse the repository at this point in the history
Make `FilesHandler.get()` a decorated coroutine. Closes #4869
  • Loading branch information
minrk authored Sep 24, 2019
2 parents 9b597a9 + 6092b29 commit 4a9cfa7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion notebook/files/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import json
from base64 import decodebytes

from tornado import web
from tornado import gen, web

from notebook.base.handlers import IPythonHandler
from notebook.utils import maybe_future
Expand Down Expand Up @@ -35,6 +35,7 @@ def head(self, path):
return self.get(path, include_body=False)

@web.authenticated
@gen.coroutine
def get(self, path, include_body=True):
# /files/ requests must originate from the same site
self.check_xsrf_cookie()
Expand Down

0 comments on commit 4a9cfa7

Please sign in to comment.