Skip to content

Commit

Permalink
Address Rails 7.0 will return Content-Type header without modification
Browse files Browse the repository at this point in the history
This pull request addresses these warnings.

```ruby
$ cd actionmailbox
$ bin/test test/controllers/ingresses/relay/inbound_emails_controller_test.rb
Run options: --seed 32561

DEPRECATION WARNING: Rails 7.0 will return Content-Type header without modification. If you want just the MIME type, please use `#media_type` instead. (called from call at /home/yahonda/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15)
...DEPRECATION WARNING: Rails 7.0 will return Content-Type header without modification. If you want just the MIME type, please use `#media_type` instead. (called from call at /home/yahonda/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15)
..

Finished in 0.114883s, 43.5224 runs/s, 87.0447 assertions/s.
5 runs, 10 assertions, 0 failures, 0 errors, 0 skips
$
```

Follow-up rails@84055130713
related to rails#41251
  • Loading branch information
yahonda committed Feb 2, 2021
1 parent beed933 commit 51931f0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def create

private
def require_valid_rfc822_message
unless request.content_type == "message/rfc822"
unless request.media_type == "message/rfc822"
head :unsupported_media_type
end
end
Expand Down

0 comments on commit 51931f0

Please sign in to comment.