Skip to content

Commit

Permalink
consistently escape before encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jul 3, 2014
1 parent 8af37f1 commit 00e27e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Mojo/UserAgent/Transactor.pm
Expand Up @@ -230,7 +230,8 @@ sub _multipart {
}

# Content-Disposition
$name = url_escape $charset ? encode($charset, $name) : $name, '"';
$name = url_escape $name, '"';
$name = encode $charset, $name if $charset;
my $disposition = qq{form-data; name="$name"};
$disposition .= qq{; filename="$filename"} if defined $filename;
$headers->content_disposition($disposition);
Expand Down

0 comments on commit 00e27e9

Please sign in to comment.