Gem breaks Rails 4 SSE / ActionController::Live #24
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm sure you could automatically ignore anything with
Content-Type
matchingtext/event-stream
.That's odd, since I'm only running anything that's
text/html
through the processor. Every otherContent-Type
is being ignored. What exactly is breaking? I haven't had the opportunity to mess w/ any of the Rails 4 streaming code.I can't say exactly, except with this middleware loaded calls to otherwise streaming endpoints return with a
Content-length
header, and they return after one iteration of their runloop.It must be the
close
that the middleware is doing on the Rack body object. I'll make some time to play around with the streaming API today and see if that's the case, but that's where my money is right now. Avoidingclose
when theContent-Type
istext/event-stream
I bet would fix the issue.Almost certainly would @johnbintz, I wonder if the Rack body object looks different in Rails streaming from your POV. At least in ALL examples about how this might work they say it's ESSENTIAL to
ensure\n\tresponse.stream.close
, which makes your proposed fix safe enough.I just rode the Rails 4 SSE wave successfully with rack-livereload running. Hopefully that commit should fix it. Let me know if it doesn't.