File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -34,10 +34,10 @@ std::string getClearPath(const std::string &path)
3434
3535 if (std::string::npos == pos)
3636 {
37- return path;
37+ return Utils::urlDecode ( path) ;
3838 }
3939
40- return std::string (path.cbegin (), path. cbegin () + pos );
40+ return Utils::urlDecode (path.substr ( 0 , pos) );
4141}
4242
4343static void getIncomingVars (std::unordered_multimap<std::string, std::string> ¶ms, const std::string &uri)
Original file line number Diff line number Diff line change @@ -55,9 +55,9 @@ namespace Utils
5555
5656 for (size_t pos = 0 ; std::string::npos != pos;)
5757 {
58- size_t delimiter = str.find (sep, pos);
58+ const size_t delimiter = str.find (sep, pos);
5959
60- std::string value = str.substr (pos, delimiter);
60+ std::string value = str.substr (pos, delimiter - pos );
6161 trim (value);
6262
6363 values.emplace_back (std::move (value) );
@@ -865,4 +865,4 @@ namespace Utils
865865
866866 return decoded;
867867 }
868- };
868+ }
Original file line number Diff line number Diff line change @@ -137,4 +137,4 @@ namespace Utils
137137
138138 std::string urlEncode (const std::string &str);
139139 std::string urlDecode (const std::string &str);
140- };
140+ }
You can’t perform that action at this time.
0 commit comments