php - 是什么原因导致XML解析错误: no root element found error?

标签 php xml http http-headers

我最近开始在 Firebug 中显示以下错误:

XML Parsing Error: no root element found Location: http://dd.example.com/1.0/sources/30 Line Number 1, Column 1: 30:1:1

是什么原因导致的以及如何解决它?

标题选项卡:

Request URL: http://dd.example.com/1.0/sources/30
Request Method: PUT
Remote address: 11.11.111.111:80
Status Code: 204 No Content
Version: HTTP/1.1

请求 header :

Host: dd.example.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://dd.example.com/
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Content-Length: 33
Cookie: _ga=GA1.2.1885184115.1475238275; PHPSESSID=7ggri150scu2g5et1f7gtone94
Authorization: Basic TEljaGGlcDqTdW5zaKfrZX==
Connection: keep-alive

请求正文:

name=name&value=Remote+Sock&pk=30

响应 header :

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection: close
Content-Length: 0
Content-Type: 
Date: Sun, 05 Feb 2017 16:59:50 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Server: Apache/2.2.15 (CentOS)
X-Powered-By: PHP/5.

最佳答案

正在发送状态代码 204,但正在尝试发送内容。

关于php - 是什么原因导致XML解析错误: no root element found error?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42054974/

相关文章:

java - HTTP 前端服务器如何与 Websphere 通信

java - Http 请求无响应 : Apache Tomcat

php - 从今天起 1 周内从 MYTABLE 中删除行

php - 如何在 PHP 中比较两个日期?

jQuery:在这种情况下如何选择属性?

java - GeoTools 中的编码器不适用于 SLD

node.js - 快速路由定义前导斜杠是否有技术原因?

javascript - Javascript 中的 Php 变量

php - Ajax 调用后 CSS 不适用于幻灯片

java - RemoveChild 删除具有该名称的第一个子项,但跳过下一个具有相同名称的子项