diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-02-23 07:27:19 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-02-23 07:27:19 +0100 |
commit | cc77058aea9001d9db60049500c50b971df89456 (patch) | |
tree | 4b4b5604f0d68907e2fa9bdac574a6f6fa183751 /sys/src/cmd/webfs | |
parent | 60fd51b9b7234f758849a442cf1abf4eb0f20729 (diff) |
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.
Diffstat (limited to 'sys/src/cmd/webfs')
-rw-r--r-- | sys/src/cmd/webfs/fs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/src/cmd/webfs/fs.c b/sys/src/cmd/webfs/fs.c index 65b4e4ce7..abd8de013 100644 --- a/sys/src/cmd/webfs/fs.c +++ b/sys/src/cmd/webfs/fs.c @@ -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); } |