browser(firefox): recompute content-length if body is overridden (#16173)
This commit is contained in:
parent
37cc7ae6cd
commit
135971c406
|
|
@ -1,2 +1,2 @@
|
||||||
1340
|
1341
|
||||||
Changed: lushnikov@chromium.org Tue 02 Aug 2022 07:18:19 AM PDT
|
Changed: yurys@chromium.org Tue Aug 2 13:48:43 PDT 2022
|
||||||
|
|
|
||||||
|
|
@ -874,7 +874,7 @@ function setPostData(httpChannel, postData, headers) {
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
}
|
}
|
||||||
// Clear content-length, so that upload stream resets it.
|
// Clear content-length, so that upload stream resets it.
|
||||||
httpChannel.setRequestHeader('content-length', overriddenHeader('content-length', ''), false /* merge */);
|
httpChannel.setRequestHeader('content-length', '', false /* merge */);
|
||||||
httpChannel.explicitSetUploadStream(synthesized, overriddenHeader('content-type', 'application/octet-stream'), -1, httpChannel.requestMethod, false);
|
httpChannel.explicitSetUploadStream(synthesized, overriddenHeader('content-type', 'application/octet-stream'), -1, httpChannel.requestMethod, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
1341
|
1342
|
||||||
Changed: dgozman@gmail.com Mon Aug 1 11:35:29 PDT 2022
|
Changed: yurys@chromium.org Tue Aug 2 13:50:22 PDT 2022
|
||||||
|
|
|
||||||
|
|
@ -874,7 +874,7 @@ function setPostData(httpChannel, postData, headers) {
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
}
|
}
|
||||||
// Clear content-length, so that upload stream resets it.
|
// Clear content-length, so that upload stream resets it.
|
||||||
httpChannel.setRequestHeader('content-length', overriddenHeader('content-length', ''), false /* merge */);
|
httpChannel.setRequestHeader('content-length', '', false /* merge */);
|
||||||
httpChannel.explicitSetUploadStream(synthesized, overriddenHeader('content-type', 'application/octet-stream'), -1, httpChannel.requestMethod, false);
|
httpChannel.explicitSetUploadStream(synthesized, overriddenHeader('content-type', 'application/octet-stream'), -1, httpChannel.requestMethod, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue