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',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'Content-Length': data.length
|
'Content-Length': Buffer.byteLength(data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const req = http.request(options)
|
const req = http.request(options)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user