Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v27]

2024-05-07 Thread Daniel Fuchs
On Thu, 25 Apr 2024 17:01:52 GMT, robert engels wrote: >> fix bug JDK-B6968351 by avoiding flush after response headers > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > update copyright date Tests were green. Please integr

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v27]

2024-05-07 Thread Jaikiran Pai
On Thu, 25 Apr 2024 17:01:52 GMT, robert engels wrote: >> fix bug JDK-B6968351 by avoiding flush after response headers > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > update copyright date Marked as reviewed by jpai (Rev

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v27]

2024-05-07 Thread Daniel Jeliński
On Thu, 25 Apr 2024 17:01:52 GMT, robert engels wrote: >> fix bug JDK-B6968351 by avoiding flush after response headers > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > update copyright date LGTM. In order to proceed, use

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v27]

2024-05-03 Thread Michael McMahon
On Thu, 25 Apr 2024 17:01:52 GMT, robert engels wrote: >> fix bug JDK-B6968351 by avoiding flush after response headers > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > update copyright date Looks fine. Thanks for the cont

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v23]

2024-05-02 Thread Daniel Fuchs
On Fri, 26 Apr 2024 13:24:08 GMT, Michael McMahon wrote: >>> I created a PR for the related proposed api changes #18955 >> >> I don't think I have the ability to create issues, so I can't create one for >> the api changes. > >> > I created a PR for the related proposed api changes #18955 >> >>

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v27]

2024-04-26 Thread Jaikiran Pai
On Fri, 26 Apr 2024 17:57:57 GMT, Varada M wrote: >> test/jdk/com/sun/net/httpserver/simpleserver/StressDirListings.java line 28: >> >>> 26: * @summary Test to stress directory listings >>> 27: * @library /test/lib >>> 28: * @run testng/othervm/timeout=180 StressDirListings >> >> Hello Varad

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v27]

2024-04-26 Thread Varada M
On Fri, 26 Apr 2024 08:59:11 GMT, Jaikiran Pai wrote: >> robert engels has updated the pull request incrementally with one additional >> commit since the last revision: >> >> update copyright date > > test/jdk/com/sun/net/httpserver/simpleserver/StressDirListings.java line 28: > >> 26: * @s

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v23]

2024-04-26 Thread robert engels
On Fri, 26 Apr 2024 13:24:08 GMT, Michael McMahon wrote: > > > I created a PR for the related proposed api changes #18955 > > > > > > I don't think I have the ability to create issues, so I can't create one > > for the api changes. > > I created a new Jira issue for this. It's at: > https://

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v23]

2024-04-26 Thread Michael McMahon
On Thu, 25 Apr 2024 16:08:24 GMT, robert engels wrote: > > I created a PR for the related proposed api changes #18955 > > I don't think I have the ability to create issues, so I can't create one for > the api changes. I created a new Jira issue for this. It's at: https://bugs.openjdk.org/brow

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-26 Thread robert engels
On Fri, 26 Apr 2024 09:01:49 GMT, Jaikiran Pai wrote: >> done > > Thank you Robert for considering the review comments and updating several > parts of this new test. You're welcome. Happy to help. - PR Review Comment: https://git.openjdk.org/jdk/pull/18667#discussion_r1580995713

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-26 Thread robert engels
On Fri, 26 Apr 2024 08:23:32 GMT, Michael McMahon wrote: >> I created a PR for the api changes https://github.com/openjdk/jdk/pull/18955 > >> I created a PR for the api changes #18955 > > I am working on a PR with some other API changes. I'd prefer to include this > change in that one as well.

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v27]

2024-04-26 Thread Jaikiran Pai
On Thu, 25 Apr 2024 17:01:52 GMT, robert engels wrote: >> fix bug JDK-B6968351 by avoiding flush after response headers > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > update copyright date test/jdk/com/sun/net/httpserver

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-26 Thread Jaikiran Pai
On Thu, 25 Apr 2024 15:20:34 GMT, robert engels wrote: >> test/jdk/com/sun/net/httpserver/bugs/TcpNoDelayNotRequired.java line 60: >> >>> 58: InetAddress loopback = InetAddress.getLoopbackAddress(); >>> 59: InetSocketAddress addr = new InetSocketAddress (loopback, 0); >>> 60:

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-26 Thread Michael McMahon
On Thu, 25 Apr 2024 15:55:38 GMT, robert engels wrote: >> I am more than willing to work on an API change PR to add these methods. It >> is an abstract class, so they could collide with existing code, but I am >> guessing it is a trivial fix if it does, and it would break at compile time >> no

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v27]

