webfs: check $httpproxy and error when its bogus
the httpproxy environment variable needs to be a url as stated in the manpage, so give an error when it isnt.
This commit is contained in:
parent
60fd51b9b7
commit
cc77058aea
1 changed files with 2 additions and 0 deletions
|
@ -820,6 +820,8 @@ main(int argc, char *argv[])
|
|||
|
||||
if(s = getenv("httpproxy")){
|
||||
proxy = saneurl(url(s, 0));
|
||||
if(proxy == nil || strcmp(proxy->scheme, "http") && strcmp(proxy->scheme, "https"))
|
||||
sysfatal("invalid httpproxy url: %s", s);
|
||||
free(s);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue