#181 Recursive iframe.

open
None
5
2009-08-19
2009-01-14
Tony Mudd
No

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.

Discussion

  • Tony Mudd

    Tony Mudd - 2009-01-15

    I have now found the way of turning off iframe following:
    wc.getClientProperties().setIframeSupported(supportIframes);

    but I'm still thinking about a "depth limit".

     
  • Wolfgang Fahl

    Wolfgang Fahl - 2009-08-19

    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.

     
  • Wolfgang Fahl

    Wolfgang Fahl - 2009-08-19
    • assigned_to: nobody --> wolfgang_fahl
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks