我有简单的代码:
def xrds
@services = {
'0' => {
'Type' => [OpenID::OPENID_2_0_TYPE,OpenID::OPENID_1_0_TYPE],
'URI' => root_url
}
}
render :content_type => 'application/xrds+xml'
end但是Rails返回的content-type是text/xml。有什么办法解决这个问题吗?我的rails版本是3.0.6
发布于 2011-08-16 19:47:25
尝试使用(渲染前):
response.headers['content-type'] = 'application/xrds+xml'http://mail-archives.apache.org/mod_mbox/incubator-heraldry-commits/200610.mbox/%3C20061011221316.186F11A981D@eris.apache.org%3E
https://stackoverflow.com/questions/7076708
复制相似问题