From: Ahmed A. <asa...@ya...> - 2015-11-26 09:00:43
|
Hi Teryl, Check the code of WebResponseData. Specifically: final String encoding = getHeader(headers, "content-encoding"); if (encoding != null) { if (StringUtils.contains(encoding, "gzip")) { stream = new GZIPInputStream(stream); } Ahmed From: tptaylor <ter...@gm...> To: htm...@li... Sent: Wednesday, November 25, 2015 8:27 PM Subject: [Htmlunit-user] Question about decompression of JavaScript in HTMLUnit Hi everyone, What Class does the decompression of gzipped js files in HTMLUnit? Is it done by the Rhino javascript engine? I'm noticing that when I mine websites that some files aren't being decompressed before they are ran; therefore, I'm seeing an "Illegal characters" script exception at times. I'm trying to track down a consistent case, but it seems to occur in weird situations. I'm using the DebugWebConnection, so i can actually decompress the files with gunzip after they've been written. Cheers, Teryl |