Uri Change
Summary Ensured that checking for a query key now returns true when the key is found, allowing accurate existence checks Added “&” separators when reconstructing query strings so that URIs are properly formatted with multiple parameters
This commit is contained in:
@@ -457,6 +457,7 @@ std::string uri_builder::str() const {
|
||||
s << '?';
|
||||
for (size_t i = 0; i < queries_.size(); ++i)
|
||||
{
|
||||
if (i != 0) s << '&';
|
||||
s << queries_[i].key << "=";
|
||||
HtmlHelper::encode_url_segment(s,queries_[i].value,true);
|
||||
}
|
||||
|
||||
+1
-1
@@ -204,7 +204,7 @@ public:
|
||||
bool has_query(const std::string &key) const {
|
||||
for (size_t i = 0; i < queries_.size(); ++i)
|
||||
{
|
||||
if (queries_[i].key == key) true;
|
||||
if (queries_[i].key == key) return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user