mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
fixes bug 119625 "Can't enter new bug or post comments (POSTs turn into GETs)"
r=bbaetz, sr=alecf
This commit is contained in:
parent
974467d75c
commit
61ed1b56b9
@ -2179,8 +2179,7 @@ nsHttpChannel::SetUploadStream(nsIInputStream *stream, const char* contentType,
|
|||||||
// and so we select POST as the request method if contentType and
|
// and so we select POST as the request method if contentType and
|
||||||
// contentLength are unspecified.
|
// contentLength are unspecified.
|
||||||
|
|
||||||
mUploadStream = stream;
|
if (stream) {
|
||||||
if (mUploadStream) {
|
|
||||||
if (contentType) {
|
if (contentType) {
|
||||||
if (contentLength < 0) {
|
if (contentLength < 0) {
|
||||||
stream->Available((PRUint32 *) &contentLength);
|
stream->Available((PRUint32 *) &contentLength);
|
||||||
@ -2204,6 +2203,7 @@ nsHttpChannel::SetUploadStream(nsIInputStream *stream, const char* contentType,
|
|||||||
mUploadStreamHasHeaders = PR_FALSE;
|
mUploadStreamHasHeaders = PR_FALSE;
|
||||||
mRequestHead.SetMethod(nsHttp::Get); // revert to GET request
|
mRequestHead.SetMethod(nsHttp::Get); // revert to GET request
|
||||||
}
|
}
|
||||||
|
mUploadStream = stream;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user