You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Allow body-up-to-EOF HTTP responses
Implements the same heuristic as Curl (and web browsers): if no `Content-Length`, no `Connection: keep-alive` and no chunked transfer encoding, assume th rest of the data until EOF is the body, gracefully setting the HTTP client back to the disconnected state. Theoretically, this is not compliant with HTTP 1.1, by which `keep-alive` is the default, but in practice, an explicit header is sent by servers.
This commit is contained in:
@@ -290,6 +290,7 @@ Error StreamPeerTCPPosix::read(uint8_t *p_buffer, int p_bytes, int &r_received,
|
||||
status = STATUS_NONE;
|
||||
peer_port = 0;
|
||||
peer_host = IP_Address();
|
||||
r_received = total_read;
|
||||
return ERR_FILE_EOF;
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user