mirror of
https://github.com/godotengine/godot.git
synced 2024-11-25 13:43:15 +00:00
Merge pull request #75867 from tefusion/fix_http_client_unicode_request
Fix HTTPClient _request using wrong size
This commit is contained in:
commit
fb10f45efe
@ -63,8 +63,9 @@ Error HTTPClient::_request_raw(Method p_method, const String &p_url, const Vecto
|
|||||||
}
|
}
|
||||||
|
|
||||||
Error HTTPClient::_request(Method p_method, const String &p_url, const Vector<String> &p_headers, const String &p_body) {
|
Error HTTPClient::_request(Method p_method, const String &p_url, const Vector<String> &p_headers, const String &p_body) {
|
||||||
int size = p_body.length();
|
CharString body_utf8 = p_body.utf8();
|
||||||
return request(p_method, p_url, p_headers, size > 0 ? (const uint8_t *)p_body.utf8().get_data() : nullptr, size);
|
int size = body_utf8.length();
|
||||||
|
return request(p_method, p_url, p_headers, size > 0 ? (const uint8_t *)body_utf8.get_data() : nullptr, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
String HTTPClient::query_string_from_dict(const Dictionary &p_dict) {
|
String HTTPClient::query_string_from_dict(const Dictionary &p_dict) {
|
||||||
|
Loading…
Reference in New Issue
Block a user