Merge pull request #181 from chenmins/master
Incorrect content-length in callback.js when body contains non-ascii characters
This commit is contained in:
commit
12608bdaf8
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user