2026-09-04 16:45:38 +02:00
|
|
|
/* Provenance: curl/curl config_init (fixed).
|
|
|
|
|
* repo: curl/curl
|
|
|
|
|
* commit: ec9cc725d598ac77de7b6df8afeec292b3c8ad46
|
|
|
|
|
* parent: abd846c374c5269809ce11740754bc6f00a0b193
|
|
|
|
|
* commit_url: https://github.com/curl/curl/commit/ec9cc725d598ac77de7b6df8afeec292b3c8ad46
|
|
|
|
|
* cve: CVE-2020-8284
|
|
|
|
|
* license: curl
|
|
|
|
|
* function: config_init
|
|
|
|
|
* relpath: src/tool_cfgable.c
|
2026-09-05 09:27:03 +02:00
|
|
|
* provenance: human
|
|
|
|
|
* mechanism: other
|
2026-09-04 16:45:38 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
void config_init(struct OperationConfig *config)
|
|
|
|
|
{
|
|
|
|
|
memset(config, 0, sizeof(struct OperationConfig));
|
|
|
|
|
|
|
|
|
|
config->postfieldsize = -1;
|
|
|
|
|
config->use_httpget = FALSE;
|
|
|
|
|
config->create_dirs = FALSE;
|
|
|
|
|
config->maxredirs = DEFAULT_MAXREDIRS;
|
|
|
|
|
config->proto = CURLPROTO_ALL;
|
|
|
|
|
config->proto_present = FALSE;
|
|
|
|
|
config->proto_redir = CURLPROTO_ALL & /* All except FILE, SCP and SMB */
|
|
|
|
|
~(CURLPROTO_FILE | CURLPROTO_SCP | CURLPROTO_SMB |
|
|
|
|
|
CURLPROTO_SMBS);
|
|
|
|
|
config->proto_redir_present = FALSE;
|
|
|
|
|
config->proto_default = NULL;
|
|
|
|
|
config->tcp_nodelay = TRUE; /* enabled by default */
|
|
|
|
|
config->happy_eyeballs_timeout_ms = CURL_HET_DEFAULT;
|
|
|
|
|
config->http09_allowed = FALSE;
|
|
|
|
|
config->ftp_skip_ip = TRUE;
|
|
|
|
|
}
|