Skip to content
This repository was archived by the owner on Nov 8, 2024. It is now read-only.

Commit bda6b27

Browse files
committed
Add implicit content length header if request body is present
1 parent 517d7ef commit bda6b27

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/execute-transaction.coffee

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ executeTransaction = (transaction, callback) ->
5151
packageConfig['version'] + \
5252
" ("+ system + ")"
5353

54+
# Add length of body if no Content-Length present
55+
if flatHeaders['Content-Length'] == undefined and request['body'] != ''
56+
flatHeaders['Content-Length'] = request['body'].length
57+
5458
if configuration.request?.headers?
5559
for header, value of configuration['request']['headers']
5660
flatHeaders[header] = value

0 commit comments

Comments
 (0)