]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
DIG: fix handling of +http-plain-{get, post} options
authorArtem Boldariev <artem@boldariev.com>
Wed, 17 Aug 2022 10:19:32 +0000 (13:19 +0300)
committerArtem Boldariev <artem@boldariev.com>
Thu, 18 Aug 2022 11:24:27 +0000 (14:24 +0300)
Support for parsing +http-plain-get and +http-plain-post options was
broken. This commit fixes that.

(cherry picked from commit fb135867644684a21d79bc3a5cebe3c83217a221)

bin/dig/dig.c

index c23b96e7f6d8883d8a3a5ced7fc08565721c6855..afa67617187f7a69a726d18096ebac71770b96d7 100644 (file)
@@ -1558,12 +1558,12 @@ plus_option(char *option, bool is_batchfile, bool *need_clone,
                                        FULLCHECK("http-plain");
                                        break;
                                case '-':
-                                       switch (cmd[6]) {
+                                       switch (cmd[11]) {
                                        case 'p':
-                                               FULLCHECK("https-plain-post");
+                                               FULLCHECK("http-plain-post");
                                                break;
                                        case 'g':
-                                               FULLCHECK("https-plain-get");
+                                               FULLCHECK("http-plain-get");
                                                lookup->https_get = true;
                                                break;
                                        }