about summary refs log tree commit diff stats
path: root/src/tinyurl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tinyurl.c')
-rw-r--r--src/tinyurl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tinyurl.c b/src/tinyurl.c
index 03e4b8f1..c492ff1d 100644
--- a/src/tinyurl.c
+++ b/src/tinyurl.c
@@ -41,6 +41,13 @@ tinyurl_init(void)
     curl_global_init(CURL_GLOBAL_ALL);
 }
 
+gboolean
+tinyurl_valid(char *url)
+{
+    return (g_str_has_prefix(url, "http://") || 
+        g_str_has_prefix(url, "https://"));
+}
+
 char *
 tinyurl_get(char *url)
 {