-
Notifications
You must be signed in to change notification settings - Fork 141
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
Websockets #44
Comments
From the error message, it looks like this is related to Rack::Lint. Can you try running without Rack::Lint and see if it works? Assuming it works without Rack::Lint, this probably a bug in Rack::Lint. The Roda specs use thin and not puma, but I have tested the websocket support with puma and it does work (slightly older version, 2.12.1, but I doubt that matters). |
How do I do that? I didn't add it in, the only gems I installed myself were roda, clearwater, faye-websocket, and slim (and maybe one other, but nothing rack-related). So I assumed it was something in the Roda/Rack/Faye triad. I actually went with Puma as a web server because it didn't work with thin, either, but I figured I was screwing something up. When it didn't work with puma, I figured it might be time to file an issue. |
I've confirmed this is an issue with Rack::Lint. If I use the Rack::Lint middleware explicitly, I get that error. This is either a bug in Rack::Lint::HijackWrapper or a bug in faye-websocket for not handling Rack::Lint::HijackWrapper. Personally, I think it is a bug in the Rack::Lint. I would file a issue in rack, and if they say it's not a bug in rack, then file a issue in faye-websocket. I don't think it is a bug in Roda, I think you would run into this in other frameworks that use faye-websocket and Rack::Lint together, unless the framework had a specific workaround for this bug. I try to avoid having framework workarounds for bugs in other libraries, as that makes it less likely for the underlying bug to get fixed. I think the following is needed to get Rack::Lint::HijackWrapper to work with faye-websocket: class Rack::Lint::HijackWrapper
def to_int
@io.to_i
end
end |
Awesome, I really appreciate you taking the time to check it out. I wasn't using |
I'm experimenting with a websockets app using Roda on Puma, using the example Roda Websockets chat app:
Here's what I'm running on:
The text was updated successfully, but these errors were encountered: