Re: RFR: 8358688: HttpClient: Simplify file streaming in RequestPublishers.FilePublisher

2025-06-06 Thread Volkan Yazici
On Thu, 5 Jun 2025 15:19:09 GMT, Daniel Fuchs wrote: >> src/java.net.http/share/classes/jdk/internal/net/http/RequestPublishers.java >> line 269: >> >>> 267: // The old code was using `FileInputStream::new`, >>> which throws `FNFE` if file doesn't exist. >>> 268:

Re: RFR: 8340182: Java HttpClient does not follow default retry limit of 3 retries [v2]

2025-06-06 Thread p-nima
> The AuthenticationFilter did not respect the default retry limit of 3 retries > in case of invalid credentials supplied. > > This PR helps to resolve the bug and tests it with default and updated retry > limit set via `jdk.httpclient.auth.retrylimit=1`. > > The test is green with tiers 1, 2,

Re: RFR: 8358688: HttpClient: Simplify file streaming in RequestPublishers.FilePublisher

2025-06-06 Thread Volkan Yazici
On Fri, 6 Jun 2025 07:38:21 GMT, Volkan Yazici wrote: >> Good idea. FWIW, and ulness I'm mistaken, I believe the old code was not >> always throwing `FileNotFoundException` - but might have thrown >> `NoSuchFileException` if using a non-default filesystem. If >> `FileNotFoundException` is sp

Re: RFR: 8358688: HttpClient: Simplify file streaming in RequestPublishers.FilePublisher

2025-06-06 Thread Volkan Yazici
On Thu, 5 Jun 2025 14:03:30 GMT, Jaikiran Pai wrote: > it might still be better to remove those tests independently in a separate > task. @jaikiran, sure, will do. > While at it, I think we should also introduce a regression test which does a > `BodyPublishers.ofFile(Path)` against a `Path` p

Re: RFR: 8358688: HttpClient: Simplify file streaming in RequestPublishers.FilePublisher

2025-06-06 Thread Daniel Fuchs
On Fri, 6 Jun 2025 07:47:17 GMT, Volkan Yazici wrote: > Such a test already exists: FilePublisherTest. I deleted its SM counterpart: > FilePublisherPermsTest. This test seems to test more things and less things than FilePublisherTest (typically it does test FileNotFoundException). We shouldn't

Re: RFR: 8358688: HttpClient: Simplify file streaming in RequestPublishers.FilePublisher [v2]

2025-06-06 Thread Volkan Yazici
> Simplifies content streaming for `HttpRequest.BodyPublishers::ofFile(Path)`, > which delegates to `RequestPublishers.FilePublisher::create(Path)`. This > effectively replaces all usages of `FileInputStream::new` in `HttpClient` > with `Files::newInputStream(Path)`. See the JBS ticket descripti

Re: RFR: 8358688: HttpClient: Simplify file streaming in RequestPublishers.FilePublisher [v3]

