Skip to content

Commit

Permalink
Encode ActionDispatch::TestRequest::DEFAULT_ENV headers as ASCII-8BIT
Browse files Browse the repository at this point in the history
Request headers provided by servers are ASCII-8BIT encoded. This commit sets up the `ActionDispatch::TestRequest::DEFAULT_ENV` headers so that they are likewise encoded as ASCII-8BIT.
  • Loading branch information
cpruitt committed Aug 22, 2019
1 parent 4dbb7aa commit da0bcfb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions actionpack/lib/action_dispatch/testing/test_request.rb
Expand Up @@ -6,9 +6,9 @@
module ActionDispatch
class TestRequest < Request
DEFAULT_ENV = Rack::MockRequest.env_for("/",
"HTTP_HOST" => "test.host",
"REMOTE_ADDR" => "0.0.0.0",
"HTTP_USER_AGENT" => "Rails Testing",
"HTTP_HOST" => "test.host".b,
"REMOTE_ADDR" => "0.0.0.0".b,
"HTTP_USER_AGENT" => "Rails Testing".b,
)

# Create a new test request with default +env+ values.
Expand Down

0 comments on commit da0bcfb

Please sign in to comment.