summary refs log tree commit diff
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2011-07-11 12:00:38 +0200
committerfranck cuny <franck@lumberjaph.net>2011-07-26 13:21:01 +0200
commit21909ee12d2ca95f62470888a1f4ec09d6546dc0 (patch)
tree1dc3bf43d9e6fe7e7139372c6649b5346a3f9f13
parentcan't log at this point when we attach a method (diff)
downloadnet-http-spore-21909ee12d2ca95f62470888a1f4ec09d6546dc0.tar.gz
be explicit when there is a timeout
Signed-off-by: franck cuny <franck@lumberjaph.net>
-rw-r--r--lib/Net/HTTP/Spore/Response.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Net/HTTP/Spore/Response.pm b/lib/Net/HTTP/Spore/Response.pm
index 95ee72b..a7acea1 100644
--- a/lib/Net/HTTP/Spore/Response.pm
+++ b/lib/Net/HTTP/Spore/Response.pm
@@ -96,7 +96,11 @@ sub header {
 
 sub to_string {
     my $self = shift;
-    return "HTTP status: ".$self->{status};
+    my $status = "HTTP status: ".$self->{status};
+    if ($self->{body} =~ /read timeout/){
+        $status .= " - read timeout";
+    }
+    return $status;
 }
 
 sub finalize {