fix bad HTTP headers size detection through proxy

fix bad HTTP headers size detection through proxy
add user/password for proxy support