Loading src/tool_cfgable.c +1 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ static void free_config_fields(struct OperationConfig *config) curl_slist_free_all(config->prequote); curl_slist_free_all(config->headers); curl_slist_free_all(config->proxyheaders); if(config->httppost) { curl_formfree(config->httppost); Loading src/tool_cfgable.h +1 −0 Original line number Diff line number Diff line Loading @@ -143,6 +143,7 @@ struct OperationConfig { curl_TimeCond timecond; time_t condtime; struct curl_slist *headers; struct curl_slist *proxyheaders; struct curl_httppost *httppost; struct curl_httppost *last_post; struct curl_slist *telnet_options; Loading src/tool_getparam.c +5 −1 Original line number Diff line number Diff line Loading @@ -222,6 +222,7 @@ static const struct LongShort aliases[]= { {"G", "get", FALSE}, {"h", "help", FALSE}, {"H", "header", TRUE}, {"Hp", "proxy-header", TRUE}, {"i", "include", FALSE}, {"I", "head", FALSE}, {"j", "junk-session-cookies", FALSE}, Loading Loading @@ -1404,6 +1405,9 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ break; case 'H': /* A custom header to append to a list */ if(subletter == 'p') /* --proxy-header */ err = add2list(&config->proxyheaders, nextarg); else err = add2list(&config->headers, nextarg); if(err) return err; Loading src/tool_operate.c +6 −0 Original line number Diff line number Diff line Loading @@ -947,6 +947,12 @@ static CURLcode operate_do(struct GlobalConfig *global, my_setopt_str(curl, CURLOPT_USERAGENT, config->useragent); my_setopt_slist(curl, CURLOPT_HTTPHEADER, config->headers); /* new in libcurl 7.36.0 */ if(config->proxyheaders) { my_setopt_slist(curl, CURLOPT_PROXYHEADER, config->proxyheaders); my_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_SEPARATE); } /* new in libcurl 7.5 */ my_setopt(curl, CURLOPT_MAXREDIRS, config->maxredirs); Loading Loading
src/tool_cfgable.c +1 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ static void free_config_fields(struct OperationConfig *config) curl_slist_free_all(config->prequote); curl_slist_free_all(config->headers); curl_slist_free_all(config->proxyheaders); if(config->httppost) { curl_formfree(config->httppost); Loading
src/tool_cfgable.h +1 −0 Original line number Diff line number Diff line Loading @@ -143,6 +143,7 @@ struct OperationConfig { curl_TimeCond timecond; time_t condtime; struct curl_slist *headers; struct curl_slist *proxyheaders; struct curl_httppost *httppost; struct curl_httppost *last_post; struct curl_slist *telnet_options; Loading
src/tool_getparam.c +5 −1 Original line number Diff line number Diff line Loading @@ -222,6 +222,7 @@ static const struct LongShort aliases[]= { {"G", "get", FALSE}, {"h", "help", FALSE}, {"H", "header", TRUE}, {"Hp", "proxy-header", TRUE}, {"i", "include", FALSE}, {"I", "head", FALSE}, {"j", "junk-session-cookies", FALSE}, Loading Loading @@ -1404,6 +1405,9 @@ ParameterError getparameter(char *flag, /* f or -long-flag */ break; case 'H': /* A custom header to append to a list */ if(subletter == 'p') /* --proxy-header */ err = add2list(&config->proxyheaders, nextarg); else err = add2list(&config->headers, nextarg); if(err) return err; Loading
src/tool_operate.c +6 −0 Original line number Diff line number Diff line Loading @@ -947,6 +947,12 @@ static CURLcode operate_do(struct GlobalConfig *global, my_setopt_str(curl, CURLOPT_USERAGENT, config->useragent); my_setopt_slist(curl, CURLOPT_HTTPHEADER, config->headers); /* new in libcurl 7.36.0 */ if(config->proxyheaders) { my_setopt_slist(curl, CURLOPT_PROXYHEADER, config->proxyheaders); my_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_SEPARATE); } /* new in libcurl 7.5 */ my_setopt(curl, CURLOPT_MAXREDIRS, config->maxredirs); Loading