DescriptionI ran into a container configuration related issue while testing out RC2, which is that the CSS rewriter doesn't seem to be taking the container into account when rewriting embedded URL's -- it always uses the default container configuration which ends up giving me invalid proxy URL's in my rewritten CSS. This appears to be due to the fact that the CssResponseRewriter uses the DomWalker.makeGadget method to create a Gadget instance to pass to the ProxyUriManager.ProxyUri constructor, but the GadgetContext inside that Gadget instance doesnt have the container set, which makes code that runs later in the ProxyUriManager to generate the proxy URL use the default container configuration instead of my custom container configuration.
I was able to come up with a patch to work around this issue, but I'm not sure if its the best way to go about it... There is a lot of code around the whole gadget rewriting process and I definitely don't have my head wrapped around all of it -- but I thought I'd take a crack at it anyway, if for nothing else to at least highlight where the issue is occurring. The two major changes I made were to add another parameter to the DomWalker.makeGadget method for the container, and passing the container down through the call stack in the CssResponseRewriter. For any other usages of the affected classes which broke -- if there was an obvious place to pull the container from (like a Gadget instance) I used it -- otherwise I just passed in null to trigger the default behavior (which is to return the default container).
The JIRA ticket for this patch is:
https://issues.apache.org/jira/browse/SHINDIG-1411
Patch Set 1 #Patch Set 2 : The first patch set wasnt based right - this patch set should be properly based on the current trunk #
Total comments: 4
Patch Set 3 : Updates per comments #
Total comments: 18
Patch Set 4 : Updates per comments #
Total comments: 12
Patch Set 5 : Updates per comments #MessagesTotal messages: 18
|