Bug 1398733 - HTMLFormSubmission should pass the size of the post data inputStream if known, r=smaug

This commit is contained in:
Andrea Marchesini
2017-09-22 08:12:03 +02:00
parent 385a35ebae
commit 3784f37893
5 changed files with 35 additions and 13 deletions

View File

@@ -796,14 +796,16 @@ HTMLFormElement::SubmitSubmission(HTMLFormSubmission* aFormSubmission)
nullptr, doc);
nsCOMPtr<nsIInputStream> postDataStream;
int64_t postDataStreamLength = -1;
rv = aFormSubmission->GetEncodedSubmission(actionURI,
getter_AddRefs(postDataStream));
getter_AddRefs(postDataStream),
&postDataStreamLength);
NS_ENSURE_SUBMIT_SUCCESS(rv);
rv = linkHandler->OnLinkClickSync(this, actionURI,
target.get(),
VoidString(),
postDataStream, -1 /* XXXbaku */,
postDataStream, postDataStreamLength,
nullptr, false,
getter_AddRefs(docShell),
getter_AddRefs(mSubmittingRequest));