fixes bug 119625 "Can't enter new bug or post comments (POSTs turn into GETs)"

r=bbaetz, sr=alecf
This commit is contained in:
darin%netscape.com 2002-01-15 00:07:46 +00:00
parent 974467d75c
commit 61ed1b56b9

View File

@ -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;
} }