From: <rb...@us...> - 2018-02-02 18:47:31
|
Revision: 15111 http://sourceforge.net/p/htmlunit/code/15111 Author: rbri Date: 2018-02-02 18:47:28 +0000 (Fri, 02 Feb 2018) Log Message: ----------- back to a working version, i think we have to add a general error handler to make this customizable Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java 2018-02-02 18:38:01 UTC (rev 15110) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java 2018-02-02 18:47:28 UTC (rev 15111) @@ -736,12 +736,12 @@ } catch (final ConnectionClosedException e) { LOG.warn("Connection was closed while reading from stream.", e); - throw e; + return new DownloadedContent.InMemory(bos.toByteArray()); } catch (final EOFException e) { // this might happen with broken gzip content LOG.warn("EOFException while reading from stream.", e); - throw e; + return new DownloadedContent.InMemory(bos.toByteArray()); } return new DownloadedContent.InMemory(bos.toByteArray()); |