Policy: Routing fix URL encoding. #1208
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit fixes an issue when a special character uses some encoding.
The value to the upstream API if the routing policy was used, is also
encoded, so something like "/foo/test space" should land in APICast as:
/foo/test%20space/
And the path to the Upstream API should contain
test%20space
, butbecause
ngx.req.set_uri
mark the URL to be encoded again, the URL thatwill be received in the Upstream API will be
/test%2520space/
This commit keeps the URL encoding correctly across all the flow.
Fix THREESCALE-5454
Signed-off-by: Eloy Coto [email protected]