]> granicus.if.org Git - curl/commitdiff
curl: customrequest_helper: deal with NULL custom method
authorDaniel Stenberg <daniel@haxx.se>
Fri, 11 Sep 2015 16:49:28 +0000 (18:49 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 11 Sep 2015 16:49:28 +0000 (18:49 +0200)
src/tool_helpers.c

index f17d09f50900e8a5c86bf0b69797a4def313aae9..e264ac795c3ad919f462e55bfaa1f30f178d6048 100644 (file)
@@ -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]);
   }