From 259ab23400fb4658c00ac9e34ef01c8c51136ac6 Mon Sep 17 00:00:00 2001 From: "darin%meer.net" Date: Thu, 20 Apr 2006 03:39:22 +0000 Subject: [PATCH] fixes bug 307769 "document how to pass a nsIInputStream to nsIXMLHttpRequest.send" r=biesi, sr=jst --- content/base/public/nsIXMLHttpRequest.idl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/content/base/public/nsIXMLHttpRequest.idl b/content/base/public/nsIXMLHttpRequest.idl index ef7ccca2e3f..58f484433c3 100644 --- a/content/base/public/nsIXMLHttpRequest.idl +++ b/content/base/public/nsIXMLHttpRequest.idl @@ -223,9 +223,15 @@ interface nsIXMLHttpRequest : nsISupports * case). This is used to populate the body of the * HTTP request if the HTTP request method is "POST". * If the parameter is a nsIDOMDocument, it is serialized. - * If the parameter is a nsIInputStream, it is expected - * to contain the ContentType: and ContentLength: headers - * and trailing carriage-return/line-feed pairs. + * If the parameter is a nsIInputStream, then it must be + * compatible with nsIUploadChannel.setUploadStream, and a + * Content-Length header will be added to the HTTP request + * with a value given by nsIInputStream.available. Any + * headers included at the top of the stream will be + * treated as part of the message body. The MIME type of + * the stream should be specified by setting the Content- + * Type header via the setRequestHeader method before + * calling send. */ void send(in nsIVariant body);