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

No way to UNset HTTP header. Or documentation is outdated

XMLWordPrintable

    • Sprint 76 (May 2021), Sprint 77 (Jun 2021), Sprint 78 (Jul 2021), Sprint 79 (Aug 2021), Sprint 80 (Sep 2021), Sprint 81 (Oct 2021), Sprint 82 (Nov 2021), Sprint 83 (Dec 2021), Sprint 84 (Jan 2022), Sprint 85 (Feb 2022), Sprint 86 (Mar 2022), Sprint 87 (Apr 2022), Sprint 88 (May 2022), Sprint 89 (Jun 2022), Sprint 90 (Jul 2022), Sprint 92 (Sep 2022), Sprint 93 (Oct 2022)
    • 0.5

      https://www.zabbix.com/documentation/5.0/manual/web_monitoring
      says:

      For example, setting a 'User-Agent' attribute with no value will remove the User-Agent value set on scenario level.

      but when you try to do that and update scenario, you get an error:

      Invalid parameter "/1/headers/1/value": cannot be empty. [httpconf.php:389 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHttpTest->update() → CHttpTest->validateUpdate() → CApiService::exception() in include/classes/api/services/CHttpTest.php:417]
      

      (added in Aug 2022 - the error happens if you try to add Header "User-Agent" at scenario level.
      This is how the original documentation was threaded by real zabbix user)

      For the particular case I found a workaround - select "Agent" drop-down as "other ..." and leave "User agent string" field empty. Checked in wireshark that generated HTTP GET does not have "User-Agent" header at all.

      One of should be fixed: documentation or ability to specify header with empty value, as currently documented.

      Note: with the workaround only 2 headers set, they are:

      Host: <FQDN from scenario step>
      Accept: */*
      

            rlataria Roberts Lataria (Inactive)
            zalex_ua Oleksii Zagorskyi
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: