From the section 4.3.6 in RFC 7231 [^1]
A server MUST NOT send any Transfer-Encoding or Content-Length header
fields in a 2xx (Successful) response to CONNECT. A client MUST
ignore any Content-Length or Transfer-Encoding header fields received
in a successful response to CONNECT.
The current server implementation does not treat the above condition and the field of Content-Length or Transfer-Encoding are sent to client.
[^1] : https://tools.ietf.org/html/rfc7231#section-4.3.6