Age | Commit message (Collapse) | Author |
|
Now has a proper StreamRef given to it by the CONNECT stream.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Also add a test for CONNECT to TLS via 2 TLS proxies.
|
|
There are better counterparts in the rfc7231_SUITE.
|
|
|
|
If we set Max-Age to 1 we may end up GCing the cookie immediately.
Instead we set it to 2 and increase all time values by 1 second.
|
|
|
|
The call to Transport:sockname/1 can return an error if the
socket was closed as we were gathering info. In that case we
simply do not fill in the address and port information.
|
|
There's no need to have idna listed in ALL_DEPS_DIR we only
use it for "make gen" which does not require it.
|
|
Also contains a few small changes and Dialyzer fixes.
|
|
|
|
|
|
|
|
|
|
|
|
As reported by Dialyzer.
|
|
|
|
And make sure all HTTP/2 connection_error(s) result in a
gun_down message containing the error. In the preface case
we do not send a gun_error message (because there's no stream
open yet) and gun_down was always saying normal.
Also make sure the human readable reason is included in the
gun_error message, if any.
|
|
|
|
|
|
This should be much faster than using lists:keyfind and friends.
This matters for connections that have a lot of concurrent
streams.
|
|
|
|
|
|
Also rework the different handle_head scenarios in separate
functions.
|
|
The details are not given for now. The best would be to
document them in Cowlib and refer to that documentation
instead of duplicating the information in both the Gun
and Cowboy manuals.
|
|
|
|
|
|
The reply_to option is also propagated when we switch protocols.
|
|
While at it the gun:info/1 function has been fixed to work
even when we are in the not_connected state, and the owner
is now also returned.
|
|
The auto-ping will at regular interval send a ping frame.
The silence_pings option defaults to true. It can be set
to false when the user needs to receive ping/pong frames.
|
|
|
|
Gun can now be used to send or receive arbitrary data in the
following scenarios:
* Directly after connecting to a server (this is not terribly
useful but it works nevertheless due to the Gun architecture)
* After connecting through one or more Socks and/or HTTP proxies.
This allows using Gun's proxy capabilities to access servers
located beyond firewalls.
* After performing an HTTP/1.1 Upgrade. This allows using Gun
to implement custom protocols that require upgrading from
an HTTP/1.1 connection.
As there is still no support for HTTP/2 CONNECT for the time
being, there are no relevant streams attached to those use
cases and therefore the raw protocol currently expects users
to use 'undefined' as the StreamRef value. This is not a
final decision and will most likely produce a Dialyzer
warning at this time.
|
|
|
|
This essentially reverts to the old behavior for initial TLS
handshakes, and improves TLS support for the Socks/HTTP proxy
cases.
|
|
|
|
|
|
The version is still kept in the state even if it's an option
because it's useful to have there and it's just a tiny atom.
|
|
It was deprecated and replaced by 'protocols' in a previous
version.
|
|
|
|
Also correct various Socks related types. This commit also
adds a new gun:protocols/0 type as a simpler way of describing
preferred protocols. The protocol/opts tuple is also documented.
This commit also fixes an issue with the default value for the
preferred protocols when using CONNECT over TLS. It was
mistakenly not enabling http2 by default.
|
|
Also fix the multiple TLS proxies tests from the previous commit.
|
|
We now properly support TCP across two TLS proxies, and
TLS across two TCP/TLS proxies.
|
|
When doing a CONNECT from http to http or from socks to socks
we may want to use different configuration options. Switching
the protocol explicitly helps us achieve that. It will also
signal through events that a protocol switch occurred.
|
|
|
|
|