Re: RFR: 8334600: TEST java/net/MulticastSocket/IPMulticastIF.java fails on linux-aarch64

2024-06-26 Thread Alan Bateman
On Tue, 25 Jun 2024 13:22:38 GMT, Daniel Fuchs wrote: > Please find here a change that makes the test IPMulticastIF.java more > resilient to platform-dependent behavior. > > The test assumed that you could set any outbound network interface on a bound > datagram channel. This is in fact system

Integrated: 8334600: TEST java/net/MulticastSocket/IPMulticastIF.java fails on linux-aarch64

2024-06-26 Thread Daniel Fuchs
On Tue, 25 Jun 2024 13:22:38 GMT, Daniel Fuchs wrote: > Please find here a change that makes the test IPMulticastIF.java more > resilient to platform-dependent behavior. > > The test assumed that you could set any outbound network interface on a bound > datagram channel. This is in fact system

RFR: 8335135: HttpURLConnection#HttpInputStream does not throw IOException when response is truncated

2024-06-26 Thread Daniel Jeliński
Currently HttpUrlConnection accepts truncated responses: if the server sends a `Content-Length` header, and then closes the connection before transferring all promised bytes, the input stream reports a clean EOF. In this PR I modify the MeteredStream class to throw an IOException when it detect

Re: RFR: 8335135: HttpURLConnection#HttpInputStream does not throw IOException when response is truncated

2024-06-26 Thread Jaikiran Pai
On Wed, 26 Jun 2024 14:35:57 GMT, Daniel Jeliński wrote: > Currently HttpUrlConnection accepts truncated responses: if the server sends > a `Content-Length` header, and then closes the connection before transferring > all promised bytes, the input stream reports a clean EOF. > > In this PR I m

Re: RFR: 8335135: HttpURLConnection#HttpInputStream does not throw IOException when response is truncated

2024-06-26 Thread Daniel Jeliński
On Thu, 27 Jun 2024 05:06:30 GMT, Jaikiran Pai wrote: >> Currently HttpUrlConnection accepts truncated responses: if the server sends >> a `Content-Length` header, and then closes the connection before >> transferring all promised bytes, the input stream reports a clean EOF. >> >> In this PR I

Re: RFR: 8335135: HttpURLConnection#HttpInputStream does not throw IOException when response is truncated

2024-06-26 Thread Jaikiran Pai
On Thu, 27 Jun 2024 05:12:18 GMT, Daniel Jeliński wrote: >> src/java.base/share/classes/sun/net/www/MeteredStream.java line 58: >> >>> 56: if (n == -1) { >>> 57: if (expected > count) { >>> 58: throw new IOException("Premature EOF"); >> >> Hello Daniel, shoul

Re: RFR: 8335135: HttpURLConnection#HttpInputStream does not throw IOException when response is truncated

2024-06-26 Thread Daniel Fuchs
On Wed, 26 Jun 2024 14:35:57 GMT, Daniel Jeliński wrote: > Currently HttpUrlConnection accepts truncated responses: if the server sends > a `Content-Length` header, and then closes the connection before transferring > all promised bytes, the input stream reports a clean EOF. > > In this PR I m