Ensure that the first parameter in all GET calls is prefaced with ?.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
All calls to CURLWrapper::add_parameters_to_uri() but the first used & for all parameters, because the boolean keeping track was implemented wrong.
This commit is contained in:
parent
0bbc6ac4c7
commit
b5144fd9ce
@ -11,7 +11,7 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "The type of build.")
|
|||||||
option(BUILD_SHARED_LIBS "Build shared libraries." YES)
|
option(BUILD_SHARED_LIBS "Build shared libraries." YES)
|
||||||
|
|
||||||
project(mastodonpp
|
project(mastodonpp
|
||||||
VERSION 0.5.2
|
VERSION 0.5.3
|
||||||
DESCRIPTION "C++ wrapper for the Mastodon and Pleroma APIs."
|
DESCRIPTION "C++ wrapper for the Mastodon and Pleroma APIs."
|
||||||
LANGUAGES CXX)
|
LANGUAGES CXX)
|
||||||
|
|
||||||
|
@ -405,6 +405,7 @@ bool CURLWrapper::replace_parameter_in_uri(string &uri,
|
|||||||
void CURLWrapper::add_parameters_to_uri(string &uri,
|
void CURLWrapper::add_parameters_to_uri(string &uri,
|
||||||
const parametermap ¶meters)
|
const parametermap ¶meters)
|
||||||
{
|
{
|
||||||
|
bool first{true};
|
||||||
// Replace <ID> with the value of parameter “id” and so on.
|
// Replace <ID> with the value of parameter “id” and so on.
|
||||||
for (const auto ¶m : parameters)
|
for (const auto ¶m : parameters)
|
||||||
{
|
{
|
||||||
@ -413,7 +414,6 @@ void CURLWrapper::add_parameters_to_uri(string &uri,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool first{true};
|
|
||||||
if (first)
|
if (first)
|
||||||
{
|
{
|
||||||
uri += "?";
|
uri += "?";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user