--- old/modules/web/src/main/java/com/sun/webkit/network/URLLoader.java 2016-07-22 15:08:49.023887000 +0530 +++ new/modules/web/src/main/java/com/sun/webkit/network/URLLoader.java 2016-07-22 15:08:48.183794600 +0530 @@ -518,10 +518,20 @@ } String encoding = c.getContentEncoding(); - if ("gzip".equalsIgnoreCase(encoding)) { - inputStream = new GZIPInputStream(inputStream); - } else if ("deflate".equalsIgnoreCase(encoding)) { - inputStream = new InflaterInputStream(inputStream); + if (inputStream != null) { + try { + if ("gzip".equalsIgnoreCase(encoding)) { + inputStream = new GZIPInputStream(inputStream); + } else if ("deflate".equalsIgnoreCase(encoding)) { + inputStream = new InflaterInputStream(inputStream); + } + } catch (IOException e) { + if (logger.isLoggable(Level.FINE)) { + logger.log(Level.FINE, String.format("Exception caught: [%s], %s", + e.getClass().getSimpleName(), + e.getMessage())); + } + } } ByteBufferAllocator allocator =