--- old/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java 2016-02-24 16:55:56.621713286 +0300 +++ new/src/java.xml.ws/share/classes/com/sun/xml/internal/messaging/saaj/client/p2p/HttpSOAPConnection.java 2016-02-24 16:55:56.549713287 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -512,13 +512,9 @@ : httpConnection.getInputStream()); // If no reply message is returned, // content-Length header field value is expected to be zero. - // java SE 6 documentation says : - // available() : an estimate of the number of bytes that can be read - //(or skipped over) from this input stream without blocking - //or 0 when it reaches the end of the input stream. + // InputStream#available() can't be used here - it just says no data *YET*! if ((httpIn == null ) - || (httpConnection.getContentLength() == 0) - || (httpIn.available() == 0)) { + || (httpConnection.getContentLength() == 0)) { response = null; log.warning("SAAJ0014.p2p.content.zero"); } else {