Commit bc8f141b authored by Dietmar Maurer's avatar Dietmar Maurer

do not use keep_alive for connections to localhost

parent 4c06bd34
......@@ -248,8 +248,11 @@ sub proxy_request {
eval {
my $target;
my $keep_alive = 1;
if ($host eq 'localhost') {
$target = "http://$host:85$abs_uri";
# keep alive for localhost is not worth (connection setup is about 0.2ms)
$keep_alive = 0;
} else {
$target = "https://$host:8006$abs_uri";
}
......@@ -283,6 +286,7 @@ sub proxy_request {
headers => $headers,
timeout => 30,
recurse => 0,
keepalive => $keep_alive,
body => $content,
tls_ctx => $self->{tls_ctx},
sub {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment