Skip to content

Commit 12608bd

Browse files
authored
Merge pull request #181 from chenmins/master
Incorrect content-length in callback.js when body contains non-ascii characters
2 parents 7945a5b + 01a6e80 commit 12608bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/callback.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const callbackRequest = (url, timeout, data) => {
4444
method: 'POST',
4545
headers: {
4646
'Content-Type': 'application/json',
47-
'Content-Length': data.length
47+
'Content-Length': Buffer.byteLength(data)
4848
}
4949
}
5050
const req = http.request(options)

0 commit comments

Comments
 (0)