mirror of
https://github.com/moparisthebest/curl
synced 2024-11-11 12:05:06 -05:00
#1 fixed --data-urlencode when no = or @ was used
#2 extended the user-agent buffer since I hit the 128 byte boundary!
This commit is contained in:
parent
dc11239ff1
commit
e963714de6
@ -2062,13 +2062,15 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
|
|||||||
size_t nlen;
|
size_t nlen;
|
||||||
char is_file;
|
char is_file;
|
||||||
if(!p)
|
if(!p)
|
||||||
|
/* there was no '=' letter, check for a '@' instead */
|
||||||
p = strchr(nextarg, '@');
|
p = strchr(nextarg, '@');
|
||||||
if (p) {
|
if (p) {
|
||||||
nlen = p - nextarg; /* length of the name part */
|
nlen = p - nextarg; /* length of the name part */
|
||||||
is_file = *p++; /* pass the separator */
|
is_file = *p++; /* pass the separator */
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
nlen = is_file = -1;
|
/* neither @ nor =, so no name and it isn't a file */
|
||||||
|
nlen = is_file = 0;
|
||||||
p = nextarg;
|
p = nextarg;
|
||||||
}
|
}
|
||||||
if('@' == is_file) {
|
if('@' == is_file) {
|
||||||
@ -3606,7 +3608,7 @@ static int
|
|||||||
operate(struct Configurable *config, int argc, argv_item_t argv[])
|
operate(struct Configurable *config, int argc, argv_item_t argv[])
|
||||||
{
|
{
|
||||||
char errorbuffer[CURL_ERROR_SIZE];
|
char errorbuffer[CURL_ERROR_SIZE];
|
||||||
char useragent[128]; /* buah, we don't want a larger default user agent */
|
char useragent[256]; /* buah, we don't want a larger default user agent */
|
||||||
struct ProgressData progressbar;
|
struct ProgressData progressbar;
|
||||||
struct getout *urlnode;
|
struct getout *urlnode;
|
||||||
struct getout *nextnode;
|
struct getout *nextnode;
|
||||||
|
Loading…
Reference in New Issue
Block a user