2024-04-25 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with one additional commit since the last revision: update copyright date - Changes: - all: https://git.openjdk.org/jdk/pull/18667/files - new: https://git

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v26]

2024-04-25 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with two additional commits since the last revision: - update copyright date - update copyright date - Changes: - all: https://git.openjdk.org/jdk/pull/18667

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v25]

2024-04-25 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with two additional commits since the last revision: - Merge remote-tracking branch 'robaho/B6968351' into B6968351 - no need for tcp nodelay after this fix -

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v21]

2024-04-25 Thread robert engels
On Thu, 25 Apr 2024 15:49:23 GMT, Daniel Fuchs wrote: >> robert engels has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add https testing > > src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpsServer.java line > 2: > >> 1: /*

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v23]

2024-04-25 Thread robert engels
On Thu, 25 Apr 2024 16:02:06 GMT, robert engels wrote: >> fix bug JDK-B6968351 by avoiding flush after response headers > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > use try with resource for HttpClient I created a PR f

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v24]

2024-04-25 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with two additional commits since the last revision: - Update src/jdk.httpserver/share/classes/sun/net/httpserver/ChunkedOutputStream.java Co-authored-by: Daniel Fuch

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v23]

2024-04-25 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with one additional commit since the last revision: use try with resource for HttpClient - Changes: - all: https://git.openjdk.org/jdk/pull/18667/files - n

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-25 Thread robert engels
On Thu, 25 Apr 2024 14:40:36 GMT, robert engels wrote: >> I’m on mobile now so I haven’t looked at the api - but I think adding >> default methods like >> >> sendResponseHeadersNoContent(int code) >> >> and OutputStream sendResponseHeadersChunked(int code) >> >> possibly sendResponeWithConten

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v22]

2024-04-25 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with one additional commit since the last revision: Update full name - Changes: - all: https://git.openjdk.org/jdk/pull/18667/files - new: https://git.open

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v21]

2024-04-25 Thread Daniel Fuchs
On Thu, 25 Apr 2024 15:24:12 GMT, robert engels wrote: >> fix bug JDK-B6968351 by avoiding flush after response headers > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > add https testing src/jdk.httpserver/share/classes/co

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v21]

2024-04-25 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with one additional commit since the last revision: add https testing - Changes: - all: https://git.openjdk.org/jdk/pull/18667/files - new: https://git.ope

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-25 Thread robert engels
On Thu, 25 Apr 2024 12:28:25 GMT, Jaikiran Pai wrote: >> robert engels has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix broken test cases > > test/jdk/com/sun/net/httpserver/bugs/TcpNoDelayNotRequired.java line 60: > >> 58: I

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-25 Thread robert engels
On Thu, 25 Apr 2024 12:17:22 GMT, Jaikiran Pai wrote: >> robert engels has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix broken test cases > > test/jdk/com/sun/net/httpserver/bugs/TcpNoDelayNotRequired.java line 32: > >> 30: */ >> 31

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v20]

2024-04-25 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with one additional commit since the last revision: document chunk handing explicitly - Changes: - all: https://git.openjdk.org/jdk/pull/18667/files - new:

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-25 Thread robert engels
On Thu, 25 Apr 2024 13:36:53 GMT, robert engels wrote: >>> I think a better solution would be to add a constant to the api class - >>> rather than adding comments everywhere. E.g NO_CONTENT=-1 and >>> UNLIMITED_CONTENT=0 or INDETERMINENT_CONTENT=0, or CHUNKED_CONTENT=0 >> >> That's not a bad i

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v19]

