]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
DIG: mark HTTP GET method in output
authorArtem Boldariev <artem@boldariev.com>
Wed, 17 Aug 2022 14:35:28 +0000 (17:35 +0300)
committerArtem Boldariev <artem@boldariev.com>
Thu, 18 Aug 2022 11:24:43 +0000 (14:24 +0300)
This commit makes dig mark the usage of HTTP(S) GET protocol usage in
its output.

(cherry picked from commit f86d8c62b01a7ae88a3543ba85c41834e64d011a)

bin/dig/dig.c

index afa67617187f7a69a726d18096ebac71770b96d7..4c62d0c5f9d335b8f169394d90654b27ef18f57a 100644 (file)
@@ -365,9 +365,11 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
                        proto = "TLS";
                } else if (query->lookup->https_mode) {
                        if (query->lookup->http_plain) {
-                               proto = "HTTP";
+                               proto = query->lookup->https_get ? "HTTP-GET"
+                                                                : "HTTP";
                        } else {
-                               proto = "HTTPS";
+                               proto = query->lookup->https_get ? "HTTPS-GET"
+                                                                : "HTTPS";
                        }
                } else if (query->lookup->tcp_mode) {
                        proto = "TCP";