From 3c8fdda73cd2e571c3395c425737e439c1a8bf99 Mon Sep 17 00:00:00 2001 From: ryah Date: Sat, 29 Mar 2008 17:57:55 +0100 Subject: [PATCH] fix tests to use 'CONTENT_TYPE' instead 'HTTP_CONTENT_TYPE' --- benchmark/application.rb | 4 ++-- test/helper.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmark/application.rb b/benchmark/application.rb index e253249..a3f8c12 100644 --- a/benchmark/application.rb +++ b/benchmark/application.rb @@ -53,12 +53,12 @@ class SimpleApp while chunk = env['rack.input'].read(512) input_body << chunk end - if env['HTTP_CONTENT_LENGTH'].to_i == input_body.length + if env['CONTENT_LENGTH'].to_i == input_body.length body = "Content-Length matches input length" status = 200 else body = "Content-Length doesn't matches input length! - content_length = #{env['HTTP_CONTENT_LENGTH'].to_i} + content_length = #{env['CONTENT_LENGTH'].to_i} input_body.length = #{input_body.length}" status = 500 end diff --git a/test/helper.rb b/test/helper.rb index 8088ada..fd1a0e5 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -25,7 +25,7 @@ class HelperApp elsif commands.include?('test_post_length') input_body = env['rack.input'].read - content_length_header = env['HTTP_CONTENT_LENGTH'].to_i + content_length_header = env['CONTENT_LENGTH'].to_i if content_length_header == input_body.length body = "Content-Length matches input length" -- 2.11.4.GIT