Re: RFR: 8288330: Avoid redundant ConcurrentHashMap.get call in Http2ClientImpl.deleteConnection

2022-06-15 Thread Daniel Fuchs
On Wed, 15 Jun 2022 18:17:39 GMT, Andrey Turbanov wrote: >> https://github.com/openjdk/jdk/blob/900d967da52afca9b239d8a58aa81b48b9fe0a78/src/java.net.http/share/classes/jdk/internal/net/http/Http2ClientImpl.java#L191-L196 >> >> Method `Http2ClientImpl.deleteConnection` removes `Http2Connection`

Re: RFR: 8272702: Resolving URI relative path with no / may lead to incorrect toString [v2]

2022-06-17 Thread Daniel Fuchs
On Fri, 17 Jun 2022 09:17:53 GMT, KIRIYAMA Takuya wrote: >> src/java.base/share/classes/java/net/URI.java line 2140: >> >>> 2138: } else { >>> 2139: sb.append("/"); >>> 2140: } >> >> This is wrong as it will cause >> `URI.create("foo").resolve(URI.creat

RFR: JDK-8288746: HttpClient resources could be reclaimed more eagerly

2022-06-20 Thread Daniel Fuchs
Hi, Please find here a patch that should help the HttpClient's SelectorManager thread to terminate more timely, allowing the resources consumed by the client to be released earlier. The idea is to use a Cleaner registered with the HttpClientFacade to wakeup the Selector when the facade is bein

Re: RFR: JDK-8288746: HttpClient resources could be reclaimed more eagerly

2022-06-21 Thread Daniel Fuchs
On Mon, 20 Jun 2022 18:28:36 GMT, Сергей Цыпанов wrote: > Shouldn't we use `Reference.refersTo()` instead of `Reference.get() == smth` > in lines 428 and 501? Hi Sergey, we could, and I'll do it for consistency. Though in those two cases it doesn't really matter since the facade referent is no

Re: RFR: 8285521: Minor improvements in java.net.URI [v2]

2022-06-21 Thread Daniel Fuchs
On Fri, 20 May 2022 08:25:02 GMT, Сергей Цыпанов wrote: >> - use `String.equalsIgnoreCase()` instead of hand-written code relying on >> `String.charAt()` >> - use `String.compareToIgnoreCase()` instead of hand-written code relying on >> `String.charAt()` >> - drop branches that are never execut

Re: RFR: JDK-8288746: HttpClient resources could be reclaimed more eagerly

2022-06-21 Thread Daniel Fuchs
On Tue, 21 Jun 2022 17:31:59 GMT, Brent Christian wrote: >> Hi, >> >> Please find here a patch that should help the HttpClient's SelectorManager >> thread to terminate more timely, allowing the resources consumed by the >> client to be released earlier. >> >> The idea is to use a Cleaner regi

Re: RFR: 8288885: Introduce a jwebserver launcher utility in test library for jtreg tests [v2]

2022-06-22 Thread Daniel Fuchs
On Wed, 22 Jun 2022 07:44:34 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which adds a utility to the JDK >> test library to help launch the JWebServer? As noted in the JBS issue, this >> utility does the necessary work to make sure when the `launch()` method >> return

Re: RFR: 8288983: broken link in com.sun.net.httpserver.SimpleFileServer

2022-06-24 Thread Daniel Fuchs
On Fri, 24 Jun 2022 08:49:06 GMT, Jaikiran Pai wrote: > Can I please get a review for this change which fixes the broken link in the > javadoc of `SimpleFileServer`? This fixes > https://bugs.openjdk.org/browse/JDK-8288983 which has the necessary context > on why/when this link broke. > > I u

Re: RFR: JDK-8286610: Add additional diagnostic output to java/net/DatagramSocket/InterruptibleDatagramSocket.java

2022-06-27 Thread Daniel Fuchs
On Fri, 24 Jun 2022 14:31:59 GMT, Bill Huang wrote: > Failure was observed on > java/net/DatagramSocket/InterruptibleDatagramSocket.java where data was > received unexpectedly ( > [JDK-8286607](https://bugs.openjdk.org/browse/JDK-8286607)). This failure > could be caused by interference from

Re: RFR: JDK-8288746: HttpClient resources could be reclaimed more eagerly

2022-06-27 Thread Daniel Fuchs
On Mon, 20 Jun 2022 14:09:27 GMT, Daniel Fuchs wrote: > Hi, > > Please find here a patch that should help the HttpClient's SelectorManager > thread to terminate more timely, allowing the resources consumed by the > client to be released earlier. > > The idea is t

Re: RFR: JDK-8288746: HttpClient resources could be reclaimed more eagerly

2022-06-27 Thread Daniel Fuchs
On Sun, 26 Jun 2022 06:08:07 GMT, Jaikiran Pai wrote: >> Hi, >> >> Please find here a patch that should help the HttpClient's SelectorManager >> thread to terminate more timely, allowing the resources consumed by the >> client to be released earlier. >> >> The idea is to use a Cleaner registe

Integrated: JDK-8288746: HttpClient resources could be reclaimed more eagerly

2022-06-27 Thread Daniel Fuchs
On Mon, 20 Jun 2022 14:09:27 GMT, Daniel Fuchs wrote: > Hi, > > Please find here a patch that should help the HttpClient's SelectorManager > thread to terminate more timely, allowing the resources consumed by the > client to be released earlier. > > The idea is t

Re: RFR: 8289385: Cleanup redundant synchronization in Http2ClientImpl

2022-06-29 Thread Daniel Fuchs
On Tue, 28 Jun 2022 18:44:38 GMT, Andrey Turbanov wrote: > Http2ClientImpl.stopping and Http2ClientImpl.failures are always accessed > under synchronized(this). > So we can remove 'volatile' modifier from 'stopping'. And remove > 'synchronizedSet' wrapper from 'failures' src/java.net.http/shar

Re: RFR: JDK-8286610: Add additional diagnostic output to java/net/DatagramSocket/InterruptibleDatagramSocket.java [v3]

2022-06-29 Thread Daniel Fuchs
On Tue, 28 Jun 2022 17:19:32 GMT, Bill Huang wrote: >> Failure was observed on >> java/net/DatagramSocket/InterruptibleDatagramSocket.java where data was >> received unexpectedly ( >> [JDK-8286607](https://bugs.openjdk.org/browse/JDK-8286607)). This failure >> could be caused by interference

Re: RFR: 8289291: HttpServer sets incorrect value for "max" parameter in Keep-Alive header value [v2]

2022-06-29 Thread Daniel Fuchs
On Wed, 29 Jun 2022 12:05:42 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which addresses >> https://bugs.openjdk.org/browse/JDK-8289291? >> >> As noted in that issue, right now, the Http(s)Server sets an incorrect value >> for the `max` parameter of the `Keep-Alive` h

Re: RFR: 8289385: Cleanup redundant synchronization in Http2ClientImpl [v2]

2022-06-30 Thread Daniel Fuchs
On Wed, 29 Jun 2022 20:57:14 GMT, Andrey Turbanov wrote: >> Http2ClientImpl.stopping and Http2ClientImpl.failures are always accessed >> under synchronized(this). >> So we can remove 'volatile' modifier from 'stopping'. And remove >> 'synchronizedSet' wrapper from 'failures' > > Andrey Turbanov

Re: RFR: 8287593: ShortResponseBody could be made more resilient to rogue connections [v2]

2022-07-01 Thread Daniel Fuchs
On Thu, 30 Jun 2022 14:26:23 GMT, Ryan Ernst wrote: >> Since ReplyingServer binds to an open port on the system where tests >> run, it is possible some other program probes that port while the test >> is running. If the probe request does not have request params, the >> request is invalid and a t

Re: RFR: 8287593: ShortResponseBody could be made more resilient to rogue connections [v3]

2022-07-04 Thread Daniel Fuchs
On Fri, 1 Jul 2022 17:55:54 GMT, Ryan Ernst wrote: >> Since ReplyingServer binds to an open port on the system where tests >> run, it is possible some other program probes that port while the test >> is running. If the probe request does not have request params, the >> request is invalid and a te

Re: RFR: 8282395: URL.openConnection can throw IOOBE [v2]

2022-07-06 Thread Daniel Fuchs
On Mon, 27 Jun 2022 05:31:47 GMT, KIRIYAMA Takuya wrote: >> src/java.base/share/classes/java/net/URL.java line 1101: >> >>> 1099: throw new MalformedURLException(e.getMessage()); >>> 1100: } >>> 1101: return url; >> >> Please revert the changes in java.net.URL. It's

Re: RFR: 8289768: Clean up unused code [v2]

2022-07-07 Thread Daniel Fuchs
On Wed, 6 Jul 2022 05:32:29 GMT, Daniel Jeliński wrote: >> This patch removes many unused variables and one unused label reported by >> the compilers when relevant warnings are enabled. >> >> The unused code was found by compiling after removing `unused` from the list >> of disabled warnings

RFR: 8290083: ResponseBodyBeforeError: javax.net.ssl.SSLException: Unsupported or unrecognized SSL message

2022-07-11 Thread Daniel Fuchs
Please find enclosed a simple test fix. This test has been observed failing once with an SSLException. My suspicion is that some random process (other test or ...) has tried to connect to the test ReplyingServer and sent some plain text that failed the handshake. The fix hardens the server to cl

Re: RFR: 8290083: ResponseBodyBeforeError: AssertionError or SSLException: Unsupported or unrecognized SSL message

2022-07-12 Thread Daniel Fuchs
On Tue, 12 Jul 2022 07:44:39 GMT, Jaikiran Pai wrote: >> Please find enclosed a simple test fix. >> This test has been observed failing once with an SSLException. My suspicion >> is that some random process (other test or ...) has tried to connect to the >> test ReplyingServer and sent some pla

Re: RFR: 8290083: ResponseBodyBeforeError: AssertionError or SSLException: Unsupported or unrecognized SSL message [v2]

2022-07-12 Thread Daniel Fuchs
he fix hardens the server to close the connection and proceed to accept the > next one, for a limited number of times... Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision: increase maxUnexpected limit - Ch

Re: RFR: 8290083: ResponseBodyBeforeError: AssertionError or SSLException: Unsupported or unrecognized SSL message [v2]

2022-07-12 Thread Daniel Fuchs
On Tue, 12 Jul 2022 08:07:36 GMT, Daniel Fuchs wrote: >> test/jdk/java/net/httpclient/ResponseBodyBeforeError.java line 349: >> >>> 347: @Override >>> 348: public void run() { >>> 349: int maxUnexpected = 2; >> >> H

Integrated: 8290083: ResponseBodyBeforeError: AssertionError or SSLException: Unsupported or unrecognized SSL message

2022-07-12 Thread Daniel Fuchs
On Mon, 11 Jul 2022 14:35:55 GMT, Daniel Fuchs wrote: > Please find enclosed a simple test fix. > This test has been observed failing once with an SSLException. My suspicion > is that some random process (other test or ...) has tried to connect to the > test ReplyingServer and sen

Re: RFR: 8290300: Use standard String-joining tools where applicable [v5]

2022-08-03 Thread Daniel Fuchs
On Mon, 18 Jul 2022 18:40:51 GMT, Сергей Цыпанов wrote: >> Simplify code with `String.join()` > > Сергей Цыпанов has updated the pull request incrementally with one additional > commit since the last revision: > > 8290300: Revert erroneous changes Changes to HttpURLConnection look good to me

Re: RFR: 8285836: sun/net/www/http/KeepAliveCache/KeepAliveProperty.java failed with "RuntimeException: Failed in server"

2022-08-03 Thread Daniel Fuchs
On Mon, 1 Aug 2022 11:01:01 GMT, Daniel Jeliński wrote: > This patch fixes a race condition in KeepAliveProperty test. The client > thread could read the `pass` field and fail the test before the server thread > had a chance to set the field value to `true`. The fix adds an explicit wait > for

Re: RFR: 8285836: sun/net/www/http/KeepAliveCache/KeepAliveProperty.java failed with "RuntimeException: Failed in server" [v2]

2022-08-03 Thread Daniel Fuchs
On Wed, 3 Aug 2022 14:30:08 GMT, Daniel Jeliński wrote: >> This patch fixes a race condition in KeepAliveProperty test. The client >> thread could read the `pass` field and fail the test before the server >> thread had a chance to set the field value to `true`. The fix adds an >> explicit wait

Re: RFR: 8291637: HttpClient default keep alive timeout not followed if server sends invalid value

2022-08-05 Thread Daniel Fuchs
On Fri, 5 Aug 2022 09:04:19 GMT, Michael McMahon wrote: >> test/jdk/sun/net/www/http/KeepAliveCache/B8291637.java line 27: >> >>> 25: * @test >>> 26: * @bug 8291637 >>> 27: * @run main/othervm -Dhttp.keepAlive.time.server=20 -esa -ea B8291637 >> >> Is it intentional that we are setting the -

Re: RFR: 8291637: HttpClient default keep alive timeout not followed if server sends invalid value [v2]

2022-08-05 Thread Daniel Fuchs
On Fri, 5 Aug 2022 10:32:56 GMT, Michael McMahon wrote: >> Hi, >> >> Some new keep alive tests are exposing some old bugs. In this case if the >> server sends an invalid timeout (say -20 seconds) we accept it creating a >> timeout in the past. So, the first time the keep alive thread wakes up

Re: RFR: 8291956: Simplify the loop condition in sun.net.httpserver.Request constructor

2022-08-05 Thread Daniel Fuchs
On Wed, 20 Jul 2022 14:02:39 GMT, thyecust wrote: > The condition at line 57 (after while) will evaluate to false > if startLine == null, so the previous if-condition is covered. LGTM. Could you update the Copyright year in the file and also run tier2 tests before integrating? - P

Re: RFR: 8291956: Simplify the loop condition in sun.net.httpserver.Request constructor [v3]

2022-08-05 Thread Daniel Fuchs
On Fri, 5 Aug 2022 13:36:47 GMT, thyecust wrote: >> The condition at line 57 (after while) will evaluate to false >> if startLine == null, so the previous if-condition is covered. > > thyecust has updated the pull request with a new target base due to a merge > or a rebase. The incremental webre

Re: RFR: 8291956: Simplify the loop condition in sun.net.httpserver.Request constructor [v4]

2022-08-05 Thread Daniel Fuchs
On Fri, 5 Aug 2022 15:07:17 GMT, thyecust wrote: >> The condition at line 57 (after while) will evaluate to false >> if startLine == null, so the previous if-condition is covered. > > thyecust has updated the pull request with a new target base due to a merge > or a rebase. The incremental webre

Re: RFR: 8291956: Simplify the loop condition in sun.net.httpserver.Request constructor [v4]

2022-08-05 Thread Daniel Fuchs
On Fri, 5 Aug 2022 16:46:06 GMT, Roger Riggs wrote: >> thyecust has updated the pull request with a new target base due to a merge >> or a rebase. The incremental webrev excludes the unrelated changes brought >> in by the merge/rebase. The pull request contains six additional commits >> since

Re: RFR: 8291956: Simplify the loop condition in sun.net.httpserver.Request constructor [v4]

2022-08-05 Thread Daniel Fuchs
On Fri, 5 Aug 2022 17:21:28 GMT, Daniel Fuchs wrote: >> src/jdk.httpserver/share/classes/sun/net/httpserver/Request.java line 54: >> >>> 52: startLine = readLine(); >>> 53: /* skip blank lines */ >>> 54: } while

Re: RFR: 8291956: Simplify the loop condition in sun.net.httpserver.Request constructor [v5]

2022-08-08 Thread Daniel Fuchs
On Fri, 5 Aug 2022 23:02:15 GMT, thyecust wrote: >> The condition at line 57 (after while) will evaluate to false >> if startLine == null, so the previous if-condition is covered. > > thyecust has updated the pull request incrementally with one additional > commit since the last revision: > >

Re: RFR: 8272702: Resolving URI relative path with no / may lead to incorrect toString [v4]

2022-08-11 Thread Daniel Fuchs
On Tue, 9 Aug 2022 11:02:31 GMT, KIRIYAMA Takuya wrote: >> Consider an authority component without trailing "/" as a base URI. When >> resolving a relative path against this base URI, the resulting URI is a >> concatenated URI without "/". >> This behaviour should be fixed, which is rationalize

Re: RFR: 8051627: Invariants about java.net.URI resolve and relativize are wrong

2022-08-11 Thread Daniel Fuchs
On Thu, 28 Jul 2022 06:48:56 GMT, KIRIYAMA Takuya wrote: > The current documentation of URI class describes relationship between resolve > and relativize methods as follows. > > > For any two normalized URIs u and v, > u.relativize(u.resolve(v)).equals(v) and > u.resolve(u.relativize(v

Re: RFR: 8272702: Resolving URI relative path with no / may lead to incorrect toString

2022-08-15 Thread Daniel Fuchs
On Mon, 30 May 2022 06:05:56 GMT, KIRIYAMA Takuya wrote: >> @tkiriyama You're using the wrong bugid. >> [JDK-8272707](https://bugs.openjdk.java.net/browse/JDK-8272707) has nothing >> to do with URI. Please use the correct bugid. > >> You're using the wrong bugid. >> [JDK-8272707](https://bugs.

RFR: 8292381: java/net/httpclient/SpecialHeadersTest.java fails with "ERROR: Shutting down connection: HTTP/2 client stopped"

2022-08-17 Thread Daniel Fuchs
Please find here a change that improves SpecialHeadersTest. This test creates a large amount of ephemeral clients and has been observed running out of heap space in our CI once. This change updates the test to wait for the previous HttpClient to be eligible for garbage collection before it creat

Re: RFR: 8292381: java/net/httpclient/SpecialHeadersTest.java fails with "ERROR: Shutting down connection: HTTP/2 client stopped"

2022-08-18 Thread Daniel Fuchs
On Thu, 18 Aug 2022 06:52:41 GMT, Jaikiran Pai wrote: >> Please find here a change that improves SpecialHeadersTest. This test >> creates a large amount of ephemeral clients and has been observed running >> out of heap space in our CI once. This change updates the test to wait for >> the previ

Re: RFR: 8292381: java/net/httpclient/SpecialHeadersTest.java fails with "ERROR: Shutting down connection: HTTP/2 client stopped"

2022-08-18 Thread Daniel Fuchs
On Thu, 18 Aug 2022 06:41:49 GMT, Jaikiran Pai wrote: >> Please find here a change that improves SpecialHeadersTest. This test >> creates a large amount of ephemeral clients and has been observed running >> out of heap space in our CI once. This change updates the test to wait for >> the previ

Re: RFR: 8292381: java/net/httpclient/SpecialHeadersTest.java fails with "ERROR: Shutting down connection: HTTP/2 client stopped"

2022-08-18 Thread Daniel Fuchs
On Thu, 18 Aug 2022 07:31:22 GMT, Jaikiran Pai wrote: > Additionally, the `SpecialHeadersTest` would need a copyright year update and > given the kind of changes we are doing in this PR, would it even warrant a > `@bug` id inclusion? This is a test bug. We only add a `@bug` for test changes th

Re: RFR: 8292381: java/net/httpclient/SpecialHeadersTest.java fails with "ERROR: Shutting down connection: HTTP/2 client stopped"

2022-08-18 Thread Daniel Fuchs
On Thu, 18 Aug 2022 10:01:28 GMT, Michael McMahon wrote: > I don't really understand why the test (originally) needed to create so many > clients. Wouldn't it be easier and more maintainable to only create the > minimum number of clients? Yeah - maybe. But there are differences between a brand

Re: RFR: 8292381: java/net/httpclient/SpecialHeadersTest.java fails with "ERROR: Shutting down connection: HTTP/2 client stopped" [v2]

2022-08-19 Thread Daniel Fuchs
ction before it creates a new one. > It also verifies that no outstanding operation are still running on the > client by the time the client is released. Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision: Integrat

Re: RFR: 8292381: java/net/httpclient/SpecialHeadersTest.java fails with "ERROR: Shutting down connection: HTTP/2 client stopped"

2022-08-19 Thread Daniel Fuchs
On Wed, 17 Aug 2022 17:06:12 GMT, Daniel Fuchs wrote: > Please find here a change that improves SpecialHeadersTest. This test creates > a large amount of ephemeral clients and has been observed running out of heap > space in our CI once. This change updates the test to wait for the

Integrated: 8292381: java/net/httpclient/SpecialHeadersTest.java fails with "ERROR: Shutting down connection: HTTP/2 client stopped"

2022-08-22 Thread Daniel Fuchs
On Wed, 17 Aug 2022 17:06:12 GMT, Daniel Fuchs wrote: > Please find here a change that improves SpecialHeadersTest. This test creates > a large amount of ephemeral clients and has been observed running out of heap > space in our CI once. This change updates the test to wait for the

Re: RFR: 8291226: Create Test Cases to cover scenarios for JDK-8278067

2022-08-22 Thread Daniel Fuchs
On Mon, 22 Aug 2022 08:26:19 GMT, Ramesh Bhagavatam Gangadhar wrote: > There are total 160 scenarios written with combination of client properties > (Client Scenarios) and Server Response (Server Scenarios). > > In tabular format, Client and Server scenarios along with expected output are > d

Re: RFR: 8291226: Create Test Cases to cover scenarios for JDK-8278067

2022-08-22 Thread Daniel Fuchs
On Mon, 22 Aug 2022 08:26:19 GMT, Ramesh Bhagavatam Gangadhar wrote: > There are total 160 scenarios written with combination of client properties > (Client Scenarios) and Server Response (Server Scenarios). > > In tabular format, Client and Server scenarios along with expected output are > d

Re: RFR: 8291226: Create Test Cases to cover scenarios for JDK-8278067

2022-08-22 Thread Daniel Fuchs
On Mon, 22 Aug 2022 08:26:19 GMT, Ramesh Bhagavatam Gangadhar wrote: > There are total 160 scenarios written with combination of client properties > (Client Scenarios) and Server Response (Server Scenarios). > > In tabular format, Client and Server scenarios along with expected output are > d

Re: RFR: 8291226: Create Test Cases to cover scenarios for JDK-8278067 [v3]

2022-08-22 Thread Daniel Fuchs
On Mon, 22 Aug 2022 17:18:21 GMT, Ramesh Bhagavatam Gangadhar wrote: >> There are total 160 scenarios written with combination of client properties >> (Client Scenarios) and Server Response (Server Scenarios). >> >> In tabular format, Client and Server scenarios along with expected output >>

Re: RFR: 8291226: Create Test Cases to cover scenarios for JDK-8278067 [v10]

2022-08-23 Thread Daniel Fuchs
On Tue, 23 Aug 2022 05:31:31 GMT, Ramesh Bhagavatam Gangadhar wrote: >> There are total 160 scenarios written with combination of client properties >> (Client Scenarios) and Server Response (Server Scenarios). >> >> In tabular format, Client and Server scenarios along with expected output >>

Re: RFR: 7113208: Incorrect javadoc on java.net.DatagramPacket.setLength()

2022-08-26 Thread Daniel Fuchs
On Fri, 26 Aug 2022 07:51:16 GMT, Jaikiran Pai wrote: > Can I please get a review of this javadoc only change for > `DatagramPacket#setLength()` method? This addresses > https://bugs.openjdk.org/browse/JDK-7113208. > > I haven't create a CSR because the javadoc was already stating the correct

Re: RFR: 7113208: Incorrect javadoc on java.net.DatagramPacket.setLength() [v2]

2022-08-26 Thread Daniel Fuchs
On Fri, 26 Aug 2022 09:55:11 GMT, Jaikiran Pai wrote: >> Can I please get a review of this javadoc only change for >> `DatagramPacket#setLength()` method? This addresses >> https://bugs.openjdk.org/browse/JDK-7113208. >> >> I haven't create a CSR because the javadoc was already stating the cor

Re: RFR: 8292968: java.net.ContentHandler's javadoc has a broken reference

2022-08-26 Thread Daniel Fuchs
On Fri, 26 Aug 2022 09:22:26 GMT, Jaikiran Pai wrote: > Can I please get a review of this javadoc only change which addresses > https://bugs.openjdk.org/browse/JDK-8292968? > > The updated javadoc now uses the `@systemProperty`, since this is the place > where the semantics of this system prop

Re: RFR: 8292968: java.net.ContentHandler's javadoc has a broken reference

2022-08-26 Thread Daniel Fuchs
On Fri, 26 Aug 2022 09:22:26 GMT, Jaikiran Pai wrote: > Can I please get a review of this javadoc only change which addresses > https://bugs.openjdk.org/browse/JDK-8292968? > > The updated javadoc now uses the `@systemProperty`, since this is the place > where the semantics of this system prop

