Merge pull request #181 from chenmins/master

Incorrect content-length in callback.js when body contains non-ascii characters
This commit is contained in:
Kevin Jahns 2024-04-19 11:10:34 +02:00 committed by GitHub
commit 12608bdaf8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)