Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* Re: Sinatra stream(:keep_open) not holding connections open
       [not found]                     ` <CA+-9oNdXyYrnyu3dfMuu7ULE7rhT_Rm48BCU_KaJUwsrmcj9-g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2013-01-19  1:01  0%                   ` W. Andrew Loe III
  0 siblings, 0 replies; 4+ results
From: W. Andrew Loe III @ 2013-01-19  1:01 UTC (permalink / raw)
  To: Rainbows! list

I was too quick to the gun, the change appears to be between Rack
1.4.1 and 1.4.2. Pinning my application to rack 1.4.1 and it works
well with kgio 2.8.0 and rainbows 4.4.3.

Frustrating.

Broken here: https://github.com/rack/rack/commit/18ff5d4a70c93a49de62a359986c1567cb4bf00d

On Fri, Jan 18, 2013 at 4:21 PM, W. Andrew Loe III <andrew-4trK/3dDa6Nl57MIdRCFDg@public.gmane.org> wrote:
> This appears to have been broken in my application in Rainbows 4.4.3.
>
> On Tue, Dec 4, 2012 at 10:09 PM, W. Andrew Loe III <andrew-4trK/3dDa6Nl57MIdRCFDg@public.gmane.org> wrote:
>> Works great! Thank you very much for the quick response and patch!
>>
>> Feature Request: https://github.com/celluloid/celluloid-io
>> Celluloid::IO backend, the spiritual successor to cool.io. I'm going
>> to take a stab at this soon, but wanted to get something out.
>>
>> On Tue, Dec 4, 2012 at 7:18 PM, Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org> wrote:
>>> "W. Andrew Loe III" <andrew-4trK/3dDa6Nl57MIdRCFDg@public.gmane.org> wrote:
>>>> I've pushed a very very stripped down example that just echos the time.
>>>> https://github.com/loe/sinatra-sse
>>>
>>> Thanks for the test case, I've just pushed out the following fix
>>> to "master" of git://bogomips.org/rainbows.git
>>>
>>> I've pushed a rainbows 4.4.1.1.gd5c8c prerelease to RubyGems.org
>>> It should be installable with: gem install --pre rainbows
>>>
>>> I expect this to work for you, but be sure to let me know if it doesn't :x
>>>
>>> Since this is a pretty small fix, I think I'll push 4.4.2 final
>>> very soon.
>>>
>>> >From d5c8cc8b51619f0d33f75036c53e3936ad2749b2 Mon Sep 17 00:00:00 2001
>>> From: Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org>
>>> Date: Wed, 5 Dec 2012 03:08:19 +0000
>>> Subject: [PATCH] event_machine: properly defer body.close for async
>>>
>>> Calling body.close in the normal write_response() code path
>>> is incorrect, and only worked out of sheer luck with
>>> Cramp and async_sinata.
>>>
>>> This change allows stream(:keep_open) in Sinatra to work
>>> properly.
>>>
>>> Thanks to W. Andrew Loe III for the informative bug report
>>> and reproducible test case.
>>>
>>> ref: http://mid.gmane.org/CA+-9oNd1EFqsniPkkPTwu5opTCinbM7-2KHoXov7+y3LE4s4Tg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
>>> ---
>>>  lib/rainbows/event_machine/client.rb | 3 +++
>>>  1 file changed, 3 insertions(+)
>>>
>>> diff --git a/lib/rainbows/event_machine/client.rb b/lib/rainbows/event_machine/client.rb
>>> index e56931f..fc0dfe3 100644
>>> --- a/lib/rainbows/event_machine/client.rb
>>> +++ b/lib/rainbows/event_machine/client.rb
>>> @@ -64,8 +64,11 @@ class Rainbows::EventMachine::Client < EM::Connection
>>>      @state = :headers if alive
>>>      if body.respond_to?(:errback) && body.respond_to?(:callback)
>>>        @deferred = body
>>> +      write_headers(status, headers, alive)
>>> +      write_body_each(body)
>>>        deferred_errback(body)
>>>        deferred_callback(body, alive)
>>> +      return
>>>      elsif body.respond_to?(:to_path)
>>>        st = File.stat(path = body.to_path)
>>>
>>> --
>>> Eric Wong
>>> _______________________________________________
>>> Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
>>> http://rubyforge.org/mailman/listinfo/rainbows-talk
>>> Do not quote signatures (like this one) or top post when replying
_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[relevance 0%]

* Re: Sinatra stream(:keep_open) not holding connections open
       [not found]                 ` <CA+-9oNfR9zM4phTShBsyjweAZBBYWF5egHw7MU8gcBf3f=fAJw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2013-01-19  0:21  0%               ` W. Andrew Loe III
       [not found]                     ` <CA+-9oNdXyYrnyu3dfMuu7ULE7rhT_Rm48BCU_KaJUwsrmcj9-g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ results
From: W. Andrew Loe III @ 2013-01-19  0:21 UTC (permalink / raw)
  To: Rainbows! list

This appears to have been broken in my application in Rainbows 4.4.3.

On Tue, Dec 4, 2012 at 10:09 PM, W. Andrew Loe III <andrew-4trK/3dDa6Nl57MIdRCFDg@public.gmane.org> wrote:
> Works great! Thank you very much for the quick response and patch!
>
> Feature Request: https://github.com/celluloid/celluloid-io
> Celluloid::IO backend, the spiritual successor to cool.io. I'm going
> to take a stab at this soon, but wanted to get something out.
>
> On Tue, Dec 4, 2012 at 7:18 PM, Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org> wrote:
>> "W. Andrew Loe III" <andrew-4trK/3dDa6Nl57MIdRCFDg@public.gmane.org> wrote:
>>> I've pushed a very very stripped down example that just echos the time.
>>> https://github.com/loe/sinatra-sse
>>
>> Thanks for the test case, I've just pushed out the following fix
>> to "master" of git://bogomips.org/rainbows.git
>>
>> I've pushed a rainbows 4.4.1.1.gd5c8c prerelease to RubyGems.org
>> It should be installable with: gem install --pre rainbows
>>
>> I expect this to work for you, but be sure to let me know if it doesn't :x
>>
>> Since this is a pretty small fix, I think I'll push 4.4.2 final
>> very soon.
>>
>> >From d5c8cc8b51619f0d33f75036c53e3936ad2749b2 Mon Sep 17 00:00:00 2001
>> From: Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org>
>> Date: Wed, 5 Dec 2012 03:08:19 +0000
>> Subject: [PATCH] event_machine: properly defer body.close for async
>>
>> Calling body.close in the normal write_response() code path
>> is incorrect, and only worked out of sheer luck with
>> Cramp and async_sinata.
>>
>> This change allows stream(:keep_open) in Sinatra to work
>> properly.
>>
>> Thanks to W. Andrew Loe III for the informative bug report
>> and reproducible test case.
>>
>> ref: http://mid.gmane.org/CA+-9oNd1EFqsniPkkPTwu5opTCinbM7-2KHoXov7+y3LE4s4Tg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
>> ---
>>  lib/rainbows/event_machine/client.rb | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/lib/rainbows/event_machine/client.rb b/lib/rainbows/event_machine/client.rb
>> index e56931f..fc0dfe3 100644
>> --- a/lib/rainbows/event_machine/client.rb
>> +++ b/lib/rainbows/event_machine/client.rb
>> @@ -64,8 +64,11 @@ class Rainbows::EventMachine::Client < EM::Connection
>>      @state = :headers if alive
>>      if body.respond_to?(:errback) && body.respond_to?(:callback)
>>        @deferred = body
>> +      write_headers(status, headers, alive)
>> +      write_body_each(body)
>>        deferred_errback(body)
>>        deferred_callback(body, alive)
>> +      return
>>      elsif body.respond_to?(:to_path)
>>        st = File.stat(path = body.to_path)
>>
>> --
>> Eric Wong
>> _______________________________________________
>> Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
>> http://rubyforge.org/mailman/listinfo/rainbows-talk
>> Do not quote signatures (like this one) or top post when replying
_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[relevance 0%]

* Re: Sinatra stream(:keep_open) not holding connections open
       [not found]             ` <20121205031848.GA32757-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
@ 2012-12-05  6:09  0%           ` W. Andrew Loe III
       [not found]                 ` <CA+-9oNfR9zM4phTShBsyjweAZBBYWF5egHw7MU8gcBf3f=fAJw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ results
From: W. Andrew Loe III @ 2012-12-05  6:09 UTC (permalink / raw)
  To: Rainbows! list

Works great! Thank you very much for the quick response and patch!

Feature Request: https://github.com/celluloid/celluloid-io
Celluloid::IO backend, the spiritual successor to cool.io. I'm going
to take a stab at this soon, but wanted to get something out.

On Tue, Dec 4, 2012 at 7:18 PM, Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org> wrote:
> "W. Andrew Loe III" <andrew-4trK/3dDa6Nl57MIdRCFDg@public.gmane.org> wrote:
>> I've pushed a very very stripped down example that just echos the time.
>> https://github.com/loe/sinatra-sse
>
> Thanks for the test case, I've just pushed out the following fix
> to "master" of git://bogomips.org/rainbows.git
>
> I've pushed a rainbows 4.4.1.1.gd5c8c prerelease to RubyGems.org
> It should be installable with: gem install --pre rainbows
>
> I expect this to work for you, but be sure to let me know if it doesn't :x
>
> Since this is a pretty small fix, I think I'll push 4.4.2 final
> very soon.
>
> >From d5c8cc8b51619f0d33f75036c53e3936ad2749b2 Mon Sep 17 00:00:00 2001
> From: Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org>
> Date: Wed, 5 Dec 2012 03:08:19 +0000
> Subject: [PATCH] event_machine: properly defer body.close for async
>
> Calling body.close in the normal write_response() code path
> is incorrect, and only worked out of sheer luck with
> Cramp and async_sinata.
>
> This change allows stream(:keep_open) in Sinatra to work
> properly.
>
> Thanks to W. Andrew Loe III for the informative bug report
> and reproducible test case.
>
> ref: http://mid.gmane.org/CA+-9oNd1EFqsniPkkPTwu5opTCinbM7-2KHoXov7+y3LE4s4Tg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
> ---
>  lib/rainbows/event_machine/client.rb | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/lib/rainbows/event_machine/client.rb b/lib/rainbows/event_machine/client.rb
> index e56931f..fc0dfe3 100644
> --- a/lib/rainbows/event_machine/client.rb
> +++ b/lib/rainbows/event_machine/client.rb
> @@ -64,8 +64,11 @@ class Rainbows::EventMachine::Client < EM::Connection
>      @state = :headers if alive
>      if body.respond_to?(:errback) && body.respond_to?(:callback)
>        @deferred = body
> +      write_headers(status, headers, alive)
> +      write_body_each(body)
>        deferred_errback(body)
>        deferred_callback(body, alive)
> +      return
>      elsif body.respond_to?(:to_path)
>        st = File.stat(path = body.to_path)
>
> --
> Eric Wong
> _______________________________________________
> Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
> http://rubyforge.org/mailman/listinfo/rainbows-talk
> Do not quote signatures (like this one) or top post when replying
_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[relevance 0%]

* Re: Sinatra stream(:keep_open) not holding connections open
       [not found]         ` <CA+-9oNd1EFqsniPkkPTwu5opTCinbM7-2KHoXov7+y3LE4s4Tg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-12-05  3:18  7%       ` Eric Wong
       [not found]             ` <20121205031848.GA32757-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
  0 siblings, 1 reply; 4+ results
From: Eric Wong @ 2012-12-05  3:18 UTC (permalink / raw)
  To: Rainbows! list

"W. Andrew Loe III" <andrew-4trK/3dDa6Nl57MIdRCFDg@public.gmane.org> wrote:
> I've pushed a very very stripped down example that just echos the time.
> https://github.com/loe/sinatra-sse

Thanks for the test case, I've just pushed out the following fix
to "master" of git://bogomips.org/rainbows.git

I've pushed a rainbows 4.4.1.1.gd5c8c prerelease to RubyGems.org
It should be installable with: gem install --pre rainbows

I expect this to work for you, but be sure to let me know if it doesn't :x

Since this is a pretty small fix, I think I'll push 4.4.2 final
very soon.

>From d5c8cc8b51619f0d33f75036c53e3936ad2749b2 Mon Sep 17 00:00:00 2001
From: Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org>
Date: Wed, 5 Dec 2012 03:08:19 +0000
Subject: [PATCH] event_machine: properly defer body.close for async

Calling body.close in the normal write_response() code path
is incorrect, and only worked out of sheer luck with
Cramp and async_sinata.

This change allows stream(:keep_open) in Sinatra to work
properly.

Thanks to W. Andrew Loe III for the informative bug report
and reproducible test case.

ref: http://mid.gmane.org/CA+-9oNd1EFqsniPkkPTwu5opTCinbM7-2KHoXov7+y3LE4s4Tg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
---
 lib/rainbows/event_machine/client.rb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/rainbows/event_machine/client.rb b/lib/rainbows/event_machine/client.rb
index e56931f..fc0dfe3 100644
--- a/lib/rainbows/event_machine/client.rb
+++ b/lib/rainbows/event_machine/client.rb
@@ -64,8 +64,11 @@ class Rainbows::EventMachine::Client < EM::Connection
     @state = :headers if alive
     if body.respond_to?(:errback) && body.respond_to?(:callback)
       @deferred = body
+      write_headers(status, headers, alive)
+      write_body_each(body)
       deferred_errback(body)
       deferred_callback(body, alive)
+      return
     elsif body.respond_to?(:to_path)
       st = File.stat(path = body.to_path)
 
-- 
Eric Wong
_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply related	[relevance 7%]

Results 1-4 of 4 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2012-12-05  1:19     Sinatra stream(:keep_open) not holding connections open W. Andrew Loe III
2012-12-05  1:44     ` Eric Wong
2012-12-05  2:16       ` W. Andrew Loe III
     [not found]         ` <CA+-9oNd1EFqsniPkkPTwu5opTCinbM7-2KHoXov7+y3LE4s4Tg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-12-05  3:18  7%       ` Eric Wong
     [not found]             ` <20121205031848.GA32757-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2012-12-05  6:09  0%           ` W. Andrew Loe III
     [not found]                 ` <CA+-9oNfR9zM4phTShBsyjweAZBBYWF5egHw7MU8gcBf3f=fAJw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-19  0:21  0%               ` W. Andrew Loe III
     [not found]                     ` <CA+-9oNdXyYrnyu3dfMuu7ULE7rhT_Rm48BCU_KaJUwsrmcj9-g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-19  1:01  0%                   ` W. Andrew Loe III

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/rainbows.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).