changed LICENSE
 
@@ -1,4 1,4 @@
1
- Copyright (c) 2011-2017, Loïc Hoguin <[email protected]>
1
Copyright (c) 2011-2022, Loïc Hoguin <[email protected]>
2
2
3
3
Permission to use, copy, modify, and/or distribute this software for any
4
4
purpose with or without fee is hereby granted, provided that the above
changed Makefile
 
@@ -2,7 2,7 @@
2
2
3
3
PROJECT = cowboy
4
4
PROJECT_DESCRIPTION = Small, fast, modern HTTP server.
5
- PROJECT_VERSION = 2.9.0
5
PROJECT_VERSION = 2.10.0
6
6
PROJECT_REGISTERED = cowboy_clock
7
7
8
8
# Options.
 
@@ -15,7 15,7 @@ CT_OPTS = -ct_hooks cowboy_ct_hook [] # -boot start_sasl
15
15
LOCAL_DEPS = crypto
16
16
17
17
DEPS = cowlib ranch
18
- dep_cowlib = git https://github.com/ninenines/cowlib 2.11.0
18
dep_cowlib = git https://github.com/ninenines/cowlib 2.12.1
19
19
dep_ranch = git https://github.com/ninenines/ranch 1.8.0
20
20
21
21
DOC_DEPS = asciideck
 
@@ -40,8 40,8 @@ define HEX_TARBALL_EXTRA_METADATA
40
40
#{
41
41
licenses => [<<"ISC">>],
42
42
links => #{
43
- <<"User guide">> => <<"https://ninenines.eu/docs/en/cowboy/2.9/guide/">>,
44
- <<"Function reference">> => <<"https://ninenines.eu/docs/en/cowboy/2.9/manual/">>,
43
<<"User guide">> => <<"https://ninenines.eu/docs/en/cowboy/2.10/guide/">>,
44
<<"Function reference">> => <<"https://ninenines.eu/docs/en/cowboy/2.10/manual/">>,
45
45
<<"GitHub">> => <<"https://github.com/ninenines/cowboy">>,
46
46
<<"Sponsor">> => <<"https://github.com/sponsors/essen">>
47
47
}
 
@@ -88,13 88,6 @@ $(H2SPEC):
88
88
$(verbose) git clone --depth 1 https://github.com/summerwind/h2spec $(dir $(H2SPEC)) || true
89
89
$(verbose) $(MAKE) -C $(dir $(H2SPEC)) build MAKEFLAGS= || true
90
90
91
- # Use erl_make_certs from the tested release during CI
92
- # and ensure that ct_helper is always recompiled.
93
-
94
- ci-setup:: clean deps test-deps
95
- $(gen_verbose) cp ~/.kerl/builds/$(CI_OTP_RELEASE)/otp_src_git/lib/ssl/test/erl_make_certs.erl deps/ct_helper/src/ || true
96
- $(gen_verbose) $(MAKE) -C $(DEPS_DIR)/ct_helper clean app
97
-
98
91
# Prepare for the release.
99
92
100
93
prepare_tag:
changed ebin/cowboy.app
 
@@ -1,6 1,6 @@
1
1
{application, 'cowboy', [
2
2
{description, "Small, fast, modern HTTP server."},
3
- {vsn, "2.9.0"},
3
{vsn, "2.10.0"},
4
4
{modules, ['cowboy','cowboy_app','cowboy_bstr','cowboy_children','cowboy_clear','cowboy_clock','cowboy_compress_h','cowboy_constraints','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']},
5
5
{registered, [cowboy_sup,cowboy_clock]},
6
6
{applications, [kernel,stdlib,crypto,cowlib,ranch]},
changed erlang.mk
 
@@ -17,7 17,7 @@
17
17
ERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST)))
18
18
export ERLANG_MK_FILENAME
19
19
20
- ERLANG_MK_VERSION = d80984c
20
ERLANG_MK_VERSION = 94718f7
21
21
ERLANG_MK_WITHOUT =
22
22
23
23
# Make 3.81 and 3.82 are deprecated.
 
@@ -2735,7 2735,7 @@ pkg_mochiweb_description = MochiWeb is an Erlang library for building lightweigh
2735
2735
pkg_mochiweb_homepage = https://github.com/mochi/mochiweb
2736
2736
pkg_mochiweb_fetch = git
2737
2737
pkg_mochiweb_repo = https://github.com/mochi/mochiweb
2738
- pkg_mochiweb_commit = master
2738
pkg_mochiweb_commit = main
2739
2739
2740
2740
PACKAGES = mochiweb_xpath
2741
2741
pkg_mochiweb_xpath_name = mochiweb_xpath
 
@@ -3391,7 3391,7 @@ pkg_relx_description = Sane, simple release creation for Erlang
3391
3391
pkg_relx_homepage = https://github.com/erlware/relx
3392
3392
pkg_relx_fetch = git
3393
3393
pkg_relx_repo = https://github.com/erlware/relx
3394
- pkg_relx_commit = master
3394
pkg_relx_commit = main
3395
3395
3396
3396
PACKAGES = resource_discovery
3397
3397
pkg_resource_discovery_name = resource_discovery
 
@@ -4959,9 4959,12 @@ endef
4959
4959
define dep_autopatch_appsrc_script.erl
4960
4960
AppSrc = "$(call core_native_path,$(DEPS_DIR)/$1/src/$1.app.src)",
4961
4961
AppSrcScript = AppSrc ".script",
4962
- {ok, Conf0} = file:consult(AppSrc),
4962
Conf1 = case file:consult(AppSrc) of
4963
{ok, Conf0} -> Conf0;
4964
{error, enoent} -> []
4965
end,
4963
4966
Bindings0 = erl_eval:new_bindings(),
4964
- Bindings1 = erl_eval:add_binding('CONFIG', Conf0, Bindings0),
4967
Bindings1 = erl_eval:add_binding('CONFIG', Conf1, Bindings0),
4965
4968
Bindings = erl_eval:add_binding('SCRIPT', AppSrcScript, Bindings1),
4966
4969
Conf = case file:script(AppSrcScript, Bindings) of
4967
4970
{ok, [C]} -> C;
 
@@ -5829,6 5832,8 @@ endef
5829
5832
5830
5833
define bs_relx_config
5831
5834
{release, {$p_release, "1"}, [$p, sasl, runtime_tools]}.
5835
{dev_mode, false}.
5836
{include_erts, true}.
5832
5837
{extended_start_script, true}.
5833
5838
{sys_config, "config/sys.config"}.
5834
5839
{vm_args, "config/vm.args"}.
 
@@ -6185,6 6190,8 @@ endif
6185
6190
$(verbose) mkdir config/
6186
6191
$(verbose) $(call core_render,bs_sys_config,config/sys.config)
6187
6192
$(verbose) $(call core_render,bs_vm_args,config/vm.args)
6193
$(verbose) awk '/^include erlang.mk/ && !ins {print "BUILD_DEPS = relx";ins=1};{print}' Makefile > Makefile.bak
6194
$(verbose) mv Makefile.bak Makefile
6188
6195
6189
6196
new-app:
6190
6197
ifndef in
 
@@ -6278,9 6285,9 @@ ifeq ($(PLATFORM),msys2)
6278
6285
CXXFLAGS ?= -O3 -finline-functions -Wall
6279
6286
else ifeq ($(PLATFORM),darwin)
6280
6287
CC ?= cc
6281
- CFLAGS ?= -O3 -std=c99 -arch x86_64 -Wall -Wmissing-prototypes
6282
- CXXFLAGS ?= -O3 -arch x86_64 -Wall
6283
- LDFLAGS ?= -arch x86_64 -flat_namespace -undefined suppress
6288
CFLAGS ?= -O3 -std=c99 -Wall -Wmissing-prototypes
6289
CXXFLAGS ?= -O3 -Wall
6290
LDFLAGS ?= -flat_namespace -undefined suppress
6284
6291
else ifeq ($(PLATFORM),freebsd)
6285
6292
CC ?= cc
6286
6293
CFLAGS ?= -O3 -std=c99 -finline-functions -Wall -Wmissing-prototypes
 
@@ -6722,7 6729,7 @@ export DIALYZER_PLT
6722
6729
6723
6730
PLT_APPS ?=
6724
6731
DIALYZER_DIRS ?= --src -r $(wildcard src) $(ALL_APPS_DIRS)
6725
- DIALYZER_OPTS ?= -Werror_handling -Wrace_conditions -Wunmatched_returns # -Wunderspecs
6732
DIALYZER_OPTS ?= -Werror_handling -Wunmatched_returns # -Wunderspecs
6726
6733
DIALYZER_PLT_OPTS ?=
6727
6734
6728
6735
# Core targets.
 
