Skip to content
Permalink
Browse files

tool_getparam: Rename encode_form_data

  • Loading branch information
bbakersmith committed Feb 14, 2020
1 parent 1ce599a commit 17a155881a5fe8d939fe9d3a934377192357ad3b
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/tool_getparam.c
@@ -527,7 +527,7 @@ static char *replace_url_encoded_space_with_plus(const char *in)
return out;
}

static char *encode_form_data(const char *in, size_t inlen)
static char *escape_form_urlencoded_string(const char *in, size_t inlen)
{
if(inlen == 0)
return strdup(""); /* if no input, return empty string */
@@ -1432,13 +1432,13 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
}
else {
/* encode the content */
char *encvalue = encode_form_data(postdata, size);
char *encvalue = escape_form_urlencoded_string(postdata, size);
Curl_safefree(postdata); /* no matter if it worked or not */
if(!encvalue)
return PARAM_NO_MEM;

/* encode the name */
char *encname = encode_form_data(nextarg, nlen);
char *encname = escape_form_urlencoded_string(nextarg, nlen);
if(!encname) {
curl_free(encvalue);
return PARAM_NO_MEM;

0 comments on commit 17a1558

Please sign in to comment.
You can’t perform that action at this time.