Apologies Daniel Templeton, I haven't been looking at this.
I also ran into the same issue a couple of months back, but didn't see this JIRA.
Just looked at the patch. It took me a little while, but I understood the problem and your patch.
The approach overall looks good to me.
I am sure you had to do a bit of testing and bringing that back may be some effort, but I got few comments
- The "append-/redirect" approach will fail if the AM URIs have query parameters.
- This is because, on the WebAppProxyServlet side -> methodAction(), it looks at HttpServletRequest.getPathInfo() which "returns any extra path information associated with the URL the client sent when it made this request. The extra path information follows the servlet path but precedes the query string and will start with a / character.".
- How about we instead go with a String target = redirectUrl + "/redirect" + httpReq.getRequestURI(); approach? Or something like that as a prefix..
- Also if we do that, we won't need (a) redirecting to the app-page (b) the internal "R" hack to let the app-pages know (c) changing AppBlock etc? We can simply look for paths of the form "http://RM-proxyAddress/proxy/cluster/application_id/redirect" and treat them separately by sending them to an error-page?
- Also inject the 'wrong' proxy-address and add a test-case which proves the patch?
Let me know how I can help in push this forward.
Also looking at a 2.8.0 RC0 this weekend / beginning next week - let's see if we can get this moving before that?