We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a541d70 commit 9931536Copy full SHA for 9931536
1 file changed
src/utils/utils.ts
@@ -1277,10 +1277,13 @@ export const Utils = {
1277
try {
1278
if ([null, undefined].includes(responseData.data)) {
1279
responseData.data = this.NO_RESPONSE;
1280
- responseData.headers = [
1281
- ...responseData.headers,
1282
- { "name": "content-length", value: 0 }
1283
- ]
+ const hasContentLength = responseData.headers.some(h => h.name.toLowerCase() === "content-length");
+ if (!hasContentLength) {
+ responseData.headers = [
+ ...responseData.headers,
1284
+ { "name": "content-length", value: 0 }
1285
+ ];
1286
+ }
1287
} else {
1288
responseData.data = JSON.stringify(responseData.data);
1289
}
0 commit comments