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

HttpRequest getHeaders() returns only last occurrence of multiple header fields with the same name

    XMLWordPrintable

Details

    • Team A
    • 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)
    • 0.5

    Description

      Steps to reproduce:

      • Create a script item to retrive an url that sets multiple cookies on request ex:

      req = new HttpRequest();
      resp=req.post("http://{$BASE_IP}/lua/api",payload);
      return JSON.stringify(req.getHeaders()['Set-Cookie']);

      Result
      Only last 'Set-Cookie' header is returned

      Expected
      An array or some other way to retrive all 'Set-Cookie' headers

      Attachments

        Issue Links

          Activity

            People

              martins-v Martins Valkovskis
              dimitri.bellini Dimitri Bellini
              Votes:
              4 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated: