mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 14:29:10 -07:00
Fix #874
This commit is contained in:
parent
ff813bf99d
commit
89519c88e2
1 changed files with 8 additions and 0 deletions
|
@ -204,6 +204,7 @@ using socket_t = int;
|
|||
#include <string>
|
||||
#include <sys/stat.h>
|
||||
#include <thread>
|
||||
#include <set>
|
||||
|
||||
#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
|
||||
#include <openssl/err.h>
|
||||
|
@ -3171,7 +3172,14 @@ inline std::string append_query_params(const char *path, const Params ¶ms) {
|
|||
}
|
||||
|
||||
inline void parse_query_text(const std::string &s, Params ¶ms) {
|
||||
std::set<std::string> cache;
|
||||
split(s.data(), s.data() + s.size(), '&', [&](const char *b, const char *e) {
|
||||
std::string kv(b, e);
|
||||
if (cache.find(kv) != cache.end()) {
|
||||
return;
|
||||
}
|
||||
cache.insert(kv);
|
||||
|
||||
std::string key;
|
||||
std::string val;
|
||||
split(b, e, '=', [&](const char *b2, const char *e2) {
|
||||
|
|
Loading…
Reference in a new issue