You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
seanmonstar opened this issue
May 10, 2018
· 3 comments
Labels
A-serverArea: server.C-featureCategory: feature. This is adding a new feature.E-easyEffort: easy. A task that would be a great starting point for a new contributor.
The default server now supports both HTTP/1 and 2 automatically. Just like there is an option to set http2_only, there should probably also be an http1_only option, if for some reason someone didn't want to allow HTTP2 support.
The text was updated successfully, but these errors were encountered:
When the http1_only mode is added, the behavior when the argument of http2_only(enabled) is false becomes undefined (there are two possible modes whether the fallback is required or not).
It seems to be better to separate the configuration for the protocol (using HTTP/1 or HTTP/2) and upgrading (to enable/disable the fallback to h2 when using h1).
I actually think all cases make sense, even though they may conflict with each other. Trying to set http1_only(true) and http2_only(true) would of course be invalid. It could be asserted, or it could simply take the latter call.
I've just created an PR for resolving this issue, just adding http1_only to Connection and Builder.
The flag field http2 in the struct Http has replaced with an enum which has three modes (http1_only, http2_only and fallback).
When http2_only(false) or http1_only(false) are called, the inner mode is set to "fallback".
A new configuration http1_only to Builder and Connection are added, which indicates that the upgrading to h2 does not perform when a parsing error occurs.
Fixes#1512.
A-serverArea: server.C-featureCategory: feature. This is adding a new feature.E-easyEffort: easy. A task that would be a great starting point for a new contributor.
The default server now supports both HTTP/1 and 2 automatically. Just like there is an option to set
http2_only
, there should probably also be anhttp1_only
option, if for some reason someone didn't want to allow HTTP2 support.The text was updated successfully, but these errors were encountered: