Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose base.py as a public api. #28

Merged
merged 1 commit into from
Apr 23, 2021
Merged

Expose base.py as a public api. #28

merged 1 commit into from
Apr 23, 2021

Conversation

arenevier
Copy link
Contributor

Extract methods that can be used to implement Websocket over HTTP/2

The implementation of HTTP/2 handshake is quite similar to HTTP/1 with a
few differences:

  • headers are lower case in HTTP/2
  • not exactly the same headers must be validated
  • We don't handle Sec-WebSocket-Accept for HTTP/2
  • the response is different

So we can implement the handshake in a base class that will delegate
some operations to the parent class.

We make _base.py public by renaming it to base.py

@arenevier
Copy link
Contributor Author

two notes:

Copy link
Collaborator

@ricea ricea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with tiny nits.

mod_pywebsocket/handshake/base.py Outdated Show resolved Hide resolved
mod_pywebsocket/handshake/base.py Outdated Show resolved Hide resolved
Extract methods that can be used to implement Websocket over HTTP/2

The implementation of HTTP/2 handshake is quite similar to HTTP/1 with a
few differences:
- headers are lower case in HTTP/2
- not exactly the same headers must be validated
- We don't handle Sec-WebSocket-Accept for HTTP/2
- the response is different

So we can implement the handshake in a base class that will delegate
some operations to the parent class.

We make _base.py public by renaming it to base.py
Copy link
Collaborator

@ricea ricea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ricea ricea merged commit 265579a into GoogleChromeLabs:master Apr 23, 2021
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request May 20, 2021
Automatic update from web-platform-tests
Squashed 'tools/third_party/pywebsocket3/' changes from 9db3d29db4..265579a969

265579a969 Expose base.py as a public api. (#28)
cdb83e3152 Add missing r to regular expression (#27)

git-subtree-dir: tools/third_party/pywebsocket3
git-subtree-split: 265579a969e1aec2a6457db7674a9e31fbb7d564

--
Merge commit '2a247ac52a4af9f82d50b2f96a43abe5c4629ed3' into HEAD

--
update ws_h2_handshake.py to recent pywebsocket

pywebsocket has been refactored to expose some utilities and base class
as part of its public API.
(see GoogleChromeLabs/pywebsocket3#28)

By updating to the newest pywebsocket3 version, we can make
ws_h2_handshake much simpler

--
Merge commit 'ec57f8af52fe5e1074ec2de6a5d0d88c4cab257a'

Closes web-platform-tests/wpt#28667.

--

wpt-commits: 2a247ac52a4af9f82d50b2f96a43abe5c4629ed3, c3c4473d852203e78c4927408aae0b42f95b7385, ec57f8af52fe5e1074ec2de6a5d0d88c4cab257a, 24fa46db564eb4491e9f84edd3d1a07316cc14c6
wpt-pr: 28667
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants