From fad96046138a8fa506589218cd871cc3848d1169 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 11 Sep 2015 18:49:28 +0200 Subject: [PATCH] curl: customrequest_helper: deal with NULL custom method --- src/tool_helpers.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tool_helpers.c b/src/tool_helpers.c index f17d09f50..e264ac795 100644 --- a/src/tool_helpers.c +++ b/src/tool_helpers.c @@ -102,7 +102,9 @@ void customrequest_helper(struct OperationConfig *config, HttpReq req, "POST" }; - if(curl_strequal(method, dflt[req])) { + if(!method) + ; + else if(curl_strequal(method, dflt[req])) { notef(config->global, "Unnecessary use of -X or --request, %s is already " "inferred.\n", dflt[req]); }