Because Canvas currently has an exact check against content type, many clients are failing with 415 errors because they POST with a content type header of application/xml; charset=utf-8.
Changing to #media_type fixes this.
Test plan:
Change the Dockerfile to use Rails 7.1
Make API request to .../grade_passback with a request Content-Type header of "application/xml; charset=utf-8"
Rails 7.1 deprecates using
#content_type
for checking media types. https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#actiondispatch-request-content-type-now-returns-content-type-header-as-it-isBecause Canvas currently has an exact check against content type, many clients are failing with 415 errors because they POST with a content type header of
application/xml; charset=utf-8
.Changing to
#media_type
fixes this.Test plan: