summaryrefslogtreecommitdiff
path: root/src/tool_operate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tool_operate.c')
-rw-r--r--src/tool_operate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index c8509531c..8ec2da679 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1189,14 +1189,14 @@ static CURLcode single_transfer(struct GlobalConfig *global,
global->isatty = orig_isatty;
}
- if(httpgetfields) {
+ if(httpgetfields || config->query) {
+ char *q = httpgetfields ? httpgetfields : config->query;
CURLU *uh = curl_url();
if(uh) {
char *updated;
if(curl_url_set(uh, CURLUPART_URL, per->this_url,
CURLU_GUESS_SCHEME) ||
- curl_url_set(uh, CURLUPART_QUERY, httpgetfields,
- CURLU_APPENDQUERY) ||
+ curl_url_set(uh, CURLUPART_QUERY, q, CURLU_APPENDQUERY) ||
curl_url_get(uh, CURLUPART_URL, &updated, CURLU_GUESS_SCHEME)) {
curl_url_cleanup(uh);
result = CURLE_OUT_OF_MEMORY;