Reuse the buffer backing the bufio.Writer returned from hijack if that
buffer is large enough to be generally useful and
Upgrader.WriteBufferSize == 0.
Update the logic for reusing bufio.Reader returned from hijack to match
the logic for bufio.Reader: The buffer backing the reader must be
sufficiently large to be generally useful and Upgrader.ReadBufferSize ==
0.
Improve the documentation for ReadBufferSize and WriterBufferSize in
Dialer and Upgrader.
Prior to this change, the client passed query strings from the
application to the network via the net/url#URL.Opaque field. This works,
but may not be something the authors of the net/url and net/http
packages expect. To play it safe, this change parses the query string to
the net/url#URL.RawQuery field.
- To take advantage of the Host header cleanup in the net/http
Request.Write method, use a net/http Request to write the handshake to
the wire.
- Move code from the deprecated NewClientConn function to Dialer.Dial.
This change makes it easier to add proxy support to Dialer.Dial. Add
comment noting that NewClientConn is deprecated.
- Update the code so that parseURL can be replaced with net/url Parse.
We need to wait until we can require 1.5 before making the swap.
The Dialer.Dial method returns an *http.Response on a bad handshake.
This CL updates the Dial method to include up to 1024 bytes of the
response body in the returned *http.Response. Applications may find the
response body helpful when debugging bad handshakes.
Fixes issue #62.
The Chrome debug server does not use case insensitive comparison on the
Connection header tokens as required by the HTTP RFC. Modify the client
to send "Connection: Upgrade" as expected by Chrome. Because this
matches the examples in the RFC, this change might improve
interoperability with other servers.