1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/test
Ryuta Kamizono b65bb377fe Fix content_type= to not discard extra part
In #36996, the behavior of `content_type=` has been changed to treat a
`content_type` itself as a mime type if a `content_type` doesn't contain
`charset=...` part.

i.e.

```ruby
response.content_type = "text/html; fragment"
response.media_type # => "text/html; fragment"

response.content_type = "text/html; fragment; charset=utf-16"
response.media_type # => "text/html"
```

That is tricky and strange.

I think that we cannot distinguish whether extra part is a part of mime
type or not for now. So at least in Rails 6.0, we should not discard
extra part conservatively as before.
2019-08-23 05:22:53 +09:00
..
abstract Module#{define_method,alias_method,undef_method,remove_method} become public since Ruby 2.5 2018-12-21 01:39:18 +09:00
assertions Use frozen string literal in actionpack/ 2017-07-29 14:02:40 +03:00
controller Fix content_type= to not discard extra part 2019-08-23 05:22:53 +09:00
dispatch Fix content_type= to not discard extra part 2019-08-23 05:22:53 +09:00
fixtures Change the empty block style to have space inside of the block 2018-09-25 13:19:35 -04:00
journey Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
lib/controller Use frozen string literal in actionpack/ 2017-07-29 14:02:40 +03:00
routing Use frozen string literal in actionpack/ 2017-07-29 14:02:40 +03:00
abstract_unit.rb Revert "MethodCallAssertions is a regular player of the team ActiveSupport::TestCase now" 2019-08-02 00:24:21 -04:00