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: |
* what's cooking in rainbows.git (v4.5.0 soon)
@ 2013-02-26  8:24  3% Eric Wong
  0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2013-02-26  8:24 UTC (permalink / raw)
  To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw

Most noticeable is rack.hijack support.

Everything works with Ruby 2.0.0 (with unicorn 4.6.2+) except
EventMachine/NeverBlock.

Eric Wong (12):
      epoll: ensure closing of pipelined clients if required
      tests: remove utee and use tee(1) instead
      tests: replace non-portable "date +%s" with ruby equivalent
      tests: "wc -c" portability for *BSDs
      tests: bump version dependencies for Isolate
      tests: "wc -l" portability for *BSDs
      hijacking support for Rack 1.5.x users
      GIT-VERSION-GEN: rewrite to manage RAINBOWS_VERSION const
      gemspec: set licenses= attribute
      bump unicorn dependency to 4.6.2+ for Ruby 2.0.0
      tests: update checks for Ruby 2.0.0
      doc: add HACKING document

Lin Jen-Shin (1):
      Add -N or --no-default-middleware option.

git clone git://bogomips.org/rainbows
_______________________________________________
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 3%]

* what's cooking in rainbows.git
@ 2013-02-01 22:07  3% Eric Wong
  0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2013-02-01 22:07 UTC (permalink / raw)
  To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw

I've pushed out some test fixes to improve portability on non-GNU
systems.  Nothing too interesting...

Eric Wong (5):
      epoll: ensure closing of pipelined clients if required
      tests: remove utee and use tee(1) instead
      tests: replace non-portable "date +%s" with ruby equivalent
      tests: "wc -c" portability for *BSDs
      tests: bump version dependencies for Isolate

Lin Jen-Shin (1):
      Add -N or --no-default-middleware option.

git clone git://bogomips.org/rainbows

git log of recent test changes:

commit f4e3bac180ff01256832f98655636f79b52f9d5b
Author: Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org>
Date:   Fri Jan 25 02:10:05 2013 +0000

    tests: bump version dependencies for Isolate
    
    Most of these test dependencies may be safely bumped.

commit 8a6117a22a7d01eeb5adc63d3152acf435cd3176
Author: Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org>
Date:   Thu Jan 24 23:33:54 2013 +0000

    tests: "wc -c" portability for *BSDs
    
    On FreeBSD 9.0, "wc -c" emits leading whitespace, so
    filter it through tr -d '[:space:]' to eliminate it.

commit 0ba6fc3c30b9cf530faf7fcf5ce7be519ec13fe7
Author: Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org>
Date:   Thu Jan 24 23:13:41 2013 +0000

    tests: replace non-portable "date +%s" with ruby equivalent
    
    "date +%s" is not in POSIX (it is in GNU, and at least FreeBSD
    9.0, possibly earlier).  The Ruby equivalent should be
    sufficiently portable between different Ruby versions.
    
    This change was automated via:
    	perl -i -p -e 's/date \+%s/unix_time/' t/*.sh

commit cbff7b0892148b037581541184364e0e91d2a138
Author: Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org>
Date:   Thu Jan 24 22:59:16 2013 +0000

    tests: remove utee and use tee(1) instead
    
    POSIX already stipulates tee(1) must be unbuffered.  I think my
    decision to use utee was due to my being misled by a bug in
    older curl where -N did not work as advertised (but --no-buffer
    did).

-- 
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	[relevance 3%]

* [PATCH] epoll: ensure closing of pipelined clients if required
@ 2013-01-24 19:56  7% Eric Wong
  0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2013-01-24 19:56 UTC (permalink / raw)
  To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw

on_read normally relies on the close checking in on_readable,
but on_deferred_write_complete may be called from on_writable
instead (bypassing the close check of on_readable).

This affects both Epoll and XEpoll users, but only if they
were sending responses via body#to_path and triggering
on_deferred_write_complete.

While we're at it, favor non-recursive want_more instead of
calling on_readable recursively in ev_write_responses to
prevent stack growth.
---
  commit 49f70632e2f4a9b84fd4fced7439d0844fed1bbd in "master"
  of git://bogomips.org/rainbows.git

 lib/rainbows/epoll/client.rb | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/lib/rainbows/epoll/client.rb b/lib/rainbows/epoll/client.rb
index f690d85..d72696b 100644
--- a/lib/rainbows/epoll/client.rb
+++ b/lib/rainbows/epoll/client.rb
@@ -102,7 +102,19 @@ module Rainbows::Epoll::Client
     else
       write_response(status, headers, body, alive)
     end
-    on_read(Z) if alive && 0 == @wr_queue.size && 0 != @buf.size
+    # try to read more if we didn't have to buffer writes
+    next_request if alive && 0 == @wr_queue.size
+  end
+
+  def next_request
+    if 0 == @buf.size
+      want_more
+    else
+      # pipelined request (already in buffer)
+      on_read(Z)
+      return if @wr_queue[0] || closed?
+      close if :close == @state
+    end
   end
 
   def epoll_run
@@ -120,7 +132,7 @@ module Rainbows::Epoll::Client
 
   def on_deferred_write_complete
     :close == @state and return close
-    0 == @buf.size ? on_readable : on_read(Z)
+    next_request
   end
 
   def handle_error(e)
-- 
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-3 of 3 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2013-01-24 19:56  7% [PATCH] epoll: ensure closing of pipelined clients if required Eric Wong
2013-02-01 22:07  3% what's cooking in rainbows.git Eric Wong
2013-02-26  8:24  3% what's cooking in rainbows.git (v4.5.0 soon) Eric Wong

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).