From f502f60f7cb8d4f472f1485efbe2301e4f396322 Mon Sep 17 00:00:00 2001 From: FranciscoPombal Date: Tue, 22 Sep 2020 17:12:01 +0100 Subject: [PATCH] Avoid unessary QString allocation --- src/base/bittorrent/tracker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/bittorrent/tracker.cpp b/src/base/bittorrent/tracker.cpp index 06cc4f8d5..bbf059e0c 100644 --- a/src/base/bittorrent/tracker.cpp +++ b/src/base/bittorrent/tracker.cpp @@ -238,7 +238,7 @@ Http::Response Tracker::processRequest(const Http::Request &request, const Http: if (request.method != Http::HEADER_REQUEST_METHOD_GET) throw MethodNotAllowedHTTPError(); - if (request.path.toLower().startsWith(ANNOUNCE_REQUEST_PATH)) + if (request.path.startsWith(ANNOUNCE_REQUEST_PATH, Qt::CaseInsensitive)) processAnnounceRequest(); else throw NotFoundHTTPError();