mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 03:49:42 +00:00
Bug 123499, enable arbitrary HTTP commands via XMLHttpRequest. Patch from matthew@mjwilson.demon.co.uk, r=heikki, sr=darin.
This commit is contained in:
parent
73d029f652
commit
250cbe186e
@ -149,8 +149,8 @@ interface nsIXMLHttpRequest : nsISupports {
|
||||
* the request is not sent until the <code>send</code> method
|
||||
* is invoked.
|
||||
*
|
||||
* @param method The HTTP method - either "POST" or "GET". Ignored
|
||||
* if the URL is not a HTTP URL.
|
||||
* @param method The HTTP method, for example "POST" or "GET". Ignored
|
||||
* if the URL is not a HTTP(S) URL.
|
||||
* @param url The URL to which to send the request.
|
||||
* @param async Whether the request is synchronous or asynchronous
|
||||
* i.e. whether send returns only after the response
|
||||
|
@ -1041,6 +1041,10 @@ nsXMLHttpRequest::Send(nsIVariant *aBody)
|
||||
NS_ASSERTION(uploadChannel, "http must support nsIUploadChannel");
|
||||
|
||||
rv = uploadChannel->SetUploadStream(postDataStream, nsnull, -1);
|
||||
// Reset the method to its original value
|
||||
if (httpChannel) {
|
||||
httpChannel->SetRequestMethod(method);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user