Hi,
Greeting to the community!
I've encountered an issue with Apigee X platform where the request urls are getting encoded incorrectly.
Example request I tried from postman is : GET https://api.xyz.com/example?test=123+abc
The url seems to be consistent in Load Balancer logs, and as soon as it reaches Apigee X, in trace session logs, I see it is encoded as https://api.xyz.com/example?test=123%20abc instead of https://api.xyz.com/example?test=123%2Babc .
Which is then forwarded incorrectly to the target server.
I'm currently not sure if this is due to Apigee or do I need to add some additional property in proxy configuration. Have anyone faced a similar issue and any possible resolution for the same?
Thanks,
Solved! Go to Solution.
The IETF standard regarding encoding characters within query strings with HTTP urls, is... maybe not easily discoverable . The relevant spec is RFC 3986.
Section 2.2 of that specification says that plus characters must be % encoded, if you want to transmit them.
It seems like you want to transmit a plus, not a space. So percent-encode it before you send it.
@Pratyush_ wrote:
I see it is encoded as https://api.xyz.com/example?test=123%20abc
This is correct behavior, based on what you're telling me.
BTW, this is the advice Gemini has to offer on the subject: