mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 14:30:28 -05:00
The controller read path parameters from the decoded JAX-RS path and
substituted them into the integration URI, so a path with an encoded space
threw from URI.create and answered 500 without reaching the backend. An
encoded ? or # cut the backend path short, %2F became a separator and %252F
lost a level of encoding.
Read the target URL's path parameters from the raw request path, for REST
HTTP_PROXY, REST HTTP and HTTP API HTTP_PROXY integrations. A value mapped
from elsewhere is percent-encoded. $request.path.X and header mappings keep
the decoded value. An integration URI that cannot be parsed now answers 502.
Routes match on the decoded path, so an encoded slash ahead of a parameter
shifts the segments read off the raw path. /a%2Fb/c/d on /a/b/{proxy+} called
the backend with /backend/d. A raw value that does not decode to the decoded
parameter is now ignored, and the decoded value is encoded instead. Comparing
values rather than literal segments also covers templates with no literals,
such as /{x}/{y}/{z+} and the HTTP API route /{x}/{y+}.