]> 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 10:34:21 +0000 (13:34 +0300)
Support for parsing +http-plain-get and +http-plain-post options was
broken. This commit fixes that.

bin/dig/dig.c

index 5452ec8e0eb2186cb207407a4633abb83b049fad..2142f9696aa7c703fbdb47040c73275bdf102719 100644 (file)
@@ -1552,12 +1552,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;
                                        }