Skip to content

Commit

Permalink
fix: remove request header content-type
Browse files Browse the repository at this point in the history
  • Loading branch information
csg01123119 committed Aug 3, 2023
1 parent f8bee46 commit 9387650
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
7 changes: 1 addition & 6 deletions lib/common/object/deleteMulti.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,7 @@ proto.deleteMulti = async function deleteMulti(names, options = {}) {
if (options.versionId) {
options.subres.versionId = options.versionId;
}
options.headers = options.headers || {};
if (options.contentLength) {
options.headers['Content-Length'] = options.contentLength;
} else {
options.headers['Content-Length'] = Buffer.from(paramXML).length;
}

const params = this._objectRequestParams('POST', '', options);
params.mime = 'xml';
params.content = paramXML;
Expand Down
6 changes: 3 additions & 3 deletions lib/common/utils/createRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ export function createRequest(this: any, params) {
headers['Content-MD5'] = params.headers['Content-MD5'];
}
}
if (!headers['Content-Length']) {
headers['Content-Length'] = params.content.length;
}
// if (!headers['Content-Length']) {
// headers['Content-Length'] = params.content.length;
// }
}

const { hasOwnProperty } = Object.prototype;
Expand Down

0 comments on commit 9387650

Please sign in to comment.