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

Issue with the proxy #1704

Open
Open
@priand

Description

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);

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions