diff options
-rw-r--r-- | debian/changelog | 7 | ||||
-rwxr-xr-x | lib/custodian/protocol-tests/http.rb | 7 | ||||
-rwxr-xr-x | lib/custodian/protocol-tests/https.rb | 7 |
3 files changed, 21 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index d95c3d8..e1203b6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +custodian (2012:1114-6) stable; urgency=low + + * HTTP/HTTPS tests should work with a missing path. + + + -- Steve Kemp <steve@bytemark.co.uk> Wed, 14 Nov 2012 10:54:00 +0000 + custodian (2012:1114-5) stable; urgency=low * Removed the -low suffix from alerts. diff --git a/lib/custodian/protocol-tests/http.rb b/lib/custodian/protocol-tests/http.rb index 2a60063..e1e0ad0 100755 --- a/lib/custodian/protocol-tests/http.rb +++ b/lib/custodian/protocol-tests/http.rb @@ -127,6 +127,13 @@ class HTTPTest response = nil + # + # Ensure we have a trailing "/" + # + if ( url.path.empty? ) + url.path = "/" + end + if nil == url.query response = http.start { http.get(url.path) } else diff --git a/lib/custodian/protocol-tests/https.rb b/lib/custodian/protocol-tests/https.rb index 8fb643f..8db4da5 100755 --- a/lib/custodian/protocol-tests/https.rb +++ b/lib/custodian/protocol-tests/https.rb @@ -130,6 +130,13 @@ class HTTPSTest response = nil + # + # Ensure we have a trailing "/" + # + if ( url.path.empty? ) + url.path = "/" + end + if nil == url.query response = http.start { http.get(url.path) } else |