Fix NPE triggered when using HTTP proxies with user auth

fix #195