Re: RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v3]

2024-05-01 Thread Mark Sheppard
On Fri, 26 Apr 2024 15:37:13 GMT, robert engels wrote: >> improve the HttpExchange api with documented constants and convenience >> methods to avoid common bugs > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > Update > sr

Re: RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v3]

2024-05-01 Thread robert engels
On Wed, 1 May 2024 11:21:59 GMT, Mark Sheppard wrote: > sendResponseHeaderChunked The description implies that this method is sending > a chunked response, but the method is not doing that. ... I don't think it is implying that. The methods: OutputStream sendResponseHeadersChunked(int code);

Re: RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v3]

2024-05-01 Thread Daniel Fuchs
On Wed, 1 May 2024 12:40:52 GMT, robert engels wrote: > OutputStream sendResponseHeadersChunked(int code); > OutputStream sendResponseHeadersFixed(int code,long length); I still think that these methods should either return `void` or be renamed, though I have been struggling to find a name that

Re: RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v3]

2024-05-01 Thread Bernd
On Fri, 26 Apr 2024 15:37:13 GMT, robert engels wrote: >> improve the HttpExchange api with documented constants and convenience >> methods to avoid common bugs > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > Update > sr

Re: RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v3]

2024-05-01 Thread robert engels
On Wed, 1 May 2024 13:06:02 GMT, Daniel Fuchs wrote: > Maybe the lesser of the two evil would be to return `void`. If you return void you prevent the linter from trapping the improper use of the OutputStream. If you use these methods - or even the existing similar structure - you must get and

Re: RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v3]

2024-05-01 Thread robert engels
On Fri, 26 Apr 2024 15:37:13 GMT, robert engels wrote: >> improve the HttpExchange api with documented constants and convenience >> methods to avoid common bugs > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > Update > sr

Re: RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v3]

2024-05-01 Thread robert engels
On Wed, 1 May 2024 13:13:44 GMT, Bernd wrote: > I agree that the sendResponse(NoContent) methods are good. > > I don’t think the “Headers” is particular clear - maybe “OS > startChunkedResponse(int)” (but only if it actually encodes it chunked) and > “OS startResponse(int status, long length)”

Re: RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v3]

2024-05-01 Thread Daniel Fuchs
On Wed, 1 May 2024 13:26:39 GMT, robert engels wrote: > I might prefer `OS beginChunkedResponse()` and `OS beginFixedResponse()`. That's not a bad suggestion (whether startXxxx or beginXxxx). My gripe with `OS sendResponseHeadersX` is that the existing `void sendResponseHeaders` returns `v

Re: RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v3]

2024-05-01 Thread Mark Sheppard
On Fri, 26 Apr 2024 15:37:13 GMT, robert engels wrote: >> improve the HttpExchange api with documented constants and convenience >> methods to avoid common bugs > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > Update > sr

Re: RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v3]

2024-05-01 Thread robert engels
On Wed, 1 May 2024 15:10:22 GMT, Mark Sheppard wrote: > It is not sending a chunked response, nor is it setting the Transfer-Encoding > header to chunked for a chunked response The javadoc was just a starting point - the method name is pretty clear imo opinion what it does - but there are othe

Re: RFR: 8330814: Cleanups for KeepAliveCache tests [v6]

2024-05-01 Thread Christoph Langer
> While working in that area I found some potential for cleanup of a few tests. > > Most notably: > > B5045306.java: > - does not need to run in othervm > - the executor service that it uses should be shut down eventually to free > resources > > B8291637.java: > - use just one instead of two te

Re: RFR: 8330814: Cleanups for KeepAliveCache tests [v2]

2024-05-01 Thread Christoph Langer
On Tue, 30 Apr 2024 15:04:37 GMT, Daniel Fuchs wrote: >> I've thought about this, too. However, I see the only critical point why it >> could merit a `/othervm` test is this thing with querying the thread CPU >> time of the Keep-Alive-SocketCleaner thread. But I think the likelihood of >> this

Re: RFR: 8330814: Cleanups for KeepAliveCache tests [v5]

2024-05-01 Thread Christoph Langer
On Tue, 30 Apr 2024 15:07:52 GMT, Daniel Fuchs wrote: >> Christoph Langer 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 seven additional >> co

Re: RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v4]

2024-05-01 Thread robert engels
> improve the HttpExchange api with documented constants and convenience > methods to avoid common bugs robert engels has updated the pull request incrementally with two additional commits since the last revision: - Merge remote-tracking branch 'robaho/HttpExchange-api-change' into HttpExchan

Re: RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v3]

2024-05-01 Thread robert engels
On Fri, 26 Apr 2024 15:37:13 GMT, robert engels wrote: >> improve the HttpExchange api with documented constants and convenience >> methods to avoid common bugs > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > Update > sr

Re: RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v4]

2024-05-01 Thread Ethan McCue
On Wed, 1 May 2024 21:12:05 GMT, robert engels wrote: >> improve the HttpExchange api with documented constants and convenience >> methods to avoid common bugs > > robert engels has updated the pull request incrementally with two additional > commits since the last revision: > > - Merge remot

Re: RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v4]

2024-05-01 Thread Ethan McCue
On Wed, 1 May 2024 21:12:05 GMT, robert engels wrote: >> improve the HttpExchange api with documented constants and convenience >> methods to avoid common bugs > > robert engels has updated the pull request incrementally with two additional > commits since the last revision: > > - Merge remot

Re: RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v3]

2024-05-01 Thread Mark Sheppard
On Wed, 1 May 2024 20:42:22 GMT, robert engels wrote: > But on the point above is not correct. If you follow the code path, you will > see that setting a length of 0 - which is what that method defers to - will > cause a chunked response to be sent - when it is written to the OutputStream. > I

Re: RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v4]

2024-05-01 Thread robert engels
On Wed, 1 May 2024 21:12:05 GMT, robert engels wrote: >> improve the HttpExchange api with documented constants and convenience >> methods to avoid common bugs > > robert engels has updated the pull request incrementally with two additional > commits since the last revision: > > - Merge remot

Re: RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v4]

2024-05-01 Thread robert engels
On Wed, 1 May 2024 21:12:05 GMT, robert engels wrote: >> improve the HttpExchange api with documented constants and convenience >> methods to avoid common bugs > > robert engels has updated the pull request incrementally with two additional > commits since the last revision: > > - Merge remot

RFR: 8331513: Tests should not use the Classpath exception form of the legal header

2024-05-01 Thread Jaikiran Pai
Can I please get a review of this copyright text only change that removes the "Classpath" exception from these test files and thus addresses https://bugs.openjdk.org/browse/JDK-8331513? - Commit messages: - 8331513: Tests should not use the Classpath exception form of the legal he