Pass the value of proxy_url variable as optional 9th argument of download
handler.
Added support for http proxy to the example download handler script.
Updated README file.
* download:
$8 url of item to download
* download:
$8 url of item to download
+ $9 url of http proxy (optional)
+http_proxy="$9"
+export http_proxy
+
test "x$url" = "x" && { echo "you must supply a url! ($url)"; exit 1; }
# only changes the dir for the $get sub process
test "x$url" = "x" && { echo "you must supply a url! ($url)"; exit 1; }
# only changes the dir for the $get sub process
if (uzbl.state.verbose)
printf("Download -> %s\n",uri);
/* if urls not escaped, we may have to escape and quote uri before this call */
if (uzbl.state.verbose)
printf("Download -> %s\n",uri);
/* if urls not escaped, we may have to escape and quote uri before this call */
- run_handler(uzbl.behave.download_handler, uri);
+
+ GString *args = g_string_new(uri);
+
+ if (uzbl.net.proxy_url) {
+ g_string_append_c(args, ' ');
+ g_string_append(args, uzbl.net.proxy_url);
+ }
+
+ run_handler(uzbl.behave.download_handler, args->str);
+
+ g_string_free(args, TRUE);