Skip to content

Commit

Permalink
Initial HTTP/3 support
Browse files Browse the repository at this point in the history
This includes HTTP/3 and Websocket over HTTP/3.
  • Loading branch information
essen committed Jan 30, 2024
1 parent 81f3a21 commit 9158d31
Show file tree
Hide file tree
Showing 35 changed files with 5,474 additions and 149 deletions.
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@ CT_OPTS += -ct_hooks cowboy_ct_hook [] # -boot start_sasl
LOCAL_DEPS = crypto

DEPS = cowlib ranch
dep_cowlib = git https://github.com/ninenines/cowlib 2.12.1
dep_cowlib = git https://github.com/ninenines/cowlib qpack
dep_ranch = git https://github.com/ninenines/ranch 1.8.0

# @todo Only if COWBOY_QUICER is set.
DEPS += quicer
dep_quicer = git https://github.com/emqx/quic main

DOC_DEPS = asciideck

TEST_DEPS = $(if $(CI_ERLANG_MK),ci.erlang.mk) ct_helper gun
dep_ct_helper = git https://github.com/extend/ct_helper master
dep_gun = git https://github.com/ninenines/gun master
dep_gun = git https://github.com/ninenines/gun http3

# CI configuration.

Expand Down Expand Up @@ -65,6 +69,11 @@ TEST_ERLC_OPTS += +'{parse_transform, eunit_autoexport}'

app:: rebar.config

# Fix quicer compilation for HTTP/3.

autopatch-quicer::
$(verbose) printf "%s\n" "all: ;" > $(DEPS_DIR)/quicer/c_src/Makefile.erlang.mk

# Dialyze the tests.

#DIALYZER_OPTS += --src -r test
Expand Down
4 changes: 2 additions & 2 deletions ebin/cowboy.app
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{application, 'cowboy', [
{description, "Small, fast, modern HTTP server."},
{vsn, "2.11.0"},
{modules, ['cowboy','cowboy_app','cowboy_bstr','cowboy_children','cowboy_clear','cowboy_clock','cowboy_compress_h','cowboy_constraints','cowboy_decompress_h','cowboy_handler','cowboy_http','cowboy_http2','cowboy_loop','cowboy_metrics_h','cowboy_middleware','cowboy_req','cowboy_rest','cowboy_router','cowboy_static','cowboy_stream','cowboy_stream_h','cowboy_sub_protocol','cowboy_sup','cowboy_tls','cowboy_tracer_h','cowboy_websocket']},
{modules, ['cow_http3','cow_http3_machine','cowboy','cowboy_app','cowboy_bstr','cowboy_children','cowboy_clear','cowboy_clock','cowboy_compress_h','cowboy_constraints','cowboy_decompress_h','cowboy_handler','cowboy_http','cowboy_http2','cowboy_http3','cowboy_loop','cowboy_metrics_h','cowboy_middleware','cowboy_quicer','cowboy_req','cowboy_rest','cowboy_router','cowboy_static','cowboy_stream','cowboy_stream_h','cowboy_sub_protocol','cowboy_sup','cowboy_tls','cowboy_tracer_h','cowboy_websocket','quic_hello_h']},
{registered, [cowboy_sup,cowboy_clock]},
{applications, [kernel,stdlib,crypto,cowlib,ranch]},
{applications, [kernel,stdlib,crypto,cowlib,ranch,quicer]},
{optional_applications, []},
{mod, {cowboy_app, []}},
{env, []}
Expand Down
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{deps, [
{cowlib,".*",{git,"https://github.com/ninenines/cowlib","2.12.1"}},{ranch,".*",{git,"https://github.com/ninenines/ranch","1.8.0"}}
{cowlib,".*",{git,"https://github.com/ninenines/cowlib","qpack"}},{ranch,".*",{git,"https://github.com/ninenines/ranch","1.8.0"}},{quicer,".*",{git,"https://github.com/emqx/quic","main"}}
]}.
{erl_opts, [debug_info,warn_export_vars,warn_shadow_vars,warn_obsolete_guard,warn_missing_spec,warn_untyped_record]}.
Loading

0 comments on commit 9158d31

Please sign in to comment.