Re: RFR: 7113208: Incorrect javadoc on java.net.DatagramPacket.setLength() [v3]

2022-09-02 Thread Daniel Fuchs
On Thu, 1 Sep 2022 07:01:14 GMT, Jaikiran Pai wrote: >> Can I please get a review of this javadoc only change for >> `DatagramPacket#setLength()` method? This addresses >> https://bugs.openjdk.org/browse/JDK-7113208. >> >> I haven't create a CSR because the javadoc was already stating the corr

Re: RFR: 8282395: URL.openConnection can throw IOOBE [v2]

2022-09-05 Thread Daniel Fuchs
On Mon, 5 Sep 2022 09:57:51 GMT, KIRIYAMA Takuya wrote: >> Let me try to summarize: there are several things that we could do: >> >> 1. nothing: continue throwing IIOBE >> 2. throw IAE instead of IIOBE, and let IAE trickle up the calling stack to >> the callers code >> 3. throw MUE instead o

Re: RFR: 8292044: HttpClient doesn't handle 102 or 103 properly

2022-09-05 Thread Daniel Fuchs
On Mon, 5 Sep 2022 13:36:04 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which proposes to fix > https://bugs.openjdk.org/browse/JDK-8292044? > > The linked JBS issue notes two parts to fixing this. Part one is to > (internally) ignore the intermediate 1xx informational

