src/jdk.httpserver/share/classes/sun/net/httpserver/FixedLengthInputStream.java
branchhttp-client-branch
changeset 55763 634d8e14c172
parent 47216 71c04702a3d5
child 55782 0586f8664ba8
equal deleted inserted replaced
55762:e947a3a50a95 55763:634d8e14c172
    58             remaining -= n;
    58             remaining -= n;
    59             if (remaining == 0) {
    59             if (remaining == 0) {
    60                 t.getServerImpl().requestCompleted (t.getConnection());
    60                 t.getServerImpl().requestCompleted (t.getConnection());
    61             }
    61             }
    62         }
    62         }
       
    63         if (n < 0 && !eof)
       
    64             throw new IOException("Connection closed before all bytes received");
    63         return n;
    65         return n;
    64     }
    66     }
    65 
    67 
    66     public int available () throws IOException {
    68     public int available () throws IOException {
    67         if (eof) {
    69         if (eof) {