aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/.gitignore
diff options
context:
space:
mode:
authorGeorge Claghorn <george.claghorn@gmail.com>2018-10-08 11:21:13 -0400
committerGitHub <noreply@github.com>2018-10-08 11:21:13 -0400
commitb4578c8b7fafddfb86b6ebe64ae34e6281d4160d (patch)
treec4aac1f37428506d839e42f696ee87b9820f1fcd /activerecord/.gitignore
parentd4127a014c110faa9c4611244f01f4320616a49b (diff)
parentbba5ecc923bbc8a635913c1101188163cb9699be (diff)
downloadrails-b4578c8b7fafddfb86b6ebe64ae34e6281d4160d.tar.gz
rails-b4578c8b7fafddfb86b6ebe64ae34e6281d4160d.tar.bz2
rails-b4578c8b7fafddfb86b6ebe64ae34e6281d4160d.zip
Fix directly uploading using a MIME type synonym
When Content-Type is "application/x-gzip", request.content_type resolves to "application/gzip", because application/x-gzip is a synonym of application/gzip by default. This causes the acceptable_content? check in ActiveStorage::DiskController to fail, because the direct upload token contains application/x-gzip, which is not equal to application/gzip. Fix by comparing the token content type with the request content type *and its synonyms*.
Diffstat (limited to 'activerecord/.gitignore')
0 files changed, 0 insertions, 0 deletions