@@ -7460,15 7467,13 @@ endif
7460
7467
# Copyright (c) 2013-2016, Loïc Hoguin <[email protected]>
7461
7468
# This file is part of erlang.mk and subject to the terms of the ISC License.
7462
7469
7470
ifeq ($(filter relx,$(BUILD_DEPS) $(DEPS) $(REL_DEPS)),relx)
7463
7471
.PHONY: relx-rel relx-relup distclean-relx-rel run
7464
7472
7465
7473
# Configuration.
7466
7474
7467
- RELX ?= $(ERLANG_MK_TMP)/relx
7468
7475
RELX_CONFIG ?= $(CURDIR)/relx.config
7469
7476
7470
- RELX_URL ?= https://erlang.mk/res/relx-v3.27.0
7471
- RELX_OPTS ?=
7472
7477
RELX_OUTPUT_DIR ?= _rel
7473
7478
RELX_REL_EXT ?=
7474
7479
RELX_TAR ?= 1
 
@@ -7477,12 7482,6 @@ ifdef SFX
7477
7482
RELX_TAR = 1
7478
7483
endif
7479
7484
7480
- ifeq ($(firstword $(RELX_OPTS)),-o)
7481
- RELX_OUTPUT_DIR = $(word 2,$(RELX_OPTS))
7482
- else
7483
- RELX_OPTS = -o $(RELX_OUTPUT_DIR)
7484
- endif
7485
-
7486
7485
# Core targets.
7487
7486
7488
7487
ifeq ($(IS_DEP),)
 
