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.
Log in to post a comment.