mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +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
2 changed files with 6 additions and 3 deletions
|
|
@ -785,8 +785,11 @@ class InvenTreeAPI {
|
||||||
Future<APIResponse> completeRequest(HttpClientRequest request, {String? data, int? statusCode}) async {
|
Future<APIResponse> completeRequest(HttpClientRequest request, {String? data, int? statusCode}) async {
|
||||||
|
|
||||||
if (data != null && data.isNotEmpty) {
|
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(
|
APIResponse response = new APIResponse(
|
||||||
|
|
|
||||||
2
lib/l10n
2
lib/l10n
|
|
@ -1 +1 @@
|
||||||
Subproject commit 1dbd8c1ec48b642f63170333a769ad9df83c6baa
|
Subproject commit c7e8c69216e17972432178db6fb2d8b3136e7a06
|
||||||
Loading…
Add table
Add a link
Reference in a new issue