about summary refs log tree commit homepage
path: root/t/t0016.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-07-06 09:58:40 +0000
committerEric Wong <normalperson@yhbt.net>2010-07-06 10:05:13 +0000
commitd2f240d7ea11738ba889668a669ffb7845d06e7b (patch)
tree020802df1f92f750ee91f0834c09bac0e304c3a2 /t/t0016.rb
parent0283928fca45a012b31662b30b49990dac2aae18 (diff)
downloadrainbows-d2f240d7ea11738ba889668a669ffb7845d06e7b.tar.gz
Fortunately this only affects the hardly-used FiberSpawn and
FiberPool concurrency models, and also unreleased revisions of
Rev.  1.9 encoding is tricky to handle right when doing I/O in
Ruby...
Diffstat (limited to 't/t0016.rb')
-rw-r--r--t/t0016.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t0016.rb b/t/t0016.rb
new file mode 100644
index 0000000..98c9a2e
--- /dev/null
+++ b/t/t0016.rb
@@ -0,0 +1,15 @@
+# -*- encoding: utf-8 -*-
+module T0016
+  CHUNK = '©' * 1024 * 1024
+  BODY = (1..50).map { CHUNK }
+  HEADER = {
+    # BODY.inject(0) { |m,c| m += c.bytesize }.to_s,
+    'Content-Length' => '104857600',
+    'Content-Type' => 'text/plain',
+  }
+
+  def self.call(env)
+    [ 200, HEADER, BODY ]
+  end
+end
+$0 == __FILE__ and T0016::BODY.each { |x| $stdout.syswrite(x) }