about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2014-02-04 03:41:15 +0000
committerEric Wong <normalperson@yhbt.net>2014-02-04 03:41:15 +0000
commit648c9a67bf397c22b82496a03c4b2b2a8ae8dd1f (patch)
treeea2089a1ec7d1165231513067f6dce2eaecae79e /test
parent0fca33cc0eea24f5b6c0e8d172d59802300b7345 (diff)
downloadyahns-648c9a67bf397c22b82496a03c4b2b2a8ae8dd1f.tar.gz
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!
Diffstat (limited to 'test')
-rw-r--r--test/server_helper.rb5
1 files changed, 5 insertions, 0 deletions
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