Merge pull request #37015 from cpruitt/action-dispatch-default-test-headers-ascii-8bit

Encode ActionDispatch::TestRequest::DEFAULT_ENV headers as ASCII-8BIT
This commit is contained in:
Aaron Patterson 2019-08-22 14:02:40 -04:00 committed by GitHub
commit 3ae59fe14a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -6,9 +6,9 @@ require "rack/utils"
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.