]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: cfgparse: rename "rev@" prefix to "rhttp@"
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 20 Oct 2023 09:34:46 +0000 (11:34 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 20 Oct 2023 12:44:37 +0000 (14:44 +0200)
'rev@' was used to specify a bind/server used with reverse HTTP
transport. This notation was deemed not explicit enough. Rename it
'rhttp@' instead.

doc/configuration.txt
include/haproxy/listener-t.h
reg-tests/connection/reverse_connect_full.vtc
reg-tests/connection/reverse_server.vtc
reg-tests/connection/reverse_server_name.vtc
src/cfgparse.c
src/tools.c

index 7ef9d724f1e55e2ba3a1751cfd733881c535e140..50fe882d078752c64fc3c96aef3757de8f6ff2e6 100644 (file)
@@ -4977,10 +4977,11 @@ bind /<path> [, ...] [param*]
                     - 'quic6@' -> address is resolved as IPv6 and protocol UDP
                       is used. The performance note for QUIC over IPv4 applies
                       as well.
-                    - 'rev@' -> used for reverse HTTP. Address must be a server
-                      with the format '<backend>/<server>'. The server will be
-                      used to instantiate connections to a remote address. The
-                      listener will try to maintain 'maxconn' connections.
+                    - 'rhttp@' -> used for reverse HTTP. Address must be a
+                      server with the format '<backend>/<server>'. The server
+                      will be used to instantiate connections to a remote
+                      address. The listener will try to maintain 'maxconn'
+                      connections.
 
                   You may want to reference some environment variables in the
                   address parameter, see section 2.3 about environment
@@ -11534,7 +11535,7 @@ server <name> <address>[:[port]] [param*]
                       one of them over the FD. The bind part will use the
                       received socket as the client FD. Should be used
                       carefully.
-                    - 'rev@'   -> custom address family for a passive server in
+                    - 'rhttp@' -> custom address family for a passive server in
                       HTTP reverse context.
               You may want to reference some environment variables in the
               address parameter, see section 2.3 about environment
index bb431317693364c255591ffc97e33b86ba979824..6b2fc66a7765e1c41463016041fff2d8fec1729f 100644 (file)
@@ -208,7 +208,7 @@ struct bind_conf {
        char *arg;                 /* argument passed to "bind" for better error reporting */
        char *file;                /* file where the section appears */
        int line;                  /* line where the section appears */
-       char *reverse_srvname;     /* name of server when using "rev@" address */
+       char *reverse_srvname;     /* name of server when using "rhttp@" address */
        int reverse_nbconn;        /* count of connections to initiate in parallel */
        __decl_thread(HA_RWLOCK_T sni_lock); /* lock the SNI trees during add/del operations */
        struct thread_set thread_set; /* entire set of the allowed threads (0=no restriction) */
index 1124f6a4671b346b9dea303026f90178b337145f..3978739a7d4b8cd2c8433162af3ee4a58a9f5abf 100644 (file)
@@ -21,7 +21,7 @@ frontend pub
        use_backend be-reverse
 
 backend be-reverse
-       server dev rev@
+       server dev rhttp@
 
 frontend priv
        bind "fd@${priv}" proto h2
@@ -37,7 +37,7 @@ defaults
        mode http
 
 frontend fe
-       bind "rev@be-pre-connect/srv" maxconn 1
+       bind "rhttp@be-pre-connect/srv" maxconn 1
        use_backend be
 
 backend be-pre-connect
index 43edcdfeafee1899f085ebf695c324ef12ca8bec..ec631f6e2c9bb0397b02df113331acc0ccb1e0b2 100644 (file)
@@ -18,7 +18,7 @@ frontend pub
        use_backend be-reverse
 
 backend be-reverse
-       server dev rev@
+       server dev rhttp@
 
 frontend priv
        bind "fd@${priv}" proto h2
index 76473d541658f577105549916717e421b708c973..667b15f844a96f40c78c6b242e8ae6697dd8e660 100644 (file)
@@ -19,7 +19,7 @@ frontend pub
        use_backend be-reverse
 
 backend be-reverse
-       server dev rev@ ssl sni hdr(x-name) verify none
+       server dev rhttp@ ssl sni hdr(x-name) verify none
 
 frontend priv
        bind "fd@${priv}" ssl crt ${testdir}/common.pem verify required ca-verify-file ${testdir}/ca-auth.crt alpn h2
index 99d6d6bf98433b7545f71d73973fcbf8b84e6d05..310214464c716be9a03afbcf2fc87a290931b860 100644 (file)
@@ -174,7 +174,7 @@ int str2listener(char *str, struct proxy *curproxy, struct bind_conf *bind_conf,
                                goto fail;
                        }
 
-                       bind_conf->reverse_srvname = strdup(str + strlen("rev@"));
+                       bind_conf->reverse_srvname = strdup(str + strlen("rhttp@"));
                        if (!bind_conf->reverse_srvname) {
                                memprintf(err, "Cannot allocate reverse HTTP bind.\n");
                                goto fail;
index b26e3efee37cdc5a2230a36fd548b69fe115ee5a..45f519ab8cd9d09744c553ca3c4bba7460c6bc96 100644 (file)
@@ -1101,7 +1101,7 @@ struct sockaddr_storage *str2sa_range(const char *str, int *port, int *low, int
                str2 += 9;
                ss.ss_family = AF_CUST_SOCKPAIR;
        }
-       else if (strncmp(str2, "rev@", 3) == 0) {
+       else if (strncmp(str2, "rhttp@", 3) == 0) {
                str2 += 4;
                ss.ss_family = AF_CUST_REV_SRV;
        }