Permalink
Browse files

URI, not URL.

  • Loading branch information...
1 parent f1fd258 commit 448038bc9d9388257b2949740b801cfaad3d3e0c Dave Lambley committed Nov 18, 2011
Showing with 6 additions and 6 deletions.
  1. +5 −5 lib/MogileFS/Client/Callback.pm
  2. +1 −1 t/callback_works.t
@@ -83,7 +83,7 @@ sub store_file_from_callback {
warn "connect to $dest failed: $!";
if ($opts->{on_failure}) {
$opts->{on_failure}->({
- uri => $path,
+ url => $path,
bytes_sent => 0,
total_bytes => $length,
client => 'callback',
@@ -110,7 +110,7 @@ sub store_file_from_callback {
if (syswrite($socket, ref($data) ? $$data : $data)!=$length_of_data) {
if ($opts->{on_failure}) {
$opts->{on_failure}->({
- uri => $path,
+ url => $path,
bytes_sent => $written_bytes,
total_bytes => $length,
client => 'callback',
@@ -135,7 +135,7 @@ sub store_file_from_callback {
unless(close($socket)) {
if ($opts->{on_failure}) {
$opts->{on_failure}->({
- uri => $path,
+ url => $path,
bytes_sent => $written_bytes,
total_bytes => $length,
client => 'callback',
@@ -164,7 +164,7 @@ sub store_file_from_callback {
if ($opts->{on_success}) {
$opts->{on_success}->({
- uri => $path,
+ url => $path,
total_bytes => $written_bytes,
connect_time => tv_interval($t0, $t1),
time_elapsed => tv_interval($t0, $t2),
@@ -175,7 +175,7 @@ sub store_file_from_callback {
else {
if ($opts->{on_failure}) {
$opts->{on_failure}->({
- uri => $path,
+ url => $path,
bytes_sent => $written_bytes,
total_bytes => $length,
client => 'callback',
View
@@ -35,7 +35,7 @@ my $callback = $mogc->store_file_from_callback($key, 'rip', $exp_len, {
on_success => sub {
my ($args) = @_;
diag Dumper($args);
- ok length($args->{uri}) > 1;
+ ok length($args->{url}) > 1;
is($args->{total_bytes}, $exp_len);
is($args->{client}, 'callback');
ok $args->{time_elapsed} > 0;

0 comments on commit 448038b

Please sign in to comment.