2025-06-06 Thread Daniel Fuchs
On Fri, 6 Jun 2025 11:13:38 GMT, Volkan Yazici wrote: >> OK > >> The "default file system" is required to support that feature, but there can >> be other file systems that support that too. > > I need to amend this statement: Per [`Path::toFile` specification]( > https://docs.oracle.com/en/jav

Re: RFR: 8349910: Implement JEP 517: HTTP/3 for the HTTP Client API [v7]

2025-06-06 Thread Daniel Fuchs
> Hi, > > Please find here a PR for the implementation of [JEP 517: HTTP/3 for the HTTP > Client API](https://openjdk.org/jeps/517). > > The CSR can be viewed at [JDK-8350588: Implement JEP 517: HTTP/3 for the HTTP > Client API](https://bugs.openjdk.org/browse/JDK-8350588) > > This JEP propose

Re: RFR: 8340182: Java HttpClient does not follow default retry limit of 3 retries [v2]

2025-06-06 Thread p-nima
On Fri, 30 May 2025 09:06:00 GMT, Volkan Yazici wrote: >> p-nima has updated the pull request incrementally with one additional commit >> since the last revision: >> >> apply review feedback > > test/jdk/java/net/httpclient/HttpClientRetryLimitTest.java line 113: > >> 111: }

Re: RFR: 8340182: Java HttpClient does not follow default retry limit of 3 retries [v3]

2025-06-06 Thread p-nima
> The AuthenticationFilter did not respect the default retry limit of 3 retries > in case of invalid credentials supplied. > > This PR helps to resolve the bug and tests it with default and updated retry > limit set via `jdk.httpclient.auth.retrylimit=1`. > > The test is green with tiers 1, 2,

Re: RFR: 8358688: HttpClient: Simplify file streaming in RequestPublishers.FilePublisher [v2]

2025-06-06 Thread Daniel Fuchs
On Fri, 6 Jun 2025 07:44:33 GMT, Volkan Yazici wrote: >> Placing `isRegularFile()` check to `create()` indeed was my initial attempt >> too. Though that resulted in a behavior change: Earlier the regular file >> check was performed by `FIS::new` at subscription, hence, `NSFE` (yes, >> `FIS::ne

Re: RFR: 8358688: HttpClient: Simplify file streaming in RequestPublishers.FilePublisher [v2]

2025-06-06 Thread Daniel Fuchs
On Fri, 6 Jun 2025 08:11:35 GMT, Volkan Yazici wrote: >> Simplifies content streaming for `HttpRequest.BodyPublishers::ofFile(Path)`, >> which delegates to `RequestPublishers.FilePublisher::create(Path)`. This >> effectively replaces all usages of `FileInputStream::new` in `HttpClient` >> with

Re: RFR: 8358688: HttpClient: Simplify file streaming in RequestPublishers.FilePublisher [v3]

2025-06-06 Thread Volkan Yazici
> Simplifies content streaming for `HttpRequest.BodyPublishers::ofFile(Path)`, > which delegates to `RequestPublishers.FilePublisher::create(Path)`. This > effectively replaces all usages of `FileInputStream::new` in `HttpClient` > with `Files::newInputStream(Path)`. See the JBS ticket descripti

Re: RFR: 8358688: HttpClient: Simplify file streaming in RequestPublishers.FilePublisher [v2]

2025-06-06 Thread Volkan Yazici
On Fri, 6 Jun 2025 08:25:44 GMT, Daniel Fuchs wrote: > I wonder if we should add `@bug 8358688` to the various FilePublisher test - > or just consider the fix as noreg-cleanup. On the one hand those tests might > have failed if you hadn't catched and transformed NSFE. On the other hand > they

Re: RFR: 8358688: HttpClient: Simplify file streaming in RequestPublishers.FilePublisher [v2]

2025-06-06 Thread Volkan Yazici
On Fri, 6 Jun 2025 08:28:30 GMT, Daniel Fuchs wrote: >> Volkan Yazici has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add back removed SM tests > > src/java.net.http/share/classes/jdk/internal/net/http/RequestPublishers.java > line 269:

Re: RFR: 8358688: HttpClient: Simplify file streaming in RequestPublishers.FilePublisher [v3]

2025-06-06 Thread Daniel Fuchs
On Fri, 6 Jun 2025 11:07:34 GMT, Volkan Yazici wrote: >> Simplifies content streaming for `HttpRequest.BodyPublishers::ofFile(Path)`, >> which delegates to `RequestPublishers.FilePublisher::create(Path)`. This >> effectively replaces all usages of `FileInputStream::new` in `HttpClient` >> with

Re: RFR: 8358688: HttpClient: Simplify file streaming in RequestPublishers.FilePublisher [v3]

2025-06-06 Thread Volkan Yazici
On Fri, 6 Jun 2025 08:21:31 GMT, Daniel Fuchs wrote: >>> I believe the old code was not always throwing `FileNotFoundException` - >>> but might have thrown `NoSuchFileException` if using a non-default >>> filesystem. >> >> @dfuch, correct. If `Path` is associated with a file system that doesn'

Re: RFR: 8358688: HttpClient: Simplify file streaming in RequestPublishers.FilePublisher [v2]

2025-06-06 Thread Daniel Fuchs
On Fri, 6 Jun 2025 11:07:00 GMT, Volkan Yazici wrote: >> src/java.net.http/share/classes/jdk/internal/net/http/RequestPublishers.java >> line 269: >> >>> 267: // The old code was using `FileInputStream::new`, >>> which throws `FNFE` if file doesn't exist. >>> 268:

Re: RFR: 8353113: Peer supported certificate signature algorithms are not being checked with default SunX509 key manager [v4]

2025-06-06 Thread Sean Mullan
On Wed, 14 May 2025 18:16:13 GMT, Artur Barashev wrote: >> When the deafult SunX509KeyManagerImpl is being used we are in violation of >> TLSv1.3 RFC spec because we ignore peer supported certificate signatures >> sent to us in "signature_algorithms"/"signature_algorithms_cert" extensions: >> h

Re: RFR: 8340182: Java HttpClient does not follow default retry limit of 3 retries [v3]

2025-06-06 Thread p-nima
On Fri, 30 May 2025 14:42:11 GMT, Volkan Yazici wrote: >> p-nima has updated the pull request incrementally with one additional commit >> since the last revision: >> >> update summary > > test/jdk/java/net/httpclient/HttpClientRetryLimitTest.java line 64: > >> 62: "jdk.httpclient

Re: RFR: 8353113: Peer supported certificate signature algorithms are not being checked with default SunX509 key manager [v4]

2025-06-06 Thread Artur Barashev
On Thu, 5 Jun 2025 19:31:55 GMT, Sean Mullan wrote: >> Artur Barashev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Make the test run on TLSv1.3 > > test/jdk/sun/security/ssl/X509KeyManager/PeerConstraintsCheck.java line 1: > >> 1: /*

Re: RFR: 8340182: Java HttpClient does not follow default retry limit of 3 retries [v3]

2025-06-06 Thread p-nima
On Fri, 30 May 2025 09:08:46 GMT, Volkan Yazici wrote: >> p-nima has updated the pull request incrementally with one additional commit >> since the last revision: >> >> update summary > > test/jdk/java/net/httpclient/HttpClientRetryLimitTest.java line 73: > >> 71: @ParameterizedTest >> 7

Re: RFR: 8340182: Java HttpClient does not follow default retry limit of 3 retries [v3]

2025-06-06 Thread p-nima
On Fri, 30 May 2025 15:01:03 GMT, Daniel Fuchs wrote: >> test/jdk/java/net/httpclient/HttpClientRetryLimitTest.java line 57: >> >>> 55: >>> 56: >>> 57: class HttpClientRetryLimitTest implements HttpServerAdapters { >> >> Shall we rename this to `HttpClientAuthRetryLimit`, since [there are sev

Re: RFR: 8353113: Peer supported certificate signature algorithms are not being checked with default SunX509 key manager [v4]

2025-06-06 Thread Artur Barashev
On Fri, 6 Jun 2025 13:20:20 GMT, Sean Mullan wrote: >> Artur Barashev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Make the test run on TLSv1.3 > > src/java.base/share/classes/sun/security/ssl/X509KeyManagerConstraints.java > line 17

Re: RFR: 8353113: Peer supported certificate signature algorithms are not being checked with default SunX509 key manager [v3]

2025-06-06 Thread Hai-May Chao
On Thu, 15 May 2025 19:29:07 GMT, Sean Mullan wrote: > > > It is nice to refactor the common code for algorithm constraints checking > > > into a new class, `X509KeyManagerConstraints.java`, used by both > > > `SunX509KeyManagerImpl` and `X509KeyManagerImpl`. However, it looks like > > > a new

Re: RFR: 8353113: Peer supported certificate signature algorithms are not being checked with default SunX509 key manager [v4]

2025-06-06 Thread Artur Barashev
On Thu, 5 Jun 2025 17:40:28 GMT, Sean Mullan wrote: >> Artur Barashev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Make the test run on TLSv1.3 > > src/java.base/share/classes/sun/security/ssl/SunX509KeyManagerImpl.java line > 264: >

Re: RFR: 8353113: Peer supported certificate signature algorithms are not being checked with default SunX509 key manager [v4]

2025-06-06 Thread Artur Barashev
On Fri, 6 Jun 2025 15:20:56 GMT, Sean Mullan wrote: >> Artur Barashev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Make the test run on TLSv1.3 > > src/java.base/share/classes/sun/security/ssl/SunX509KeyManagerImpl.java line > 401: >

Re: RFR: 8353113: Peer supported certificate signature algorithms are not being checked with default SunX509 key manager [v4]

2025-06-06 Thread Artur Barashev
On Thu, 5 Jun 2025 15:10:35 GMT, Sean Mullan wrote: >> Artur Barashev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Make the test run on TLSv1.3 > > test/lib/jdk/test/lib/security/CertificateBuilder.java line 244: > >> 242: * @th

Re: RFR: 8353113: Peer supported certificate signature algorithms are not being checked with default SunX509 key manager [v4]

2025-06-06 Thread Artur Barashev
On Thu, 5 Jun 2025 19:00:27 GMT, Sean Mullan wrote: >> Artur Barashev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Make the test run on TLSv1.3 > > test/jdk/sun/net/www/protocol/https/HttpsClient/ServerIdentityTest.java line > 1: >