Uploaded image for project: 'mod-aes'
  1. mod-aes
  2. MODAES-7

Configuration cannot be retrieved due to 502 errors

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • TBD
    • Resolution: Done
    • None
    • 0.0.2
    • None

    Description

      When sending the GET /configurations/entries request, we use CQL in the query parameter. This includes white space around the CQL operators. Assuming nginx is in front of Okapi in the FOLIO deployment, for whatever reason, it will return a 502 (Bad Gateway) for a request that has query parameters with unencoded spaces.

      We should URL encode the "query" string so that nginx will allow this query.

      Example via curl:

      $ curl -X GET   'https://okapi.example.com/configurations/entries?query=(module=AES and configName=routing_rules)&limit=2147483647'  -H 'content-type: application/json' -H 'x-okapi-tenant: <some-tenant-id>'   -H 'x-okapi-token: <some-token>'
      <html>
      <head><title>502 Bad Gateway</title></head>
      <body bgcolor="white">
      <center><h1>502 Bad Gateway</h1></center>
      </body>
      </html>
      

      Same query with spaces encoded to %20:

      $ curl -X GET   'https://okapi.example.com/configurations/entries?query=(module=AES%20and%20configName=routing_rules)&limit=2147483647' -H 'content-type: application/json' -H 'x-okapi-tenant: <some-tenant-id>'   -H 'x-okapi-token: <some-token>
      {
        "configs" : [ ],
        "totalRecords" : 0,
        "resultInfo" : {
          "totalRecords" : 0,
          "facets" : [ ],
          "diagnostics" : [ ]
        }
      }
      

      TestRail: Results

        Attachments

          Activity

            People

              mreno Mathew Reno
              mreno Mathew Reno
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                TestRail: Runs

                  TestRail: Cases