[prev in list] [next in list] [prev in thread] [next in thread] 

List:       htmlunit-user
Subject:    Re: [Htmlunit-user] disabling auto loading of iframe in htmlunit
From:       Marc Guillemot <mguillemot () yahoo ! fr>
Date:       2012-09-11 16:12:44
Message-ID: 504F62FC.6030606 () yahoo ! fr
[Download RAW message or body]

Hi,

> I am facing the same problem as mentioned here in this stackoverflow
> post: http://stackoverflow.com/questions/7200886/extremely-simple-code-not-working-in-htmlunit-2-9-stable
>  Is there any plan to implement the solution mentioned here in the release?

no. You can easily achieve something similar by wrapping the
WebConnection to return dummy content when you want.

> On another note, I have two issues with htmlunit 2.10
> 
> 1) My First problem with htmlunit 2.10 is, now I am unable to use one
> instance of WebClient to parse my webpages. I have 4-5 pages that I
> parse, each of them on a different site. With htmlunit 2.10, I have seen
> that when getting page once any one of the pages errors out, none of the
> ones after that are loaded, and they all show the same exception as the
> first one and the url of first failed page in stack trace.
> 
> 2) Second problem I have is, my code which was working fine with
> htmlunit 2.9, now gives errors when parsing few pages with htmlunit 2.10
> like this : 
> 
> java.util.zip.ZipException: incorrect header check
> at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:164)
> at
> org.cyberneko.html.HTMLScanner$PlaybackInputStream.read(HTMLScanner.java:3511)
> at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)
> at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
> at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
> at java.io.InputStreamReader.read(InputStreamReader.java:184)
> at org.cyberneko.html.HTMLScanner$CurrentEntity.load(HTMLScanner.java:1814)
> at org.cyberneko.html.HTMLScanner$CurrentEntity.read(HTMLScanner.java:1835)
> at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2000)
> at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:917)
> at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499)
> at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452)
> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> at
> com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:798)
>  at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:234)
> at
> com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:180)
> at
> com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:267)
>  at
> com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:155)
>  at
> com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:440)
> at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:315)
> at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:380)
> at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:365)
> 
> For the time being I have reverted to htmlunit 2.9, and I might just
> make the change mentioned in stackoverflow post in htmlunit 2.9 code and
> use that instead.

please open issues with the information allowing to reproduce the problems.

Cheers,
Marc.
-- 
HtmlUnit support & consulting from the source
Blog: http://mguillem.wordpress.com


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Htmlunit-user mailing list
Htmlunit-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/htmlunit-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic