From 648c9a67bf397c22b82496a03c4b2b2a8ae8dd1f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 4 Feb 2014 03:41:15 +0000 Subject: http_response: use kgio_syssend with MSG_MORE If Content-Length is known, try to save some bandwidth by corking the headers until the body is sendable. This allows us to avoid sending an extra packet for small HTTP responses. This allows high-performance websites like YHBT.net to be served faster! --- test/server_helper.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') diff --git a/test/server_helper.rb b/test/server_helper.rb index d4b8f98..a92a2da 100644 --- a/test/server_helper.rb +++ b/test/server_helper.rb @@ -100,4 +100,9 @@ module TrywriteBlocked return :wait_writable if $_tw_block_on.include?($_tw_blocked += 1) super end + + def kgio_syssend(*args) + return :wait_writable if $_tw_block_on.include?($_tw_blocked += 1) + super + end end -- cgit v1.2.3-24-ge0c7