2024-04-25 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with one additional commit since the last revision: clean and move test based on PR review - Changes: - all: https://git.openjdk.org/jdk/pull/18667/files -

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v18]

2024-04-25 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with one additional commit since the last revision: update copyright date - Changes: - all: https://git.openjdk.org/jdk/pull/18667/files - new: https://git

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-25 Thread robert engels
On Thu, 25 Apr 2024 13:29:25 GMT, Michael McMahon wrote: >> I think a better solution would be to add a constant to the api class - >> rather than adding comments everywhere. E.g NO_CONTENT=-1 and >> UNLIMITED_CONTENT=0 or INDETERMINENT_CONTENT=0, or CHUNKED_CONTENT=0 > >> I think a better solu

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-25 Thread robert engels
On Thu, 25 Apr 2024 12:58:36 GMT, robert engels wrote: >> We have been using these newer constructs whenever a new test gets added, >> but we don't update all tests in one go for such changes. If/when old tests >> are updated for some bug fix relevant to that test, depending on the >> complexi

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-25 Thread Michael McMahon
On Thu, 25 Apr 2024 12:52:14 GMT, robert engels wrote: > I think a better solution would be to add a constant to the api class - > rather than adding comments everywhere. E.g NO_CONTENT=-1 and > UNLIMITED_CONTENT=0 or INDETERMINENT_CONTENT=0, or CHUNKED_CONTENT=0 That's not a bad idea. I am do

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-25 Thread Michael McMahon
On Wed, 24 Apr 2024 10:41:19 GMT, robert engels wrote: > Yep. Just let me know if there is anything else you need me to do. Thats ok. I'll take care of the release note. - PR Review Comment: https://git.openjdk.org/jdk/pull/18667#discussion_r1579475193

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-25 Thread robert engels
On Thu, 25 Apr 2024 12:50:23 GMT, Jaikiran Pai wrote: >> Isn’t consistency in the code base more important. I like the change but it >> seems there should be a single PR that changes all of the test cases to this >> format. > > We have been using these newer constructs whenever a new test gets

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-25 Thread robert engels
On Thu, 25 Apr 2024 12:39:56 GMT, Jaikiran Pai wrote: >> robert engels has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix broken test cases > > test/jdk/java/net/Authenticator/B4769350.java line 358: > >> 356: { >> 357:

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-25 Thread Jaikiran Pai
On Thu, 25 Apr 2024 12:45:28 GMT, robert engels wrote: >> test/jdk/com/sun/net/httpserver/bugs/TcpNoDelayNotRequired.java line 99: >> >>> 97: t.sendResponseHeaders(200,5); >>> 98: >>> t.getResponseBody().write("hello".getBytes(StandardCharsets.ISO_8859_1)); >>> 99:

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-25 Thread robert engels
On Thu, 25 Apr 2024 12:11:42 GMT, Jaikiran Pai wrote: >> robert engels has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix broken test cases > > test/jdk/com/sun/net/httpserver/bugs/TcpNoDelayNotRequired.java line 29: > >> 27: * @summa

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-25 Thread Jaikiran Pai
On Tue, 23 Apr 2024 19:10:48 GMT, robert engels wrote: >> fix bug JDK-B6968351 by avoiding flush after response headers > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > fix broken test cases I think it might be better to m

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-25 Thread Jaikiran Pai
On Tue, 23 Apr 2024 19:10:48 GMT, robert engels wrote: >> fix bug JDK-B6968351 by avoiding flush after response headers > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > fix broken test cases test/jdk/com/sun/net/httpserver

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-25 Thread Jaikiran Pai
On Tue, 23 Apr 2024 19:10:48 GMT, robert engels wrote: >> fix bug JDK-B6968351 by avoiding flush after response headers > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > fix broken test cases test/jdk/com/sun/net/httpserver

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-25 Thread Jaikiran Pai
On Tue, 23 Apr 2024 19:10:48 GMT, robert engels wrote: >> fix bug JDK-B6968351 by avoiding flush after response headers > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > fix broken test cases test/jdk/com/sun/net/httpserver

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-25 Thread Jaikiran Pai
On Tue, 23 Apr 2024 19:10:48 GMT, robert engels wrote: >> fix bug JDK-B6968351 by avoiding flush after response headers > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > fix broken test cases test/jdk/com/sun/net/httpserver

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-25 Thread Jaikiran Pai
On Tue, 23 Apr 2024 19:10:48 GMT, robert engels wrote: >> fix bug JDK-B6968351 by avoiding flush after response headers > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > fix broken test cases test/jdk/com/sun/net/httpserver

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-25 Thread Jaikiran Pai
On Thu, 25 Apr 2024 12:01:41 GMT, Jaikiran Pai wrote: >> robert engels has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix broken test cases > > test/jdk/com/sun/net/httpserver/bugs/TcpNoDelayNotRequired.java line 2: > >> 1: /* >> 2: *

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-25 Thread Daniel Jeliński
On Tue, 23 Apr 2024 19:10:48 GMT, robert engels wrote: >> fix bug JDK-B6968351 by avoiding flush after response headers > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > fix broken test cases LGTM. Thanks! - M

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-24 Thread robert engels
On Wed, 24 Apr 2024 08:31:14 GMT, Michael McMahon wrote: >> By the way, as an x-Googler I am familiar with Hyrum and have seen the link. >> >> Since the api allows for async handling - validating that an arbitrary >> handler closes the stream doesn't seem possible other than by testing that >

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-24 Thread Michael McMahon
On Tue, 23 Apr 2024 19:31:03 GMT, robert engels wrote: >> The PR has been updated to fix the tests. > > By the way, as an x-Googler I am familiar with Hyrum and have seen the link. > > Since the api allows for async handling - validating that an arbitrary > handler closes the stream doesn't se

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-23 Thread robert engels
On Tue, 23 Apr 2024 19:08:06 GMT, robert engels wrote: >> If the handler sends headers(code,0) and doesn't close the stream, the >> connection is dead. If what you are saying is that the old behavior was to >> send the headers at this point, the client would see it and terminate the >> connect

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-23 Thread robert engels
On Tue, 23 Apr 2024 16:19:12 GMT, robert engels wrote: >> If the client was based on HttpURLConnection in Java and if the code was >> doing HTTP authentication then it's possible it could happen because >> HTTPURLConnection closes the connection in between each phase of the >> authentication (

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v17]

2024-04-23 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with one additional commit since the last revision: fix broken test cases - Changes: - all: https://git.openjdk.org/jdk/pull/18667/files - new: https://git

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-23 Thread robert engels
On Tue, 23 Apr 2024 15:24:52 GMT, Michael McMahon wrote: >> I’ll update the PR to fix the tests. I understand the need for backwards >> compatibility- it’s one of the prime reasons Java is awesome - but in this >> situation the tests are validating that 1+1=3 and I don’t think anyone wants >>

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v15]

2024-04-23 Thread robert engels
On Tue, 23 Apr 2024 08:29:41 GMT, Daniel Jeliński wrote: >> robert engels has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revert "flush after exchange returns" >> >> This reverts commit 30340e58be8ae08205400079b055460ed9ac2e25. > >

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v16]

2024-04-23 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with one additional commit since the last revision: remove timing check and rely on the test harness timeout - Changes: - all: https://git.openjdk.org/jdk/pu

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-23 Thread Michael McMahon
On Mon, 22 Apr 2024 22:07:32 GMT, robert engels wrote: >> Let me add some background: >> https://www.hyrumslaw.com/ >> https://xkcd.com/1172/ >> https://wiki.openjdk.org/display/csr/Kinds+of+Compatibility >> >> Every time we make an observable behavioral change, we need to decide if we >> can m

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v15]

2024-04-23 Thread Daniel Jeliński
On Mon, 22 Apr 2024 12:48:57 GMT, robert engels wrote: >> fix bug JDK-B6968351 by avoiding flush after response headers > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > Revert "flush after exchange returns" > > This re

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-22 Thread robert engels
On Mon, 22 Apr 2024 18:52:00 GMT, Daniel Jeliński wrote: >> If I write a test case "test multiple requests without closing" - and add >> that test case to earlier JDK versions, it will fail every time - with no >> setting that would allow it to work. >> >> So trying to protect earlier bad code

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-22 Thread Daniel Jeliński
On Mon, 22 Apr 2024 16:30:01 GMT, robert engels wrote: >> I understand what you're saying - but you would be surprised of what you >> could encounter in the wild. In any case, it's not an issue if no backport >> is intended. > > If I write a test case "test multiple requests without closing" -

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-22 Thread robert engels
On Mon, 22 Apr 2024 15:39:30 GMT, Daniel Fuchs wrote: >> I already removed that line - it is not necessary (but I also think it is >> fine - there is no race/corruption possible, and it would restore the >> previous behavior of always sending the headers). >> >> To your point though, I think I

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-22 Thread Daniel Fuchs
On Mon, 22 Apr 2024 15:23:01 GMT, robert engels wrote: >> Just to be clear - I agree with Daniel that the line 851 should be removed. >> I was just speculating about the possible backward compatibility issues of >> *not* flushing the stream after writing the headers. We saw some test >> failur

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-22 Thread robert engels
On Mon, 22 Apr 2024 14:51:30 GMT, Daniel Fuchs wrote: >> Prior to this change, If the handler does not close the body output stream >> or exchange, then yes, the client will see those headers but if it tries to >> send another request - which will reuse the same connection by default in >> Htt

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-22 Thread Daniel Fuchs
On Mon, 22 Apr 2024 14:40:02 GMT, robert engels wrote: >> I can see that a bad handler could call `sendResponse(500, 0);` instead of >> `sendResponse(500, -1)`, and forget to close the body output stream or the >> exchange. A client might just not read the body if it receives 500. Before >> t

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-22 Thread robert engels
On Mon, 22 Apr 2024 14:10:01 GMT, Daniel Fuchs wrote: >>> We don't want to allow it; we want to fix the broken tests, and add a >>> release note so that the users know how to recognize that their code is >>> broken and know how to fix it. >>> >>> This should be fine in a new JDK version, where

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-22 Thread Daniel Fuchs
On Mon, 22 Apr 2024 13:05:31 GMT, robert engels wrote: >> also, I reviewed the semantics of the buffered output stream. It is fully >> synchronized, so flushing here is fine and cannot corrupt the data to the >> client. But still, I don't think it is needed as it doesn't really solve >> anythi

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-22 Thread robert engels
On Mon, 22 Apr 2024 12:50:31 GMT, robert engels wrote: >> We don't want to allow it; we want to fix the broken tests, and add a >> release note so that the users know how to recognize that their code is >> broken and know how to fix it. >> >> This should be fine in a new JDK version, where th

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-22 Thread robert engels
On Mon, 22 Apr 2024 12:45:01 GMT, Daniel Jeliński wrote: >> I reverted the commit. I think my comment that the TcpNoDelayNotRequired >> hangs the client connection if the stream is not closed - in the existing >> JDK code - shows that the concern regarding "existing code" is not valid. I >> th

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-22 Thread robert engels
On Mon, 22 Apr 2024 12:16:14 GMT, Daniel Jeliński wrote: >> robert engels has updated the pull request incrementally with one additional >> commit since the last revision: >> >> flush after exchange returns > > src/jdk.httpserver/share/classes/sun/net/httpserver/ServerImpl.java line 851: > >

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-22 Thread Daniel Jeliński
On Mon, 22 Apr 2024 12:44:58 GMT, robert engels wrote: >> src/jdk.httpserver/share/classes/sun/net/httpserver/ServerImpl.java line 851: >> >>> 849: uc.doFilter (new HttpExchangeImpl (tx)); >>> 850: } >>> 851: tx.getResponseBody().flush(); >> >

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v15]

2024-04-22 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with one additional commit since the last revision: Revert "flush after exchange returns" This reverts commit 30340e58be8ae08205400079b055460ed9ac2e25. -

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-22 Thread robert engels
On Mon, 22 Apr 2024 12:16:14 GMT, Daniel Jeliński wrote: >> robert engels has updated the pull request incrementally with one additional >> commit since the last revision: >> >> flush after exchange returns > > src/jdk.httpserver/share/classes/sun/net/httpserver/ServerImpl.java line 851: > >

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-22 Thread Daniel Jeliński
On Sun, 21 Apr 2024 19:03:53 GMT, robert engels wrote: >> fix bug JDK-B6968351 by avoiding flush after response headers > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > flush after exchange returns src/jdk.httpserver/share

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v14]

2024-04-21 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with one additional commit since the last revision: flush after exchange returns - Changes: - all: https://git.openjdk.org/jdk/pull/18667/files - new: http

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v13]

2024-04-21 Thread robert engels
On Sun, 21 Apr 2024 18:49:45 GMT, robert engels wrote: >> fix bug JDK-B6968351 by avoiding flush after response headers > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > remove FixLengthOutputStream changes since not needed

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v13]

2024-04-21 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with one additional commit since the last revision: remove FixLengthOutputStream changes since not needed - Changes: - all: https://git.openjdk.org/jdk/pull/

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v12]

2024-04-21 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with one additional commit since the last revision: fix jtreg params - Changes: - all: https://git.openjdk.org/jdk/pull/18667/files - new: https://git.open

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v11]

2024-04-19 Thread robert engels
On Fri, 19 Apr 2024 15:45:50 GMT, robert engels wrote: >> I agree with Daniel here - with new tests we try to use a more descriptive >> name. I hate to see JBS issues titled `foo/bar/BNN.java failed` - and >> then I have no clue of what that test might be doing :-) > > I will change. chang

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v11]

2024-04-19 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with one additional commit since the last revision: rename testcase for clarity - Changes: - all: https://git.openjdk.org/jdk/pull/18667/files - new: https

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v9]

2024-04-19 Thread robert engels
On Fri, 19 Apr 2024 19:48:24 GMT, robert engels wrote: > Hi all. Hold off on further review. My local OSX version is failing - but > strangely the linux version is working. I believe the environment may be > corrupted but I need to track down what is happening. Everything is working now. I th

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v10]

2024-04-19 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with one additional commit since the last revision: need to flush before close - Changes: - all: https://git.openjdk.org/jdk/pull/18667/files - new: https:

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v9]

2024-04-19 Thread robert engels
On Fri, 19 Apr 2024 19:15:19 GMT, robert engels wrote: >> fix bug JDK-B6968351 by avoiding flush after response headers > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > avoid sending multiple empty chunks Hi all. Hold off

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v9]

2024-04-19 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with one additional commit since the last revision: avoid sending multiple empty chunks - Changes: - all: https://git.openjdk.org/jdk/pull/18667/files - ne

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v8]

2024-04-19 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with one additional commit since the last revision: avoid sending multiple empty chunks - Changes: - all: https://git.openjdk.org/jdk/pull/18667/files - ne

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v4]

2024-04-19 Thread robert engels
On Fri, 19 Apr 2024 18:28:19 GMT, robert engels wrote: >> src/jdk.httpserver/share/classes/sun/net/httpserver/FixedLengthOutputStream.java >> line 68: >> >>> 66: remaining --; >>> 67: if(remaining==0) { >>> 68: close(); >> >> `close()` has the side effect of closing

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v7]

2024-04-19 Thread robert engels
On Fri, 19 Apr 2024 18:40:20 GMT, robert engels wrote: >> I figured out what you are referring to. Let me look at this, I am pretty >> sure I can remove the first flush. > > I posted a fix which addresses this. I will modify the test case to test both > methods of returning the data. test case

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v6]

2024-04-19 Thread robert engels
On Fri, 19 Apr 2024 18:50:10 GMT, Daniel Fuchs wrote: >> yes, let me fixed that. > > Shouldn't you look at whether count > 0 as is done in flush() ? corrected. good catch. - PR Review Comment: https://git.openjdk.org/jdk/pull/18667#discussion_r1572783063

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v6]

2024-04-19 Thread Daniel Fuchs
On Fri, 19 Apr 2024 18:49:33 GMT, robert engels wrote: >> src/jdk.httpserver/share/classes/sun/net/httpserver/ChunkedOutputStream.java >> line 142: >> >>> 140: try { >>> 141: /* write any pending chunk data */ >>> 142: writeChunk(); >> >> Isn't there a risk that

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v6]

2024-04-19 Thread robert engels
On Fri, 19 Apr 2024 18:44:52 GMT, Daniel Fuchs wrote: >> robert engels has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix chunked response for small packets > > src/jdk.httpserver/share/classes/sun/net/httpserver/ChunkedOutputStream.jav

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v6]

2024-04-19 Thread Daniel Fuchs
On Fri, 19 Apr 2024 18:43:18 GMT, robert engels wrote: >> fix bug JDK-B6968351 by avoiding flush after response headers > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > fix chunked response for small packets src/jdk.httpse

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v7]

2024-04-19 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with two additional commits since the last revision: - avoid sending multiple empty chunks - test both fixed and chunked responses - Changes: - all: https://

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v6]

2024-04-19 Thread robert engels
On Fri, 19 Apr 2024 18:17:56 GMT, robert engels wrote: >> https://github.com/openjdk/jdk/blob/b704e91241b0f84d866f50a8f2c6af240087cb29/src/jdk.httpserver/share/classes/sun/net/httpserver/ChunkedOutputStream.java#L140-L144 > > I figured out what you are referring to. Let me look at this, I am pret

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v6]

2024-04-19 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with one additional commit since the last revision: fix chunked response for small packets - Changes: - all: https://git.openjdk.org/jdk/pull/18667/files -

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v4]

