I am creating my protocol handler and channel in JavaScript.
But there is a problem wheh when I use XMLHttpRequest. It returns NS_ERROR_FAILLURE anytime during send().
Dumping every event and looking in the nsXMLHttpRequest.cpp seems that the program:
* enter nsXMLRequest::Send * obtains request method (via httpChannel->GetRequestMethod(method)) * but never goes to the mChannel->SetNotificationCallbacks(this) <http://lxr.mozilla.org/mozilla/source/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp#1525>
The problem probaly is somewhere in the managing modalEventQueue or obtaining mScriptContext.
<http://lxr.mozilla.org/mozilla/source/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp#1503>
The block in
if (aBody && httpChannel && !method.EqualsLiteral("GET")) {}is very probably past OK, for GET method, it is ignored 8-) and for POST, it sets uploadchannel, headers etc. correctly.
Any idea? Had someone tried create protocol in JavaScript?
Thank you
Martin Hassman _______________________________________________ Mozilla-xpcom mailing list [email protected] http://mail.mozilla.org/listinfo/mozilla-xpcom
