mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-13 02:35:27 +00:00
Fix for utf character encoding
- content length was being set based on the non-encoded string - naughty naughty
This commit is contained in:
@ -785,8 +785,11 @@ class InvenTreeAPI {
|
||||
Future<APIResponse> completeRequest(HttpClientRequest request, {String? data, int? statusCode}) async {
|
||||
|
||||
if (data != null && data.isNotEmpty) {
|
||||
request.headers.set(HttpHeaders.contentLengthHeader, data.length.toString());
|
||||
request.add(utf8.encode(data));
|
||||
|
||||
var encoded_data = utf8.encode(data);
|
||||
|
||||
request.headers.set(HttpHeaders.contentLengthHeader, encoded_data.length.toString());
|
||||
request.add(encoded_data);
|
||||
}
|
||||
|
||||
APIResponse response = new APIResponse(
|
||||
|
2
lib/l10n
2
lib/l10n
Submodule lib/l10n updated: 1dbd8c1ec4...c7e8c69216
Reference in New Issue
Block a user