2024-04-19 Thread robert engels
On Fri, 19 Apr 2024 18:12:14 GMT, Daniel Jeliński wrote: >> robert engels has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix jtreg params > > src/jdk.httpserver/share/classes/sun/net/httpserver/FixedLengthOutputStream.java > line 68: >

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v5]

2024-04-19 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with one additional commit since the last revision: ignore flush() on closed stream - Changes: - all: https://git.openjdk.org/jdk/pull/18667/files - new: h

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v4]

2024-04-19 Thread robert engels
On Fri, 19 Apr 2024 18:15:26 GMT, Daniel Jeliński wrote: >>> The problem with closing a chunked stream is that it flushes both before >>> and after the final chunk. I assume it may also cause delays. >>> >>> The only case when you don't need to close the exchange or the output >>> stream is wh

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v4]

2024-04-19 Thread Daniel Jeliński
On Fri, 19 Apr 2024 17:51:55 GMT, robert engels wrote: >> ah no, this is not related to the test failures; this is only about the >> original issue (small sends result in problems with delayed acks) > >> The problem with closing a chunked stream is that it flushes both before and >> after the f

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v4]

2024-04-19 Thread Daniel Jeliński
On Fri, 19 Apr 2024 17:51:27 GMT, robert engels wrote: >> fix bug JDK-B6968351 by avoiding flush after response headers > > robert engels has updated the pull request incrementally with one additional > commit since the last revision: > > fix jtreg params src/jdk.httpserver/share/classes/sun

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v4]

2024-04-19 Thread Daniel Jeliński
On Fri, 19 Apr 2024 17:41:22 GMT, robert engels wrote: > Is there a command line to only run all of the httpserver tests? I'd use `make test TEST=jdk_net`. If you want something more selective, you can also point `TEST` to a specific file or directory. - PR Comment: https://git.op

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v4]

2024-04-19 Thread robert engels
On Fri, 19 Apr 2024 17:24:33 GMT, Daniel Jeliński wrote: >>> The problem with closing a chunked stream is that it flushes both before >>> and after the final chunk. I assume it may also cause delays. >>> >>> The only case when you don't need to close the exchange or the output >>> stream is wh

Re: RFR: 6968351: httpserver clashes with delayed TCP ACKs for low Content-Length [v4]

2024-04-19 Thread robert engels
> fix bug JDK-B6968351 by avoiding flush after response headers robert engels has updated the pull request incrementally with one additional commit since the last revision: fix jtreg params - Changes: - all: https://git.openjdk.org/jdk/pull/18667/files - new: https://git.open

  1   2   >