From 151c30a931ffbb8439c2a3717f44221aff0b4a08 Mon Sep 17 00:00:00 2001 From: Relintai Date: Mon, 28 Aug 2023 09:15:08 +0200 Subject: [PATCH] Send the user's header when sending the file in HTTPServerConnection. --- modules/http_server_simple/http_server_simple.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/http_server_simple/http_server_simple.cpp b/modules/http_server_simple/http_server_simple.cpp index 4768d24e4..7fbd6bed0 100644 --- a/modules/http_server_simple/http_server_simple.cpp +++ b/modules/http_server_simple/http_server_simple.cpp @@ -272,7 +272,7 @@ void HTTPServerConnection::send_file(Ref request, const String FileAccess *f = FileAccess::open(p_file_path, FileAccess::READ); 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 (has_more_messages()) {