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

Fix websockets #124

Merged
merged 2 commits into from
Dec 7, 2016
Merged

Fix websockets #124

merged 2 commits into from
Dec 7, 2016

Conversation

tomaka
Copy link
Member

@tomaka tomaka commented Dec 6, 2016

Changes:

  • Added the ReadWrite trait to make the Request::upgrade function compile again. This was likely broken because of a change in Rust. The logic of the function didn't change.
  • Made the websockets example compile. It was using some very old code that needed an upgrade.
  • I noticed that browsers send Connection: keep-alive, upgrade instead of just Connection: upgrade so I replaced (pseudo-code) header == "keep-alive" with header.contains("keep-alive") and same for upgrade.

@frewsxcv
Copy link
Member

frewsxcv commented Dec 7, 2016

LGTM, thanks!

@frewsxcv frewsxcv merged commit 320dab1 into tiny-http:master Dec 7, 2016
@tomaka tomaka deleted the fix-ws branch December 7, 2016 06:17
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