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

Commit aded788

Browse files
author
Adam Kliment
committed
Merge branch 'implicit-content-length' of github.com:theodorton/dredd into content-length
2 parents 2a70bfa + bda6b27 commit aded788

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)