Skip to content

Commit 01a6e80

Browse files
authoredApr 19, 2024
Update callback.cjs
Incorrect content-length in callback.js when body contains non-ascii characters
1 parent 7945a5b commit 01a6e80

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)
Please sign in to comment.