Skip to content

Commit

Permalink
Merge pull request #1591 from newrelic/NR-1222/rack-test-v2
Browse files Browse the repository at this point in the history
NR-1222/rack-test-v2
  • Loading branch information
hannahramadan authored Nov 4, 2022
2 parents 9a8d240 + ec0e9bb commit 8867bbe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/new_relic/rack/browser_monitoring.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def attachment?(headers)
end

def streaming?(env, headers)
# Chunked transfer encoding is a streaming data transfer mechanism available only in HTTP/1.1
return true if headers && headers['Transfer-Encoding'] == 'chunked'

defined?(ActionController::Live) &&
Expand Down
2 changes: 1 addition & 1 deletion test/multiverse/suites/rails/Envfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def minitest_rails_version(rails_version = nil)
end

def pre2_rack_test
%Q(gem 'rack-test', '< 2')
%Q(gem 'rack-test')
end

def gem_list(rails_version = nil)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_excludes_rum_instrumentation_when_streaming_with_action_controller_live
end

def test_excludes_rum_instrumentation_when_streaming_with_action_stream_true
get('/undead/brain_stream')
get('/undead/brain_stream', env: {'HTTP_VERSION' => 'HTTP/1.1'})

assert_includes(response.body, UndeadController::RESPONSE_BODY)
assert_not_includes(response.body, JS_LOADER)
Expand Down

0 comments on commit 8867bbe

Please sign in to comment.