improve http_proxy handling