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

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)