[otrs-cvs] Support/Kernel/System/Support/Webserver IIS.pm, 1.10, 1.11

"CVS commits notifications of OTRS.org" <[email protected]>
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/Support/Kernel/System/Support/Webserver
In directory lancelot:/tmp/cvs-serv4707/Kernel/System/Support/Webserver

Modified Files:
	IIS.pm 
Log Message:
Added IIS tests to show web server version and variables.

Author: mb

Index: IIS.pm
===================================================================
RCS file: /home/cvs/Support/Kernel/System/Support/Webserver/IIS.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -2 -u -d -r1.10 -r1.11
--- IIS.pm	5 Sep 2012 04:29:56 -0000	1.10
+++ IIS.pm	4 Feb 2013 07:08:41 -0000	1.11
@@ -1,5 +1,5 @@
 # --
 # Kernel/System/Support/Webserver/IIS.pm - all required system information
-# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
 # --
 # $Id$
@@ -76,5 +76,4 @@
     my $Data = {};
 
-    # check if Apache::DBI is loaded
     my $Check   = '';
     my $Message = '';
@@ -98,3 +97,55 @@
 }
 
+sub _IISVersionCheck {
+    my ( $Self, %Param ) = @_;
+
+    my $Data    = {};
+    my $Check   = '';
+    my $Message = '';
+    if ( $ENV{SERVER_SOFTWARE} ) {
+        $Check   = 'OK';
+        $Message = $Self->{LanguageObject}->Get('You are running') . " $ENV{SERVER_SOFTWARE}.";
+    }
+    else {
+        $Check   = 'Failed';
+        $Message = $Self->{LanguageObject}->Get('Could not determine IIS version.');
+    }
+    $Data = {
+        Name        => $Self->{LanguageObject}->Get('IIS Version'),
+        Description => $Self->{LanguageObject}->Get('Display web server version.'),
+        Comment     => $Message,
+        Check       => $Check,
+    };
+    return $Data;
+}
+
+sub _IISEnvironmentCheck {
+    my ( $Self, %Param ) = @_;
+
+    my %Environment = %ENV;
+
+    for my $NotNeededString (
+        qw( HTTP_REFERER         HTTP_CACHE_CONTROL   HTTP_COOKIE    HTTP_USER_AGENT
+        HTTP_ACCEPT_LANGUAGE HTTP_ACCEPT_ENCODING HTTP_ACCEPT
+        QUERY_STRING         REQUEST_METHOD       REQUEST_URI    SCRIPT_NAME
+        ALLUSERSPROFILE      APPDATA              LOCALAPPDATA   COMMONPROGRAMFILES
+        PROGRAMDATA          PROGRAMFILES         PSMODULEPATH   PUBLIC
+        SYSTEMDRIVE          SYSTEMROOT           TEMP           WINDIR
+        USERPROFILE )
+        )
+    {
+        delete $Environment{$NotNeededString};
+    }
+
+    my $Data = {
+        Name        => $Self->{LanguageObject}->Get('Server Environment'),
+        Description => $Self->{LanguageObject}->Get('Display environment variables'),
+        Comment     => $Self->{LanguageObject}->Get('General information about your system.'),
+        Check       => 'OK',
+        BlockStyle  => 'TableDataSimple',
+        TableInfo   => \%Environment,
+    };
+    return $Data;
+}
+
 1;
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.