Closed
Bug 92772
Opened 23 years ago
Closed 22 years ago
Cannot call nsIStringStream from Javascript [xml rpc]
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: wsargent, Assigned: scc)
Details
var oUploadStream = ????? // mmh, so here I've got a problem: I need Does anyone have an idea how to wrap the string object in something that provides nsIInputStream?? I'm trying to hack nsXmlRpcClient.js back into operation. There doesn't seem to be a way to turn a string into a stream from Javascript. I need to do this so I can send a POST request through an HttpChannel. The usual way of doing it from C++ seems to be to use NS_NewCStringInputStream(), but that relies on nsIStringStream, which doesn't have an IDL interface. Doesn't look like anything else uses Javascript, so I can't see what the workaround is. Also see 9ijp67$4371@secnews.netscape.com: // The old/deprecated way would be to use the NewPostDataStream method (this method is no longer available within the new nsIHttpProtocolHandler interface): var oProtocolHandler = oIoService.getProtocolHandler(oUrl.scheme); oProtocolHandler = oProtocolHandler.QueryInterface(Components.interfaces.nsIHTTPProtocolHandler ); var oUploadStream = oProtocolHandler.NewPostDataStream(false, "\r\n" + oBody, oProtocolHandler.ENCODE_NORMAL); oChannel.uploadStream = oUploadStream;
Comment 1•23 years ago
|
||
Re-assigning to default owner, since this bug sounds like a string thing, not an XPCOM thing.
Assignee: kandrot → scc
Component: XPCOM → String
Comment 2•23 years ago
|
||
scc: if there is not an existing mechanism for this, then i can whip something up: afterall, my http changes removed the NewPostDataStream solution. so, feel free to reassign.
Comment 3•22 years ago
|
||
This bug is related to the XML-RPC and XML modules, I think. I don't know if this bug has been fixed yet, but I'd like to see who I can talk to about this to see if this still impacts XML-RPC messages.
Reporter | ||
Updated•22 years ago
|
Summary: Cannot call nsIStringStream from Javascript → Cannot call nsIStringStream from Javascript [xml rpc]
Comment 4•22 years ago
|
||
I think that this was either fixed or invalidated by Bug 109960. xml-rpc works now.
Reporter | ||
Comment 5•22 years ago
|
||
I can't duplicate this on an RC2 build. Looks like it was fixed by Bug 109960. Marking as WORKSFORME
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
Updated•3 years ago
|
Component: String → XPCOM
You need to log in
before you can comment on or make changes to this bug.
Description
•