Skip to content

Commit e8d82a6

Browse files
committed
chore(sdk-client-v3): remove request content-length header
- remove user-specified request content-lenght header
1 parent 6d813e2 commit e8d82a6

2 files changed

Lines changed: 0 additions & 5 deletions

File tree

packages/sdk-client-v3/src/middleware/auth-middleware/auth-request-executor.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ export async function executeRequest(options: ExecuteRequestOptions) {
6868
...request.headers,
6969
Authorization: `Basic ${basicAuth}`,
7070
'Content-Type': 'application/x-www-form-urlencoded',
71-
'Content-Length': byteLength(body),
7271
},
7372
httpClient,
7473
httpClientOptions,

packages/sdk-client-v3/src/middleware/create-http-middleware.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,6 @@ export default function createHttpMiddleware(
186186
? request.body
187187
: JSON.stringify(request.body || undefined)
188188

189-
if (body && (typeof body === 'string' || isBuffer(body))) {
190-
requestHeader['Content-Length'] = byteLength(body)
191-
}
192-
193189
const clientOptions: HttpClientOptions = {
194190
enableRetry,
195191
retryConfig,

0 commit comments

Comments
 (0)