Re: RFR: 8288717: Add a means to close idle connections in HTTP/2 connection pool

2022-09-07 Thread Daniel Fuchs
On Wed, 7 Sep 2022 06:36:33 GMT, Jaikiran Pai wrote: >> **Issue** >> When using HTTP/2 with the HttpClient, it can often be necessary to close an >> idle Http2 Connection before a server sends a GOAWAY frame. For example, a >> server or cloud based tool could close a TCP connection silently whe

Re: RFR: 8292044: HttpClient doesn't handle 102 or 103 properly [v6]

2022-09-09 Thread Daniel Fuchs
On Fri, 9 Sep 2022 08:17:52 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to fix >> https://bugs.openjdk.org/browse/JDK-8292044? >> >> The linked JBS issue notes two parts to fixing this. Part one is to >> (internally) ignore the intermediate 1xx informati

Re: RFR: 8292044: HttpClient doesn't handle 102 or 103 properly [v7]

2022-09-09 Thread Daniel Fuchs
On Fri, 9 Sep 2022 09:57:09 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to fix >> https://bugs.openjdk.org/browse/JDK-8292044? >> >> The linked JBS issue notes two parts to fixing this. Part one is to >> (internally) ignore the intermediate 1xx informati

Re: RFR: 8170305: URLConnection doesn't handle HTTP/1.1 1xx (informational) messages

