This project is archived and is in readonly mode.
ActiveResource is not extracting errors from an XML response if the Content-Type is 'application/xml; charset=utf-8'
Reported by Peter Nash | September 17th, 2009 @ 12:45 PM
A change to ActiveResource::Validations was introduced in 2.3.4 which adds support for JSON errors:
http://github.com/rails/rails/commit/797588543ed70b4c5dcf51d7f1e4a7...
The following test was added to the "save_with_validation"
method:
case error.response['Content-Type']
when 'application/xml'
errors.from_xml(error.response.body)
when 'application/json'
errors.from_json(error.response.body)
end
This is looking for an exact match on Content-Type
'application/xml'.
If, for example, the returned Content-Type is 'application/xml; charset=utf-8' then the error response is ignored.
Comments and changes to this ticket
-
Jeremy Kemper September 17th, 2009 @ 07:24 PM
- State changed from new to duplicate
Reopened #1956 with this issue.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>