Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-27032

Not possible retrieve only header from JavaScript request.head() method

XMLWordPrintable

    • Prev.Sprint, S25-W42/43
    • 2

      https://www.zabbix.com/documentation/7.4/en/manual/config/items/preprocessing/javascript/javascript_objects#httprequest

      Support to use:

      head(url)

      But in practice, it reports an empty result. This is the contents of "head.js":

      var request = new HttpRequest();
      return request.head("https://www.zabbix.com");

      After testing with:

      zabbix_js -s head.js -p 1

      It reports an empty result. With request.get("https://www.zabbix.com") it works fine.

      The source code responsible for the request seems to be:
      https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/libs/zbxembed/httprequest.c?at=release%2F7.0

      Expected is a similar output as with "curl" from the command line:

      curl --head https://www.zabbix.com/

            MVekslers Michael Veksler
            aigars.kadikis Aigars Kadikis
            Team B
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - 16h Original Estimate - 16h
                16h
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 42h
                42h