Skip to content

Commit

Permalink
fixed another small upgrade bug in Mojo::UserAgent::Transactor
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 10, 2013
1 parent 4f5bbde commit a30ece7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,7 +1,7 @@

3.77 2013-01-11
- Improved tests.
- Fixed small upgrade bug in Mojo::UserAgent::Transactor.
- Fixed small upgrade bugs in Mojo::UserAgent::Transactor.

3.76 2013-01-10
- Added support for multiple uploads sharing the same name to
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/UserAgent/Transactor.pm
Expand Up @@ -207,7 +207,7 @@ sub _multipart {
# Field
else {
$value = encode $encoding, $value if $encoding;
$part->asset->add_chunk($value);
$part->asset(Mojo::Asset::Memory->new->add_chunk($value));
}

# Content-Disposition
Expand Down
2 changes: 2 additions & 0 deletions t/mojo/transactor.t
Expand Up @@ -127,6 +127,8 @@ is $tx->req->headers->content_type, 'multipart/form-data',
like $tx->req->content->parts->[0]->headers->content_disposition, qr/"test"/,
'right "Content-Disposition" value';
is $tx->req->content->parts->[0]->asset->slurp, 123, 'right part';
ok !$tx->req->content->parts->[0]->asset->is_file, 'stored in memory';
ok !$tx->req->content->parts->[0]->asset->auto_upgrade, 'no upgrade';
is $tx->req->content->parts->[1], undef, 'no more parts';

# Multipart form with multiple values
Expand Down

0 comments on commit a30ece7

Please sign in to comment.