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)
    • 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

              wiper Andris Zeila
              dimitri.bellini Dimitri Bellini
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated: