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

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

      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

            dgoloscapov Dmitrijs Goloscapovs
            dimitri.bellini Dimitri Bellini
            Team A
            Votes:
            5 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: