Merge pull request #142 from RangelReale/develop

* BUGFIX: URI::addQueryParameter was adding an extra '?' to the query string
This commit is contained in:
Aleksandar Fabijanic 2013-04-03 11:16:11 -07:00
commit a3873cbb5f

View File

@ -344,8 +344,7 @@ void URI::addQueryParameter(const std::string& param, const std::string& val)
{
std::string reserved(RESERVED_QUERY);
reserved += "=&";
if (_query.empty()) _query.append(1, '?');
else _query.append(1, '&');
if (!_query.empty()) _query.append(1, '&');
encode(param, reserved, _query);
_query.append(1, '=');
encode(val, reserved, _query);