Skip to content
This repository was archived by the owner on Nov 15, 2019. It is now read-only.

Update utils.h #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libcinatra_http/cinatra_http/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ namespace cinatra
template<typename IteratorT, typename MapT>
void kv_parser(IteratorT begin, IteratorT end, MapT& result, int kv_sep, int field_sep, bool unescape, bool trim)
{
result.clear();
std::string key, val;
auto result_add = [&result, trim](std::string key, std::string val)
{
Expand Down
4 changes: 2 additions & 2 deletions libcinatra_http/request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace cinatra
{
return -1;
}

queries_.clear();
if (url_info_.field_set & (1 << UF_QUERY))
{
kv_parser(url_ + url_info_.field_data[UF_QUERY].off,
Expand Down Expand Up @@ -463,4 +463,4 @@ namespace cinatra
buffer_.max_size += size;
}

}
}