Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
TBD
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 0.0.2
-
Labels:None
-
Template:customfield_11100 38291
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" : [ ] } }