0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00
Commit graph

11 commits

Author SHA1 Message Date
Loïc Hoguin
8cb9d242b0
Initial HTTP/3 implementation
This includes Websocket over HTTP/3.

Since quicer, which provides the QUIC implementation,
is a NIF, Cowboy cannot depend directly on it. In order
to enable QUIC and HTTP/3, users have to set the
COWBOY_QUICER environment variable:

  export COWBOY_QUICER=1

In order to run the test suites, the same must be done
for Gun:

  export GUN_QUICER=1

HTTP/3 support is currently not available on Windows
due to compilation issues of quicer which have yet to
be looked at or resolved.

HTTP/3 support is also unavailable on the upcoming
OTP-27 due to compilation errors in quicer dependencies.
Once resolved HTTP/3 should work on OTP-27.

Because of how QUIC currently works, it's possible
that streams that get reset after sending a response
do not receive that response. The test suite was
modified to accomodate for that. A future extension
to QUIC will allow us to gracefully reset streams.

This also updates Erlang.mk.
2024-03-26 15:53:48 +01:00
Loïc Hoguin
b36f064a91
Refresh copyright lines 2024-01-25 11:22:54 +01:00
Loïc Hoguin
ca6477af7b
Use init_per_suite instead of all/0 for init in tracer_SUITE 2023-12-01 15:46:23 +01:00
Loïc Hoguin
251e70b219
Fix OTP-26+ warnings in test suites 2023-03-30 10:35:08 +02:00
Loïc Hoguin
e51ac66728
Rely on timetrap timeouts for tracer_SUITE 2020-04-06 20:14:31 +02:00
Loïc Hoguin
cf3ab5832a
Add nowarn_export_all to all test suites 2017-11-29 16:57:10 +01:00
Loïc Hoguin
aedd274e26
Disable the tracer suite when compiled natively 2017-11-17 22:55:56 +01:00
Loïc Hoguin
ce5ab4b49a
Initialize trace patterns only once
They are global for the node for all future call trace flags,
so it's not necessary to set them repeatedly with every request.

Doing it once at startup also ensures we can't have race
conditions when the user wants to change which trace patterns
should be used (because requests are concurrent and patterns
end up overwriting themselves repeatedly), and makes this
changing of trace patterns much more straightforward: the
user can just define the ones they want. The default function
traces everything.

In addition I have also added the tracer_flags option to make
the trace flags configurable, excluding the tracer pid.
2017-11-17 13:23:38 +01:00
Loïc Hoguin
6cc162583d
Keep the state returned by the tracer callback
It was mistakenly discarded.
2017-11-10 14:59:11 +00:00
Loïc Hoguin
da304799fe
Add a terminate event to the tracer and more tests 2017-11-03 17:52:18 +00:00
Loïc Hoguin
f4331f7c16
Add cowboy_tracer_h stream handler
Another experimental stream handler. It enables tracing for
the connection process and any children processes based on
the matching of the request. It can be used to do ad-hoc
tracing by sending a specific header, path, method or other.

It is meant to be used both for tests and production. Some
configuration scenarios are NOT safe for production, beware.

It's important to understand that, at this time, tracing
is enabled on the scale of the entire connection including
any future request processes. Keep this in mind when trying
to use it in production. The only way to stop tracing is
by having the callback function exit (by calling exit/1
explicitly). This can be done after a certain number of
events for example. Tracing can generate a lot of events,
so it's a good idea to stop after a small number of events
(between 1000 and 10000 should be good) and to avoid tracing
the whole world.

Documentation will follow at a later time.
2017-10-27 17:18:28 +01:00