Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
webssh
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
郑天保
webssh
Commits
7e5a1703
Commit
7e5a1703
authored
Oct 16, 2018
by
Sheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added head method IndexHandler
parent
a68eff59
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
test_app.py
tests/test_app.py
+15
-0
handler.py
webssh/handler.py
+3
-0
No files found.
tests/test_app.py
View file @
7e5a1703
...
...
@@ -613,3 +613,18 @@ class TestAppNotFoundHandler(OtherTestBase):
response
.
headers
[
'Server'
],
self
.
custom_headers
[
'Server'
]
)
self
.
assertIn
(
b
'404: Not Found'
,
response
.
body
)
class
TestAppHeadRequest
(
OtherTestBase
):
def
test_with_index_path
(
self
):
response
=
self
.
fetch
(
'/'
,
method
=
'HEAD'
)
self
.
assertEqual
(
response
.
code
,
200
)
def
test_with_ws_path
(
self
):
response
=
self
.
fetch
(
'/ws'
,
method
=
'HEAD'
)
self
.
assertEqual
(
response
.
code
,
405
)
def
test_with_not_found_path
(
self
):
response
=
self
.
fetch
(
'/notfound'
,
method
=
'HEAD'
)
self
.
assertEqual
(
response
.
code
,
404
)
webssh/handler.py
View file @
7e5a1703
...
...
@@ -288,6 +288,9 @@ class IndexHandler(MixinHandler, tornado.web.RequestHandler):
else
:
future
.
set_result
(
worker
)
def
head
(
self
):
pass
def
get
(
self
):
self
.
render
(
'index.html'
,
debug
=
self
.
debug
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment