【发布时间】:2013-07-25 23:31:44
【问题描述】:
我不确定问题是因为错误的 PHP 代码还是错误的 nginx 配置。
我喜欢生成 atom 格式的提要。 Feed 的 XML 有效。我确实通过
设置了内容类型header("Content-type: application/atom+xml");
在我发布 XML 之前。尽管如此,我还是从 chromium 开发者工具中获得了不同的信息。
Network 中的表格视图将 text/plain 显示为类型:
但是,标头本身似乎没问题,因为它声明了 application/atom+xml:
这个 mime-type 在 nginx-configuration 中正确设置:
types {
[...]
application/atom+xml atom;
[...]
}
Chromium 无法识别我的提要的正确 mime 类型并将其声明为 text/plain 可能会丢失/错误?
【问题讨论】:
-
咨询第三方——试试
curl -i。text/plain是否可能只是 Chromium 内容处理的产物?
标签: php nginx google-chrome-devtools mime-types atom-feed