Skip to content

Commit

Permalink
fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Oct 7, 2011
1 parent 63e607b commit 53f7ffb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Changes
@@ -1,6 +1,6 @@
This file documents the revision history for Perl extension Mojolicious.

2.0 2011-10-06 00:00:00
2.0 2011-10-07 00:00:00
- Code name "Leaf Fluttering In Wind", this is a major release.
- Increased Perl version requirement to 5.10.1.
- Added EXPERIMENTAL on_body attribute to Mojo::Content.
Expand All @@ -13,7 +13,7 @@ This file documents the revision history for Perl extension Mojolicious.
- Fixed many portability issues.
- Fixed on_finish callback to work consistently with all servers.
- Fixed small memory leak in Mojo::DOM.
- Foxed small memory leak in Mojo::Message.
- Fixed small memory leak in Mojo::Message.
- Fixed small formatting bug in Mojo::Headers.
- Fixed small proxy message generation bug.
- Fixed small detection bug in Mojolicious::Types.
Expand Down
17 changes: 6 additions & 11 deletions t/mojolicious/upload_lite_app.t
Expand Up @@ -22,26 +22,21 @@ use Test::Mojo;
my $cache = {};
app->hook(
after_build_tx => sub {
my $tx = shift;
$tx->req->on_progress(
shift->req->on_progress(
sub {
my $req = shift;

# Upload id parameter
# Check for id
return unless my $id = $req->url->query->param('upload_id');

# Expected content length
# Check for content length
return
unless my $len = $req->headers->content_length;

# Current progress
# Update cache with current progress
my $progress = $req->content->progress;

# Update cache
my $c = $cache->{$id} ||= [0];
push @$c, $progress == $len
? 100
: int($progress / ($len / 100));
push @{$cache->{$id} ||= [0]},
$progress == $len ? 100 : int($progress / ($len / 100));
}
);
}
Expand Down
3 changes: 1 addition & 2 deletions t/mojolicious/upload_stream_lite_app.t
Expand Up @@ -19,8 +19,7 @@ use Test::Mojo;
my $cache = {};
app->hook(
after_build_tx => sub {
my $tx = shift;
$tx->req->on_progress(
shift->req->on_progress(
sub {
my $req = shift;

Expand Down

0 comments on commit 53f7ffb

Please sign in to comment.