mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
CI: Update Ubuntu runners to 24.04, but keep 22.04 for Linux builds
Pin clang-format to version 16, and black to 24.10.0. Keep using Ubuntu 22.04 for Linux builds for portability.
This commit is contained in:
@@ -713,15 +713,16 @@ PoolByteArray HTTPClient::read_response_body_chunk() {
|
||||
chunk_left -= rec;
|
||||
|
||||
if (chunk_left == 0) {
|
||||
if (chunk[chunk.size() - 2] != '\r' || chunk[chunk.size() - 1] != '\n') {
|
||||
const int chunk_size = chunk.size();
|
||||
if (chunk[chunk_size - 2] != '\r' || chunk[chunk_size - 1] != '\n') {
|
||||
ERR_PRINT("HTTP Invalid chunk terminator (not \\r\\n)");
|
||||
status = STATUS_CONNECTION_ERROR;
|
||||
break;
|
||||
}
|
||||
|
||||
ret.resize(chunk.size() - 2);
|
||||
ret.resize(chunk_size - 2);
|
||||
PoolByteArray::Write w = ret.write();
|
||||
memcpy(w.ptr(), chunk.ptr(), chunk.size() - 2);
|
||||
memcpy(w.ptr(), chunk.ptr(), chunk_size - 2);
|
||||
chunk.clear();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user