diff options
author | Timm Bäder <mail@baedert.org> | 2017-02-21 17:08:17 +0100 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2017-02-21 17:08:17 +0100 |
commit | ed129beedce73ab537a31bd1365f1bafbbad0aa1 (patch) | |
tree | f16048a0a8a3023b16483d63d55f3c9b7dc29550 | |
parent | b1600bb0f3e7eb2446fa8951f2387c7a576dda08 (diff) | |
download | librest-ed129beedce73ab537a31bd1365f1bafbbad0aa1.tar.gz |
proxy-call: Don't default to "GET" for NULL method
Allowing NULL parameter values and then changing that to "GET" seems
weird, so just check that the given method is !NULL and use it in any
case.
-rw-r--r-- | rest/rest-proxy-call.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/rest/rest-proxy-call.c b/rest/rest-proxy-call.c index 5fba507..70d1214 100644 --- a/rest/rest-proxy-call.c +++ b/rest/rest-proxy-call.c @@ -220,13 +220,10 @@ rest_proxy_call_set_method (RestProxyCall *call, RestProxyCallPrivate *priv = GET_PRIVATE (call); g_return_if_fail (REST_IS_PROXY_CALL (call)); + g_return_if_fail (method != NULL); g_free (priv->method); - - if (method) - priv->method = g_strdup (method); - else - priv->method = g_strdup ("GET"); + priv->method = g_strdup (method); } /** |