mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-06 03:32:14 +00:00
Enhancements
Fix request parameters are url-decoded twice. Fix post form request not handled correctly.
This commit is contained in:
4 files changed
+14
-14
No files matched your search
@@ -343,10 +343,10 @@ std::string getUrlArg(const std::string &url, const std::string &request)
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string getUrlArg(const string_multimap &url, const std::string &request)
|
||||
std::string getUrlArg(const string_multimap &args, const std::string &request)
|
||||
{
|
||||
auto it = url.find(request);
|
||||
if(it != url.end())
|
||||
auto it = args.find(request);
|
||||
if(it != args.end())
|
||||
return it->second;
|
||||
return "";
|
||||
}
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ std::string join(InputIt first, InputIt last, const std::string &delimiter)
|
||||
}
|
||||
|
||||
std::string getUrlArg(const std::string &url, const std::string &request);
|
||||
std::string getUrlArg(const string_multimap &url, const std::string &request);
|
||||
std::string getUrlArg(const string_multimap &args, const std::string &request);
|
||||
std::string replaceAllDistinct(std::string str, const std::string &old_value, const std::string &new_value);
|
||||
std::string trimOf(const std::string& str, char target, bool before = true, bool after = true);
|
||||
std::string trim(const std::string& str, bool before = true, bool after = true);
|
||||
|
||||
Reference in new issue
Block a user