about summary refs log tree commit homepage
path: root/t/client_body_buffer_size.ru
diff options
context:
space:
mode:
Diffstat (limited to 't/client_body_buffer_size.ru')
-rw-r--r--t/client_body_buffer_size.ru15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/client_body_buffer_size.ru b/t/client_body_buffer_size.ru
new file mode 100644
index 0000000..1a0fb16
--- /dev/null
+++ b/t/client_body_buffer_size.ru
@@ -0,0 +1,15 @@
+#\ -E none
+# frozen_string_literal: false
+app = lambda do |env|
+  input = env['rack.input']
+  case env["PATH_INFO"]
+  when "/tmp_class"
+    body = input.instance_variable_get(:@tmp).class.name
+  when "/input_class"
+    body = input.class.name
+  else
+    return [ 500, {}, [] ]
+  end
+  [ 200, {}, [ body ] ]
+end
+run app