2022-09-09 Thread Daniel Fuchs
On Fri, 9 Sep 2022 11:21:51 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which proposes to fix > https://bugs.openjdk.org/browse/JDK-8170305? > > The commit in this PR changes the internal implementation of > `HttpURLConnection` to ignore interim informational 1xx respon

Re: RFR: 8292044: HttpClient doesn't handle 102 or 103 properly [v8]

2022-09-09 Thread Daniel Fuchs
On Fri, 9 Sep 2022 13:08:21 GMT, Julian Reschke wrote: > A 101 response implies that the wire protocol is switching to the protocol > specified in the "Upgrade" header field. I don't think it would be wise to > ignore that, unless the protocol actually stays the same. > > Note that this is ind

Re: RFR: 8170305: URLConnection doesn't handle HTTP/1.1 1xx (informational) messages [v4]

2022-09-12 Thread Daniel Fuchs
On Mon, 12 Sep 2022 09:41:09 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to fix >> https://bugs.openjdk.org/browse/JDK-8170305? >> >> The commit in this PR changes the internal implementation of >> `HttpURLConnection` to ignore interim informational 1xx

Re: RFR: 8170305: URLConnection doesn't handle HTTP/1.1 1xx (informational) messages [v4]

2022-09-12 Thread Daniel Fuchs
On Mon, 12 Sep 2022 12:55:12 GMT, Jaikiran Pai wrote: >> test/jdk/java/net/HttpURLConnection/Response1xxTest.java line 225: >> >>> 223: final HttpURLConnection urlConnection = (HttpURLConnection) >>> requestURI.toURL().openConnection(); >>> 224: // we expect the request to fail

