mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Encode ActionDispatch::TestRequest::DEFAULT_ENV headers as ASCII-8BIT
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.
This commit is contained in:
parent
4dbb7aa58b
commit
da0bcfb44a
1 changed files with 3 additions and 3 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue