diff --git a/spec/integration/rails/rails_spec.rb b/spec/integration/rails/rails_spec.rb index eae1691..723b6c1 100644 --- a/spec/integration/rails/rails_spec.rb +++ b/spec/integration/rails/rails_spec.rb @@ -40,7 +40,7 @@ } end let(:now) { Time.now } - let(:headers) { { 'HTTP_AUTHORIZATION' => 'Basic 123', 'HTTP_X_FORWARDED_FOR' => '5.5.5.5, 1.2.3.4' } } + let(:headers) { { 'HTTP_AUTHORIZATION' => 'Basic 123', 'HTTP_X_FORWARDED_FOR' => '5.5.5.5, 1.2.3.4', 'HTTP_CONTENT_LENGTH' => '0' } } before do Timecop.freeze(now) diff --git a/spec/lib/castle/client_spec.rb b/spec/lib/castle/client_spec.rb index 25a9b70..0e1bd4a 100644 --- a/spec/lib/castle/client_spec.rb +++ b/spec/lib/castle/client_spec.rb @@ -9,7 +9,8 @@ '/', 'HTTP_USER_AGENT' => ua, 'HTTP_X_FORWARDED_FOR' => ip, - 'HTTP_COOKIE' => "__cid=#{cookie_id};other=efgh" + 'HTTP_COOKIE' => "__cid=#{cookie_id};other=efgh", + 'HTTP_CONTENT_LENGTH' => '0' ) end let(:request) { Rack::Request.new(env) } diff --git a/spec/lib/castle/context/get_default_spec.rb b/spec/lib/castle/context/get_default_spec.rb index fbf0a10..4a48ca2 100644 --- a/spec/lib/castle/context/get_default_spec.rb +++ b/spec/lib/castle/context/get_default_spec.rb @@ -12,7 +12,8 @@ 'HTTP_X_FORWARDED_FOR' => ip, 'HTTP_ACCEPT_LANGUAGE' => 'en', 'HTTP_USER_AGENT' => 'test', - 'HTTP_COOKIE' => "__cid=#{client_id};other=efgh" + 'HTTP_COOKIE' => "__cid=#{client_id};other=efgh", + 'HTTP_CONTENT_LENGTH' => '0' ) end let(:request) { Rack::Request.new(env) } diff --git a/spec/lib/castle/context/prepare_spec.rb b/spec/lib/castle/context/prepare_spec.rb index cc6c87b..ed08b2f 100644 --- a/spec/lib/castle/context/prepare_spec.rb +++ b/spec/lib/castle/context/prepare_spec.rb @@ -9,7 +9,8 @@ '/', 'HTTP_USER_AGENT' => ua, 'HTTP_X_FORWARDED_FOR' => ip, - 'HTTP_COOKIE' => "__cid=#{cookie_id};other=efgh" + 'HTTP_COOKIE' => "__cid=#{cookie_id};other=efgh", + 'HTTP_CONTENT_LENGTH' => '0' ) end let(:request) { Rack::Request.new(env) } diff --git a/spec/lib/castle/headers/filter_spec.rb b/spec/lib/castle/headers/filter_spec.rb index 059415b..729ac6b 100644 --- a/spec/lib/castle/headers/filter_spec.rb +++ b/spec/lib/castle/headers/filter_spec.rb @@ -14,7 +14,8 @@ 'HTTP_X_FORWARDED_FOR' => '1.2.3.4', 'HTTP_USER_AGENT' => 'Mozilla 1234', 'TEST' => '1', - 'REMOTE_ADDR' => '1.2.3.4' + 'REMOTE_ADDR' => '1.2.3.4', + 'HTTP_CONTENT_LENGTH' => '0' ) result[:HTTP_OK] = 'OK' result diff --git a/spec/lib/castle/payload/prepare_spec.rb b/spec/lib/castle/payload/prepare_spec.rb index f91190a..ff358e3 100644 --- a/spec/lib/castle/payload/prepare_spec.rb +++ b/spec/lib/castle/payload/prepare_spec.rb @@ -9,7 +9,8 @@ '/', 'HTTP_USER_AGENT' => ua, 'HTTP_X_FORWARDED_FOR' => ip, - 'HTTP_COOKIE' => "__cid=#{cookie_id};other=efgh" + 'HTTP_COOKIE' => "__cid=#{cookie_id};other=efgh", + 'HTTP_CONTENT_LENGTH' => '0' ) end let(:request) { Rack::Request.new(env) }