Closed Bug 98928 Opened 24 years ago Closed 24 years ago

nsIXMLHttpRequest needs IE-compatible (JS polymorphic) send method

Categories

(Core :: XML, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla0.9.7

People

(Reporter: shaver, Assigned: hjtoi-bugzilla)

References

Details

(Whiteboard: [fixinhand])

Attachments

(1 file, 2 obsolete files)

Lots of people want to be able to call the nsIXMLHttpRequest::send method with either a DOM document or a JS string. I'll attach a patch that probably doesn't work, but shows one (good, IMO) approach to the problem. Remaining issues: - factoring the stream-sending code out of nsXMLHttpRequest::SendDocument and calling it from SendDocument and SendStream - figuring out where to get the nsJSUtils stuff from, since my path-to-headers ugliness can't remain, and we still need the actual symbols - moving the polymorphic nsIXMLHttpRequest::send to nsIJSXMLHttpRequest - updating C++ callers to use sendDocument/sendString I don't think I'll get a chance to finish this up myself in the near future, but someone might be motivated enough by IE compatibility to go the rest of the way. Maybe even Heikki, if properly incented. =)
I was actually going to do this as soon as jband was finished with his nsIVariant work (bug 44675, targeted for 0.9.5, has fix but cleanup remains). Then we can do just by changing the parameter type to send() to be nsIVariant, and do not need to add new methods.
Depends on: 44675
Priority: -- → P2
Target Milestone: --- → mozilla0.9.5
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Target Milestone: mozilla0.9.6 → mozilla0.9.7
Whiteboard: [fixinhand]
John, is this how one is supposed to use nsIVariant?
That looks reasonable to me. Does it work as expected?
It compiles, I get no assertions, the JS call comes into the code I expect and I send the request so I think it works. I am unable to run my testsuite since green.mcom.com still needs a static IP address. I'll probably need to add a couple of checks for return values and once I have tested this I'll ask for reviews.
Status: NEW → ASSIGNED
Attachment #48735 - Attachment is obsolete: true
Attachment #56985 - Attachment is obsolete: true
Finally now that green is back up I was able to test my latest patch. jband, could you review please?
Harish, r? jst sr? I don't seem to be able to send mail right now which I why I am asking here...
Comment on attachment 58803 [details] [diff] [review] Patch with error checking r/sr=jband Heikki, Sorry I forgot about your review request. Looks good to me.
Attachment #58803 - Flags: superreview+
Space after comma! I.e. |foo, bar|, not |foo,bar|, or at least be consistent. r=jst if you fix that.
Attachment #58803 - Flags: review+
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
QA Contact: petersen → rakeshmishra
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: