summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-15 10:28:17 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-15 10:28:17 +0000
commit7889b2df359b10a9fe1e319cfb0db03138d1a1a2 (patch)
treee5a585144e9ba8b0d6d879c44b19a86e229eda60
parenta7f7dadb38fa0e29e54d5d4314c2e31049f34d25 (diff)
A HTTP-body might be legitimately empty
-rw-r--r--debian/changelog6
-rwxr-xr-xlib/custodian/webfetch.rb7
2 files changed, 10 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index 77fd5a0..c87c33d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+custodian (2012:1115-3) stable; urgency=low
+
+ * A HTTP-request might result in a legitimately empty body.
+
+ -- Steve Kemp <steve@bytemark.co.uk> Thu, 15 Nov 2012 10:28:01 +0000
+
custodian (2012:1115-2) stable; urgency=low
* Throw exceptions on bogus configuration file entries.
diff --git a/lib/custodian/webfetch.rb b/lib/custodian/webfetch.rb
index 5c04b31..0b5f9c6 100755
--- a/lib/custodian/webfetch.rb
+++ b/lib/custodian/webfetch.rb
@@ -59,10 +59,11 @@ class WebFetch
#
- # If both files are size zero then we clearly failed.
+ # If the header was empty then we're a failure.
#
- if ( ( File.size( body ) == 0 ) ||
- ( File.size( head ) == 0 ) )
+ # (A body might be legitimately empty.)
+ #
+ if ( File.size( head ) == 0 )
#
# Cleanup