Skip to content

Commit

Permalink
mogfiledebug: show Last-Modified header if available
Browse files Browse the repository at this point in the history
This can be useful in several cases:

1) it may be used to determine the original version of the file
   if one copy was corrupted during replication

2) it can also be used to determine when replication congestion
   occurred by comparing the relative differences between
   replicas.
  • Loading branch information
Eric Wong authored and dormando committed Aug 8, 2013
1 parent 8618a9a commit 4bbaafb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mogfiledebug
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ if (@paths) {
}
print " - MD5 Hash: ", $res->{hash}, "\n";
print " - Length: ", $res->{length}, "\n" if defined $res->{length};
print " - Last-Modified: ", $res->{mtime}, "\n" if defined $res->{mtime};
print " - HTTP result: ", $res->{res}, "\n";
}
} else {
Expand Down Expand Up @@ -183,6 +184,7 @@ sub fetch_path {

$toret{hash} = $ctx->hexdigest;
$toret{res} = $res->status_line;
$toret{mtime} = $res->header("Last-Modified");
$toret{path} = $path;
return \%toret;
}

0 comments on commit 4bbaafb

Please sign in to comment.