Change the way the HTTP client performs HTTP upgrade
Fix some proxying / HTTP client issues