If there is an encoded Url path segment in an incoming Url, zuul decodes that part before forwarding it to the routed host. For eg. if the servlet path is A/B/C/D%2FE ( %2F is encoding the '/' character). the route host is called with A/B/C/D/E.
I wish to have it passed as-is ie. A/B/C/D%2FE.
It would be great if I could set a zuul property like zuul.decodeUrls=false and bypass decoding. A possible option is to handle this in PreDecorationFilter where it uses a UrlHelper object, to set urlHelper.setUrlDecode(false) based on that property.
Comment From: bibordoloi
I closed this because I realized the zuul does try to re-encode the url in ProxyRequestHelper. But in this case, it is not able to re-encode because it loses track of the original encoding (%2F) and interprets it as a /. This I think is a different issue that the original.
Comment From: Dheeraprabhakar
I face the same issue of zuul decoding encoded parts of the URL before sending it to the destination. I am unable to capture where exactly this is happening (wrote a custom route filter too) but to no avail. In my route filter, I do see the request url constructed just fine (http://blahblah.com/aa/bb/cc%2Fdd%2Fee). But my destination logs show this -> http://blahblah.com/aa/bb/cc/dd/ee and it returns a HTTP 404. Any idea how to overcome this?