I agree with everything you write, but I suspect you have misunderstood what my code does: it sets a request header in order to allow the server to leave the connection open after sending its response.
in reply to Re: Using Persistent Connections with SOAP::Lite HTTP clients
in thread Using Persistent Connections with SOAP::Lite HTTP clients
The snippet I posted sets Connection: KeepAlive on the request, letting the server know that the client can deal with KeepAlive responses.
Although HTTP 1.1 introduced this feature, clients and servers commonly support it as an extension when speaking HTTP 1.0: if the header does not exist, servers will close the TCP connection after each request as per standard HTTP 1.0.