From 75e8f68a246aba62ec57fdfb9ab98a177d6c7403 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 10 Mar 2024 09:16:43 +0100 Subject: [PATCH] Use String::length(), even though in this case size() works too. --- modules/http_server_simple/http_parser.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/http_server_simple/http_parser.cpp b/modules/http_server_simple/http_parser.cpp index ae13e9fdcf..949898d824 100644 --- a/modules/http_server_simple/http_parser.cpp +++ b/modules/http_server_simple/http_parser.cpp @@ -194,8 +194,7 @@ void HTTPParser::_process_multipart_header_value(const String &val) { if (_multipart_form_name.length() >= 2 && _multipart_form_name.begins_with("\"") && _multipart_form_name.ends_with("\"")) { _multipart_form_name.remove(0); - //TODO check if this should be _multipart_form_name.remove(_multipart_form_name.length() - 1); - _multipart_form_name.remove(_multipart_form_name.size() - 1); + _multipart_form_name.remove(_multipart_form_name.length() - 1); } } else if (kk == "filename") { _multipart_form_filename = vs.get_slicec('=', 1); @@ -204,8 +203,7 @@ void HTTPParser::_process_multipart_header_value(const String &val) { if (_multipart_form_name.length() >= 2 && _multipart_form_name.begins_with("\"") && _multipart_form_name.ends_with("\"")) { _multipart_form_name.remove(0); - //TODO check if this should be _multipart_form_name.remove(_multipart_form_name.length() - 1); - _multipart_form_name.remove(_multipart_form_name.size() - 1); + _multipart_form_name.remove(_multipart_form_name.length() - 1); } if (upload_file_store_type == WebServerSimple::FILE_UPLOAD_STORE_TYPE_TEMP_FILES) {