On Fri, Oct 11, 2019 at 1:49 PM Michael Osipov <michaelo@apache.org> wrote:
> Am 2019-10-11 um 11:51 schrieb Rémy Maucherat:
> > On Fri, Oct 11, 2019 at 10:30 AM <michaelo@apache.org> wrote:
> >
> >> This is an automated email from the ASF dual-hosted git repository.
> >>
> >> michaelo pushed a commit to branch BZ-63835/8.5.x
> >> in repository https://gitbox.apache.org/repos/asf/tomcat.git
> >>
> >> commit 6ff2233cbbd27c9c2c649208a21931e5f3e132a6
> >> Author: Michael Osipov <michaelo@apache.org>
> >> AuthorDate: Fri Oct 11 10:30:08 2019 +0200
> >>
> >> First draft
> >>
> >
> > + if (keepAliveTimeout > 0) {
> > + String value = "timeout=" +
> > TimeUnit.MILLISECONDS.toSeconds(keepAliveTimeout);
> > +
> > + if (maxKeepAliveRequests > 0) {
> > + value += ", max=" + maxKeepAliveRequests;
> > + }
> > StringBuilder ?
>
> StringBuilder does not make any sense because:
>
> * The compiler will replace the static code automatically with a
> StringBuilder
> * StringBuilder gains benefit when you concat strings in a for/while/do
> loop. The above code is purely static.
>
I don't understand how this can work, or how it is static, but if you're
100% certain it's fine.
>
> > Can you add a new flag controlling the feature ? The information may not
> be
> > very useful in many cases such as when proxying, so it would be better to
> > skip generating it by default.
>
> This is -- as documented -- a first draft.
>
> As mentioned on the ticket. This is hop-by-hop and writetn only if the
> client requests this piece of information. We can surely discuss a flag
> for this on the connector.
>
Ok indeed. I never understood why some clients kept sending Connection:
keep-alive since it was also not needed.
Rémy
|