diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/HTTP.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/HTTP.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/HTTP.cpp 2026-10-02 02:31:28.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/HTTP.cpp 2026-10-02 02:11:03.000000000 +0000 @@ -291,5 +291,5 @@ bool URL::is_i2p() const { - return host.ends_with (".i2p"); + return host.rfind(".i2p") == ( host.size() - 4 ); } diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd_client/TorrentsRPC.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd_client/TorrentsRPC.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd_client/TorrentsRPC.cpp 2026-10-02 02:31:28.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd_client/TorrentsRPC.cpp 2026-10-02 02:11:03.000000000 +0000 @@ -57,5 +57,5 @@ boost::json::array GetFiles (std::shared_ptr torrent) const; static boost::json::array GetFileStats (std::shared_ptr torrent); - static std::string RecognizeClientByPeerID (const PeerConnection::PeerID& peerID); + static std::string_view RecognizeClientByPeerID (const PeerConnection::PeerID& peerID); std::string HandleTorrentAdd (boost::json::object&& jsonRequest); @@ -334,5 +334,6 @@ } }, - { "magnetLink", [](std::shared_ptr torrent) + { + "magnetLink", [](std::shared_ptr torrent) { std::string hexHash; @@ -590,5 +591,5 @@ } - std::string JSONRPCHandler::RecognizeClientByPeerID (const PeerConnection::PeerID& peerID) + std::string_view JSONRPCHandler::RecognizeClientByPeerID (const PeerConnection::PeerID& peerID) { static constexpr std::array i2psnark { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03 }; @@ -617,5 +618,5 @@ auto it = twoChars.find (peerIDStr.substr (1,2)); if (it != twoChars.end ()) - return std::string (it->second); + return it->second; } else if (peerIDStr.substr (0, 3) == "TIX")