开发者

Error on xmlrpcresp Object

开发者 https://www.devze.com 2023-04-11 02:22 出处:网络
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 withxmlrpcresp Object that i

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 serv开发者_JAVA技巧er):

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?


"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.

0

精彩评论

暂无评论...
验证码 换一张
取 消