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

Details

    • Team C
    • 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)
    • 0.25

    Description

      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]
      

      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: */*
      

      Attachments

        Activity

          People

            rlataria Roberts Lataria
            zalex_ua Oleksii Zagorskyi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: