From 1cb112f64c60a6c4d95fbfa06e2a2f221ac01c2e Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 22 Mar 2023 13:59:58 +0100 Subject: [PATCH] Properly handle non-ascii characters in uris in HTTPParser. --- modules/http_server_simple/http_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/http_server_simple/http_parser.cpp b/modules/http_server_simple/http_parser.cpp index 7b34b85c8..fe249c1dc 100644 --- a/modules/http_server_simple/http_parser.cpp +++ b/modules/http_server_simple/http_parser.cpp @@ -267,7 +267,7 @@ int HTTPParser::on_message_begin() { int HTTPParser::on_url(const char *at, size_t length) { ERR_FAIL_COND_V(!_request.is_valid(), 0); - String s = chr_len_to_str(at, length); + String s = chr_len_to_str(at, length).uri_decode().strip_edges(); #if MESSAGE_DEBUG ERR_PRINT("url " + s);