diff options
author | portix <portix@gmx.net> | 2011-07-19 22:28:23 +0200 |
---|---|---|
committer | portix <portix@gmx.net> | 2011-07-19 22:28:23 +0200 |
commit | 8d81be3f650d748fc8e0083af9d5be0ef055a08d (patch) | |
tree | 54e19c942fb1d4011a859d35ce33a1eb9be9f8ac /src/util.c | |
parent | 6ae0e0c7307b4677dd5ebce33893b40fed9c752e (diff) | |
download | dwb-8d81be3f650d748fc8e0083af9d5be0ef055a08d.zip |
Check for scheme part in proxy uri, fixes #42
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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]; |