@@ -7497,21 7496,59 @@ distclean:: distclean-relx-rel
7497
7496
7498
7497
# Plugin-specific targets.
7499
7498
7500
- $(RELX): | $(ERLANG_MK_TMP)
7501
- $(gen_verbose) $(call core_http_get,$(RELX),$(RELX_URL))
7502
- $(verbose) chmod x $(RELX)
7499
define relx_release.erl
7500
{ok, Config} = file:consult("$(call core_native_path,$(RELX_CONFIG))"),
7501
{release, {Name, Vsn0}, _} = lists:keyfind(release, 1, Config),
7502
Vsn = case Vsn0 of
7503
{cmd, Cmd} -> os:cmd(Cmd);
7504
semver -> "";
7505
{semver, _} -> "";
7506
VsnStr -> Vsn0
7507
end,
7508
{ok, _} = relx:build_release(#{name => Name, vsn => Vsn}, Config),
7509
halt(0).
7510
endef
7503
7511
7504
- relx-rel: $(RELX) rel-deps app
7505
- $(verbose) $(RELX) $(if $(filter 1,$V),-V 3) -c $(RELX_CONFIG) $(RELX_OPTS) release
7512
define relx_tar.erl
7513
{ok, Config} = file:consult("$(call core_native_path,$(RELX_CONFIG))"),
7514
{release, {Name, Vsn0}, _} = lists:keyfind(release, 1, Config),
7515
Vsn = case Vsn0 of
7516
{cmd, Cmd} -> os:cmd(Cmd);
7517
semver -> "";
7518
{semver, _} -> "";
7519
VsnStr -> Vsn0
7520
end,
7521
{ok, _} = relx:build_tar(#{name => Name, vsn => Vsn}, Config),
7522
halt(0).
7523
endef
7524
7525
define relx_relup.erl
7526
{ok, Config} = file:consult("$(call core_native_path,$(RELX_CONFIG))"),
7527
{release, {Name, Vsn0}, _} = lists:keyfind(release, 1, Config),
7528
Vsn = case Vsn0 of
7529
{cmd, Cmd} -> os:cmd(Cmd);
7530
semver -> "";
7531
{semver, _} -> "";
7532
VsnStr -> Vsn0
7533
end,
7534
{ok, _} = relx:build_relup(Name, Vsn, undefined, Config [{output_dir, "$(RELX_OUTPUT_DIR)"}]),
7535
halt(0).
7536
endef
7537
7538
relx-rel: rel-deps app
7539
$(call erlang,$(call relx_release.erl),-pa ebin/)
7506
7540
$(verbose) $(MAKE) relx-post-rel
7507
7541
ifeq ($(RELX_TAR),1)
7508
- $(verbose) $(RELX) $(if $(filter 1,$V),-V 3) -c $(RELX_CONFIG) $(RELX_OPTS) tar
7542
$(call erlang,$(call relx_tar.erl),-pa ebin/)
7509
7543
endif
7510
7544
7511
- relx-relup: $(RELX) rel-deps app
7512
- $(verbose) $(RELX) $(if $(filter 1,$V),-V 3) -c $(RELX_CONFIG) $(RELX_OPTS) release
7545
relx-relup: rel-deps app
7546
$(call erlang,$(call relx_release.erl),-pa ebin/)
7513
7547
$(MAKE) relx-post-rel
7514
- $(verbose) $(RELX) $(if $(filter 1,$V),-V 3) -c $(RELX_CONFIG) $(RELX_OPTS) relup $(if $(filter 1,$(RELX_TAR)),tar)
7548
$(call erlang,$(call relx_relup.erl),-pa ebin/)
7549
ifeq ($(RELX_TAR),1)
7550
$(call erlang,$(call relx_tar.erl),-pa ebin/)
7551
endif
7515
7552
7516
7553
distclean-relx-rel:
7517
7554
$(gen_verbose) rm -rf $(RELX_OUTPUT_DIR)
 
@@ -7568,6 7605,7 @@ help::
7568
7605
" run Compile the project, build the release and run it"
7569
7606
7570
7607
endif
7608
endif
7571
7609
7572
7610
# Copyright (c) 2015-2016, Loïc Hoguin <[email protected]>
7573
7611
# Copyright (c) 2014, M Robert Martin <[email protected]>
 
@@ -7739,45 7777,224 @@ triq: test-build cover-data-dir
7739
7777
endif
7740
7778
endif
7741
7779
7742
- # Copyright (c) 2016, Loïc Hoguin <[email protected]>
7743
- # Copyright (c) 2015, Erlang Solutions Ltd.
7780
# Copyright (c) 2022, Loïc Hoguin <[email protected]>
7744
7781
# This file is part of erlang.mk and subject to the terms of the ISC License.
7745
7782
7746
- .PHONY: xref distclean-xref
7783
.PHONY: xref
7747
7784
7748
7785
# Configuration.
7749
7786
7750
- ifeq ($(XREF_CONFIG),)
7751
- XREFR_ARGS :=
7752
- else
7753
- XREFR_ARGS := -c $(XREF_CONFIG)
7754
- endif
7787
# We do not use locals_not_used or deprecated_function_calls
7788
# because the compiler will error out by default in those
7789
# cases with Erlang.mk. Deprecated functions may make sense
7790
# in some cases but few libraries define them. We do not
7791
# use exports_not_used by default because it hinders more
7792
# than it helps library projects such as Cowboy. Finally,
7793
# undefined_functions provides little that undefined_function_calls
7794
# doesn't already provide, so it's not enabled by default.
7795
XREF_CHECKS ?= [undefined_function_calls]
7755
7796
7756
- XREFR ?= $(CURDIR)/xrefr
7757
- export XREFR
7797
# Instead of predefined checks a query can be evaluated
7798
# using the Xref DSL. The $q variable is used in that case.
7758
7799
7759
- XREFR_URL ?= https://github.com/inaka/xref_runner/releases/download/1.1.0/xrefr
7800
# The scope is a list of keywords that correspond to
7801
# application directories, being essentially an easy way
7802
# to configure which applications to analyze. With:
7803
#
7804
# - app: .
7805
# - apps: $(ALL_APPS_DIRS)
7806
# - deps: $(ALL_DEPS_DIRS)
7807
# - otp: Built-in Erlang/OTP applications.
7808
#
7809
# The default is conservative (app) and will not be
7810
# appropriate for all types of queries (for example
7811
# application_call requires adding all applications
7812
# that might be called or they will not be found).
7813
XREF_SCOPE ?= app # apps deps otp
7814
7815
# If the above is not enough, additional application
7816
# directories can be configured.
7817
XREF_EXTRA_APP_DIRS ?=
7818
7819
# As well as additional non-application directories.
7820
XREF_EXTRA_DIRS ?=
7821
7822
# Erlang.mk supports -ignore_xref([...]) with forms
7823
# {M, F, A} | {F, A} | M, the latter ignoring whole
7824
# modules. Ignores can also be provided project-wide.
7825
XREF_IGNORE ?= []
7826
7827
# All callbacks may be ignored. Erlang.mk will ignore
7828
# them automatically for exports_not_used (unless it
7829
# is explicitly disabled by the user).
7830
XREF_IGNORE_CALLBACKS ?=
7760
7831
7761
7832
# Core targets.
7762
7833
7763
7834
help::
7764
7835
$(verbose) printf '%s\n' '' \
7765
7836
'Xref targets:' \
7766
- ' xref Run Xrefr using $$XREF_CONFIG as config file if defined'
7767
-
7768
- distclean:: distclean-xref
7837
' xref Analyze the project using Xref' \
7838
' xref q=QUERY Evaluate an Xref query'
7769
7839
7770
7840
# Plugin-specific targets.
7771
7841
7772
- $(XREFR):
7773
- $(gen_verbose) $(call core_http_get,$(XREFR),$(XREFR_URL))
7774
- $(verbose) chmod x $(XREFR)
7842
define xref.erl
7843
{ok, Xref} = xref:start([]),
7844
Scope = [$(call comma_list,$(XREF_SCOPE))],
7845
AppDirs0 = [$(call comma_list,$(foreach d,$(XREF_EXTRA_APP_DIRS),"$d"))],
7846
AppDirs1 = case lists:member(otp, Scope) of
7847
false -> AppDirs0;
7848
true ->
7849
RootDir = code:root_dir(),
7850
AppDirs0 [filename:dirname(P) || P <- code:get_path(), lists:prefix(RootDir, P)]
7851
end,
7852
AppDirs2 = case lists:member(deps, Scope) of
7853
false -> AppDirs1;
7854
true -> [$(call comma_list,$(foreach d,$(ALL_DEPS_DIRS),"$d"))] AppDirs1
7855
end,
7856
AppDirs3 = case lists:member(apps, Scope) of
7857
false -> AppDirs2;
7858
true -> [$(call comma_list,$(foreach d,$(ALL_APPS_DIRS),"$d"))] AppDirs2
7859
end,
7860
AppDirs = case lists:member(app, Scope) of
7861
false -> AppDirs3;
7862
true -> ["../$(notdir $(CURDIR))"|AppDirs3]
7863
end,
7864
[{ok, _} = xref:add_application(Xref, AppDir, [{builtins, true}]) || AppDir <- AppDirs],
7865
ExtraDirs = [$(call comma_list,$(foreach d,$(XREF_EXTRA_DIRS),"$d"))],
7866
[{ok, _} = xref:add_directory(Xref, ExtraDir, [{builtins, true}]) || ExtraDir <- ExtraDirs],
7867
ok = xref:set_library_path(Xref, code:get_path() -- (["ebin", "."] AppDirs ExtraDirs)),
7868
Checks = case {$1, is_list($2)} of
7869
{check, true} -> $2;
7870
{check, false} -> [$2];
7871
{query, _} -> [$2]
7872
end,
7873
FinalRes = [begin
7874
IsInformational = case $1 of
7875
query -> true;
7876
check ->
7877
is_tuple(Check) andalso
7878
lists:member(element(1, Check),
7879
[call, use, module_call, module_use, application_call, application_use])
7880
end,
7881
{ok, Res0} = case $1 of
7882
check -> xref:analyze(Xref, Check);
7883
query -> xref:q(Xref, Check)
7884
end,
7885
Res = case IsInformational of
7886
true -> Res0;
7887
false ->
7888
lists:filter(fun(R) ->
7889
{Mod, InMFA, MFA} = case R of
7890
{InMFA0 = {M, _, _}, MFA0} -> {M, InMFA0, MFA0};
7891
{M, _, _} -> {M, R, R}
7892
end,
7893
Attrs = try
7894
Mod:module_info(attributes)
7895
catch error:undef ->
7896
[]
7897
end,
7898
InlineIgnores = lists:flatten([
7899
[case V of
7900
M when is_atom(M) -> {M, '_', '_'};
7901
{F, A} -> {Mod, F, A};
7902
_ -> V
7903
end || V <- Values]
7904
|| {ignore_xref, Values} <- Attrs]),
7905
BuiltinIgnores = [
7906
{eunit_test, wrapper_test_exported_, 0}
7907
],
7908
DoCallbackIgnores = case {Check, "$(strip $(XREF_IGNORE_CALLBACKS))"} of
7909
{exports_not_used, ""} -> true;
7910
{_, "0"} -> false;
7911
_ -> true
7912
end,
7913
CallbackIgnores = case DoCallbackIgnores of
7914
false -> [];
7915
true ->
7916
Behaviors = lists:flatten([
7917
[BL || {behavior, BL} <- Attrs],
7918
[BL || {behaviour, BL} <- Attrs]
7919
]),
7920
[{Mod, CF, CA} || B <- Behaviors, {CF, CA} <- B:behaviour_info(callbacks)]
7921
end,
7922
WideIgnores = if
7923
is_list($(XREF_IGNORE)) ->
7924
[if is_atom(I) -> {I, '_', '_'}; true -> I end
7925
|| I <- $(XREF_IGNORE)];
7926
true -> [$(XREF_IGNORE)]
7927
end,
7928
Ignores = InlineIgnores BuiltinIgnores CallbackIgnores WideIgnores,
7929
not (lists:member(InMFA, Ignores)
7930
orelse lists:member(MFA, Ignores)
7931
orelse lists:member({Mod, '_', '_'}, Ignores))
7932
end, Res0)
7933
end,
7934
case Res of
7935
[] -> ok;
7936
_ when IsInformational ->
7937
case Check of
7938
{call, {CM, CF, CA}} ->
7939
io:format("Functions that ~s:~s/~b calls:~n", [CM, CF, CA]);
7940
{use, {CM, CF, CA}} ->
7941
io:format("Function ~s:~s/~b is called by:~n", [CM, CF, CA]);
7942
{module_call, CMod} ->
7943
io:format("Modules that ~s calls:~n", [CMod]);
7944
{module_use, CMod} ->
7945
io:format("Module ~s is used by:~n", [CMod]);
7946
{application_call, CApp} ->
7947
io:format("Applications that ~s calls:~n", [CApp]);
7948
{application_use, CApp} ->
7949
io:format("Application ~s is used by:~n", [CApp]);
7950
_ when $1 =:= query ->
7951
io:format("Query ~s returned:~n", [Check])
7952
end,
7953
[case R of
7954
{{InM, InF, InA}, {M, F, A}} ->
7955
io:format("- ~s:~s/~b called by ~s:~s/~b~n",
7956
[M, F, A, InM, InF, InA]);
7957
{M, F, A} ->
7958
io:format("- ~s:~s/~b~n", [M, F, A]);
7959
ModOrApp ->
7960
io:format("- ~s~n", [ModOrApp])
7961
end || R <- Res],
7962
ok;
7963
_ ->
7964
[case {Check, R} of
7965
{undefined_function_calls, {{InM, InF, InA}, {M, F, A}}} ->
7966
io:format("Undefined function ~s:~s/~b called by ~s:~s/~b~n",
7967
[M, F, A, InM, InF, InA]);
7968
{undefined_functions, {M, F, A}} ->
7969
io:format("Undefined function ~s:~s/~b~n", [M, F, A]);
7970
{locals_not_used, {M, F, A}} ->
7971
io:format("Unused local function ~s:~s/~b~n", [M, F, A]);
7972
{exports_not_used, {M, F, A}} ->
7973
io:format("Unused exported function ~s:~s/~b~n", [M, F, A]);
7974
{deprecated_function_calls, {{InM, InF, InA}, {M, F, A}}} ->
7975
io:format("Deprecated function ~s:~s/~b called by ~s:~s/~b~n",
7976
[M, F, A, InM, InF, InA]);
7977
{deprecated_functions, {M, F, A}} ->
7978
io:format("Deprecated function ~s:~s/~b~n", [M, F, A]);
7979
_ ->
7980
io:format("~p: ~p~n", [Check, R])
7981
end || R <- Res],
7982
error
7983
end
7984
end || Check <- Checks],
7985
stopped = xref:stop(Xref),
7986
case lists:usort(FinalRes) of
7987
[ok] -> halt(0);
7988
_ -> halt(1)
7989
end
7990
endef
7775
7991
7776
- xref: deps app $(XREFR)
7777
- $(gen_verbose) $(XREFR) $(XREFR_ARGS)
7778
-
7779
- distclean-xref:
7780
- $(gen_verbose) rm -rf $(XREFR)
7992
xref: deps app
7993
ifdef q
7994
$(verbose) $(call erlang,$(call xref.erl,query,"$q"),-pa ebin/)
7995
else
7996
$(verbose) $(call erlang,$(call xref.erl,check,$(XREF_CHECKS)),-pa ebin/)
7997
endif
7781
7998
7782
7999
# Copyright (c) 2016, Loïc Hoguin <[email protected]>
7783
8000
# Copyright (c) 2015, Viktor Söderqvist <[email protected]>
changed hex_metadata.config
 
@@ -19,18 19,18 @@
19
19
{<<"licenses">>,[<<"ISC">>]}.
20
20
{<<"links">>,
21
21
[{<<"Function reference">>,
22
- <<"https://ninenines.eu/docs/en/cowboy/2.9/manual/">>},
22
<<"https://ninenines.eu/docs/en/cowboy/2.10/manual/">>},
23
23
{<<"GitHub">>,<<"https://github.com/ninenines/cowboy">>},
24
24
{<<"Sponsor">>,<<"https://github.com/sponsors/essen">>},
25
- {<<"User guide">>,<<"https://ninenines.eu/docs/en/cowboy/2.9/guide/">>}]}.
25
{<<"User guide">>,<<"https://ninenines.eu/docs/en/cowboy/2.10/guide/">>}]}.
26
26
{<<"name">>,<<"cowboy">>}.
27
27
{<<"requirements">>,
28
28
[{<<"cowlib">>,
29
29
[{<<"app">>,<<"cowlib">>},
30
30
{<<"optional">>,false},
31
- {<<"requirement">>,<<"2.11.0">>}]},
31
{<<"requirement">>,<<"2.12.1">>}]},
32
32
{<<"ranch">>,
33
33
[{<<"app">>,<<"ranch">>},
34
34
{<<"optional">>,false},
35
35
{<<"requirement">>,<<"1.8.0">>}]}]}.
36
- {<<"version">>,<<"2.9.0">>}.
36
{<<"version">>,<<"2.10.0">>}.
changed rebar.config
 
