简体   繁体   English

400:错误的请求!

[英]400 : Bad Request !

I am developing an application which uses an xmlrpc service to communicate. 我正在开发一个使用xmlrpc服务进行通信的应用程序。 I developed the server-side with windows using WAMP and it works pretty well. 我使用WAMP开发了带有Windows的服务器端,并且效果很好。 However, I have decided to implement the server-side on Ubuntu. 但是,我决定在Ubuntu上实现服务器端。 So I've started downloading and installing what's necessary (apt-get install lamp-server^) and everything which comes with. 因此,我已经开始下载并安装必要的工具(apt-get install lamp-server ^)以及随附的所有工具。 When I tried it, It didn't work and I got that error : 400 : Bad Request. 当我尝试它时,它不起作用,并且出现了该错误:400:错误的请求。 At first, I thought I came from lamp-server and a bad configuration so I uninstalled it all and started again all components one by one but I still that error ! 起初,我以为我来自Lamp-server,配置错误,因此我将其全部卸载,然后再次逐个启动所有组件,但仍然出现该错误!

I'm using pear's xml_rpc package (http://pear.php.net/package/XML_RPC/redirected). 我正在使用pear的xml_rpc包(http://pear.php.net/package/XML_RPC/redirected)。 And It seems it work, here's the page source which gives me this error : 而且似乎可行,这是给我这个错误的页面源:

---SENT---
POST server5.php HTTP/1.0
User-Agent: PEAR XML_RPC
Host: localhost
Content-Type: text/xml
Content-Length: 309

<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>storeData</methodName>
<params>
<param>
<value><base64></base64></value>
</param>
<param>
<value><string>03-10-2010-16.55.23</string></value>
</param>
<param>
<value><string>popop</string></value>
</param>
</params>
</methodCall>

---END---

---RECEIVED---
HTTP/1.1 400 Bad Request
Date: Wed, 13 Apr 2011 14:31:33 GMT
Server: Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.3 with Suhosin-Patch
Vary: Accept-Encoding
Content-Length: 226
Connection: close
Content-Type: text/html; charset=iso-8859-1

&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML 2.0//EN&quot;&gt;
&lt;html&gt;&lt;head&gt;
&lt;title&gt;400 Bad Request&lt;/title&gt;

&lt;/head&gt;&lt;body&gt;
&lt;h1&gt;Bad Request&lt;/h1&gt;
&lt;p&gt;Your browser sent a request that this server could not understand.&lt;br /&gt;
&lt;/p&gt;
&lt;/body&gt;&lt;/html&gt;

---END---

Fault Code: 5 Fault Reason: Didn't receive 200 OK from remote server. 故障代码:5故障原因:没有从远程服务器收到200 OK。 (HTTP/1.1 400 Bad Request) (HTTP / 1.1 400错误请求)

Do you have any idea what could raise that error ? 您是否知道会导致该错误的原因? any tips or clue ? 有什么提示或线索吗?

Thanks in advance ! 提前致谢 !

Server is right, the request is Bad 服务器正确,请求错误

Your path needs to start with / 您的路径必须以/开头

> POST /server5.php HTTP/1.0 User-Agent:
> PEAR XML_RPC Host: localhost
> Content-Type: text/xml Content-Length:
> 309

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM