Is this necessary?  I think Rails does this automatically based on content type, perhaps that's not being set on the client side.