зеркало из https://github.com/mozilla/gecko-dev.git
Bug 119625 - can't POST forms
Patch by christophe.fergeau@laposte.net, r=bbaetz, sr=beng
This commit is contained in:
Родитель
e99ddaaeee
Коммит
dba349965d
|
@ -2179,6 +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 (mUploadStream) {
|
if (mUploadStream) {
|
||||||
if (contentType) {
|
if (contentType) {
|
||||||
if (contentLength < 0) {
|
if (contentLength < 0) {
|
||||||
|
@ -2203,7 +2204,6 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче