Metadata
Description
This issue was discovered at sending PUT request to CouchDB `/_bulk_docs` API in order to load JSON data that contains special characters such as "ä". CouchDB returns error:
{"error":"bad_request","reason":"invalid_json"}
This is because, the function kettle.dataSource.URL.handle.http() in dataSource-url.js use `data.length` to calculate "Content-Length" of the http request. `data.length` calculates the number of chars instead of the number of bytes, which causes problem when a special character exists in the post data. To fix it, the data should be converted with `data = new Buffer(data);` to get the proper length in bytes.