2

全部

使用葡萄时出现错误。

This page contains the following errors:

error on line 1 at column 1: Document is empty
Below is a rendering of the page up to the first error.

事实上,我的 api 可以很好地返回 xml。运行一段时间后,它开始出现故障。显示该错误。我的服务器是 nginx + 乘客。rails2.3.8. +葡萄。有什么帮助吗?

4

1 回答 1

5

错误来自 Chrome,当内容类型为 xml 并且 xml 格式不正确时显示,或者在您的情况下,如错误所示,为空。您的 api 仍然可以在不解析和验证内容类型的客户端(例如 curl)上工作。

当您遇到奇怪的事情时,最好使用 curl 而不是浏览器来访问您的 api。

于 2012-03-21T09:53:39.547 回答