summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2011-07-19 22:28:23 +0200
committerportix <portix@gmx.net>2011-07-19 22:28:23 +0200
commit8d81be3f650d748fc8e0083af9d5be0ef055a08d (patch)
tree54e19c942fb1d4011a859d35ce33a1eb9be9f8ac /src/util.c
parent6ae0e0c7307b4677dd5ebce33893b40fed9c752e (diff)
downloaddwb-8d81be3f650d748fc8e0083af9d5be0ef055a08d.zip
Check for scheme part in proxy uri, fixes #42
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 05aa8029..19acd41e 100644
--- a/src/util.c
+++ b/src/util.c
@@ -56,6 +56,9 @@ dwb_util_test_connect(const char *uri) {
int s;
int ret = 1;
+ char *scheme = strstr(uri, "://");
+ if (scheme != NULL)
+ uri = scheme + 3;
char **token = g_strsplit(uri, ":", 2);
if (token[0] && token[1]) {
char *host = !strcmp(token[0], "localhost") ? "127.0.0.1" : token[0];