Revert original path to its initial behavior (#2157)
This commit is contained in:
parent
bbcad71458
commit
1b4653577f
|
@ -209,9 +209,7 @@ class HttpRequestImpl : public HttpRequest
|
|||
|
||||
const std::string &getOriginalPath() const override
|
||||
{
|
||||
return originalPath_.empty()
|
||||
? (originalPath_ = drogon::utils::urlEncode(path_))
|
||||
: originalPath_;
|
||||
return originalPath_.empty() ? path_ : originalPath_;
|
||||
}
|
||||
|
||||
void setQuery(const char *start, const char *end)
|
||||
|
@ -675,7 +673,10 @@ class HttpRequestImpl : public HttpRequest
|
|||
HttpMethod previousMethod_{Invalid};
|
||||
Version version_{Version::kUnknown};
|
||||
std::string path_;
|
||||
mutable std::string originalPath_;
|
||||
/// Contains the encoded `path_` if and only if `path_` is set in encoded
|
||||
/// form. If path is in a normal form and needed no decoding, then this will
|
||||
/// be empty, as we do not need to store a duplicate.
|
||||
std::string originalPath_;
|
||||
bool pathEncode_{true};
|
||||
std::string_view matchedPathPattern_{""};
|
||||
std::string query_;
|
||||
|
|
Loading…
Reference in New Issue