From 05939a2bbc1947103b58b5e67fc0295bb8757e8c Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Mon, 13 Jun 2016 08:50:53 -0400 Subject: [PATCH] special case for i2p.rocks in proxy --- HTTP.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/HTTP.cpp b/HTTP.cpp index a23f5a72..b4ba9940 100644 --- a/HTTP.cpp +++ b/HTTP.cpp @@ -71,7 +71,11 @@ namespace http { bool URL::parse(const std::string& url) { std::size_t pos_p = 0; /* < current parse position */ std::size_t pos_c = 0; /* < work position */ - if (url.at(0) != '/') { + if (url.at(0) == "/" && url.find("/http://") == url.begin()) { + /* specical case */ + pos_p ++; + } + if(url.at(0) != "/" || pos_b > 0) { /* schema */ pos_c = url.find("://"); if (pos_c != std::string::npos) {