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

wss HttpTooLargeError #23

Closed
fuchsnj opened this issue Mar 23, 2015 · 4 comments
Closed

wss HttpTooLargeError #23

fuchsnj opened this issue Mar 23, 2015 · 4 comments

Comments

@fuchsnj
Copy link
Contributor

fuchsnj commented Mar 23, 2015

I tried running the "secure server" example at http://cyderize.github.io/rust-websocket/doc/websocket/server/struct.Server.html

but whenever a websocket client connects to the server, the server fails with

Failed to read request (HttpError(HttpTooLargeError))

It works if I use the non-secure server, and my ssl cert works in another application.

@fuchsnj
Copy link
Contributor Author

fuchsnj commented Mar 23, 2015

So after some painful debugging, this isn't really a problem with this library. The error that is being returned by hyper (HttpTooLargeError) is incorrect. When the error is returned, the request is actually too small (0 or 1 bytes in my case) and hyper fails to parse the headers and returns the incorrect error.

I was using Chrome as the websocket client while testing this with an invalid certificate (using it on localhost), which for some reason when it connects to the websocket server, it gets rejected the first time (which is where the 0 byte request comes from) then opens the connection again and works the 2nd time.

@fuchsnj fuchsnj closed this as completed Mar 23, 2015
@cyderize
Copy link
Member

Yes, I was trying to debug this as well.

I'm thinking this might have something to do with hyper #389, although that one is about clients not servers.

@seanmonstar
Copy link

The error was in http.rs, so it affected both. It should be fixed now.

@fuchsnj
Copy link
Contributor Author

fuchsnj commented Mar 28, 2015

@seanmonstar Thanks!

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

No branches or pull requests

3 participants