-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] Changed the way Python handlers work for H2, it now returns a F…
…unctionHandler that has methods for specific frame handling. No longer requires a thread to parse the request. Refactored `finish_handling` to be cleaner split between h1 and h2.
- Loading branch information
David Heiberg
committed
Aug 13, 2018
1 parent
11531f4
commit 20e4e2f
Showing
8 changed files
with
232 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def handle_data(frame, request, response): | ||
response.content = frame.data[::-1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
def handle_headers(frame, request, response): | ||
response.status = 203 | ||
response.headers.update([('test', 'passed')]) |
6 changes: 6 additions & 0 deletions
6
tools/wptserve/tests/functional/docroot/test_h2_headers_data.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
def handle_headers(frame, request, response): | ||
response.status = 203 | ||
response.headers.update([('test', 'passed')]) | ||
|
||
def handle_data(frame, request, response): | ||
response.content = frame.data[::-1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.