MAJOR: htx: Enable the HTX mode by default for all proxies
The legacy HTTP mode is no more the default one. So now, by default, without any option in your configuration, all proxies will use the HTX mode. The line "option http-use-htx" in proxy sections are now useless, except to cancel the legacy HTTP mode. To fallback on legacy HTTP mode, you should use the line "no option http-use-htx" explicitly. Note that the reg-tests still work by default on legacy HTTP mode. The HTX will be enabled by default in a futur commit.
This commit is contained in:
parent
0ef372a390
commit
1d2b586cdd
|
@ -6224,28 +6224,28 @@ no option http-use-htx
|
|||
yes | yes | yes | yes
|
||||
Arguments : none
|
||||
|
||||
By default, the HTTP protocol is processed as-is. Inserting, deleting, or
|
||||
Historically, the HTTP protocol is processed as-is. Inserting, deleting, or
|
||||
modifying a header field requires to rewrite the affected part in the buffer
|
||||
and to move the buffer's tail accordingly. Since this principle has deep
|
||||
roots in haproxy, the HTTP/2 protocol is converted to HTTP/1.1 before being
|
||||
processed this way. It also results in the inability to establish HTTP/2
|
||||
connections to servers because of the loss of HTTP/2 semantics in the HTTP/1
|
||||
representation.
|
||||
and to move the buffer's tail accordingly. This mode is known as the legacy
|
||||
HTTP mode. Since this principle has deep roots in haproxy, the HTTP/2
|
||||
protocol is converted to HTTP/1.1 before being processed this way. It also
|
||||
results in the inability to establish HTTP/2 connections to servers because
|
||||
of the loss of HTTP/2 semantics in the HTTP/1 representation.
|
||||
|
||||
HTX is the name of a totally new native internal representation for the HTTP
|
||||
protocol, that is agnostic to the version and aims at preserving semantics
|
||||
all along the chain. It relies on a fast parsing, tokenizing and indexing of
|
||||
the protocol elements so that no more memory moves are necessary and that
|
||||
most elements are directly accessed. This mechanism is still limited to the
|
||||
most basic operations (no compression, filters, Lua, applets, cache, etc).
|
||||
But it supports using either HTTP/1 or HTTP/2 on any side regardless of the
|
||||
other side's version.
|
||||
most elements are directly accessed. It supports using either HTTP/1 or
|
||||
HTTP/2 on any side regardless of the other side's version. It also supports
|
||||
upgrades from TCP to HTTP and implicit ones from HTTP/1 to HTTP/2 (matching
|
||||
the HTTP/2 preface).
|
||||
|
||||
This option indicates that HTX needs to be used. It will cause errors to be
|
||||
emitted if incompatible features are used, but will allow H2 to be selected
|
||||
as a server protocol. It is recommended to use this option on new reasonably
|
||||
simple configurations, but since the feature still has incomplete functional
|
||||
coverage, it is not enabled by default.
|
||||
This option indicates that HTX needs to be used. Since the version 2.0-dev3,
|
||||
the HTX is the default mode. To switch back on the legacy HTTP mode, the
|
||||
option must be explicitly disabled using the "no" prefix. For prior versions,
|
||||
the feature has incomplete functional coverage, so it is not enabled by
|
||||
default.
|
||||
|
||||
See also : "mode http"
|
||||
|
||||
|
|
|
@ -302,7 +302,7 @@ jobcount=""
|
|||
verbose="-q"
|
||||
debug=""
|
||||
keep_logs="-l"
|
||||
no_htx="#"
|
||||
no_htx="no "
|
||||
testlist=""
|
||||
|
||||
_process "$@";
|
||||
|
|
|
@ -820,6 +820,9 @@ void init_new_proxy(struct proxy *p)
|
|||
/* initial uuid is unassigned (-1) */
|
||||
p->uuid = -1;
|
||||
|
||||
/* HTX is the default mode, for HTTP and TCP */
|
||||
p->options2 |= PR_O2_USE_HTX;
|
||||
|
||||
HA_SPIN_INIT(&p->lock);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue