Age | Commit message (Collapse) | Author |
|
|
|
|
|
This changes the way we connect to servers entirely. We now have
three states when connecting (domain_lookup, connect and
tls_handshake when applicable) and as a result three corresponding
timeout options. Each state has a start/end event associated and
the event data was tweaked to best match each event. Since the
TLS handshake is separate, the transport_opts option was also
split into two: tcp_opts and tls_opts.
|
|
|
|
And ensure that Websocket triggers all the request/response
events.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
No need to have the error repeated in the logs by the Gun process.
|
|
This fixes a bug in `gun` when trying to open 2 connections with tracing enabled.
You can recreate it like so:
> application:ensure_all_started(gun).
> gun:open("localhost", 80, #{trace => true}).
> gun:open("localhost", 80, #{trace => true}).
The second call fails with a cause clause exception.
You'll observe the same exception by:
> dbg:start().
> dbg:start().
Ultimately this may be a bug in OTP, but since `dbg:start/0` is undocumented
I'm inclined to give it the benefit of the doubt. Regardless, since the docs[1]
clearly state that calling `dbg:tracer/0` is the proper way to start the default
tracer message receiver, I argue that calling `dbg:start/0` is a bug in `gun`.
[1]: http://erlang.org/doc/man/dbg.html
|
|
|
|
|
|
Still need to add ALPN support and to wait before trying to send
data on a proxied TLS connection that didn't complete its handshake.
|
|
|
|
Header names can now be provided as binary, string or atom
and Gun no longer requires them to be in lowercase. The list
of headers can also be provided as a map as well.
|
|
This was a bug in the case of HTTP/1.1 and an inconvenience
in the case of HTTP/2.
|
|
|
|
|
|
Also fixes an issue with switch_transport introduced when
converting the Gun process to gen_statem.
|
|
This is safer as servers may reject too many extra empty lines.
|
|
This cleaner separation gets rid of the implicit body check
that was causing issues for many users. Now the body is
either given explicitly or it is expected via future
gun:data/3 calls.
|
|
|
|
A common state machine for Gun and Cowboy will be easier to
maintain. This fixes numerous issues including some test
failures that were hidden because the h2specd_SUITE was
flawed.
We temporarily depend on Cowlib master until a new version
is released.
|
|
|
|
The same can now be achieved using gun:info to retrieve
the socket. This function was not documented and was only
used in the old Cowboy test suite.
|
|
This is used by Cowboy for tests.
|
|
Also augment the CONNECT tests to confirm that the
intermediaries are accounted for.
|
|
This fixes HTTP/2 over TLS connections.
The protocol destination option has been deprecated in favor
of a protocols option.
|
|
Gun can now be used to connect through TCP HTTP/1.1 proxies
using all supported protocols. It is also possible to create
a tunnel through multiple proxies.
Also updates Cowlib to 2.6.0.
|
|
|
|
|
|
|
|
We instead of two new modules, gun_tcp and gun_tls.
They only have 6 functions so far, much less than
what Ranch provided before.
Also renames ssl to tls where applicable. It's still
possible to use the ssl transport option but it's now
undocumented.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The reason for this change is to avoid annoying supervisor logs
when SASL logging is enabled.
|
|
The code is definitely not the best, but as long as it doesn't
break anything it should be OK for now.
|
|
|
|
|