Re: RFR: 8170305: URLConnection doesn't handle HTTP/1.1 1xx (informational) messages [v5]

2022-09-12 Thread Daniel Fuchs
On Mon, 12 Sep 2022 13:26:45 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to fix >> https://bugs.openjdk.org/browse/JDK-8170305? >> >> The commit in this PR changes the internal implementation of >> `HttpURLConnection` to ignore interim informational 1xx

Re: RFR: 8292044: HttpClient doesn't handle 102 or 103 properly [v9]

2022-09-14 Thread Daniel Fuchs
On Wed, 14 Sep 2022 13:57:34 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to fix >> https://bugs.openjdk.org/browse/JDK-8292044? >> >> The linked JBS issue notes two parts to fixing this. Part one is to >> (internally) ignore the intermediate 1xx informat

Re: RFR: 8292044: HttpClient doesn't handle 102 or 103 properly [v9]

2022-09-14 Thread Daniel Fuchs
On Wed, 14 Sep 2022 13:59:13 GMT, Jaikiran Pai wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Close the connection/stream when a 101 response isn't expected > > src/java.net.http/share/classes/jdk/internal/net/htt

Re: RFR: 8293842: IPv6-only systems throws UnsupportedOperationException for several socket/TCP options

2022-09-15 Thread Daniel Fuchs
On Thu, 15 Sep 2022 07:25:04 GMT, Man Cao wrote: > Hi all, > > Could anyone review this bug fix for ipv6-only system? See > https://bugs.openjdk.org/browse/JDK-8293842 for detailed description of this > bug. > > Ideally, the `socket(PF_INET6, ...)` or `socket(PF_INET, ...)` call should > dep

Re: RFR: 8292044: HttpClient doesn't handle 102 or 103 properly [v13]

2022-09-20 Thread Daniel Fuchs
On Tue, 20 Sep 2022 05:38:49 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to fix >> https://bugs.openjdk.org/browse/JDK-8292044? >> >> The linked JBS issue notes two parts to fixing this. Part one is to >> (internally) ignore the intermediate 1xx informat

Re: HttpClient infinite HTTP/2 connection pooling

2022-09-22 Thread Daniel Fuchs
Hi Anton, There is a PR under review that will provide a system property to control the maximum time an HTTP/2 connection can remain idle before being closed by the client: Please see https://git.openjdk.org/jdk/pull/10183 best regards, -- daniel On 21/09/2022 19:50, Anton Keks wrote: Hello!

Re: RFR: 8288717: Add a means to close idle connections in HTTP/2 connection pool

2022-09-22 Thread Daniel Fuchs
On Thu, 22 Sep 2022 10:53:52 GMT, tenor-dev wrote: > IMHO, it would be great to use the same property as for HTTP/1 connections: > jdk.httpclient.keepalive.timeout > People are already expecting it to work with HTTP/2, but to everyone's > surprise it doesn't. > > It would also be nice to suppor

Re: RFR: 8293562: blocked threads with KeepAliveCache.get

2022-09-23 Thread Daniel Fuchs
On Fri, 23 Sep 2022 06:55:11 GMT, Daniel Jeliński wrote: > Please review this patch that makes sure KeepAliveCache does not block all > threads while closing sockets. > > Changes: > - get operation no longer closes sockets; if there's no socket that is recent > enough, get returns null and let

Re: HttpClient infinite HTTP/2 connection pooling

2022-09-23 Thread Daniel Fuchs
Hi Anton, On 23/09/2022 10:02, Anton Keks wrote: Do you have any background info, why the possibility wasn't there in the beginning? Probably this paragraph from the HTTP/2 spec: HTTP/2 connections are persistent. For best performance, it is expected that clients will not close connect

