Re: RFR: 8293064: Remove unused NET_xxx functions

2022-09-20 Thread Vyom Tewari
On Mon, 19 Sep 2022 14:32:24 GMT, Darragh Clarke wrote: > No tests were affected so this is purely a removal PR apart from updating > copyright headers. > I ran tests for Tier 1,2&3 and everything seems to be passing Looks OK to me, i build/run this patch at my Linux env and worked as expected

Re: RFR: 8225235: Unused field defaultIndex in NetworkInterface

2022-09-29 Thread Vyom Tewari
On Wed, 28 Sep 2022 18:55:09 GMT, Viktor Klang (Oracle) wrote: > Removes the `defaultIndex`since it is no longer used. Looks OK to me. - Marked as reviewed by vtewari (Committer). PR: https://git.openjdk.org/jdk/pull/10471

Re: RFR: 8294047: HttpResponseInputStream swallows interrupts [v4]

2022-11-29 Thread Vyom Tewari
On Mon, 28 Nov 2022 14:21:01 GMT, Darragh Clarke wrote: >> Currently if a `HttpResonseInputStream` gets interrupted while reading it >> will just swallow the exception and continue, >> >> This PR changes it to close the stream and throw an IOException, I added a >> test to cover this which jus

Re: RFR: 8294047: HttpResponseInputStream swallows interrupts [v4]

2022-11-30 Thread Vyom Tewari
On Wed, 30 Nov 2022 11:00:58 GMT, Daniel Fuchs wrote: >> src/java.net.http/share/classes/jdk/internal/net/http/ResponseSubscribers.java >> line 491: >> >>> 489: // Throw InterruptedIOException where the >>> initCause is >>> 490: // set to the caught Inte

Re: RFR: 8294047: HttpResponseInputStream swallows interrupts [v9]

2022-12-03 Thread Vyom Tewari
On Fri, 2 Dec 2022 16:17:32 GMT, Darragh Clarke wrote: >> Currently if a `HttpResonseInputStream` gets interrupted while reading it >> will just swallow the exception and continue, >> >> This PR changes it to close the stream and throw an IOException, I added a >> test to cover this which just

Re: RFR: 8294047: HttpResponseInputStream swallows interrupts [v9]

2022-12-04 Thread Vyom Tewari
On Fri, 2 Dec 2022 16:17:32 GMT, Darragh Clarke wrote: >> Currently if a `HttpResonseInputStream` gets interrupted while reading it >> will just swallow the exception and continue, >> >> This PR changes it to close the stream and throw an IOException, I added a >> test to cover this which just

Re: RFR: 8299827: Add resolved IP address in connection exception for sockets [v2]

2023-01-13 Thread Vyom Tewari
On Fri, 13 Jan 2023 18:21:46 GMT, Ralf Schmelter wrote: >> This change adds the resolved IP address to the exception text of a failed >> socket connection. This helps if the connection failed because of stale DNS >> entries. > > Ralf Schmelter has updated the pull request incrementally with one

Re: RFR: 8299827: Add resolved IP address in connection exception for sockets [v4]

2023-01-17 Thread Vyom Tewari
On Tue, 17 Jan 2023 09:22:36 GMT, Ralf Schmelter wrote: >> This change adds the resolved IP address to the exception text of a failed >> socket connection. This helps if the connection failed because of stale DNS >> entries. > > Ralf Schmelter has updated the pull request incrementally with one

Re: RFR: 8300268 : ServerImpl allows too many idle connections when using sun.net.httpserver.maxIdleConnections

2023-02-06 Thread Vyom Tewari
On Fri, 3 Feb 2023 17:58:28 GMT, Darragh Clarke wrote: > Currently there is a race condition that can allow for too many > 'idleConnections' in `ServerImpl` > > This PR adds a lock to make sure only one connection can be marked Idle at a > time as well as a test that consistently failed before

Re: RFR: 8300268 : ServerImpl allows too many idle connections when using sun.net.httpserver.maxIdleConnections [v3]

2023-02-07 Thread Vyom Tewari
On Tue, 7 Feb 2023 15:40:48 GMT, Darragh Clarke wrote: >> Currently there is a race condition that can allow for too many >> 'idleConnections' in `ServerImpl` >> >> This PR adds a lock to make sure only one connection can be marked Idle at a >> time as well as a test that consistently failed b

Re: RFR: 8303216: Prefer ArrayList to LinkedList in sun.net.httpserver.ServerImpl

