fixed the HTTP built-in responsiveness check to use the value of the option 'host' #278

This commit is contained in:
Jordi Sanfeliu 2020-05-05 09:37:00 +02:00
parent 1bea584bde
commit 80efbfe69b
1 changed files with 2 additions and 1 deletions

View File

@ -867,7 +867,8 @@ while(1) {
use LWP::UserAgent;
my $pid = fork();
if(!$pid) {
my $url = "http://localhost:" . $config{httpd_builtin}->{port} . $config{base_url};
my $host = $config{httpd_builtin}->{host} ? $config{httpd_builtin}->{host} : "localhost";
my $url = "http://" . $host . ":" . $config{httpd_builtin}->{port} . $config{base_url};
my $ua = LWP::UserAgent->new(timeout => 30);
my $response = $ua->request(HTTP::Request->new('GET', $url));
if(!$response->is_success) {