Folks,
while working on an improvement for Http11Processor I have noticed there
constructs:
if ((contentEncodingMB != null)
(contentEncodingMB.indexOf("gzip") != -1))
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. A simple curl test:
$ curl http://md11gxtc:8080/ -I --verbose -H "Connection: close2"
* Uses proxy env variable NO_PROXY == 'localhost .siemens.net .siemens.com
.siemens.de'
* Trying 147.54.67.8:8080...
* TCP_NODELAY set
* Connected to md11gxtc (147.54.67.8) port 8080 (#0)
HEAD / HTTP/1.1
Host: md11gxtc:8080
User-Agent: curl/7.66.0
Accept: */*
Connection: close2
* Mark bundle as not supporting multiuse
< HTTP/1.1 404
HTTP/1.1 404
< Content-Type: text/html;charset=utf-8
Content-Type: text/html;charset=utf-8
< Content-Language: en
Content-Language: en
< Transfer-Encoding: chunked
Transfer-Encoding: chunked
< Date: Wed, 09 Oct 2019 15:54:49 GMT
Date: Wed, 09 Oct 2019 15:54:49 GMT
< Connection: close
Connection: close
<
* Closing connection 0
I don't expect the server to respond with "Connection: close" when I
send a non-sense value "close2".
Here w/o the header:
$ curl http://md11gxtc:8080/ -I --verbose
* Uses proxy env variable NO_PROXY == 'localhost .siemens.net .siemens.com
.siemens.de'
* Trying 147.54.67.8:8080...
* TCP_NODELAY set
* Connected to md11gxtc (147.54.67.8) port 8080 (#0)
HEAD / HTTP/1.1
Host: md11gxtc:8080
User-Agent: curl/7.66.0
Accept: */*
* Mark bundle as not supporting multiuse
< HTTP/1.1 404
HTTP/1.1 404
< Content-Type: text/html;charset=utf-8
Content-Type: text/html;charset=utf-8
< Content-Language: en
Content-Language: en
< Transfer-Encoding: chunked
Transfer-Encoding: chunked
< Date: Wed, 09 Oct 2019 15:56:31 GMT
Date: Wed, 09 Oct 2019 15:56:31 GMT
<
* Connection #0 to host md11gxtc left intact
Tests performed with 8.5.x/4a9f854a67bc5cece8fa83278ac5449c4b1f54d9.
WDYT?
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org