Incorrect processing of headers in JS based templates, for example OpenStack by HTTP

XMLWordPrintable

    • Support backlog
    • 2

      Steps to reproduce:

      1. Configure monitoring of the openstack with OpenStack by HTTP
      2. get not working item Get access token and service catalog, since it returns x-subject-token

      Modify:

      try {
       token = headers["X-Subject-Token"][0];

      with this one:

      try {
       token = headers["x-subject-token"][0];

      And it starts working.

      Expected:
      According to the HTTP specification (RFC 7230), header field names are case-insensitive.
      Issue itself: parseHttpData function on this line:

      token = headers["X-Subject-Token"][0];
      

      Something like this:

          for (const key in headers) {
              if (key.toLowerCase() === 'x-subject-token') {
                  if (Array.isArray(headers[key]) && headers[key].length > 0) {
                      token = headers[key][0];
                  }
                  break;
              }
          }
      

            Assignee:
            Aleksejs Abrosimovs
            Reporter:
            Edgar Akhmetshin
            Team INT
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 37h
                37h