Skip to content

Commit

Permalink
Merge pull request #181 from chenmins/master
Browse files Browse the repository at this point in the history
Incorrect content-length in callback.js when body contains non-ascii characters
  • Loading branch information
dmonad authored Apr 19, 2024
2 parents 7945a5b + 01a6e80 commit 12608bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/callback.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const callbackRequest = (url, timeout, data) => {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Content-Length': data.length
'Content-Length': Buffer.byteLength(data)
}
}
const req = http.request(options)
Expand Down

0 comments on commit 12608bd

Please sign in to comment.