@@ -1,4 1,4 @@
1
1
{deps, [
2
- {cowlib,".*",{git,"https://github.com/ninenines/cowlib","2.11.0"}},{ranch,".*",{git,"https://github.com/ninenines/ranch","1.8.0"}}
2
{cowlib,".*",{git,"https://github.com/ninenines/cowlib","2.12.1"}},{ranch,".*",{git,"https://github.com/ninenines/ranch","1.8.0"}}
3
3
]}.
4
4
{erl_opts, [debug_info,warn_export_vars,warn_shadow_vars,warn_obsolete_guard,warn_missing_spec,warn_untyped_record]}.
changed src/cowboy_http2.erl
 
@@ -849,7 849,13 @@ send_data(State0=#state{socket=Socket, transport=Transport, opts=Opts}, SendData
849
849
_ ->
850
850
Transport:send(Socket, Data)
851
851
end || Data <- Acc],
852
- State.
852
send_data_terminate(State, SendData).
853
854
send_data_terminate(State, []) ->
855
State;
856
send_data_terminate(State0, [{StreamID, IsFin, _}|Tail]) ->
857
State = maybe_terminate_stream(State0, StreamID, IsFin),
858
send_data_terminate(State, Tail).
853
859
854
860
prepare_data(State, [], Acc, []) ->
855
861
{lists:reverse(Acc), State};
 
@@ -859,8 865,7 @@ prepare_data(State0, [{StreamID, IsFin, SendData}|Tail], Acc0, Buffer0) ->
859
865
{Acc, Buffer, State} = prepare_data(State0, StreamID, IsFin, SendData, Acc0, Buffer0),
860
866
prepare_data(State, Tail, Acc, Buffer).
861
867
862
- prepare_data(State0, StreamID, IsFin, [], Acc, Buffer) ->
863
- State = maybe_terminate_stream(State0, StreamID, IsFin),
868
prepare_data(State, _, _, [], Acc, Buffer) ->
864
869
{Acc, Buffer, State};
865
870
prepare_data(State0, StreamID, IsFin, [FrameData|Tail], Acc, Buffer) ->
866
871
FrameIsFin = case Tail of