mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 13:36:50 +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:
parent
cf9c57c9e0
commit
a8ca441868
@ -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
@ -1 +1 @@
|
||||
Subproject commit 1dbd8c1ec48b642f63170333a769ad9df83c6baa
|
||||
Subproject commit c7e8c69216e17972432178db6fb2d8b3136e7a06
|
Loading…
x
Reference in New Issue
Block a user