Re: RFR: 8348986: Improve coverage of enhanced exception messages [v8]

2025-04-25 Thread Michael McMahon
> Hi, > > Enhanced exception messages are designed to hide sensitive information such > as hostnames, IP > addresses from exception message strings, unless the enhanced mode for the > specific category > has been explicitly enabled. Enhanced exceptions were first introduced in > 8204233 in JD

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v6]

2025-04-25 Thread Eirik Bjørsnøs
On Fri, 25 Apr 2025 09:44:34 GMT, Daniel Fuchs wrote: > I wonder if we need to add a comment in OpenStream that "bad" UNC paths are > tested in NonLocalFtpFallback. We could. But there is technincally no such thing as a "bad" UNC path though. If File::exists fails, then it isn't considered a U

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v9]

2025-04-25 Thread Eirik Bjørsnøs
> Please help review this PR which disables the unspecified but long-standing > feature where an `FtpURLConnection` is opened as a fallback for non-local > file URLs. > > Before this change, if a file URL has a non-local host component, say > `file://remotehost/folder/data.txt`, then the imple

Integrated: 8355475: UNCTest should use an existing UNC path

2025-04-25 Thread Eirik Bjørsnøs
On Thu, 24 Apr 2025 08:12:37 GMT, Eirik Bjørsnøs wrote: > Please review this test-only PR which updates `UNCTest.java` to use a UNC > path which is known to exist. > > The test currently uses the file URL > `file://jdk/LOCAL-JAVA/jdk1.4/win/README.txt`, but since this is unlikely to > resolve

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v10]

2025-04-25 Thread Eirik Bjørsnøs
> Please help review this PR which disables the unspecified but long-standing > feature where an `FtpURLConnection` is opened as a fallback for non-local > file URLs. > > Before this change, if a file URL has a non-local host component, say > `file://remotehost/folder/data.txt`, then the imple

Re: RFR: 8355475: UNCTest should use an existing UNC path [v4]

2025-04-25 Thread Eirik Bjørsnøs
On Fri, 25 Apr 2025 11:13:18 GMT, Daniel Fuchs wrote: >> Eirik Bjørsnøs has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Some spell fixes and comment tweaks >> - Use Java-style array declaration > > For what I'm concerned this is good

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default

2025-04-25 Thread Eirik Bjørsnøs
On Wed, 23 Apr 2025 18:28:48 GMT, Daniel Fuchs wrote: > Two tests under `java/net/` are now failing on windows with the message: > "Unsupported non-local file URL" > > java/net/URL/OpenStream.java > java/net/URLConnection/UNCTest.java With the updates to `OpenStream` in this PR and the updates

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v6]

2025-04-25 Thread Daniel Fuchs
On Fri, 25 Apr 2025 09:44:34 GMT, Daniel Fuchs wrote: >> You will still need to update `java/net/URL/OpenStream.java` to make it pass >> with the new changes. Possibly have two `@run`, one with >> `-Djdk.net.file.ftpfallback=true` and one without and adapt the test >> expectation based on the

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v6]

2025-04-25 Thread Eirik Bjørsnøs
On Fri, 25 Apr 2025 12:25:53 GMT, Daniel Fuchs wrote: > Will do. Great! > The CSR could also be moved to "Proposed". It was earlier today. - PR Comment: https://git.openjdk.org/jdk/pull/24657#issuecomment-2830292381

Re: RFR: 8355370: Include server name in HTTP test server thread names to improve diagnostics [v2]

2025-04-25 Thread Jaikiran Pai
On Thu, 24 Apr 2025 07:24:36 GMT, Volkan Yazici wrote: >> Incorporates the test server name while deriving the HTTP/2 test server >> (i.e., `jdk.httpclient.test.lib.http2.Http2TestServer`) thread names to >> improve diagnostics. >> >> ### Making `HttpTestServer` implement `AutoCloseable` >> >

Re: HttpServer.stop seems to wait longer than expected

2025-04-25 Thread Daniel Fuchs
Hi Pavel, No, it's a known bug: https://bugs.openjdk.org/browse/JDK-8304065 best regards, -- daniel On 25/04/2025 16:31, Pavel Rappo wrote: The specification of the method has these words (emphasis mine): The method will then block until all current exchange handlers have completed or els

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v10]

2025-04-25 Thread Daniel Fuchs
On Fri, 25 Apr 2025 17:08:09 GMT, Daniel Fuchs wrote: >> Eirik Bjørsnøs 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 12 additional >> commits

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v10]

2025-04-25 Thread Daniel Fuchs
On Fri, 25 Apr 2025 11:24:11 GMT, Eirik Bjørsnøs wrote: >> Please help review this PR which disables the unspecified but long-standing >> feature where an `FtpURLConnection` is opened as a fallback for non-local >> file URLs. >> >> Before this change, if a file URL has a non-local host compone

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v10]

