From 2de93be1a3addece532e101610b3946914626fc8 Mon Sep 17 00:00:00 2001 From: orignal Date: Thu, 1 Oct 2026 22:21:16 -0400 Subject: [PATCH] check is host end with .i2p using ends_with --- libi2pd/HTTP.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libi2pd/HTTP.cpp b/libi2pd/HTTP.cpp index 43a110bc..7791cd76 100644 --- a/libi2pd/HTTP.cpp +++ b/libi2pd/HTTP.cpp @@ -290,7 +290,7 @@ namespace http bool URL::is_i2p() const { - return host.rfind(".i2p") == ( host.size() - 4 ); + return host.ends_with (".i2p"); } void HTTPMsg::add_header(const char *name, const std::string & value, bool replace) {