2023-02-27 Thread Vyom Tewari
On Sun, 26 Feb 2023 20:12:09 GMT, Andrey Turbanov wrote: > LinkedList is used in a few places in `ServerImpl`. > There is only add/iterator/clear/size calls on this lists. No removes from > the head or something like this. ArrayList should be preferred as more > efficient and widely used (more

Re: RFR: 8305089: Implement missing socket options on AIX [v2]

2023-04-04 Thread Vyom Tewari
On Thu, 30 Mar 2023 16:05:08 GMT, Varada M wrote: >> Breaking this into two parts : >> >> 1. Implementing socket options for AIX >> 2. DontFragmentTest failure >> >> - Implementing socket options for AIX : >> >> Unlike the linux, windows and macOS, AIX uses the default implementation for >

Re: RFR: 8305089: Implement missing socket options on AIX [v4]

2023-04-14 Thread Vyom Tewari
On Fri, 14 Apr 2023 07:59:49 GMT, Varada M wrote: >> Breaking this into two parts : >> >> 1. Implementing socket options for AIX >> 2. DontFragmentTest failure >> >> - Implementing socket options for AIX : >> >> Unlike the linux, windows and macOS, AIX uses the default implementation for >

RFR: JDK-8309591: Socket.setOption(TCP_QUICKACK) uses wrong level

2023-06-27 Thread Vyom Tewari
Please review the simple fix for the issue [JDK-8309591](https://bugs.openjdk.org/browse/JDK-8309591). In this issue sys call is incorrectly setting the socket option(TCP_QUICKACK) at wrong level(SOL_TCP). After fix all the existing tests are passing. Note: I did the similar changes for AIX po

Integrated: JDK-8309591: Socket.setOption(TCP_QUICKACK) uses wrong level

2023-06-27 Thread Vyom Tewari
On Tue, 27 Jun 2023 09:23:49 GMT, Vyom Tewari wrote: > Please review the simple fix for the issue > [JDK-8309591](https://bugs.openjdk.org/browse/JDK-8309591). In this issue sys > call is incorrectly setting the socket option(TCP_QUICKACK) at wrong > level(SOL_TCP). After

RFR: 8306040: HttpResponseInputStream.available() returns 1 on empty stream

2023-07-10 Thread Vyom Tewari
Please review the code change for [JDK-8306040](https://bugs.openjdk.org/browse/JDK-8306040). In the overridden "available" method of "HttpResponseInputStream" we are returning 1 after exploring all the code path. - Commit messages: - 8306040:HttpResponseInputStream.available() re

Re: RFR: 8306040: HttpResponseInputStream.available() returns 1 on empty stream

2023-07-11 Thread Vyom Tewari
On Mon, 10 Jul 2023 07:42:35 GMT, Daniel Fuchs wrote: >> Please review the code change for >> [JDK-8306040](https://bugs.openjdk.org/browse/JDK-8306040). In the >> overridden "available" method of "HttpResponseInputStream" we are returning >> 1 after exploring all the code path. > > src/java.n

Re: RFR: 8308593: Add Keepalive Extended Socket Options Support for Windows [v3]

2023-07-20 Thread Vyom Tewari
On Thu, 20 Jul 2023 16:49:04 GMT, Terry Chow wrote: >> The PR adds support for the keepalive extended socket options on Windows. >> For TCP_KEEPIDLE and TCP_KEEPINTVL, these options are supported starting >> from Windows 10 version 1709. TCP_KEEPCNT is supported starting from Windows >> 10 ver

Re: RFR: 8308593: Add Keepalive Extended Socket Options Support for Windows [v4]

2023-07-20 Thread Vyom Tewari
On Thu, 20 Jul 2023 18:52:53 GMT, Terry Chow wrote: >> The PR adds support for the keepalive extended socket options on Windows. >> For TCP_KEEPIDLE and TCP_KEEPINTVL, these options are supported starting >> from Windows 10 version 1709. TCP_KEEPCNT is supported starting from Windows >> 10 ver

Re: RFR: 8306040: HttpResponseInputStream.available() returns 1 on empty stream

2023-08-16 Thread Vyom Tewari
On Sat, 8 Jul 2023 06:15:13 GMT, Vyom Tewari wrote: > Please review the code change for > [JDK-8306040](https://bugs.openjdk.org/browse/JDK-8306040). In the overridden > "available" method of "HttpResponseInputStream" we are returning 1 after > exploring al

Re: RFR: 8306040: HttpResponseInputStream.available() returns 1 on empty stream [v2]

2023-08-17 Thread Vyom Tewari
> Please review the code change for > [JDK-8306040](https://bugs.openjdk.org/browse/JDK-8306040). In the overridden > "available" method of "HttpResponseInputStream" we are returning 1 after > exploring all the code path. Vyom Tewari has updated the pul

Re: RFR: 8306040: HttpResponseInputStream.available() returns 1 on empty stream [v3]

2023-08-23 Thread Vyom Tewari
> Please review the code change for > [JDK-8306040](https://bugs.openjdk.org/browse/JDK-8306040). In the overridden > "available" method of "HttpResponseInputStream" we are returning 1 after > exploring all the code path. Vyom Tewari has updated the pul

Integrated: 8306040: HttpResponseInputStream.available() returns 1 on empty stream

2023-08-24 Thread Vyom Tewari
On Sat, 8 Jul 2023 06:15:13 GMT, Vyom Tewari wrote: > Please review the code change for > [JDK-8306040](https://bugs.openjdk.org/browse/JDK-8306040). In the overridden > "available" method of "HttpResponseInputStream" we are returning 1 after > exploring all t

RFR: 8314978: Multiple server call from connection failing with expect100 in getOutputStream

2023-08-30 Thread Vyom Tewari
With the current implementation of HttpURLConnection if server rejects the “Expect 100-continue” then there will be ‘java.net.ProtocolException’ will be thrown from 'expect100Continue()' method. After the exception thrown, If we call any other method on the same instance (ex getHeaderField()

Re: RFR: 8314978: Multiple server call from connection failing with expect100 in getOutputStream [v2]

2023-09-03 Thread Vyom Tewari
eption and getOutputStream0() will re-throw ‘rememberedException’ > if the ‘rememberedException’ is not null. > > Note: getOutputStream0() also call’s ‘expect100Continue()’ if > ‘expectContinue’ is true. Vyom Tewari has updated the pull request incrementally with one additional comm

Re: RFR: 8314978: Multiple server call from connection failing with expect100 in getOutputStream [v2]

2023-09-04 Thread Vyom Tewari
On Mon, 4 Sep 2023 07:22:46 GMT, Jaikiran Pai wrote: >> Vyom Tewari has updated the pull request incrementally with one additional >> commit since the last revision: >> >> modified the junit tests names > > src/java.base/share/classes/sun/net/www/protocol/http/

Re: RFR: 8314978: Multiple server call from connection failing with expect100 in getOutputStream [v2]

2023-09-04 Thread Vyom Tewari
On Sun, 3 Sep 2023 09:16:24 GMT, Vyom Tewari wrote: >> With the current implementation of HttpURLConnection if server rejects the >> “Expect 100-continue” then there will be ‘java.net.ProtocolException’ will >> be thrown from 'expect100Continue()' method. >&

Re: RFR: 8314978: Multiple server call from connection failing with expect100 in getOutputStream [v2]

2023-09-04 Thread Vyom Tewari
On Mon, 4 Sep 2023 16:49:39 GMT, Daniel Fuchs wrote: > IIRC the `ProtocolException` here is caught higher in the stack - I believe > that's what the comment `// responseCode will be returned to caller` means. > @DarraghClarke might remember. There is much history here. The fix may appear > sim

Re: RFR: 8314978: Multiple server call from connection failing with expect100 in getOutputStream [v2]

2023-09-12 Thread Vyom Tewari
On Fri, 8 Sep 2023 11:32:26 GMT, Daniel Fuchs wrote: > If another code than 100 is returned there's no point in sending the request > body, hence the exception. You can get the 200 and the response at this point > by looking at the status code and reading the response input stream. IMHO > it's

Re: RFR: 8314978: Multiple server call from connection failing with expect100 in getOutputStream [v2]

2023-09-13 Thread Vyom Tewari
On Tue, 12 Sep 2023 12:05:51 GMT, Daniel Fuchs wrote: > Hi Vyom, the HttpClient is a different API. We're talking about the > HttpURLConnection here. You're calling `HttpURLConnection::getOutputStream()` > ; it blocks for a while waiting for 100 from the server. If the server > returns 100, or

Re: RFR: 8314978: Multiple server call from connection failing with expect100 in getOutputStream [v2]

2023-09-18 Thread Vyom Tewari
On Fri, 15 Sep 2023 15:29:52 GMT, Daniel Fuchs wrote: > I am concerned that you are reusing the `rememberedException` field, which is > used by getInputStream(). A server doesn't need to read the request body if > it doesn't need it to send the response. So it could close the socket input > an

Re: RFR: 8314978: Multiple server call from connection failing with expect100 in getOutputStream [v3]

2023-09-27 Thread Vyom Tewari
eption and getOutputStream0() will re-throw ‘rememberedException’ > if the ‘rememberedException’ is not null. > > Note: getOutputStream0() also call’s ‘expect100Continue()’ if > ‘expectContinue’ is true. Vyom Tewari has updated the pull request incrementally with one additional com

Re: RFR: 8314978: Multiple server call from connection failing with expect100 in getOutputStream [v2]

2023-09-27 Thread Vyom Tewari
On Sun, 3 Sep 2023 09:16:24 GMT, Vyom Tewari wrote: >> With the current implementation of HttpURLConnection if server rejects the >> “Expect 100-continue” then there will be ‘java.net.ProtocolException’ will >> be thrown from 'expect100Continue()' method. >&

Re: RFR: 8314978: Multiple server call from connection failing with expect100 in getOutputStream [v4]

2023-10-04 Thread Vyom Tewari
eption and getOutputStream0() will re-throw ‘rememberedException’ > if the ‘rememberedException’ is not null. > > Note: getOutputStream0() also call’s ‘expect100Continue()’ if > ‘expectContinue’ is true. Vyom Tewari has updated the pull request incrementally with one additional commit s

Re: RFR: 8314978: Multiple server call from connection failing with expect100 in getOutputStream [v3]

2023-10-04 Thread Vyom Tewari
On Mon, 2 Oct 2023 13:17:16 GMT, Daniel Fuchs wrote: >> Vyom Tewari has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Incorporated the review comments > > test/jdk/java/net/HttpURLConnection/HttpURLConnectio

Integrated: 8314978: Multiple server call from connection failing with expect100 in getOutputStream

2023-10-07 Thread Vyom Tewari
On Wed, 30 Aug 2023 09:23:34 GMT, Vyom Tewari wrote: > With the current implementation of HttpURLConnection if server rejects the > “Expect 100-continue” then there will be ‘java.net.ProtocolException’ will be > thrown from 'expect100Continue()' method. > > After

Re: RFR: 8317736: Stream::handleReset locks twice

2023-10-09 Thread Vyom Tewari
On Mon, 9 Oct 2023 13:52:39 GMT, Daniel Fuchs wrote: > Trivial one liner fix. > > The fix for [JDK-8308310](https://bugs.openjdk.org/browse/JDK-8308310) > introduced a reentrant `stateLock` but also a regression. In > Stream::handleReset the lock is locked twice. Looks OK - Mark

Re: RFR: 8319450: New methods java.net.InetXAddress.ofLiteral() miss @since tag

2023-11-06 Thread Vyom Tewari
On Sun, 5 Nov 2023 19:05:48 GMT, Marc R. Hoffmann wrote: > 8319450: New methods java.net.InetXAddress.ofLiteral() miss @since tag Looks OK to me. - Marked as reviewed by vtewari (Committer). PR Review: https://git.openjdk.org/jdk/pull/16511#pullrequestreview-1716858237

Re: RFR: JDK-8320168: handle setsocktopt return values [v4]

2023-11-20 Thread Vyom Tewari
On Mon, 20 Nov 2023 08:23:51 GMT, Matthias Baesken wrote: >> There are a few places in the JDK C coding where the setsocktopt return >> value is not handled but better should be handled. > > Matthias Baesken has updated the pull request incrementally with one > additional commit since the last

Re: RFR: 8331063: Some HttpClient tests don't report leaks

2024-04-24 Thread Vyom Tewari
On Wed, 24 Apr 2024 16:21:39 GMT, Daniel Jeliński wrote: > This patch fixes leak reporting in `ForbiddenHeadTest.java` and > `ProxySelectorTest.java`. > > The tests were checking for leaks, but the detected problems were not > reported to the test harness. Additionally, `ForbiddenHeadTest.java

Re: RFR: 8332020: jwebserver tool prints invalid URL in case of IPv6 address binding [v3]

2024-05-10 Thread Vyom Tewari
On Fri, 10 May 2024 12:02:49 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to address >> https://bugs.openjdk.org/browse/JDK-8332020? >> >> `jwebserver` when it is launched prints a URL where the server is >> accessible. When launched using an IPv6 bind ad