mirror of https://github.com/moparisthebest/curl
support blank arguments to options, each option should check for blank
ones themselves if they need to prevent this.
This commit is contained in:
parent
33306b2749
commit
20d8e32a58
|
@ -525,7 +525,7 @@ static void GetStr(char **string,
|
||||||
{
|
{
|
||||||
if(*string)
|
if(*string)
|
||||||
free(*string);
|
free(*string);
|
||||||
if(value && *value)
|
if(value)
|
||||||
*string = strdup(value);
|
*string = strdup(value);
|
||||||
else
|
else
|
||||||
*string = NULL;
|
*string = NULL;
|
||||||
|
@ -1131,7 +1131,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
|
||||||
nextarg=(char *)&parse[1]; /* this is the actual extra parameter */
|
nextarg=(char *)&parse[1]; /* this is the actual extra parameter */
|
||||||
singleopt=TRUE; /* don't loop anymore after this */
|
singleopt=TRUE; /* don't loop anymore after this */
|
||||||
}
|
}
|
||||||
else if((!nextarg || !*nextarg) && aliases[hit].extraparam) {
|
else if(!nextarg && aliases[hit].extraparam) {
|
||||||
return PARAM_REQUIRES_PARAMETER;
|
return PARAM_REQUIRES_PARAMETER;
|
||||||
}
|
}
|
||||||
else if(nextarg && aliases[hit].extraparam)
|
else if(nextarg && aliases[hit].extraparam)
|
||||||
|
@ -1324,7 +1324,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
|
||||||
GetStr(&postdata, nextarg);
|
GetStr(&postdata, nextarg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(config->postfields && *config->postfields) {
|
if(config->postfields) {
|
||||||
/* we already have a string, we append this one
|
/* we already have a string, we append this one
|
||||||
with a separating &-letter */
|
with a separating &-letter */
|
||||||
char *oldpost=config->postfields;
|
char *oldpost=config->postfields;
|
||||||
|
|
Loading…
Reference in New Issue