-
由 Edouard CHIN 提交于
- `respond_to any` doesn't allow to specify a content type and the content type in the response will be based on the request format. ```ruby def my_action respond_to do |format| format.html { render(html: 'hello') } format.any { render(json: { foo: 'bar'}) } end end get('my_action.csv') # Before this patch, content type was `text/csv' # Ather this patch, content type is correctly set to whateve we did in the `format.any` block ``` If the client specify the type of data he wants but the server doesn't know how to handle it and return plain text (or whatever) I don't think it make sense to falsey claim that we are returning a `text/csv` a response where in fact we are returning something else. Fix #37345
42c51576
可在Tags中查看这些版本中当前仓库的状态.