Browse Source

Don't filter HTTP/2 options

It's not a big gain and causes issues when forgetting to update
the list. Maybe it can be added back again at a later time.
Loïc Hoguin 5 years ago
parent
commit
7d70e77d9f
1 changed files with 2 additions and 11 deletions
  1. 2 11
      src/cow_http2_machine.erl

+ 2 - 11
src/cow_http2_machine.erl

@@ -191,7 +191,7 @@ init(client, Opts) ->
 	NextSettings = settings_init(Opts),
 	client_preface(#http2_machine{
 		mode=client,
-		opts=only_keep_relevant_opts(Opts),
+		opts=Opts,
 		preface_timer=start_timer(preface_timeout, Opts),
 		settings_timer=start_timer(settings_timeout, Opts),
 		next_settings=NextSettings,
@@ -201,22 +201,13 @@ init(server, Opts) ->
 	NextSettings = settings_init(Opts),
 	common_preface(#http2_machine{
 		mode=server,
-		opts=only_keep_relevant_opts(Opts),
+		opts=Opts,
 		preface_timer=start_timer(preface_timeout, Opts),
 		settings_timer=start_timer(settings_timeout, Opts),
 		next_settings=NextSettings,
 		local_streamid=2
 	}).
 
-%% We remove the options that are part of SETTINGS or that are not known.
-only_keep_relevant_opts(Opts) ->
-	maps:with([
-		initial_connection_window_size,
-		max_encode_table_size,
-		max_frame_size_sent,
-		settings_timeout
-	], Opts).
-
 start_timer(Name, Opts) ->
 	case maps:get(Name, Opts, 5000) of
 		infinity -> undefined;