CURLOPT_NOPROGRESS is being set twice, if a file is uploaded from '.'.
Fix order of options so that '.' can override the global setting. Without
this, the `tool_readbusy_cb()` is never inoked and cannot unpause a
transfer waiting for more input.
Fixes #17513
Reported-by: denandz on github
Closes #17517
return CURLE_OK;
}
+static void gen_trace_setopts(struct GlobalConfig *global,
+ struct OperationConfig *config,
+ CURL *curl)
+{
+ if(global->tracetype != TRACE_NONE) {
+ my_setopt(curl, CURLOPT_DEBUGFUNCTION, tool_debug_cb);
+ my_setopt(curl, CURLOPT_DEBUGDATA, config);
+ my_setopt_long(curl, CURLOPT_VERBOSE, 1L);
+ }
+}
+
static void gen_cb_setopts(struct GlobalConfig *global,
struct OperationConfig *config,
struct per_transfer *per,
CURL *curl)
{
(void) global; /* for builds without --libcurl */
-
+ (void) config;
/* where to store */
my_setopt(curl, CURLOPT_WRITEDATA, per);
my_setopt(curl, CURLOPT_INTERLEAVEDATA, per);
my_setopt(curl, CURLOPT_XFERINFODATA, per);
}
- if(global->tracetype != TRACE_NONE) {
- my_setopt(curl, CURLOPT_DEBUGFUNCTION, tool_debug_cb);
- my_setopt(curl, CURLOPT_DEBUGDATA, config);
- my_setopt_long(curl, CURLOPT_VERBOSE, 1L);
- }
-
my_setopt(curl, CURLOPT_HEADERFUNCTION, tool_header_cb);
my_setopt(curl, CURLOPT_HEADERDATA, per);
}
return result;
#endif
- gen_cb_setopts(global, config, per, curl);
+ gen_trace_setopts(global, config, curl);
{
#ifdef DEBUGBUILD
my_setopt_str(curl, CURLOPT_URL, per->url);
my_setopt_long(curl, CURLOPT_NOPROGRESS,
global->noprogress || global->silent);
+ /* call after the line above. It may override CURLOPT_NOPROGRESS */
+ gen_cb_setopts(global, config, per, curl);
+
if(config->no_body)
my_setopt_long(curl, CURLOPT_NOBODY, 1);
as source easily. You may choose to either not use them or implement
them yourself.
+ CURLOPT_DEBUGFUNCTION was set to a function pointer
+ CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_WRITEDATA was set to an object pointer
CURLOPT_WRITEFUNCTION was set to a function pointer
CURLOPT_READDATA was set to an object pointer
CURLOPT_READFUNCTION was set to a function pointer
CURLOPT_SEEKDATA was set to an object pointer
CURLOPT_SEEKFUNCTION was set to a function pointer
- CURLOPT_DEBUGFUNCTION was set to a function pointer
- CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_HEADERFUNCTION was set to a function pointer
CURLOPT_HEADERDATA was set to an object pointer
CURLOPT_ERRORBUFFER was set to an object pointer
as source easily. You may choose to either not use them or implement
them yourself.
+ CURLOPT_DEBUGFUNCTION was set to a function pointer
+ CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_WRITEDATA was set to an object pointer
CURLOPT_WRITEFUNCTION was set to a function pointer
CURLOPT_READDATA was set to an object pointer
CURLOPT_READFUNCTION was set to a function pointer
CURLOPT_SEEKDATA was set to an object pointer
CURLOPT_SEEKFUNCTION was set to a function pointer
- CURLOPT_DEBUGFUNCTION was set to a function pointer
- CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_HEADERFUNCTION was set to a function pointer
CURLOPT_HEADERDATA was set to an object pointer
CURLOPT_ERRORBUFFER was set to an object pointer
as source easily. You may choose to either not use them or implement
them yourself.
+ CURLOPT_DEBUGFUNCTION was set to a function pointer
+ CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_WRITEDATA was set to an object pointer
CURLOPT_WRITEFUNCTION was set to a function pointer
CURLOPT_READDATA was set to an object pointer
CURLOPT_READFUNCTION was set to a function pointer
CURLOPT_SEEKDATA was set to an object pointer
CURLOPT_SEEKFUNCTION was set to a function pointer
- CURLOPT_DEBUGFUNCTION was set to a function pointer
- CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_HEADERFUNCTION was set to a function pointer
CURLOPT_HEADERDATA was set to an object pointer
CURLOPT_ERRORBUFFER was set to an object pointer
as source easily. You may choose to either not use them or implement
them yourself.
+ CURLOPT_DEBUGFUNCTION was set to a function pointer
+ CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_WRITEDATA was set to an object pointer
CURLOPT_WRITEFUNCTION was set to a function pointer
CURLOPT_READDATA was set to an object pointer
CURLOPT_READFUNCTION was set to a function pointer
CURLOPT_SEEKDATA was set to an object pointer
CURLOPT_SEEKFUNCTION was set to a function pointer
- CURLOPT_DEBUGFUNCTION was set to a function pointer
- CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_HEADERFUNCTION was set to a function pointer
CURLOPT_HEADERDATA was set to an object pointer
CURLOPT_ERRORBUFFER was set to an object pointer
as source easily. You may choose to either not use them or implement
them yourself.
+ CURLOPT_DEBUGFUNCTION was set to a function pointer
+ CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_WRITEDATA was set to an object pointer
CURLOPT_WRITEFUNCTION was set to a function pointer
CURLOPT_READDATA was set to an object pointer
CURLOPT_READFUNCTION was set to a function pointer
CURLOPT_SEEKDATA was set to an object pointer
CURLOPT_SEEKFUNCTION was set to a function pointer
- CURLOPT_DEBUGFUNCTION was set to a function pointer
- CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_HEADERFUNCTION was set to a function pointer
CURLOPT_HEADERDATA was set to an object pointer
CURLOPT_ERRORBUFFER was set to an object pointer
as source easily. You may choose to either not use them or implement
them yourself.
+ CURLOPT_DEBUGFUNCTION was set to a function pointer
+ CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_WRITEDATA was set to an object pointer
CURLOPT_WRITEFUNCTION was set to a function pointer
CURLOPT_READDATA was set to an object pointer
CURLOPT_READFUNCTION was set to a function pointer
CURLOPT_SEEKDATA was set to an object pointer
CURLOPT_SEEKFUNCTION was set to a function pointer
- CURLOPT_DEBUGFUNCTION was set to a function pointer
- CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_HEADERFUNCTION was set to a function pointer
CURLOPT_HEADERDATA was set to an object pointer
CURLOPT_ERRORBUFFER was set to an object pointer
as source easily. You may choose to either not use them or implement
them yourself.
+ CURLOPT_DEBUGFUNCTION was set to a function pointer
+ CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_WRITEDATA was set to an object pointer
CURLOPT_WRITEFUNCTION was set to a function pointer
CURLOPT_READDATA was set to an object pointer
CURLOPT_READFUNCTION was set to a function pointer
CURLOPT_SEEKDATA was set to an object pointer
CURLOPT_SEEKFUNCTION was set to a function pointer
- CURLOPT_DEBUGFUNCTION was set to a function pointer
- CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_HEADERFUNCTION was set to a function pointer
CURLOPT_HEADERDATA was set to an object pointer
CURLOPT_ERRORBUFFER was set to an object pointer
as source easily. You may choose to either not use them or implement
them yourself.
+ CURLOPT_DEBUGFUNCTION was set to a function pointer
+ CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_WRITEDATA was set to an object pointer
CURLOPT_WRITEFUNCTION was set to a function pointer
CURLOPT_READDATA was set to an object pointer
CURLOPT_READFUNCTION was set to a function pointer
CURLOPT_SEEKDATA was set to an object pointer
CURLOPT_SEEKFUNCTION was set to a function pointer
- CURLOPT_DEBUGFUNCTION was set to a function pointer
- CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_HEADERFUNCTION was set to a function pointer
CURLOPT_HEADERDATA was set to an object pointer
CURLOPT_ERRORBUFFER was set to an object pointer
as source easily. You may choose to either not use them or implement
them yourself.
+ CURLOPT_DEBUGFUNCTION was set to a function pointer
+ CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_WRITEDATA was set to an object pointer
CURLOPT_WRITEFUNCTION was set to a function pointer
CURLOPT_READDATA was set to an object pointer
CURLOPT_READFUNCTION was set to a function pointer
CURLOPT_SEEKDATA was set to an object pointer
CURLOPT_SEEKFUNCTION was set to a function pointer
- CURLOPT_DEBUGFUNCTION was set to a function pointer
- CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_HEADERFUNCTION was set to a function pointer
CURLOPT_HEADERDATA was set to an object pointer
CURLOPT_ERRORBUFFER was set to an object pointer
as source easily. You may choose to either not use them or implement
them yourself.
+ CURLOPT_DEBUGFUNCTION was set to a function pointer
+ CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_WRITEDATA was set to an object pointer
CURLOPT_WRITEFUNCTION was set to a function pointer
CURLOPT_READDATA was set to an object pointer
CURLOPT_READFUNCTION was set to a function pointer
CURLOPT_SEEKDATA was set to an object pointer
CURLOPT_SEEKFUNCTION was set to a function pointer
- CURLOPT_DEBUGFUNCTION was set to a function pointer
- CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_HEADERFUNCTION was set to a function pointer
CURLOPT_HEADERDATA was set to an object pointer
CURLOPT_ERRORBUFFER was set to an object pointer
as source easily. You may choose to either not use them or implement
them yourself.
+ CURLOPT_DEBUGFUNCTION was set to a function pointer
+ CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_WRITEDATA was set to an object pointer
CURLOPT_WRITEFUNCTION was set to a function pointer
CURLOPT_READDATA was set to an object pointer
CURLOPT_READFUNCTION was set to a function pointer
CURLOPT_SEEKDATA was set to an object pointer
CURLOPT_SEEKFUNCTION was set to a function pointer
- CURLOPT_DEBUGFUNCTION was set to a function pointer
- CURLOPT_DEBUGDATA was set to an object pointer
CURLOPT_HEADERFUNCTION was set to a function pointer
CURLOPT_HEADERDATA was set to an object pointer
CURLOPT_ERRORBUFFER was set to an object pointer