Commit Graph

11 Commits

Author SHA1 Message Date
Gary Burd 1551221275 Reject URIs containing user information
WebSocket URIs do not contain user information per section 3 of RFC
6455.

Fixes #65
2015-05-15 09:26:38 -07:00
Peter Waller 6fd0f867fe Allow separate specification of http/dial Hosts
Enable the Host: header to be customized in a Dialer.Dial call.

This is needed to implement websocket proxies.
2015-05-10 11:51:08 +01:00
Gary Burd b2fa8f6d58 Return response body on bad handshake.
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.
2015-05-08 15:39:37 -07:00
Gary Burd 7d2ea39ebc Cleanup buffer size calculations. 2014-11-05 12:26:52 -08:00
Gary Burd db7a2a1679 Improve client host header handling.
- Set request host header to substring of the URL. Do not add default
  port to string.
- Do not include port when verifying TLS host name.
2014-05-08 11:21:56 -07:00
Gary Burd 15aed3b4a4 Relicense to the Gorilla WebSocket Authors. 2014-04-18 14:25:11 -07:00
Gary Burd 707d1f6c6b Cleanup issues reported by golint. 2013-12-23 12:08:49 -08:00
Gary Burd f273336ae2 Modify client to work with Chrome debug server.
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.
2013-12-21 08:44:58 -08:00
Gary Burd b118f62ec0 Add subprotocol negotiation to Dialer. 2013-12-14 08:06:24 -08:00
Gary Burd 87accaef66 Add Dialer. 2013-12-14 08:06:24 -08:00
Gary Burd 273ecadfca Initial commit 2013-10-16 16:30:59 -07:00