Re: RFR: 8293562: blocked threads with KeepAliveCache.get [v2]

2022-09-27 Thread Daniel Fuchs
On Tue, 27 Sep 2022 09:18:18 GMT, Daniel Jeliński wrote: >> Please review this patch that makes sure KeepAliveCache does not block all >> threads while closing sockets. >> >> Changes: >> - get operation no longer closes sockets; if there's no socket that is >> recent enough, get returns null a

Re: RFR: 8288717: Add a means to close idle connections in HTTP/2 connection pool

2022-09-27 Thread Daniel Fuchs
On Tue, 27 Sep 2022 10:58:07 GMT, Michael McMahon wrote: >> **Issue** >> When using HTTP/2 with the HttpClient, it can often be necessary to close an >> idle Http2 Connection before a server sends a GOAWAY frame. For example, a >> server or cloud based tool could close a TCP connection silently

Re: RFR: 8294375: test/jdk/java/nio/channels/vthread/BlockingChannelOps.java is slow

2022-09-27 Thread Daniel Fuchs
On Mon, 26 Sep 2022 15:35:28 GMT, Alan Bateman wrote: > BlockingChannelOps.java and BlockingSocketOps.java test virtual threads doing > blocking I/O on channels and java.net sockets. > > BlockingChannelOps has 32 tests at this time and takes nearly 120s to run due > to several tests that sleep

Re: RFR: 8293562: blocked threads with KeepAliveCache.get [v2]

2022-09-28 Thread Daniel Fuchs
On Tue, 27 Sep 2022 18:27:17 GMT, Daniel Jeliński wrote: > Should I change that one as well? No need. We'd have to evaluate whether that test wanted to test using getLocalHost() first :-) - PR: https://git.openjdk.org/jdk/pull/10401

Re: RFR: 8293562: blocked threads with KeepAliveCache.get [v3]

2022-09-28 Thread Daniel Fuchs
On Tue, 27 Sep 2022 19:00:28 GMT, Daniel Jeliński wrote: >> Please review this patch that makes sure KeepAliveCache does not block all >> threads while closing sockets. >> >> Changes: >> - get operation no longer closes sockets; if there's no socket that is >> recent enough, get returns null a

Re: RFR: 8051627: Invariants about java.net.URI resolve and relativize are wrong [v2]

2022-09-28 Thread Daniel Fuchs
On Fri, 16 Sep 2022 07:20:11 GMT, KIRIYAMA Takuya wrote: >> I believe you are correct. Could you update the UriTest with some examples >> and counter-examples to validate this claim? > > @dfuch > Thank you for your review and suggestions. > >> A colon ':' may be more appropriate than a period

Re: RFR: 8282395: URL.openConnection can throw IOOBE [v3]

2022-09-28 Thread Daniel Fuchs
On Fri, 16 Sep 2022 06:15:01 GMT, KIRIYAMA Takuya wrote: >> I fixed sun.net.www.ParseUtil.decode(). >> >> ParseUtil.decode() always tries to decode after parsing '%', so if '%' is >> located at the end of the String, IndexOutOfBoundsException is thrown. Also, >> if '%' is shown after decodable

Re: RFR: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni [v2]

2022-09-28 Thread Daniel Fuchs
On Tue, 27 Sep 2022 23:12:43 GMT, Michael Ernst wrote: > Feel free to break up the pull request if that is what is needed to free it > from red tape. Only you can do that @mernst - PR: https://git.openjdk.org/jdk/pull/10029

Re: RFR: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni [v2]

2022-09-28 Thread Daniel Fuchs
On Wed, 28 Sep 2022 14:45:54 GMT, Michael Ernst wrote: >> Michael Ernst has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains six commits: >> >> - Reinstate typos in Apache code that is copied into the JDK >> - Merge ../jdk-openjdk in

Re: RFR: 8294115: JNI local refs exceeds capacity warning in NetworkInterface::getAll [v2]

2022-09-29 Thread Daniel Fuchs
On Thu, 29 Sep 2022 08:13:27 GMT, Daniel Jeliński wrote: >> Please review this patch that fixes the warning `JNI local refs ... exceeds >> capacity` on Windows machines running with IPv6 stack enabled. >> >> This case was missed in JDK-8187450 / #2963. >> >> I verified that with this patch app

Re: RFR: 8225235: Unused field defaultIndex in NetworkInterface

2022-09-29 Thread Daniel Fuchs
On Wed, 28 Sep 2022 18:55:09 GMT, Viktor Klang (Oracle) wrote: > Removes the `defaultIndex`since it is no longer used. Please update copyright years in NetworkInterface.java. Otherwise LGTM! - Marked as reviewed by dfuchs (Reviewer). PR: https://git.openjdk.org/jdk/pull/10471

Re: RFR: 8225235: Unused field defaultIndex in NetworkInterface

2022-09-29 Thread Daniel Fuchs
On Wed, 28 Sep 2022 18:55:09 GMT, Viktor Klang (Oracle) wrote: > Removes the `defaultIndex`since it is no longer used. Thanks! Please integrate and one of us will sponsor. - PR: https://git.openjdk.org/jdk/pull/10471

Re: RFR: 8282395: URL.openConnection can throw IOOBE [v3]

2022-09-29 Thread Daniel Fuchs
On Thu, 29 Sep 2022 10:23:57 GMT, Daniel Fuchs wrote: >> The constructor "MalformedURLException (Throwable cause)" doens'nt exist. >> Isn't there any other method? > > You can use `Throwable::initCause` var mfue = new MalformedURLException(e.getMes

Re: RFR: 8282395: URL.openConnection can throw IOOBE [v3]

2022-09-29 Thread Daniel Fuchs
On Thu, 29 Sep 2022 09:55:17 GMT, KIRIYAMA Takuya wrote: >> src/java.base/share/classes/sun/net/www/protocol/ftp/Handler.java line 66: >> >>> 64: connection = new FtpURLConnection(u, p); >>> 65: } catch (IllegalArgumentException e) { >>> 66: throw new MalformedURL

Re: RFR: 8294610: java/net/vthread/HttpALot.java is slow on Linux

2022-09-30 Thread Daniel Fuchs
On Fri, 30 Sep 2022 09:10:05 GMT, Jaikiran Pai wrote: > Can I please get a review for this test-only change which proposes to improve > the test run duration of `java/net/vthread/HttpALot.java` test, on Linux? > This relates to https://bugs.openjdk.org/browse/JDK-8294610 > > Experiments have s

Re: RFR: 8282395: URL.openConnection can throw IOOBE [v4]

2022-09-30 Thread Daniel Fuchs
On Fri, 30 Sep 2022 09:11:30 GMT, KIRIYAMA Takuya wrote: >> I fixed sun.net.www.ParseUtil.decode(). >> >> ParseUtil.decode() always tries to decode after parsing '%', so if '%' is >> located at the end of the String, IndexOutOfBoundsException is thrown. Also, >> if '%' is shown after decodable

Re: RFR: 8294610: java/net/vthread/HttpALot.java is slow on Linux [v3]

2022-09-30 Thread Daniel Fuchs
On Fri, 30 Sep 2022 10:59:09 GMT, Alan Bateman wrote: >> test/jdk/java/net/vthread/HttpALot.java line 26: >> >>> 24: /** >>> 25: * @test >>> 26: * @bug 8294610 >> >> is this tag valid for a test fix -- afaik it is for a "product code fix" >> i.e. the test is for a fix in the product code ide

Re: RFR: 8294626: Improve URL protocol lower casing

2022-09-30 Thread Daniel Fuchs
On Fri, 30 Sep 2022 10:39:37 GMT, Claes Redestad wrote: > Move a simple utility method from `URL` to the shared `sun.net.util.URLUtil` > class, rename it for clarity and enhance it so that it returns the string > literal if the protocol matches one of the tested variants. This helps reduce > d

Re: RFR: 8294626: Improve URL protocol lower casing [v3]

2022-09-30 Thread Daniel Fuchs
On Fri, 30 Sep 2022 11:43:15 GMT, Claes Redestad wrote: >> Move a simple utility method from `URL` to the shared `sun.net.util.URLUtil` >> class, rename it for clarity and enhance it so that it returns the string >> literal if the protocol matches one of the tested variants. This helps >> redu

Re: RFR: 8294626: Improve URL protocol lower casing [v3]

2022-09-30 Thread Daniel Fuchs
On Fri, 30 Sep 2022 11:46:39 GMT, Claes Redestad wrote: >> Move a simple utility method from `URL` to the shared `sun.net.util.URLUtil` >> class, rename it for clarity and enhance it so that it returns the string >> literal if the protocol matches one of the tested variants. This helps >> redu

Re: RFR: 8294610: java/net/vthread/HttpALot.java is slow on Linux [v3]

2022-09-30 Thread Daniel Fuchs
On Fri, 30 Sep 2022 12:18:51 GMT, Mark Sheppard wrote: >> Hello Mark, it hasn't always been clear to me when to update the `@bug`. The >> contribution guide isn't completely clear either. So I usually update the >> bug id if the test change is substantial (in the way it affects the test). >> I

Re: RFR: 8282395: URL.openConnection can throw IOOBE [v4]

2022-09-30 Thread Daniel Fuchs
On Fri, 30 Sep 2022 09:11:30 GMT, KIRIYAMA Takuya wrote: >> I fixed sun.net.www.ParseUtil.decode(). >> >> ParseUtil.decode() always tries to decode after parsing '%', so if '%' is >> located at the end of the String, IndexOutOfBoundsException is thrown. Also, >> if '%' is shown after decodable

RFR: 8293590: Some syntax checks performed by URL.openConnection() could be performed earlier, at URL construction

2022-10-03 Thread Daniel Fuchs
Many built-in URL Handlers perform additional syntax checking on the URL when `URLStreamHandler::openConnection` / connect is called. In some cases, some of these checks could be also performed earlier, when `URLStreamHandler::parseURL` is called. This fix proposes to slightly modify the behavi

Re: RFR: 8186765: Speed up test sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java

2022-10-03 Thread Daniel Fuchs
On Mon, 3 Oct 2022 14:35:46 GMT, Daniel Jeliński wrote: > This PR reduces the execution time of ProxyAuthTest. > > Before this change the test always required at least 3 minutes to complete > (6x 30 seconds timeout in `SSLSocketTemplate`'s `sslServerSocket.accept()`). > After this change the te

Re: RFR: 8186765: Speed up test sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java [v2]

2022-10-04 Thread Daniel Fuchs
On Tue, 4 Oct 2022 07:04:42 GMT, Daniel Jeliński wrote: >> This PR reduces the execution time of ProxyAuthTest. >> >> Before this change the test always required at least 3 minutes to complete >> (6x 30 seconds timeout in `SSLSocketTemplate`'s `sslServerSocket.accept()`). >> After this change t

  1   2   3   4   5   6   7   8   9   10   >