[MODAES-7] Configuration cannot be retrieved due to 502 errors Created: 29/Jul/20 Updated: 30/Jul/20 Resolved: 30/Jul/20 |
|
| Status: | Closed |
| Project: | ARCHIVED: mod-aes |
| Components: | None |
| Affects versions: | None |
| Fix versions: | 0.0.2 |
| Type: | Bug | Priority: | TBD |
| Reporter: | Matt Reno | Assignee: | Matt Reno |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original estimate: | Not Specified | ||
| Sprint: |
| 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" : [ ]
}
}
|