From 4bbaafb4475d222a77339a3bb7971113326db042 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 30 May 2013 07:54:27 +0000 Subject: [PATCH] mogfiledebug: show Last-Modified header if available 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. --- mogfiledebug | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mogfiledebug b/mogfiledebug index 658c1b1..63c0ddd 100755 --- a/mogfiledebug +++ b/mogfiledebug @@ -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 { @@ -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; }