.TP
.B http_proxy
If this variable is set to an none empty value, and the configuration option
-`proxy' is enabled, this will be used as http proxy.
+`proxy' is enabled, this will be used as http proxy. If the proxy URL has no
+scheme set, http is assumed.
.TP
.B no_proxy
A comma separated list of domains and/or ips which should not be proxied. Note
*/
#include "config.h"
+#include <string.h>
#include "main.h"
#include "setting.h"
#include "shortcut.h"
const char *http_proxy = g_getenv("http_proxy");
if (http_proxy != NULL && *http_proxy != '\0') {
- char *proxy_new = g_str_has_prefix(http_proxy, "http://")
+ char *proxy_new = strstr(http_proxy, "://")
? g_strdup(http_proxy)
: g_strconcat("http://", http_proxy, NULL);