On 09/10/2019 16:58, Michael Osipov wrote:
> Folks,
>
> while working on an improvement for Http11Processor I have noticed there
> constructs:
>
>> if ((contentEncodingMB != null)
>> (contentEncodingMB.indexOf("gzip") != -1))
The parsing of this is much tighter on input. For output I think this is
a reasonable trade-off. The worst that will happen is that Tomcat won't
compress something it might have been able to.
>> if (connectionValue != null)
>> foundUpgrade =
>> connectionValue.toLowerCase(Locale.ENGLISH).contains("upgrade");
>
>> if (findBytes(connectionValueBC, Constants.CLOSE_BYTES) != -1) {
>> keepAlive = false;
>> } else if (findBytes(connectionValueBC,
>> Constants.KEEPALIVE_BYTES) != -1) {
>
> and on likely other spots. I believe they are wrong.
Yes, but. Is the cost of parsing that header (and any similar headers)
fully worth the benefit? The header parser is reasonably efficient so it
might be OK.
I'd suggest creating a BZ issue for this.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]