2025-04-25 Thread Daniel Fuchs
On Fri, 25 Apr 2025 11:24:11 GMT, Eirik Bjørsnøs wrote: >> Please help review this PR which disables the unspecified but long-standing >> feature where an `FtpURLConnection` is opened as a fallback for non-local >> file URLs. >> >> Before this change, if a file URL has a non-local host compone

Re: RFR: 8349910: Implement HTTP/3 for the HTTP Client API [v2]

2025-04-25 Thread Artur Barashev
On Thu, 24 Apr 2025 16:59:45 GMT, Daniel Fuchs wrote: >> Hi, >> >> Please find here a PR for the implementation of JEP [JDK-8291976: HTTP/3 for >> the HTTP Client API](https://bugs.openjdk.org/browse/JDK-8291976). >> >> The CSR can be viewed at [JDK-8350588: Implement HTTP/3 for the HTTP Clien

Re: RFR: 8349910: Implement HTTP/3 for the HTTP Client API [v2]

2025-04-25 Thread Artur Barashev
On Thu, 24 Apr 2025 16:59:45 GMT, Daniel Fuchs wrote: >> Hi, >> >> Please find here a PR for the implementation of JEP [JDK-8291976: HTTP/3 for >> the HTTP Client API](https://bugs.openjdk.org/browse/JDK-8291976). >> >> The CSR can be viewed at [JDK-8350588: Implement HTTP/3 for the HTTP Clien

Range header support

2025-04-25 Thread Josiah Noel
I should mention that the code I posted may not work well with the default single-threaded executor, as the browser's barrage of range requests could cause the server to lock up. I normally use a virtual thread executor, so the chunk size would need a second look if we want to stay with the single-

Re: RFR: 8355475: UNCTest should use an existing UNC path [v4]

2025-04-25 Thread Mikhail Yankelevich
On Fri, 25 Apr 2025 06:19:30 GMT, Eirik Bjørsnøs wrote: >> Please review this test-only PR which updates `UNCTest.java` to use a UNC >> path which is known to exist. >> >> The test currently uses the file URL >> `file://jdk/LOCAL-JAVA/jdk1.4/win/README.txt`, but since this is unlikely to >> r

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v8]

2025-04-25 Thread Eirik Bjørsnøs
> Please help review this PR which disables the unspecified but long-standing > feature where an `FtpURLConnection` is opened as a fallback for non-local > file URLs. > > Before this change, if a file URL has a non-local host component, say > `file://remotehost/folder/data.txt`, then the imple

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v6]

2025-04-25 Thread Daniel Fuchs
On Thu, 24 Apr 2025 10:08:10 GMT, Daniel Fuchs wrote: >> Eirik Bjørsnøs has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix repeated "should should" > > You will still need to update `java/net/URL/OpenStream.java` to make it pass > with

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v7]

2025-04-25 Thread Eirik Bjørsnøs
> Please help review this PR which disables the unspecified but long-standing > feature where an `FtpURLConnection` is opened as a fallback for non-local > file URLs. > > Before this change, if a file URL has a non-local host component, say > `file://remotehost/folder/data.txt`, then the imple

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v6]

2025-04-25 Thread Eirik Bjørsnøs
On Wed, 23 Apr 2025 17:34:33 GMT, Eirik Bjørsnøs wrote: >> Please help review this PR which disables the unspecified but long-standing >> feature where an `FtpURLConnection` is opened as a fallback for non-local >> file URLs. >> >> Before this change, if a file URL has a non-local host compone

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v6]

2025-04-25 Thread Eirik Bjørsnøs
On Fri, 25 Apr 2025 09:55:52 GMT, Eirik Bjørsnøs wrote: > I wonder if we need to add a comment in OpenStream that "bad" UNC paths are > tested in NonLocalFtpFallback. Could we say something like: _For testing of non-local file URLs with the legacy FTP fallback feature enabled, see NonLocalFtp

Re: RFR: 8355475: UNCTest should use an existing UNC path [v4]

2025-04-25 Thread Daniel Fuchs
On Fri, 25 Apr 2025 06:19:30 GMT, Eirik Bjørsnøs wrote: >> Please review this test-only PR which updates `UNCTest.java` to use a UNC >> path which is known to exist. >> >> The test currently uses the file URL >> `file://jdk/LOCAL-JAVA/jdk1.4/win/README.txt`, but since this is unlikely to >> r

Re: RFR: 8355475: UNCTest should use an existing UNC path [v4]

