@whatwg-node/node-fetch 0.5.9-alpha-20240321101544-d4f6a3ec1f0c24888b6904208dd4cf1631c3f085 → 0.5.9-rc-20240321095247-939ee0a0bd6c7c5d13d8806b8b04d72a357824ac
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/Request.js +1 -1
- package/esm/Request.js +1 -1
- package/package.json +1 -1
package/cjs/Request.js
CHANGED
@@ -62,7 +62,7 @@ class PonyfillRequest extends Body_js_1.PonyfillBody {
|
|
62
62
|
this.contentType = contentTypeInHeaders;
|
63
63
|
}
|
64
64
|
const contentLengthInHeaders = this.headers.get('content-length');
|
65
|
-
if (
|
65
|
+
if (this.body == null && !contentLengthInHeaders) {
|
66
66
|
this.contentLength = 0;
|
67
67
|
this.headers.set('content-length', '0');
|
68
68
|
}
|
package/esm/Request.js
CHANGED
@@ -59,7 +59,7 @@ export class PonyfillRequest extends PonyfillBody {
|
|
59
59
|
this.contentType = contentTypeInHeaders;
|
60
60
|
}
|
61
61
|
const contentLengthInHeaders = this.headers.get('content-length');
|
62
|
-
if (
|
62
|
+
if (this.body == null && !contentLengthInHeaders) {
|
63
63
|
this.contentLength = 0;
|
64
64
|
this.headers.set('content-length', '0');
|
65
65
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@whatwg-node/node-fetch",
|
3
|
-
"version": "0.5.9-
|
3
|
+
"version": "0.5.9-rc-20240321095247-939ee0a0bd6c7c5d13d8806b8b04d72a357824ac",
|
4
4
|
"description": "Fetch API implementation for Node",
|
5
5
|
"sideEffects": false,
|
6
6
|
"dependencies": {
|