From fc8e92e13131c7dd9c1e0ace9ddbcf0271cae2a5 Mon Sep 17 00:00:00 2001 From: an-tao <20741618@qq.com> Date: Fri, 4 Jan 2019 18:34:27 +0800 Subject: [PATCH] Modify setPath() --- lib/src/HttpRequestImpl.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/src/HttpRequestImpl.h b/lib/src/HttpRequestImpl.h index d32b534b..7ec9de17 100755 --- a/lib/src/HttpRequestImpl.h +++ b/lib/src/HttpRequestImpl.h @@ -135,15 +135,7 @@ class HttpRequestImpl : public HttpRequest void setPath(const char *start, const char *end) { - auto path = std::string(start, end); - if (path.find('+') != std::string::npos || path.find('%') != std::string::npos) - { - _path = urlDecode(path); - } - else - { - _path = path; - } + _path = urlDecode(std::string(start, end)); } virtual void setPath(const std::string &path) override {