On Fri, 31 Jul 2026 15:42:55 GMT, Daniel Fuchs <[email protected]> wrote:
>> Daniel Jeliński has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add a comment to explain how the incomplete request is sent > > test/jdk/com/sun/net/httpserver/simpleserver/jwebserver/MaxRequestTimeTest.java > line 148: > >> 146: requestBuffer.clear(); >> 147: // only send a part of the HTTP request >> 148: int numBytes = RND.nextInt(1, requestBuffer.limit()); > > Won't this occasionally send the full request? The second param to `Random.nextInt(...)` is "exclusive". So this call is guaranteed to return at least one byte less than the number of bytes in the `requestText`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/31983#discussion_r3691637061
