Skip to content

Commit 1107877

Browse files
committed
Merge pull request #20 from ignacio/patch-1
Use specified Content-Length if provided
2 parents 1a0128c + 5c38a0b commit 1107877

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wsapi/mock.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ local function build_post(path, params, headers)
127127
req.QUERY_STRING = qs
128128
end
129129

130-
req.CONTENT_LENGTH = #body
130+
req.CONTENT_LENGTH = headers["Content-Length"] or #body
131131

132132
return {
133133
env = req,

0 commit comments

Comments
 (0)