Hi,
A set of pages I need to download using httpunit all have the same code near the top with a recursive iframe:
<iframe name="printIframe" id="printIframe" width="0" height="0" src="?ExpandNote=ALL"></iframe>
I'm not entirely sure what it's for, I think it's used when a viewer clicks a "print me" button, so they get an expanded view of the page (instead of a "folded" view that is normally shown).
However, httpunit, loads the first page, follows the link for the iframe..... and takes all the CPU, java runs out of heap etc.
Is there a way I can limit the depth to which httpunit will follow links in iframe/frames? Limiting it to 10 or so should work for most real websites but stop things like this breaking httpunit. Failing that, is there an option to turn link following off completely for iframes.
btw, it appears that browsers (IE & Firefox) can cope with this, and detect the condition.
Thanks, Tony.
I have now found the way of turning off iframe following:
wc.getClientProperties().setIframeSupported(supportIframes);
but I'm still thinking about a "depth limit".
Tony, thanks for your proposal I have moved it to the feature request section.
Please supply a patch if you'd like to get this added.
You might want to join the developers mailing list to discuss this in more detail.