Bug 315767 - Submission of large files using multipart-post doesn't work. r=darin, r=aaronr

This commit is contained in:
pedemont%us.ibm.com 2006-03-15 20:42:50 +00:00
Родитель cd0f7191e6
Коммит c3ca55e915
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -1992,6 +1992,12 @@ nsXFormsSubmissionElement::SendData(const nsCString &uriSpec,
nsCOMPtr<nsILoadGroup> loadGroup = doc->GetDocumentLoadGroup();
channel->SetLoadGroup(loadGroup);
// set LOAD_DOCUMENT_URI so throbber works during submit
nsLoadFlags loadFlags = 0;
channel->GetLoadFlags(&loadFlags);
loadFlags |= nsIChannel::LOAD_DOCUMENT_URI;
channel->SetLoadFlags(loadFlags);
// create a pipe in which to store the response (yeah, this kind of
// sucks since we'll use a lot of memory if the response is large).
//
@ -2002,7 +2008,7 @@ nsXFormsSubmissionElement::SendData(const nsCString &uriSpec,
nsCOMPtr<nsIOutputStream> pipeOut;
rv = NS_NewPipe(getter_AddRefs(mPipeIn), getter_AddRefs(pipeOut),
0, PR_UINT32_MAX, PR_TRUE, PR_TRUE);
4096, PR_UINT32_MAX, PR_TRUE, PR_TRUE);
NS_ENSURE_SUCCESS(rv, rv);
// use a simple stream listener to tee our data into the pipe, and