400 : Bad Request !
I am developing an application which uses an xmlrpc service to communicate. I developed the server-side with windows using WAMP and it works pretty well. However, I have decided to implement the server-side on Ubuntu. So I've started downloading and installing what's necessary (apt-get install lamp-server^) and everything which comes with. When I tried it, It didn't work and I got that error : 400 : Bad Request. 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 !
I'm using pear's xml_rpc package (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: A开发者_JAVA百科pache/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
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
</body></html>
---END---
Fault Code: 5 Fault Reason: Didn't receive 200 OK from remote server. (HTTP/1.1 400 Bad Request)
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
精彩评论