protocol.http.InvalidPath error ONLY with squre bracket [ ] in path, encoded or raw

I have encountered an issue similar to this one where I get 400 "protocol.http.InvalidPath" with raw square bracket ([ and ]) or encoded square bracket (%5B and %5D). For example:

 https://my.apigee.host/api/files[].txt

or

https://my.apigee.host/api/files%5B%5D.txt



I did further testing with other special characters, both raw and URL encoded, in path and in query parameter, and here is what I observed:

  • When any encoded or raw special characters are in query parameter, Apigee (or Message Processor) accepts them
  • When raw or encoded non-bracket special characters (like { } or ( )) are in path, Apigee accepts them
  • When raw or encoded brackets are in path, Apigee throws 400 InvalidPath

No matter whether the brackets are encoded or not, error message always shows raw brackets like:

{
"fault": {
"faultstring": "Invalid path GET /files[].txt HTTP/1.1",
"detail": {
"errorcode": "protocol.http.InvalidPath"
}
}
}
 
Is this something configurable on Apigee? Is there a solution to fixing the issue?
2 0 71
0 REPLIES 0