Send the user's header when sending the file in HTTPServerConnection.

This commit is contained in:
Relintai 2023-08-28 09:15:08 +02:00
parent b18d0a5fc9
commit 151c30a931

View File

@ -272,7 +272,7 @@ void HTTPServerConnection::send_file(Ref<WebServerRequest> request, const String
FileAccess *f = FileAccess::open(p_file_path, FileAccess::READ); FileAccess *f = FileAccess::open(p_file_path, FileAccess::READ);
ERR_FAIL_COND(!f); ERR_FAIL_COND(!f);
String s = "HTTP/1.1 200 OK\r\n"; String s = "HTTP/1.1 " + HTTPServerEnums::get_status_code_header_string(request->get_status_code()) + "\r\n";
if (!custom_headers.has("Connection")) { if (!custom_headers.has("Connection")) {
if (has_more_messages()) { if (has_more_messages()) {