From b881c0cf629c99ec7cf3067164523036e9dcdfb4 Mon Sep 17 00:00:00 2001
From: Nathan Gass
Date: Tue, 27 Sep 2011 17:16:30 +0000
Subject: fall back on get_multi for other protocols

---
 it_url.class | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/it_url.class b/it_url.class
index 5a65f12..baac7c7 100644
--- a/it_url.class
+++ b/it_url.class
@@ -221,6 +221,9 @@ function is_reachable($timeout = 5)
 
 /**
  * Get simple URL with timeout. Can be called statically
+ *
+ * If the protocol is not http, only features of get_multi are supported.
+ *
  * @param $p parameter array with the following keys
  * @param $p['url']: url to get, defaults to constructor URL
  * @param $p['headers']: optional array of HTTP headers to send
@@ -333,6 +336,9 @@ function get($p=null, $timeout=5)
 
 			@fclose($fp);
 		}
+	} else {
+		$results = self::get_multi(array('urls' => array('one' => $p['url'])) + $p);
+		$result = $results['one'];
 	}
 
 	if (time() >= $endtime)
-- 
cgit v1.2.3