diff --git a/doc/configuration.txt b/doc/configuration.txt index 2f1e57e44..7a5903ce7 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -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" diff --git a/scripts/run-regtests.sh b/scripts/run-regtests.sh index 5eaaf0f6c..c6477cb8d 100755 --- a/scripts/run-regtests.sh +++ b/scripts/run-regtests.sh @@ -302,7 +302,7 @@ jobcount="" verbose="-q" debug="" keep_logs="-l" -no_htx="#" +no_htx="no " testlist="" _process "$@"; diff --git a/src/proxy.c b/src/proxy.c index 276fc425b..a3f355f64 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -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); }