devbobo
Feb-09-2005, 12:51 AM
Don,
I'm trying to write some code for Mozilla, and I have found that when using Smugmug's api, i get some weird results.
I was running some test code, works fine on some other xml-rpc sites, but when I ran it on smugmug, I found that the code always reported 'Error: Server reported status 200'. Which when I looked it up, i was surprised that 200 == OK.
So I did some digging in the nsXmlrpcClient.js file and found the offending piece of code...
if (!e.target.responseXML) {
if (e.target.status) {
try {
parent._listener.onError(parent, parent._context, Components.results.NS_ERROR_FAILURE, 'Server returned status ' + e.target.responseText);
[snip]...
so what I find is that even though a status of 200 was returned, the XML-RPC responseXML is empty. I did some more checking and find that the XML-RPC responseText has the text version of the responseXML.
so i could easily change the code to look at the responseText instead of responseXML, but my problem is that this file is code provided by Firefox and I really don't want to be modifying if possible.
Is it possible to check why smugmug isn't returning the responseXML.
Thanks,
David
I'm trying to write some code for Mozilla, and I have found that when using Smugmug's api, i get some weird results.
I was running some test code, works fine on some other xml-rpc sites, but when I ran it on smugmug, I found that the code always reported 'Error: Server reported status 200'. Which when I looked it up, i was surprised that 200 == OK.
So I did some digging in the nsXmlrpcClient.js file and found the offending piece of code...
if (!e.target.responseXML) {
if (e.target.status) {
try {
parent._listener.onError(parent, parent._context, Components.results.NS_ERROR_FAILURE, 'Server returned status ' + e.target.responseText);
[snip]...
so what I find is that even though a status of 200 was returned, the XML-RPC responseXML is empty. I did some more checking and find that the XML-RPC responseText has the text version of the responseXML.
so i could easily change the code to look at the responseText instead of responseXML, but my problem is that this file is code provided by Firefox and I really don't want to be modifying if possible.
Is it possible to check why smugmug isn't returning the responseXML.
Thanks,
David