From e839fb0bb30327de7a1b7ca9cef7c05b4a59eae4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 1 Jul 2020 11:38:44 +0200
Subject: [PATCH] Do not use deprecated ap_get_server_version() in
 Server::Status
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

It produced warnings with httpd 2.4.

CPAN RT#124972

Signed-off-by: Petr Písař <ppisar@redhat.com>
---
 docs/api/Apache2/ServerUtil.pod | 3 ++-
 lib/Apache2/Status.pm           | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/docs/api/Apache2/ServerUtil.pod b/docs/api/Apache2/ServerUtil.pod
index 96e3a28..6828ce8 100644
--- a/docs/api/Apache2/ServerUtil.pod
+++ b/docs/api/Apache2/ServerUtil.pod
@@ -29,7 +29,6 @@ Apache2::ServerUtil - Perl API for Apache server record utils
   # server build and version info:
   $when_built = Apache2::ServerUtil::get_server_built(); 
   $description = Apache2::ServerUtil::get_server_description(); 
-  $version = Apache2::ServerUtil::get_server_version();
   $banner = Apache2::ServerUtil::get_server_banner(); 
   
   # ServerRoot value
@@ -365,6 +364,8 @@ Get the server version string
 
   $version = Apache2::ServerUtil::get_server_version();
 
+This function is deprecated. Use C<get_server_banner()> instead.
+
 =over 4
 
 =item ret: C<$version> ( string )
diff --git a/lib/Apache2/Status.pm b/lib/Apache2/Status.pm
index 65c3208..ee4bb8c 100644
--- a/lib/Apache2/Status.pm
+++ b/lib/Apache2/Status.pm
@@ -142,7 +142,7 @@ sub handler {
 sub header {
     my $r = shift;
     my $start = scalar localtime $^T;
-    my $srv = Apache2::ServerUtil::get_server_version();
+    my $srv = Apache2::ServerUtil::get_server_banner();
     $r->content_type("text/html");
     my $v = $^V ? sprintf "v%vd", $^V : $];
     $r->print(<<"EOF");
-- 
2.25.4

