MINOR: acl: Add HTTP_2.0 predefined macro
HTTP_2.0 predefined macro returns true for HTTP/2 requests. HTTP/2 doen't
convey a version information, so this macro may seem a bit strange. But for
compatiblity reasons, internally, the "HTTP/2.0" version is set. Thus, it is
handy to rely on it to differenciate HTTP/1 and HTTP/2 requests.
diff --git a/doc/configuration.txt b/doc/configuration.txt
index c25e2ce..6b52609 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@ -19503,6 +19503,7 @@
HTTP req.proto_http match if request protocol is valid HTTP
HTTP_1.0 req.ver 1.0 match if HTTP request version is 1.0
HTTP_1.1 req.ver 1.1 match if HTTP request version is 1.1
+HTTP_2.0 req.ver 2.0 match if HTTP request version is 2.0
HTTP_CONTENT req.hdr_val(content-length) gt 0 match an existing content-length in the HTTP request
HTTP_URL_ABS url_reg ^[^/:]*:// match absolute URL with scheme
HTTP_URL_SLASH url_beg / match URL beginning with "/"
diff --git a/src/acl.c b/src/acl.c
index 54324c5..655f9f4 100644
--- a/src/acl.c
+++ b/src/acl.c
@@ -755,6 +755,7 @@
{ .name = "HTTP", .expr = {"req.proto_http",""}},
{ .name = "HTTP_1.0", .expr = {"req.ver","1.0",""}},
{ .name = "HTTP_1.1", .expr = {"req.ver","1.1",""}},
+ { .name = "HTTP_2.0", .expr = {"req.ver","2.0",""}},
{ .name = "METH_CONNECT", .expr = {"method","CONNECT",""}},
{ .name = "METH_DELETE", .expr = {"method","DELETE",""}},
{ .name = "METH_GET", .expr = {"method","GET","HEAD",""}},