【发布时间】:2015-09-24 12:28:30
【问题描述】:
接受标头"Accept: text/plain,text/html;" 适用于http://nginx.org 等网站。但是,当我针对我的 Rails 4.1 应用程序在本地运行它时
curl -v -H "Accept: text/plain,text/html;" localhost:3000/
在 html 响应主页上,我收到一个 500 错误页面,用于执行 ActionController::UnknownFormat 执行。
当我卷曲时
curl -v -H "Accept: text/plain,text/html" localhost:3000
一切正常(注意缺少;)
我怎样才能使它也适用于Accept: text/plain,text/html; 案例?
【问题讨论】:
标签: ruby-on-rails mime-types ruby-on-rails-4.1