summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCherish98 <66007047+Cherish98@users.noreply.github.com>2020-12-23 12:59:00 +0000
committerDaniel Stenberg <daniel@haxx.se>2020-12-23 16:20:39 +0100
commit6a5e020d4d2b04a57d57eea7a9ba23cc0c68cb51 (patch)
tree9928333964926d2542033d115f84c78289e2d519
parente99e5ab820a36f9c3b2aa96d09f91c73f56cbd9b (diff)
downloadcurl-6a5e020d4d2b04a57d57eea7a9ba23cc0c68cb51.tar.gz
curl: fix handling of -q option
The match of the "-q" option (short for "--disable") should: a) allow concatenation with other single-letters; and b) be case-sensitive, lest confusing with "-Q" ("--quote") Closes #6364
-rw-r--r--src/tool_operate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 23dfa635e..9e80ca2e5 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -2542,7 +2542,7 @@ CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[])
/* Parse .curlrc if necessary */
if((argc == 1) ||
- (!curl_strequal(first_arg, "-q") &&
+ (strncmp(first_arg, "-q", 2) &&
!curl_strequal(first_arg, "--disable"))) {
parseconfig(NULL, global); /* ignore possible failure */