You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a connection gets hijacked by ActionCable, the HTTP1 server crashes the task – this seems to be a somewhat-known issue, has been mentioned in multiple places and indeed seems not-so-critical.
I am happy to create a PR and submit it here, but before doing so, wanted to check if that is indeed a valid fix? Any implications of not sending the response when the body is empty and the @stream is nil? Or there is a case where this situation is valid and the fix belongs to a different place?
The text was updated successfully, but these errors were encountered:
When a connection gets hijacked by ActionCable, the HTTP1 server crashes the task – this seems to be a somewhat-known issue, has been mentioned in multiple places and indeed seems not-so-critical.
The culprit seems to be this line: https://github.com/socketry/async-http/blob/main/lib/async/http/protocol/http1/server.rb#L53.
@stream
is nil, bybody
is not (it's actually an instance ofProtocol::Rack::Body::Enumerable
). Looks like we can simply check for#empty?
method on the body and get rid of the error.I am happy to create a PR and submit it here, but before doing so, wanted to check if that is indeed a valid fix? Any implications of not sending the response when the
body
is empty and the@stream
is nil? Or there is a case where this situation is valid and the fix belongs to a different place?The text was updated successfully, but these errors were encountered: