Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Issue with the proxy #1704

Open
priand opened this issue Aug 21, 2015 · 0 comments
Open

Issue with the proxy #1704

priand opened this issue Aug 21, 2015 · 0 comments

Comments

@priand
Copy link

priand commented Aug 21, 2015

The proxy service is calling getPathInfo() to compose the URL to redirect to but, according to the J2EE spec, this is decoding the URL while the proxy should pass it as is. For example, if the URL path contains an encoded '/', this should not be decoded. On the other hand, getRequestURI() returns the raw path, so this is what should be used.
The code in ProxyEndpointService should be changed as shown bellow:

    @Override
    protected void initProxy(HttpServletRequest request, HttpServletResponse response)
            throws ServletException {
        // PHIL: Fix the pathinfo to get it encoded
        //String pathInfo = request.getPathInfo();
        String _reqURI = request.getRequestURI();
        int w = _reqURI.indexOf("/proxy/");
        String pathInfo = _reqURI.substring(w);
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants