0

I'm working on a project that I write a Firefox addon to communicate with a service on my client server. My add send a POST request and then the server encounter an error with xmlrpcresp Object that is:

Error: xmlrpcresp Object
(
  [val] => 0
  [valtyp] => 
  [errno] => 6
  [errstr] => No data received from server.
  [payload] => 
  [hdrs] => Array
    (
    )

  [_cookies] => Array
    (
    )

  [content_type] => text/xml
  [raw_data] => 
)

and my addon request (it intend to recieve json data from the server):

Request({
            contentType: "application/x-www-form-urlencoded",
            headers: {
                "Keep-Alive": (model.get("interval1")  || 30) - 10
                },
            content: content,
            url: url,
            onComplete: function(res){
                var response = res || this.response;
                logger.logFile("collect steps status " + helper.getStatusData(response.json))
                if (response.status == "200"){
                    var json = response.json;
                    logger.object(json, "track download id");
                    if(json.results && json.results.status == "0") 
                        callback(json);
                    else{
                        if(fallback) fallback(json);
                    }
                }
                else{
                    if(fallback) fallback(json);
                }
            }
        }).post()

The client's IT team said that it might be a header error and this not always happen, just sometime.

Can my above request cause the error? Or, it's just some server side process's error?

hakre
  • 193,403
  • 52
  • 435
  • 836
leegor
  • 472
  • 5
  • 15

1 Answers1

0

"No data received from server" is not an error message that the browser gave you, it is the response from the xmlrpc library on the server. In other words, your add-on successfully sent a request to the server and received a response. In the response the server indicates that its RPC call failed. How could this be a client problem? It is quite obviously a problem with the server that the RPC call went to - instead of giving a response back it returned 200 OK without any data which is what the error message is saying.

Wladimir Palant
  • 56,865
  • 12
  • 98
  • 126
  • Thanks Wladimir Palant. One more question - I have little knowledge about PHP XMLRPC - do you know why and when "No data received from server" happens? So that i can talk to the client's team? – leegor Oct 05 '11 at 17:21
  • @leegor: And I have no knowledge about PHP XMLRPC whatsoever. So better ask a new question ;) – Wladimir Palant Oct 05 '11 at 17:24