2025-04-25 Thread Daniel Fuchs
On Fri, 25 Apr 2025 06:19:30 GMT, Eirik Bjørsnøs wrote: >> Please review this test-only PR which updates `UNCTest.java` to use a UNC >> path which is known to exist. >> >> The test currently uses the file URL >> `file://jdk/LOCAL-JAVA/jdk1.4/win/README.txt`, but since this is unlikely to >> r

Re: RFR: 8355370: Include server name in HTTP test server thread names to improve diagnostics [v2]

2025-04-25 Thread Daniel Fuchs
On Thu, 24 Apr 2025 07:24:36 GMT, Volkan Yazici wrote: >> Incorporates the test server name while deriving the HTTP/2 test server >> (i.e., `jdk.httpclient.test.lib.http2.Http2TestServer`) thread names to >> improve diagnostics. >> >> ### Making `HttpTestServer` implement `AutoCloseable` >> >

HttpServer.stop seems to wait longer than expected

2025-04-25 Thread Pavel Rappo
The specification of the method has these words (emphasis mine): > The method will then block until all current exchange handlers have completed > or else when approximately delay seconds have elapsed (__whichever happens > sooner__). I noticed that stop(t) blocks for approximately `t` seconds

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v5]

2025-04-25 Thread Eirik Bjørsnøs
On Wed, 23 Apr 2025 17:04:30 GMT, Eirik Bjørsnøs wrote: >> src/java.base/share/classes/java/net/doc-files/net-properties.html line 174: >> >>> 172: >>> 173: File URL stream protocol handler properties >>> 174: The following properties are used to configure the handler for URLs >>> with the {@c

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v11]

2025-04-25 Thread Eirik Bjørsnøs
> Please help review this PR which disables the unspecified but long-standing > feature where an `FtpURLConnection` is opened as a fallback for non-local > file URLs. > > Before this change, if a file URL has a non-local host component, say > `file://remotehost/folder/data.txt`, then the imple

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v10]

2025-04-25 Thread Eirik Bjørsnøs
On Fri, 25 Apr 2025 17:30:41 GMT, Daniel Fuchs wrote: > Sorry - rewording the release note got me thinking again... Documentation Driven Development For The Win! 👍 > src/java.base/share/classes/sun/net/www/protocol/file/FileURLConnection.java > line 55: > >> 53: System.getProperty

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v11]

2025-04-25 Thread Eirik Bjørsnøs
On Fri, 25 Apr 2025 18:48:48 GMT, Daniel Fuchs wrote: > MalformedURLException could be thrown while constructing the URL... Good catch, fixed. - PR Review Comment: https://git.openjdk.org/jdk/pull/24657#discussion_r2060739140

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v12]

2025-04-25 Thread Eirik Bjørsnøs
> Please help review this PR which disables the unspecified but long-standing > feature where an `FtpURLConnection` is opened as a fallback for non-local > file URLs. > > Before this change, if a file URL has a non-local host component, say > `file://remotehost/folder/data.txt`, then the imple

Re: RFR: 8353440: Disable FTP fallback for non-local file URLs by default [v11]

2025-04-25 Thread Daniel Fuchs
On Fri, 25 Apr 2025 18:41:19 GMT, Eirik Bjørsnøs wrote: >> Please help review this PR which disables the unspecified but long-standing >> feature where an `FtpURLConnection` is opened as a fallback for non-local >> file URLs. >> >> Before this change, if a file URL has a non-local host compone

Re: RFR: 8349910: Implement HTTP/3 for the HTTP Client API [v2]

2025-04-25 Thread Artur Barashev
On Thu, 24 Apr 2025 16:59:45 GMT, Daniel Fuchs wrote: >> Hi, >> >> Please find here a PR for the implementation of JEP [JDK-8291976: HTTP/3 for >> the HTTP Client API](https://bugs.openjdk.org/browse/JDK-8291976). >> >> The CSR can be viewed at [JDK-8350588: Implement HTTP/3 for the HTTP Clien

Re: RFR: 8349910: Implement HTTP/3 for the HTTP Client API [v2]

2025-04-25 Thread Artur Barashev
On Thu, 24 Apr 2025 16:59:45 GMT, Daniel Fuchs wrote: >> Hi, >> >> Please find here a PR for the implementation of JEP [JDK-8291976: HTTP/3 for >> the HTTP Client API](https://bugs.openjdk.org/browse/JDK-8291976). >> >> The CSR can be viewed at [JDK-8350588: Implement HTTP/3 for the HTTP Clien

Range header support

2025-04-25 Thread Josiah Noel
I present for your consideration the kind of logic I normally use for range requests with the jdk.httpserver. It can resume downloads and properly stream video to the browser. Link to Gist -- Cheers, Josiah.