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

Supporting 101 Switching Protocols #141

Closed
WGH- opened this issue Jul 13, 2016 · 2 comments
Closed

Supporting 101 Switching Protocols #141

WGH- opened this issue Jul 13, 2016 · 2 comments

Comments

@WGH-
Copy link
Contributor

WGH- commented Jul 13, 2016

Related to #13 which was closed for no apparent reason.

As soon as server replies with 101 Switching Protocols, anything after HTTP headers is no longer HTTP protocol.

The server will switch protocols to those defined by the response's Upgrade header field immediately after the empty line which terminates the 101 response.

libhtp seems to ignore this status code, still trying to parse everything that comes after as HTTP data.

This leads to WebSocket traffic being interpreted as some junk requests/responses (I will attach some pcaps a bit later, if needed).

I believe the correct solution would be to stop tracking HTTP connection after 101 response, unless specific protocol can be actually supported.

@WGH-
Copy link
Contributor Author

WGH- commented Aug 3, 2016

I've started working on implementing this. As libhtp already does something similar with CONNECT requests, it shouldn't be very hard.

WGH- added a commit to WGH-/libhtp that referenced this issue Aug 4, 2016
This fixes WebSockets traffic (WebSockets being the main
user of HTTP Upgrade) being interpreted as garbage HTTP
traffic.
@catenacyber
Copy link
Contributor

Is this still an issue ? (I do not think so)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants