From MAILER-DAEMON Wed Sep 02 13:42:34 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Mitqs-0008Sj-5v
	for mharc-myserver-commit@gnu.org; Wed, 02 Sep 2009 13:42:34 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Mitqq-0008Qe-GM
	for myserver-commit@gnu.org; Wed, 02 Sep 2009 13:42:32 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Mitqp-0008PN-Jf
	for myserver-commit@gnu.org; Wed, 02 Sep 2009 13:42:31 -0400
Received: from [199.232.76.173] (port=49575 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Mitqp-0008Ot-8T
	for myserver-commit@gnu.org; Wed, 02 Sep 2009 13:42:31 -0400
Received: from savannah.gnu.org ([199.232.41.3]:52707 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <maarons@gnu.org>) id 1Mitqo-0005vM-R6
	for myserver-commit@gnu.org; Wed, 02 Sep 2009 13:42:30 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <maarons@gnu.org>) id 1Mitqo-0005Sn-7J
	for myserver-commit@gnu.org; Wed, 02 Sep 2009 17:42:30 +0000
Received: from maarons by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <maarons@savannah.gnu.org>) id 1Mitqk-0005SF-9n
	for myserver-commit@gnu.org; Wed, 02 Sep 2009 17:42:30 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: dcef300aaa5c994c08554001464a1630ca117081
X-Git-Newrev: 28ef7dff416a2f18707674b8f38d48bfa8ff28be
Message-Id: <E1Mitqk-0005SF-9n@cvs.savannah.gnu.org>
From: Marek Aaron Sapota <maarons@gnu.org>
Date: Wed, 02 Sep 2009 17:42:28 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 28ef7dff416a2f18707674b8f38d48bfa8ff28be
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 02 Sep 2009 17:42:32 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  28ef7dff416a2f18707674b8f38d48bfa8ff28be (commit)
      from  dcef300aaa5c994c08554001464a1630ca117081 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 28ef7dff416a2f18707674b8f38d48bfa8ff28be
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Wed Sep 2 19:41:47 2009 +0200

    m4 macro for checking Python version.

diff --git a/myserver/configure.ac b/myserver/configure.ac
index 4e8a481..92ad10e 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -321,7 +321,17 @@ else
 fi
 
 if test x$enable_gui == xyes; then
-  MAKE_GUI=yes
+  dnl Checking Python version
+  AM_PYTHON(2.6.0, have_python=yes)
+  if test x$have_python != xyes; then
+    AC_MSG_WARN([
+      *** Cannot find matching Python (http://python.org) version
+      *** GUI will not be built
+    ])
+    MAKE_GUI=no
+  else
+    MAKE_GUI=yes
+  fi
 else
   MAKE_GUI=no
 fi
diff --git a/myserver/m4/python.m4 b/myserver/m4/python.m4
new file mode 100644
index 0000000..7f890b2
--- /dev/null
+++ b/myserver/m4/python.m4
@@ -0,0 +1,76 @@
+dnl GNU MyServer
+dnl
+dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
+dnl
+dnl AM_PYTHON(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl
+AC_DEFUN([AM_PYTHON],
+[
+  python_version_min=$1
+
+  AC_MSG_CHECKING(for Python - version >= $python_version_min)
+  no_python=""
+  python_version=`/usr/bin/env python --version 2>&1`
+  if test "$python_version" = "" ; then
+    AC_MSG_RESULT(no)
+    no_python=yes
+  else
+    python_major_version=`echo $python_version | \
+        sed 's/Python \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+    python_minor_version=`echo $python_version | \
+        sed 's/Python \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+    python_micro_version=`echo $python_version | \
+        sed 's/Python \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+
+    python_major_min=`echo $python_version_min | \
+        sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+    if test "x${python_major_min}" = "x" ; then
+      python_major_min=0
+    fi
+  
+    python_minor_min=`echo $python_version_min | \
+        sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+    if test "x${python_minor_min}" = "x" ; then
+      python_minor_min=0
+    fi
+  
+    python_micro_min=`echo $python_version_min | \
+        sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+    if test "x${python_micro_min}" = "x" ; then
+      python_micro_min=0
+    fi
+
+    python_version_proper=`expr \
+        $python_major_version \> $python_major_min \| \
+        $python_major_version \= $python_major_min \& \
+        $python_minor_version \> $python_minor_min \| \
+        $python_major_version \= $python_major_min \& \
+        $python_minor_version \= $python_minor_min \& \
+        $python_micro_version \>= $python_micro_min `
+
+    if test "$python_version_proper" = "1" ; then
+      AC_MSG_RESULT([$python_major_version.$python_minor_version.$python_micro_version])
+    else
+      AC_MSG_RESULT(too old)
+      no_python=yes
+    fi
+  fi
+
+  if test "x$no_python" = x ; then
+    ifelse([$2], , :, [$2])
+  else
+    ifelse([$3], , :, [$3])
+  fi
+])

-----------------------------------------------------------------------

Summary of changes:
 myserver/configure.ac |   12 +++++++-
 myserver/m4/python.m4 |   76 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 87 insertions(+), 1 deletions(-)
 create mode 100644 myserver/m4/python.m4


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Mon Sep 07 13:49:02 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MkiKs-0003hZ-JM
	for mharc-myserver-commit@gnu.org; Mon, 07 Sep 2009 13:49:02 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MkiKo-0003eq-UQ
	for myserver-commit@gnu.org; Mon, 07 Sep 2009 13:48:59 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MkiKe-0003ZZ-G8
	for myserver-commit@gnu.org; Mon, 07 Sep 2009 13:48:49 -0400
Received: from [199.232.76.173] (port=51914 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MkiKa-0003Yq-Kg
	for myserver-commit@gnu.org; Mon, 07 Sep 2009 13:48:44 -0400
Received: from savannah.gnu.org ([199.232.41.3]:42461 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <maarons@gnu.org>) id 1MkiKZ-0004SC-Bd
	for myserver-commit@gnu.org; Mon, 07 Sep 2009 13:48:43 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <maarons@gnu.org>) id 1MkiKY-0001M1-0i
	for myserver-commit@gnu.org; Mon, 07 Sep 2009 17:48:42 +0000
Received: from maarons by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <maarons@savannah.gnu.org>) id 1MkiKU-0001LT-DX
	for myserver-commit@gnu.org; Mon, 07 Sep 2009 17:48:41 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 28ef7dff416a2f18707674b8f38d48bfa8ff28be
X-Git-Newrev: 7086ce0915862f91e837a5d88688c811e840c74b
Message-Id: <E1MkiKU-0001LT-DX@cvs.savannah.gnu.org>
From: Marek Aaron Sapota <maarons@gnu.org>
Date: Mon, 07 Sep 2009 17:48:40 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 7086ce0915862f91e837a5d88688c811e840c74b
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 07 Sep 2009 17:48:59 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  7086ce0915862f91e837a5d88688c811e840c74b (commit)
      from  28ef7dff416a2f18707674b8f38d48bfa8ff28be (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 7086ce0915862f91e837a5d88688c811e840c74b
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Mon Sep 7 19:47:28 2009 +0200

    Autoconf checking for required python modules.

diff --git a/myserver/configure.ac b/myserver/configure.ac
index 92ad10e..b5f863a 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -331,6 +331,30 @@ if test x$enable_gui == xyes; then
     MAKE_GUI=no
   else
     MAKE_GUI=yes
+    AM_PYTHON_MODULE(lxml, have_lxml=yes)
+    if test x$have_lxml != xyes; then
+      AC_MSG_WARN([
+        *** Cannon find lxml Python module (http://codespeak.net/lxml/)
+        *** GUI will not be built
+      ])
+      MAKE_GUI=no
+    fi
+    AM_PYTHON_MODULE(gtk, have_gtk=yes)
+    if test x$have_gtk != xyes; then
+      AC_MSG_WARN([
+        *** Cannon find PyGTK Python module (http://www.pygtk.org/)
+        *** GUI will not be built
+      ])
+      MAKE_GUI=no
+    fi
+    AM_PYTHON_MODULE(gobject, have_gobject=yes)
+    if test x$have_gobject != xyes; then
+      AC_MSG_WARN([
+        *** Cannon find PyGObject Python module (http://www.pygtk.org/)
+        *** GUI will not be built
+      ])
+      MAKE_GUI=no
+    fi
   fi
 else
   MAKE_GUI=no
diff --git a/myserver/m4/python_mod.m4 b/myserver/m4/python_mod.m4
new file mode 100644
index 0000000..e19eb35
--- /dev/null
+++ b/myserver/m4/python_mod.m4
@@ -0,0 +1,38 @@
+dnl GNU MyServer
+dnl
+dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
+dnl
+dnl AM_PYTHON_MODULE(MODULE_NAME, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl
+AC_DEFUN([AM_PYTHON_MODULE],
+[
+  module_name=$1
+
+  AC_MSG_CHECKING(for Python module: $module_name)
+  no_module=""
+  python_module=`/usr/bin/env python -c "import $module_name" &> /dev/null && echo "yes"`
+  if test "$python_module" = "" ; then
+    AC_MSG_RESULT(no)
+    no_module=yes
+  else
+    AC_MSG_RESULT(yes)
+  fi
+
+  if test "x$no_module" = x ; then
+    ifelse([$2], , :, [$2])
+  else
+    ifelse([$3], , :, [$3])
+  fi
+])

-----------------------------------------------------------------------

Summary of changes:
 myserver/configure.ac     |   24 ++++++++++++++++++++++++
 myserver/m4/python_mod.m4 |   38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+), 0 deletions(-)
 create mode 100644 myserver/m4/python_mod.m4


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Sep 13 17:43:02 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Mmwqc-000678-Av
	for mharc-myserver-commit@gnu.org; Sun, 13 Sep 2009 17:43:02 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Mmwqa-00066U-Lb
	for myserver-commit@gnu.org; Sun, 13 Sep 2009 17:43:00 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MmwqV-00063k-LG
	for myserver-commit@gnu.org; Sun, 13 Sep 2009 17:43:00 -0400
Received: from [199.232.76.173] (port=53118 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MmwqV-00063h-Da
	for myserver-commit@gnu.org; Sun, 13 Sep 2009 17:42:55 -0400
Received: from savannah.gnu.org ([199.232.41.3]:36287 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MmwqT-000770-Fs
	for myserver-commit@gnu.org; Sun, 13 Sep 2009 17:42:55 -0400
Received: from download.savannah.gnu.org ([199.232.41.75]
	helo=cvs.savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MmwqS-0004wM-Ry
	for myserver-commit@gnu.org; Sun, 13 Sep 2009 21:42:53 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MmwqR-0004vt-94
	for myserver-commit@gnu.org; Sun, 13 Sep 2009 21:42:52 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 7086ce0915862f91e837a5d88688c811e840c74b
X-Git-Newrev: fbbd04b9971c9082900bb42eead1603e49c2cabf
Message-Id: <E1MmwqR-0004vt-94@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 13 Sep 2009 21:42:52 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. fbbd04b9971c9082900bb42eead1603e49c2cabf
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 13 Sep 2009 21:43:00 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  fbbd04b9971c9082900bb42eead1603e49c2cabf (commit)
      from  7086ce0915862f91e837a5d88688c811e840c74b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit fbbd04b9971c9082900bb42eead1603e49c2cabf
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Sep 13 23:39:23 2009 +0200

    Mass update: corrected C preprocessor indentation using GNU cppi.

diff --git a/myserver/include/base/base64/mime_utils.h b/myserver/include/base/base64/mime_utils.h
index 3a97e57..403b69c 100644
--- a/myserver/include/base/base64/mime_utils.h
+++ b/myserver/include/base/base64/mime_utils.h
@@ -18,7 +18,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 #ifndef MIMEUTILS_H
-#define MIMEUTILS_H
+# define MIMEUTILS_H
 
 class CBase64Utils
 {
diff --git a/myserver/include/base/bitvec/bitvec.h b/myserver/include/base/bitvec/bitvec.h
index 07e7c63..f382802 100644
--- a/myserver/include/base/bitvec/bitvec.h
+++ b/myserver/include/base/bitvec/bitvec.h
@@ -17,7 +17,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef BITVEC_H
-#define BITVEC_H
+# define BITVEC_H
 
 # include "stdafx.h"
 
diff --git a/myserver/include/base/dynamic_lib/dynamiclib.h b/myserver/include/base/dynamic_lib/dynamiclib.h
index 024a0ca..ef9a1ed 100644
--- a/myserver/include/base/dynamic_lib/dynamiclib.h
+++ b/myserver/include/base/dynamic_lib/dynamiclib.h
@@ -17,19 +17,19 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef DYNAMICLIBRARY_H
-#define DYNAMICLIBRARY_H
-#include "stdafx.h"
+# define DYNAMICLIBRARY_H
+# include "stdafx.h"
 
-#include <string>
+# include <string>
 
 extern "C"
 {
-#ifdef WIN32
-#include <direct.h>
-#endif
-#ifdef HAVE_DL
-#include <dlfcn.h>
-#endif
+# ifdef WIN32
+#  include <direct.h>
+# endif
+# ifdef HAVE_DL
+#  include <dlfcn.h>
+# endif
 }
 
 using namespace std;
diff --git a/myserver/include/base/file/file.h b/myserver/include/base/file/file.h
index 44f1724..761d140 100644
--- a/myserver/include/base/file/file.h
+++ b/myserver/include/base/file/file.h
@@ -17,14 +17,14 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef FILE_H
-#define FILE_H
+# define FILE_H
 
-#include "stdafx.h"
-#include <include/filter/stream.h>
-#include <string>
+# include "stdafx.h"
+# include <include/filter/stream.h>
+# include <string>
 
-#include <include/base/socket/socket.h>
-#include <include/base/mem_buff/mem_buff.h>
+# include <include/base/socket/socket.h>
+# include <include/base/mem_buff/mem_buff.h>
 
 using namespace std;
 
diff --git a/myserver/include/base/file/files_utility.h b/myserver/include/base/file/files_utility.h
index 00c7765..6e5e591 100644
--- a/myserver/include/base/file/files_utility.h
+++ b/myserver/include/base/file/files_utility.h
@@ -17,12 +17,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef FILES_UTILITY_H
-#define FILES_UTILITY_H
+# define FILES_UTILITY_H
 
-#include "stdafx.h"
-#include <include/filter/stream.h>
-#include <include/base/file/file.h>
-#include <string>
+# include "stdafx.h"
+# include <include/filter/stream.h>
+# include <include/base/file/file.h>
+# include <string>
 
 using namespace std;
 
diff --git a/myserver/include/base/files_cache/cached_file.h b/myserver/include/base/files_cache/cached_file.h
index fca362b..27dbed9 100644
--- a/myserver/include/base/files_cache/cached_file.h
+++ b/myserver/include/base/files_cache/cached_file.h
@@ -17,13 +17,13 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef CACHED_FILE_H
-#define CACHED_FILE_H
+# define CACHED_FILE_H
 
-#include "stdafx.h"
-#include <include/filter/stream.h>
-#include <include/base/file/file.h>
-#include <include/base/files_cache/cached_file_buffer.h>
-#include <string>
+# include "stdafx.h"
+# include <include/filter/stream.h>
+# include <include/base/file/file.h>
+# include <include/base/files_cache/cached_file_buffer.h>
+# include <string>
 
 using namespace std;
 
diff --git a/myserver/include/base/files_cache/cached_file_buffer.h b/myserver/include/base/files_cache/cached_file_buffer.h
index 4b57602..309e6c7 100644
--- a/myserver/include/base/files_cache/cached_file_buffer.h
+++ b/myserver/include/base/files_cache/cached_file_buffer.h
@@ -17,13 +17,13 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef CACHED_FILE_BUFFER_H
-#define CACHED_FILE_BUFFER_H
+# define CACHED_FILE_BUFFER_H
 
-#include "stdafx.h"
-#include <include/filter/stream.h>
-#include <include/base/file/file.h>
-#include <include/base/sync/mutex.h>
-#include <string>
+# include "stdafx.h"
+# include <include/filter/stream.h>
+# include <include/base/file/file.h>
+# include <include/base/sync/mutex.h>
+# include <string>
 
 using namespace std;
 
diff --git a/myserver/include/base/files_cache/cached_file_factory.h b/myserver/include/base/files_cache/cached_file_factory.h
index a34a9dc..9c0e98e 100644
--- a/myserver/include/base/files_cache/cached_file_factory.h
+++ b/myserver/include/base/files_cache/cached_file_factory.h
@@ -17,17 +17,17 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef CACHED_FILE_FACTORY_H
-#define CACHED_FILE_FACTORY_H
-
-#include "stdafx.h"
-#include <include/filter/stream.h>
-#include <include/base/hash_map/hash_map.h>
-#include <include/base/file/file.h>
-#include <include/base/sync/mutex.h>
-#include <include/base/files_cache/cached_file.h>
-#include <include/base/files_cache/cached_file_buffer.h>
-#include <string>
-#include <list>
+# define CACHED_FILE_FACTORY_H
+
+# include "stdafx.h"
+# include <include/filter/stream.h>
+# include <include/base/hash_map/hash_map.h>
+# include <include/base/file/file.h>
+# include <include/base/sync/mutex.h>
+# include <include/base/files_cache/cached_file.h>
+# include <include/base/files_cache/cached_file_buffer.h>
+# include <string>
+# include <list>
 
 using namespace std;
 
diff --git a/myserver/include/base/hash_map/hash_map.h b/myserver/include/base/hash_map/hash_map.h
index 375f710..1a1d13e 100644
--- a/myserver/include/base/hash_map/hash_map.h
+++ b/myserver/include/base/hash_map/hash_map.h
@@ -22,11 +22,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 //valueType removeList(const hashmap <keyType, valueType>&);
 
 #ifndef HASHMAP_H
-#define HASHMAP_H
+# define HASHMAP_H
 
-#include <list>
-#include <vector>
-#include <string>
+# include <list>
+# include <vector>
+# include <string>
 
 using namespace std;
 
@@ -240,8 +240,8 @@ class HashMap <void*, ValueType>
 	unsigned int hash (const char *, int);
 };
 
-#ifndef HASHMAP_CPP
-#include <src/base/hash_map/hash_map.cpp>
-#endif
+# ifndef HASHMAP_CPP
+#  include <src/base/hash_map/hash_map.cpp>
+# endif
 
 #endif
diff --git a/myserver/include/base/home_dir/home_dir.h b/myserver/include/base/home_dir/home_dir.h
old mode 100755
new mode 100644
index 81d9226..14ce349
--- a/myserver/include/base/home_dir/home_dir.h
+++ b/myserver/include/base/home_dir/home_dir.h
@@ -17,14 +17,14 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef HOME_DIR_H
-#define HOME_DIR_H
+# define HOME_DIR_H
 
-#include "stdafx.h"
-#include <include/base/file/file.h>
-#include <include/base/string/stringutils.h>
-#include <include/base/hash_map/hash_map.h>
-#include <include/base/sync/mutex.h>
-#include <string>
+# include "stdafx.h"
+# include <include/base/file/file.h>
+# include <include/base/string/stringutils.h>
+# include <include/base/hash_map/hash_map.h>
+# include <include/base/sync/mutex.h>
+# include <string>
 
 using namespace std;
 
@@ -45,11 +45,11 @@ private:
   Mutex loadMutex;
   int loadImpl();
 
-#ifdef WIN32
+# ifdef WIN32
   string data;
-#elif !GETPWNAM
+# elif !GETPWNAM
 	HashMap<string, string*> data;
-#endif
+# endif
 	time_t timestamp;
 	int loaded;
 };
diff --git a/myserver/include/base/md5/md5.h b/myserver/include/base/md5/md5.h
index dfac789..8344440 100644
--- a/myserver/include/base/md5/md5.h
+++ b/myserver/include/base/md5/md5.h
@@ -38,7 +38,7 @@
 #include "stdafx.h"
 
 #ifndef MD5_H
-#define MD5_H
+# define MD5_H
 
 class Md5
 {
diff --git a/myserver/include/base/mem_buff/mem_buff.h b/myserver/include/base/mem_buff/mem_buff.h
index 0a351fc..2465851 100644
--- a/myserver/include/base/mem_buff/mem_buff.h
+++ b/myserver/include/base/mem_buff/mem_buff.h
@@ -18,33 +18,33 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef MEMBUF_H
-#define MEMBUF_H
+# define MEMBUF_H
 
-#ifndef NULL
-#define NULL 0
-#endif
+# ifndef NULL
+#  define NULL 0
+# endif
 
-#include "stdafx.h"
-#include <iostream>
-#include <string>
+# include "stdafx.h"
+# include <iostream>
+# include <string>
 using namespace std;
 
-#define USE_NEW
+# define USE_NEW
 
 
-#define DONT_MATCH_LENGTH // Comment this line to always make the buffer
+# define DONT_MATCH_LENGTH // Comment this line to always make the buffer
 			  // have the exact length of his data
 			  // (involves reallocations => unrecommended)
-#ifdef USE_NEW
-#define mem_alloc(size) (new char[size])
-#define mem_free(pAdr) (delete [] pAdr)
-#else
-#include <stdlib.h>
-#define mem_alloc(size) ((char*) malloc(size))
-#define mem_free(pAdr) (free(pAdr))
-#endif
-
-#define end_str '\0'
+# ifdef USE_NEW
+#  define mem_alloc(size) (new char[size])
+#  define mem_free(pAdr) (delete [] pAdr)
+# else
+#  include <stdlib.h>
+#  define mem_alloc(size) ((char*) malloc(size))
+#  define mem_free(pAdr) (free(pAdr))
+# endif
+
+# define end_str '\0'
 
 class MemBuf
 {
diff --git a/myserver/include/base/multicast/multicast.h b/myserver/include/base/multicast/multicast.h
index 3039657..efb2b17 100644
--- a/myserver/include/base/multicast/multicast.h
+++ b/myserver/include/base/multicast/multicast.h
@@ -17,13 +17,13 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef MULTICAST_H
-#define MULTICAST_H
+# define MULTICAST_H
 
-#include "stdafx.h"
-#include <include/base/hash_map/hash_map.h>
+# include "stdafx.h"
+# include <include/base/hash_map/hash_map.h>
 
-#include <string>
-#include <vector>
+# include <string>
+# include <vector>
 using namespace std;
 
 template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE>
@@ -53,6 +53,6 @@ private:
 };
 
 
-#include <src/base/multicast/multicast.cpp>
+# include <src/base/multicast/multicast.cpp>
 
 #endif
diff --git a/myserver/include/base/pipe/pipe.h b/myserver/include/base/pipe/pipe.h
index 17a795a..b97f4ef 100644
--- a/myserver/include/base/pipe/pipe.h
+++ b/myserver/include/base/pipe/pipe.h
@@ -17,11 +17,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef PIPE_H
-#define PIPE_H
+# define PIPE_H
 
-#include "stdafx.h"
-#include <include/filter/stream.h>
-#include <string>
+# include "stdafx.h"
+# include <include/filter/stream.h>
+# include <string>
 
 using namespace std;
 
@@ -43,11 +43,11 @@ public:
   int waitForData (int sec, int usec);
 private:
   bool terminated;
-#ifndef WIN32
+# ifndef WIN32
 	int handles[2];
-#else
+# else
   HANDLE readHandle;
   HANDLE writeHandle;
-#endif
+# endif
 };
 #endif
diff --git a/myserver/include/base/process/fork_server.h b/myserver/include/base/process/fork_server.h
index 6f92b5e..bed2832 100644
--- a/myserver/include/base/process/fork_server.h
+++ b/myserver/include/base/process/fork_server.h
@@ -20,7 +20,7 @@
 #include <include/base/unix_socket/unix_socket.h>
 
 #ifndef FORK_SERVER_H
-#define FORK_SERVER_H
+# define FORK_SERVER_H
 
 struct StartProcInfo;
 
diff --git a/myserver/include/base/process/process.h b/myserver/include/base/process/process.h
old mode 100755
new mode 100644
index db0ea34..cd9a405
--- a/myserver/include/base/process/process.h
+++ b/myserver/include/base/process/process.h
@@ -17,16 +17,16 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef PROCESS_H
-#define PROCESS_H
+# define PROCESS_H
 
-#include "stdafx.h"
+# include "stdafx.h"
 
-#include <include/base/file/file.h>
-#include <include/base/sync/mutex.h>
-#include <include/base/process/fork_server.h>
-#include <include/base/string/stringutils.h>
+# include <include/base/file/file.h>
+# include <include/base/sync/mutex.h>
+# include <include/base/process/fork_server.h>
+# include <include/base/string/stringutils.h>
 
-#include <string>
+# include <string>
 
 /*!
  *Structure used for start a new process.
@@ -71,12 +71,12 @@ struct StartProcInfo
 class Process
 {
 public:
-#ifdef HAVE_PTHREAD
+# ifdef HAVE_PTHREAD
 	static Mutex forkMutex;
 	static void forkPrepare();
 	static void forkParent();
 	static void forkChild();
-#endif
+# endif
 	static void initialize();
   int exec (StartProcInfo *spi, bool waitEnd = false);
   int terminateProcess();
diff --git a/myserver/include/base/process/process_server_manager.h b/myserver/include/base/process/process_server_manager.h
index a071f74..2725b6a 100644
--- a/myserver/include/base/process/process_server_manager.h
+++ b/myserver/include/base/process/process_server_manager.h
@@ -17,19 +17,19 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef PROCESS_SERVER_MANAGER_H
-#define PROCESS_SERVER_MANAGER_H
+# define PROCESS_SERVER_MANAGER_H
 
-#include "stdafx.h"
-#include <include/base/utility.h>
-#include <include/base/socket/socket.h>
-#include <include/connection/connection.h>
-#include <include/base/string/stringutils.h>
-#include <include/base/thread/thread.h>
-#include <include/base/sync/mutex.h>
-#include <include/base/hash_map/hash_map.h>
-#include <string>
+# include "stdafx.h"
+# include <include/base/utility.h>
+# include <include/base/socket/socket.h>
+# include <include/connection/connection.h>
+# include <include/base/string/stringutils.h>
+# include <include/base/thread/thread.h>
+# include <include/base/sync/mutex.h>
+# include <include/base/hash_map/hash_map.h>
+# include <string>
 
-#include <vector>
+# include <vector>
 using namespace std;
 
 class ProcessServerManager
diff --git a/myserver/include/base/regex/myserver_regex.h b/myserver/include/base/regex/myserver_regex.h
index f2b4fb6..b5b9706 100644
--- a/myserver/include/base/regex/myserver_regex.h
+++ b/myserver/include/base/regex/myserver_regex.h
@@ -36,7 +36,7 @@ extern "C"
 # endif
 }
 
-#include <string>
+# include <string>
 using namespace std;
 
 /*!
diff --git a/myserver/include/base/safetime/safetime.h b/myserver/include/base/safetime/safetime.h
index 7920acc..40f8321 100644
--- a/myserver/include/base/safetime/safetime.h
+++ b/myserver/include/base/safetime/safetime.h
@@ -17,18 +17,18 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef SAFETIME_H
-#define SAFETIME_H
+# define SAFETIME_H
 
-#include "stdafx.h"
+# include "stdafx.h"
 
-#ifdef GETTIMEOFDAY
-#include <sys/time.h>
-#endif
+# ifdef GETTIMEOFDAY
+#  include <sys/time.h>
+# endif
 
-#ifdef WIN32
-#include <direct.h>
-#include <time.h>
-#endif
+# ifdef WIN32
+#  include <direct.h>
+#  include <time.h>
+# endif
 
 void myserver_safetime_init();
 void myserver_safetime_destroy();
diff --git a/myserver/include/base/slab/slab.h b/myserver/include/base/slab/slab.h
index 375de35..459b6a1 100644
--- a/myserver/include/base/slab/slab.h
+++ b/myserver/include/base/slab/slab.h
@@ -17,7 +17,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef SLAB_H
-#define SLAB_H
+# define SLAB_H
 
 
 # include "stdafx.h"
diff --git a/myserver/include/base/socket/socket.h b/myserver/include/base/socket/socket.h
index 1dd7bbe..e23f53f 100644
--- a/myserver/include/base/socket/socket.h
+++ b/myserver/include/base/socket/socket.h
@@ -17,51 +17,51 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef SOCKET_H
-#define SOCKET_H
+# define SOCKET_H
 
-#include "stdafx.h"
-#include <include/filter/stream.h>
+# include "stdafx.h"
+# include <include/filter/stream.h>
 
-#include <string>
+# include <string>
 using namespace std;
 
-#ifdef WIN32
-#ifndef SOCKETLIBINCLUDED
+# ifdef WIN32
+#  ifndef SOCKETLIBINCLUDED
 extern "C"
 {
-#include <winsock2.h>
+#   include <winsock2.h>
 }
-#define SOCKETLIBINCLUDED
-#endif
-#endif
+#   define SOCKETLIBINCLUDED
+#  endif
+# endif
 
-#ifndef WIN32
+# ifndef WIN32
 extern "C" {
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <unistd.h>
+#  include <sys/types.h>
+#  include <sys/socket.h>
+#  include <sys/ioctl.h>
+#  include <netinet/in.h>
+#  include <netdb.h>
+#  include <stdio.h>
+#  include <unistd.h>
 }
 
-#define INVALID_SOCKET -1
-#define SD_BOTH SHUT_RDWR
-#endif
+#  define INVALID_SOCKET -1
+#  define SD_BOTH SHUT_RDWR
+# endif
 
-#ifdef WIN32
+# ifdef WIN32
 typedef SOCKET SocketHandle;
-#else
+# else
 typedef int SocketHandle;
-#endif
+# endif
 
 
-#ifdef INET6_ADDRSTRLEN
-#define MAX_IP_STRING_LEN  INET6_ADDRSTRLEN
-#else
-#define MAX_IP_STRING_LEN  32
-#endif
+# ifdef INET6_ADDRSTRLEN
+#  define MAX_IP_STRING_LEN  INET6_ADDRSTRLEN
+# else
+#  define MAX_IP_STRING_LEN  32
+# endif
 
 typedef struct sockaddr_storage MYSERVER_SOCKADDR_STORAGE;
 typedef struct sockaddr_storage MYSERVER_SOCKADDRIN;
diff --git a/myserver/include/base/socket/ssl_socket.h b/myserver/include/base/socket/ssl_socket.h
index 34af34e..ca77c5a 100644
--- a/myserver/include/base/socket/ssl_socket.h
+++ b/myserver/include/base/socket/ssl_socket.h
@@ -17,29 +17,29 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef SSL_SOCKET_H
-#define SSL_SOCKET_H
+# define SSL_SOCKET_H
 
-#include "stdafx.h"
-#include <include/base/socket/socket.h>
-#include <include/base/ssl/ssl.h>
+# include "stdafx.h"
+# include <include/base/socket/socket.h>
+# include <include/base/ssl/ssl.h>
 
-#include <string>
+# include <string>
 using namespace std;
 
-#include <gnutls/openssl.h>
+# include <gnutls/openssl.h>
 
 
-#ifndef WIN32
+# ifndef WIN32
 extern "C" {
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <stdio.h>
-#include <unistd.h>
+#  include <sys/types.h>
+#  include <sys/socket.h>
+#  include <sys/ioctl.h>
+#  include <netinet/in.h>
+#  include <netdb.h>
+#  include <stdio.h>
+#  include <unistd.h>
 }
-#endif
+# endif
 
 class SslSocket : public Socket
 {
@@ -58,11 +58,11 @@ public:
 	virtual int rawSend(const char* buffer, int len, int flags);
 	virtual u_long bytesToRead();
 
-#ifdef __HURD__
+# ifdef __HURD__
 	virtual int dataOnRead(int sec = 1, int usec = 500);
-#else
+# else
 	virtual int dataOnRead(int sec = 0, int usec = 500);
-#endif
+# endif
 
 	SslSocket(Socket*);
 	~SslSocket();
diff --git a/myserver/include/base/socket_pair/socket_pair.h b/myserver/include/base/socket_pair/socket_pair.h
index 7164727..68d7703 100644
--- a/myserver/include/base/socket_pair/socket_pair.h
+++ b/myserver/include/base/socket_pair/socket_pair.h
@@ -17,12 +17,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef SOCKET_PAIR_H
-#define SOCKET_PAIR_H
+# define SOCKET_PAIR_H
 
-#include "stdafx.h"
-#include <include/filter/stream.h>
-#include <include/base/socket/socket.h>
-#include <string>
+# include "stdafx.h"
+# include <include/filter/stream.h>
+# include <include/base/socket/socket.h>
+# include <string>
 
 using namespace std;
 
diff --git a/myserver/include/base/ssl/ssl.h b/myserver/include/base/ssl/ssl.h
index 69de3d9..0a82a99 100644
--- a/myserver/include/base/ssl/ssl.h
+++ b/myserver/include/base/ssl/ssl.h
@@ -17,12 +17,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef SSL_H
-#define SSL_H
+# define SSL_H
 
-#include "stdafx.h"
+# include "stdafx.h"
 
-#include <gnutls/openssl.h>
-#include <string>
+# include <gnutls/openssl.h>
+# include <string>
 
 using namespace std;
 
diff --git a/myserver/include/base/string/securestr.h b/myserver/include/base/string/securestr.h
old mode 100755
new mode 100644
diff --git a/myserver/include/base/string/stringutils.h b/myserver/include/base/string/stringutils.h
index 8b777d0..02b1ec4 100644
--- a/myserver/include/base/string/stringutils.h
+++ b/myserver/include/base/string/stringutils.h
@@ -17,10 +17,10 @@
 */
 
 #ifndef STRINGUTILS_H
-#define STRINGUTILS_H
+# define STRINGUTILS_H
 
-#include "stdafx.h"
-#include <string>
+# include "stdafx.h"
+# include <string>
 
 using namespace std;
 
@@ -75,16 +75,16 @@ int stringcmp (string const &a, string const &b);
 int stringcmpi (string const &a, const char* b);
 int stringcmp (string const &a, const char* b);
 
-#ifndef WIN32
+# ifndef WIN32
 extern "C"
 {
 char* strupr (char * string);
-# include <string.h>
+#  include <string.h>
 }
-#endif
+# endif
 
-#ifndef strcmpi
-# define strcmpi strcasecmp
-#endif
+# ifndef strcmpi
+#  define strcmpi strcasecmp
+# endif
 
 #endif
diff --git a/myserver/include/base/sync/event.h b/myserver/include/base/sync/event.h
old mode 100755
new mode 100644
index 01f47c8..4488b79
--- a/myserver/include/base/sync/event.h
+++ b/myserver/include/base/sync/event.h
@@ -17,28 +17,28 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef EVENT_H
-#define EVENT_H
+# define EVENT_H
 
-#include "stdafx.h"
-#include <include/base/sync/mutex.h>
+# include "stdafx.h"
+# include <include/base/sync/mutex.h>
 
-#ifdef HAVE_PTHREAD
+# ifdef HAVE_PTHREAD
 	typedef pthread_cond_t EventHandle;
-#else
+# else
 	typedef HANDLE EventHandle;
-#endif
+# endif
 
 class Event
 {
 private:
 	bool initialized;
 	bool broadcast;
-#ifdef HAVE_PTHREAD
+# ifdef HAVE_PTHREAD
 	/*!
 	 *Under pthread a condition is associated with a mutex.
 	 */
 	pthread_mutex_t mutex;
-#endif
+# endif
 	EventHandle event;
 public:
 	Event(bool broadcast);
diff --git a/myserver/include/base/sync/mutex.h b/myserver/include/base/sync/mutex.h
old mode 100755
new mode 100644
index 062a206..256095d
--- a/myserver/include/base/sync/mutex.h
+++ b/myserver/include/base/sync/mutex.h
@@ -17,17 +17,17 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef MUTEX_H
-#define MUTEX_H
+# define MUTEX_H
 
-#include "stdafx.h"
-#include <include/base/file/file.h>
-#include <include/base/string/stringutils.h>
+# include "stdafx.h"
+# include <include/base/file/file.h>
+# include <include/base/string/stringutils.h>
 
-#ifdef HAVE_PTHREAD
+# ifdef HAVE_PTHREAD
 	typedef pthread_mutex_t MutexHandle;
-#else
+# else
 	typedef HANDLE MutexHandle;
-#endif
+# endif
 
 class Mutex
 {
diff --git a/myserver/include/base/sync/read_write_lock.h b/myserver/include/base/sync/read_write_lock.h
old mode 100755
new mode 100644
index 8b98ae7..95f5d7d
--- a/myserver/include/base/sync/read_write_lock.h
+++ b/myserver/include/base/sync/read_write_lock.h
@@ -17,10 +17,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef READ_WRITE_LOCK_H
-#define READ_WRITE_LOCK_H
+# define READ_WRITE_LOCK_H
 
-#include "stdafx.h"
-#include <include/base/sync/semaphore.h>
+# include "stdafx.h"
+# include <include/base/sync/semaphore.h>
 
 class ReadWriteLock
 {
diff --git a/myserver/include/base/sync/recursive_mutex.h b/myserver/include/base/sync/recursive_mutex.h
old mode 100755
new mode 100644
index b6f7aa5..277c447
--- a/myserver/include/base/sync/recursive_mutex.h
+++ b/myserver/include/base/sync/recursive_mutex.h
@@ -17,10 +17,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef RECURSIVE_MUTEX_H
-#define RECURSIVE_MUTEX_H
+# define RECURSIVE_MUTEX_H
 
-#include "stdafx.h"
-#include <include/base/sync/mutex.h>
+# include "stdafx.h"
+# include <include/base/sync/mutex.h>
 
 
 class RecursiveMutex : public Mutex
diff --git a/myserver/include/base/sync/semaphore.h b/myserver/include/base/sync/semaphore.h
old mode 100755
new mode 100644
index acad719..7ae3eb7
--- a/myserver/include/base/sync/semaphore.h
+++ b/myserver/include/base/sync/semaphore.h
@@ -17,16 +17,16 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef SEMAPHORE_H
-#define SEMAPHORE_H
+# define SEMAPHORE_H
 
-#include "stdafx.h"
+# include "stdafx.h"
 
-#ifdef HAVE_PTHREAD
-#include <semaphore.h>
+# ifdef HAVE_PTHREAD
+#  include <semaphore.h>
 typedef sem_t SemaphoreHandle;
-#else
+# else
 typedef HANDLE SemaphoreHandle;
-#endif
+# endif
 
 class Semaphore
 {
diff --git a/myserver/include/base/thread/thread.h b/myserver/include/base/thread/thread.h
old mode 100755
new mode 100644
index b933a60..7aaf7b7
--- a/myserver/include/base/thread/thread.h
+++ b/myserver/include/base/thread/thread.h
@@ -17,34 +17,34 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef THREAD_H
-#define THREAD_H
+# define THREAD_H
 
-#include "stdafx.h"
-#include <include/base/file/file.h>
-#include <include/base/string/stringutils.h>
+# include "stdafx.h"
+# include <include/base/file/file.h>
+# include <include/base/string/stringutils.h>
 
-#ifdef WIN32
+# ifdef WIN32
 	typedef unsigned int ThreadID;
-#define DEFINE_THREAD(NAME,PARAM) unsigned int __stdcall NAME(void* PARAM)
-#endif
-#ifdef HAVE_PTHREAD
+#  define DEFINE_THREAD(NAME,PARAM) unsigned int __stdcall NAME(void* PARAM)
+# endif
+# ifdef HAVE_PTHREAD
 	typedef pthread_t ThreadID;
-#define DEFINE_THREAD(NAME,PARAM) void* NAME(void* PARAM)
-#endif
+#  define DEFINE_THREAD(NAME,PARAM) void* NAME(void* PARAM)
+# endif
 
 class Thread
 {
 public:
   static void wait(u_long);
 	static ThreadID threadID();
-#ifdef WIN32
+# ifdef WIN32
 	static int create(ThreadID*  thread,
              unsigned int (_stdcall *start_routine)(void *), void * arg);
-#endif
-#ifdef HAVE_PTHREAD
+# endif
+# ifdef HAVE_PTHREAD
 	static int create(ThreadID*  thread, void * (*start_routine)(void *),
                     void * arg);
-#endif
+# endif
 	static void terminate();
 	static int join(ThreadID);
 };
diff --git a/myserver/include/base/unix_socket/unix_socket.h b/myserver/include/base/unix_socket/unix_socket.h
index 1dac26b..73c508e 100644
--- a/myserver/include/base/unix_socket/unix_socket.h
+++ b/myserver/include/base/unix_socket/unix_socket.h
@@ -17,19 +17,19 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef UNIX_SOCKET_H
-#define UNIX_SOCKET_H
+# define UNIX_SOCKET_H
 
-#include "stdafx.h"
-#include <include/base/socket/socket.h>
+# include "stdafx.h"
+# include <include/base/socket/socket.h>
 
 
 extern "C"
 {
-#ifdef WIN32
-#undef AF_UNIX //This shouldn't happen, but better be sure.
-#else
-#include <sys/un.h>
-#endif
+# ifdef WIN32
+#  undef AF_UNIX //This shouldn't happen, but better be sure.
+# else
+#  include <sys/un.h>
+# endif
 }
 
 
@@ -45,22 +45,22 @@ public:
   int socket ();
 protected:
 
-#ifdef AF_UNIX
+# ifdef AF_UNIX
   sockaddr_un addr;
-#endif
+# endif
 
   int readHandle (Handle* fd);
   int writeHandle (Handle fd);
 
 private:
-#ifdef AF_UNIX
+# ifdef AF_UNIX
   void makeAddrInfo (sockaddr_un *info, const char *path)
   {
     memset(info, 0, sizeof(struct sockaddr_un));
     info->sun_family = AF_UNIX;
     strcpy (info->sun_path, path);
   }
-#endif
+# endif
 };
 
 #endif
diff --git a/myserver/include/base/utility.h b/myserver/include/base/utility.h
index a6f22bc..d8ddc8b 100644
--- a/myserver/include/base/utility.h
+++ b/myserver/include/base/utility.h
@@ -17,21 +17,21 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef UTILITY_H
-#define UTILITY_H
+# define UTILITY_H
 
-#include "stdafx.h"
-#include <include/base/file/file.h>
-#include <include/base/string/stringutils.h>
-#include <include/base/process/process.h>
-#include <include/base/thread/thread.h>
-#include <include/base/sync/mutex.h>
-#include <string.h>
+# include "stdafx.h"
+# include <include/base/file/file.h>
+# include <include/base/string/stringutils.h>
+# include <include/base/process/process.h>
+# include <include/base/thread/thread.h>
+# include <include/base/sync/mutex.h>
+# include <string.h>
 
 using namespace std;
 
-#define MYSERVER_KB(x) (x << 10)
-#define MYSERVER_MB(x) (x << 20)
-#define MYSERVER_SEC(x) (x * 1000)
+# define MYSERVER_KB(x) (x << 10)
+# define MYSERVER_MB(x) (x << 20)
+# define MYSERVER_SEC(x) (x * 1000)
 
 int preparePrintError ();
 int endPrintError ();
diff --git a/myserver/include/base/xml/xml_parser.h b/myserver/include/base/xml/xml_parser.h
index 684c0a9..b3936ff 100644
--- a/myserver/include/base/xml/xml_parser.h
+++ b/myserver/include/base/xml/xml_parser.h
@@ -17,20 +17,20 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef CXMLPARSER_IN
-#define CXMLPARSER_IN
+# define CXMLPARSER_IN
 
-#include "stdafx.h"
-#include <include/base/file/file.h>
-#include <include/base/mem_buff/mem_buff.h>
+# include "stdafx.h"
+# include <include/base/file/file.h>
+# include <include/base/mem_buff/mem_buff.h>
 extern "C"
 {
-#include <libxml/xmlmemory.h>
-#include <libxml/parser.h>
-#include <libxml/tree.h>
-#include <libxml/xpath.h>
-#include <libxml/xpathInternals.h>
+# include <libxml/xmlmemory.h>
+# include <libxml/parser.h>
+# include <libxml/tree.h>
+# include <libxml/xpath.h>
+# include <libxml/xpathInternals.h>
 }
-#include <string>
+# include <string>
 
 using namespace std;
 
diff --git a/myserver/include/conf/mime/mime_manager.h b/myserver/include/conf/mime/mime_manager.h
index 4e47d27..d38c38d 100644
--- a/myserver/include/conf/mime/mime_manager.h
+++ b/myserver/include/conf/mime/mime_manager.h
@@ -17,36 +17,36 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef MIME_MANAGER_H
-#define MIME_MANAGER_H
+# define MIME_MANAGER_H
 
-#include <include/base/utility.h>
-#include <include/base/hash_map/hash_map.h>
-#include <include/base/sync/mutex.h>
-#include <include/base/xml/xml_parser.h>
-#include <include/base/regex/myserver_regex.h>
+# include <include/base/utility.h>
+# include <include/base/hash_map/hash_map.h>
+# include <include/base/sync/mutex.h>
+# include <include/base/xml/xml_parser.h>
+# include <include/base/regex/myserver_regex.h>
 
 
-#ifdef WIN32
-# include <windows.h>
-#endif
+# ifdef WIN32
+#  include <windows.h>
+# endif
 
 extern "C"
 {
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-#ifdef WIN32
-# include <tchar.h>
-# include <io.h>
-#endif
+# include <stdio.h>
+# include <stdlib.h>
+# include <string.h>
+# include <ctype.h>
+
+# ifdef WIN32
+#  include <tchar.h>
+#  include <io.h>
+# endif
 }
 
-#include <string>
-#include <map>
-#include <vector>
-#include <list>
+# include <string>
+# include <map>
+# include <vector>
+# include <list>
 
 using namespace std;
 
diff --git a/myserver/include/conf/nodetree.h b/myserver/include/conf/nodetree.h
index 1da691a..cca47ce 100644
--- a/myserver/include/conf/nodetree.h
+++ b/myserver/include/conf/nodetree.h
@@ -17,8 +17,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef NODE_TREE_H
-#define NODE_TREE_H
+# define NODE_TREE_H
 
-#include <src/conf/nodetree.cpp>
+# include <src/conf/nodetree.cpp>
 
 #endif
diff --git a/myserver/include/conf/security/auth_domain.h b/myserver/include/conf/security/auth_domain.h
index fd9091e..ff475f8 100644
--- a/myserver/include/conf/security/auth_domain.h
+++ b/myserver/include/conf/security/auth_domain.h
@@ -17,12 +17,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef AUTH_DOMAIN_H
-#define AUTH_DOMAIN_H
+# define AUTH_DOMAIN_H
 
-#include "stdafx.h"
-#include <include/conf/security/security_domain.h>
+# include "stdafx.h"
+# include <include/conf/security/security_domain.h>
 
-#include <string>
+# include <string>
 
 using namespace std;
 
diff --git a/myserver/include/conf/security/auth_method.h b/myserver/include/conf/security/auth_method.h
index eaf100a..561f374 100644
--- a/myserver/include/conf/security/auth_method.h
+++ b/myserver/include/conf/security/auth_method.h
@@ -17,10 +17,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef AUTH_METHOD_H
-#define AUTH_METHOD_H
+# define AUTH_METHOD_H
 
-#include "stdafx.h"
-#include <include/conf/security/security_manager.h>
+# include "stdafx.h"
+# include <include/conf/security/security_manager.h>
 
 using namespace std;
 
diff --git a/myserver/include/conf/security/auth_method_factory.h b/myserver/include/conf/security/auth_method_factory.h
index 8d054e1..c326999 100644
--- a/myserver/include/conf/security/auth_method_factory.h
+++ b/myserver/include/conf/security/auth_method_factory.h
@@ -17,11 +17,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef AUTH_METHOD_FACTORY_H
-#define AUTH_METHOD_FACTORY_H
+# define AUTH_METHOD_FACTORY_H
 
-#include "stdafx.h"
-#include <include/base/hash_map/hash_map.h>
-#include <string>
+# include "stdafx.h"
+# include <include/base/hash_map/hash_map.h>
+# include <string>
 
 using namespace std;
 
diff --git a/myserver/include/conf/security/security_cache.h b/myserver/include/conf/security/security_cache.h
index b349be9..89f42f7 100644
--- a/myserver/include/conf/security/security_cache.h
+++ b/myserver/include/conf/security/security_cache.h
@@ -16,17 +16,17 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 #ifndef SECURITY_CACHE_H
-#define SECURITY_CACHE_H
-#include <include/base/hash_map/hash_map.h>
-#include <include/conf/security/security_manager.h>
+# define SECURITY_CACHE_H
+# include <include/base/hash_map/hash_map.h>
+# include <include/conf/security/security_manager.h>
 
-#include <include/conf/security/auth_method_factory.h>
-#include <include/conf/security/auth_method.h>
-#include <include/conf/security/validator_factory.h>
-#include <include/conf/security/validator.h>
-#include <include/conf/security/xml_validator.h>
+# include <include/conf/security/auth_method_factory.h>
+# include <include/conf/security/auth_method.h>
+# include <include/conf/security/validator_factory.h>
+# include <include/conf/security/validator.h>
+# include <include/conf/security/xml_validator.h>
 
-#include <string>
+# include <string>
 
 using namespace std;
 
diff --git a/myserver/include/conf/security/security_domain.h b/myserver/include/conf/security/security_domain.h
index 3393522..28a66f4 100644
--- a/myserver/include/conf/security/security_domain.h
+++ b/myserver/include/conf/security/security_domain.h
@@ -17,11 +17,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef SECURITY_DOMAIN_H
-#define SECURITY_DOMAIN_H
+# define SECURITY_DOMAIN_H
 
-#include "stdafx.h"
+# include "stdafx.h"
 
-#include <string>
+# include <string>
 
 using namespace std;
 
diff --git a/myserver/include/conf/security/security_manager.h b/myserver/include/conf/security/security_manager.h
index f181d7b..81097a9 100644
--- a/myserver/include/conf/security/security_manager.h
+++ b/myserver/include/conf/security/security_manager.h
@@ -17,16 +17,16 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef SECURITY_MANAGER_H
-#define SECURITY_MANAGER_H
+# define SECURITY_MANAGER_H
 
-#include "stdafx.h"
-#include <include/conf/security/security_token.h>
-#include <include/connection/connection.h>
-#include <include/base/xml/xml_parser.h>
-#include <include/protocol/http/http_headers.h>
-#include <include/base/hash_map/hash_map.h>
+# include "stdafx.h"
+# include <include/conf/security/security_token.h>
+# include <include/connection/connection.h>
+# include <include/base/xml/xml_parser.h>
+# include <include/protocol/http/http_headers.h>
+# include <include/base/hash_map/hash_map.h>
 
-#include <string>
+# include <string>
 
 using namespace std;
 
diff --git a/myserver/include/conf/security/security_token.h b/myserver/include/conf/security/security_token.h
index 9a3ef30..1d03b2d 100644
--- a/myserver/include/conf/security/security_token.h
+++ b/myserver/include/conf/security/security_token.h
@@ -17,12 +17,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef SECURITY_TOKEN_H
-#define SECURITY_TOKEN_H
+# define SECURITY_TOKEN_H
 
-#include "stdafx.h"
-#include <include/base/hash_map/hash_map.h>
-#include <include/conf/nodetree.h>
-#include <string>
+# include "stdafx.h"
+# include <include/base/hash_map/hash_map.h>
+# include <include/conf/nodetree.h>
+# include <string>
 
 using namespace std;
 
diff --git a/myserver/include/conf/security/validator.h b/myserver/include/conf/security/validator.h
index 2d129a5..02cd48e 100644
--- a/myserver/include/conf/security/validator.h
+++ b/myserver/include/conf/security/validator.h
@@ -17,16 +17,16 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef VALIDATOR_H
-#define VALIDATOR_H
+# define VALIDATOR_H
 
-#include "stdafx.h"
-#include <include/base/hash_map/hash_map.h>
+# include "stdafx.h"
+# include <include/base/hash_map/hash_map.h>
 
-#include <include/conf/security/auth_method.h>
-#include <include/conf/security/security_domain.h>
-#include <include/conf/security/security_manager.h>
+# include <include/conf/security/auth_method.h>
+# include <include/conf/security/security_domain.h>
+# include <include/conf/security/security_manager.h>
 
-#include <list>
+# include <list>
 using namespace std;
 
 
diff --git a/myserver/include/conf/security/validator_factory.h b/myserver/include/conf/security/validator_factory.h
index 62feebf..08033fd 100644
--- a/myserver/include/conf/security/validator_factory.h
+++ b/myserver/include/conf/security/validator_factory.h
@@ -17,11 +17,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef VALIDATOR_FACTORY_H
-#define VALIDATOR_FACTORY_H
+# define VALIDATOR_FACTORY_H
 
-#include "stdafx.h"
-#include <include/base/hash_map/hash_map.h>
-#include <string>
+# include "stdafx.h"
+# include <include/base/hash_map/hash_map.h>
+# include <string>
 
 using namespace std;
 
diff --git a/myserver/include/conf/security/xml_validator.h b/myserver/include/conf/security/xml_validator.h
index c9c9abd..a0c9d97 100644
--- a/myserver/include/conf/security/xml_validator.h
+++ b/myserver/include/conf/security/xml_validator.h
@@ -17,17 +17,17 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef XML_VALIDATOR_H
-#define XML_VALIDATOR_H
+# define XML_VALIDATOR_H
 
-#include "stdafx.h"
-#include <include/base/hash_map/hash_map.h>
+# include "stdafx.h"
+# include <include/base/hash_map/hash_map.h>
 
-#include <include/conf/security/security_domain.h>
-#include <include/conf/security/security_manager.h>
-#include <include/server/server.h>
-#include <include/base/sync/mutex.h>
-#include <include/conf/security/validator.h>
-#include <include/base/xml/xml_parser.h>
+# include <include/conf/security/security_domain.h>
+# include <include/conf/security/security_manager.h>
+# include <include/server/server.h>
+# include <include/base/sync/mutex.h>
+# include <include/conf/security/validator.h>
+# include <include/base/xml/xml_parser.h>
 
 class SecurityCache;
 
diff --git a/myserver/include/conf/vhost/ip.h b/myserver/include/conf/vhost/ip.h
index 55e547c..b9b48d9 100644
--- a/myserver/include/conf/vhost/ip.h
+++ b/myserver/include/conf/vhost/ip.h
@@ -17,10 +17,10 @@
 */
 
 #ifndef IP_H
-#define IP_H
+# define IP_H
 
-#include "stdafx.h"
-#include <string>
+# include "stdafx.h"
+# include <string>
 
 class IpRange
 {
diff --git a/myserver/include/conf/vhost/vhost.h b/myserver/include/conf/vhost/vhost.h
index c30064c..db48120 100644
--- a/myserver/include/conf/vhost/vhost.h
+++ b/myserver/include/conf/vhost/vhost.h
@@ -17,25 +17,25 @@
 */
 
 #ifndef VHOST_H
-#define VHOST_H
-
-#include <list>
-#include <string>
-
-#include "stdafx.h"
-#include <include/base/xml/xml_parser.h>
-#include <include/base/file/file.h>
-#include <include/base/utility.h>
-#include <include/base/regex/myserver_regex.h>
-#include <include/log/log_manager.h>
-#include <include/conf/mime/mime_manager.h>
-#include <include/base/thread/thread.h>
-#include <include/base/hash_map/hash_map.h>
-#include <include/base/sync/mutex.h>
-#include <include/base/ssl/ssl.h>
-#include <include/connections_scheduler/listen_threads.h>
-#include <include/conf/vhost/ip.h>
-#include <include/conf/nodetree.h>
+# define VHOST_H
+
+# include <list>
+# include <string>
+
+# include "stdafx.h"
+# include <include/base/xml/xml_parser.h>
+# include <include/base/file/file.h>
+# include <include/base/utility.h>
+# include <include/base/regex/myserver_regex.h>
+# include <include/log/log_manager.h>
+# include <include/conf/mime/mime_manager.h>
+# include <include/base/thread/thread.h>
+# include <include/base/hash_map/hash_map.h>
+# include <include/base/sync/mutex.h>
+# include <include/base/ssl/ssl.h>
+# include <include/connections_scheduler/listen_threads.h>
+# include <include/conf/vhost/ip.h>
+# include <include/conf/nodetree.h>
 
 using namespace std;
 typedef int (*NULL_REFERENCECB)(class Vhost*);
diff --git a/myserver/include/conf/vhost/vhost_manager.h b/myserver/include/conf/vhost/vhost_manager.h
index 947148b..d2733ea 100644
--- a/myserver/include/conf/vhost/vhost_manager.h
+++ b/myserver/include/conf/vhost/vhost_manager.h
@@ -17,11 +17,11 @@
 */
 
 #ifndef VHOST_MANAGER_H
-#define VHOST_MANAGER_H
+# define VHOST_MANAGER_H
 
-#include "stdafx.h"
-#include <include/conf/vhost/vhost.h>
-#include <include/log/log_manager.h>
+# include "stdafx.h"
+# include <include/conf/vhost/vhost.h>
+# include <include/log/log_manager.h>
 
 class VhostSource
 {
diff --git a/myserver/include/conf/xml_conf.h b/myserver/include/conf/xml_conf.h
index 2693923..2eb1fc5 100644
--- a/myserver/include/conf/xml_conf.h
+++ b/myserver/include/conf/xml_conf.h
@@ -17,13 +17,13 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef XML_CONF_H
-#define XML_CONF_H
+# define XML_CONF_H
 
-#include <include/conf/nodetree.h>
-#include <include/base/xml/xml_parser.h>
-#include <include/base/hash_map/hash_map.h>
+# include <include/conf/nodetree.h>
+# include <include/base/xml/xml_parser.h>
+# include <include/base/hash_map/hash_map.h>
 
-#include <list>
+# include <list>
 
 using namespace std;
 
diff --git a/myserver/include/connection/connection.h b/myserver/include/connection/connection.h
index 6718786..dd3bcf7 100644
--- a/myserver/include/connection/connection.h
+++ b/myserver/include/connection/connection.h
@@ -17,22 +17,22 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef CONNECTION_H
-#define CONNECTION_H
+# define CONNECTION_H
 
 extern "C"
 {
-#include <sys/time.h>
+# include <sys/time.h>
 }
 
-#include <include/base/socket/socket.h>
-#include <include/protocol/protocol_buffer.h>
-#include <include/base/utility.h>
-#include <include/base/mem_buff/mem_buff.h>
+# include <include/base/socket/socket.h>
+# include <include/protocol/protocol_buffer.h>
+# include <include/base/utility.h>
+# include <include/base/mem_buff/mem_buff.h>
 
 class Vhost;
 class ClientsThread;
 
-#include <string>
+# include <string>
 
 using namespace std;
 
diff --git a/myserver/include/connections_scheduler/connections_scheduler.h b/myserver/include/connections_scheduler/connections_scheduler.h
index f770457..4125c19 100644
--- a/myserver/include/connections_scheduler/connections_scheduler.h
+++ b/myserver/include/connections_scheduler/connections_scheduler.h
@@ -17,26 +17,26 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef CONNECTIONS_SCHEDULER_H
-#define CONNECTIONS_SCHEDULER_H
+# define CONNECTIONS_SCHEDULER_H
 
-#include "stdafx.h"
-#include <include/base/socket/socket.h>
-#include <include/connection/connection.h>
-#include <include/base/sync/mutex.h>
-#include <include/base/sync/event.h>
-#include <include/base/sync/semaphore.h>
-#include <include/base/hash_map/hash_map.h>
-#include <include/base/thread/thread.h>
-#include <include/base/socket_pair/socket_pair.h>
+# include "stdafx.h"
+# include <include/base/socket/socket.h>
+# include <include/connection/connection.h>
+# include <include/base/sync/mutex.h>
+# include <include/base/sync/event.h>
+# include <include/base/sync/semaphore.h>
+# include <include/base/hash_map/hash_map.h>
+# include <include/base/thread/thread.h>
+# include <include/base/socket_pair/socket_pair.h>
 
-#include <list>
-#include <queue>
+# include <list>
+# include <queue>
 
-#include <event.h>
+# include <event.h>
 
 using namespace std;
 
-#define PRIORITY_CLASSES 3
+# define PRIORITY_CLASSES 3
 
 
 class Server;
diff --git a/myserver/include/connections_scheduler/listen_threads.h b/myserver/include/connections_scheduler/listen_threads.h
index dd07fd1..1b3af00 100644
--- a/myserver/include/connections_scheduler/listen_threads.h
+++ b/myserver/include/connections_scheduler/listen_threads.h
@@ -16,13 +16,13 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 #ifndef LISTEN_THREADS_H
-#define LISTEN_THREADS_H
+# define LISTEN_THREADS_H
 
-#include "stdafx.h"
-#include <include/base/xml/xml_parser.h>
-#include <include/base/sync/mutex.h>
-#include <include/base/hash_map/hash_map.h>
-#include <include/connections_scheduler/connections_scheduler.h>
+# include "stdafx.h"
+# include <include/base/xml/xml_parser.h>
+# include <include/base/sync/mutex.h>
+# include <include/base/hash_map/hash_map.h>
+# include <include/connections_scheduler/connections_scheduler.h>
 
 class ListenThreads
 {
diff --git a/myserver/include/filter/console.h b/myserver/include/filter/console.h
index f40cdd0..42806e7 100644
--- a/myserver/include/filter/console.h
+++ b/myserver/include/filter/console.h
@@ -17,12 +17,12 @@
 */
 
 #ifndef CONSOLE_H
-#define CONSOLE_H
+# define CONSOLE_H
 
-#include <iostream>
-#include <map>
+# include <iostream>
+# include <map>
 
-#include <include/filter/stream.h>
+# include <include/filter/stream.h>
 
 using namespace std;
 
@@ -39,13 +39,13 @@ public:
   int reset ();
 protected:
   ostream* fd;
-#ifdef WIN32
+# ifdef WIN32
   map<string, WORD> fg_colors;
   map<string, WORD> bg_colors;
-#else
+# else
   map<string, string> fg_colors;
   map<string, string> bg_colors;
-#endif
+# endif
 };
 
 #endif
diff --git a/myserver/include/filter/filter.h b/myserver/include/filter/filter.h
index a93f90f..fc4bc13 100644
--- a/myserver/include/filter/filter.h
+++ b/myserver/include/filter/filter.h
@@ -17,10 +17,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef FILTER_H
-#define FILTER_H
-#include "stdafx.h"
-#include <include/filter/stream.h>
-#include <include/protocol/protocol.h>
+# define FILTER_H
+# include "stdafx.h"
+# include <include/filter/stream.h>
+# include <include/protocol/protocol.h>
 
 /*!
  *Abstract class to handle virtual data filters.
diff --git a/myserver/include/filter/filters_chain.h b/myserver/include/filter/filters_chain.h
index d296ba7..42484dc 100644
--- a/myserver/include/filter/filters_chain.h
+++ b/myserver/include/filter/filters_chain.h
@@ -17,12 +17,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef FILTERS_CHAIN_H
-#define FILTERS_CHAIN_H
-#include "stdafx.h"
-#include <include/filter/stream.h>
-#include <include/filter/filter.h>
-#include <include/protocol/protocol.h>
-#include <list>
+# define FILTERS_CHAIN_H
+# include "stdafx.h"
+# include <include/filter/stream.h>
+# include <include/filter/filter.h>
+# include <include/protocol/protocol.h>
+# include <list>
 
 using namespace std;
 
diff --git a/myserver/include/filter/filters_factory.h b/myserver/include/filter/filters_factory.h
index 035b0d9..ee1a7fa 100644
--- a/myserver/include/filter/filters_factory.h
+++ b/myserver/include/filter/filters_factory.h
@@ -17,15 +17,15 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef FILTERS_FACTORY_H
-#define FILTERS_FACTORY_H
+# define FILTERS_FACTORY_H
 
-#include "stdafx.h"
-#include <include/filter/stream.h>
-#include <include/filter/filter.h>
-#include <include/filter/filters_chain.h>
-#include <include/base/hash_map/hash_map.h>
+# include "stdafx.h"
+# include <include/filter/stream.h>
+# include <include/filter/filter.h>
+# include <include/filter/filters_chain.h>
+# include <include/base/hash_map/hash_map.h>
 
-#include <list>
+# include <list>
 
 using namespace std;
 
diff --git a/myserver/include/filter/gzip/gzip.h b/myserver/include/filter/gzip/gzip.h
old mode 100755
new mode 100644
index 6fbd377..39d7af8
--- a/myserver/include/filter/gzip/gzip.h
+++ b/myserver/include/filter/gzip/gzip.h
@@ -17,18 +17,18 @@
 */
 
 #ifndef GZIP_H
-#define GZIP_H
-#include "stdafx.h"
-#include <include/filter/filter.h>
-
-#ifdef HAVE_ZLIB
-# include "zlib.h"
-#else
-# define z_stream (void*)
-#endif
-
-#define GZIP_HEADER_LENGTH		10
-#define GZIP_FOOTER_LENGTH		8
+# define GZIP_H
+# include "stdafx.h"
+# include <include/filter/filter.h>
+
+# ifdef HAVE_ZLIB
+#  include "zlib.h"
+# else
+#  define z_stream (void*)
+# endif
+
+# define GZIP_HEADER_LENGTH		10
+# define GZIP_FOOTER_LENGTH		8
 extern char GZIP_HEADER[];
 
 class Gzip : public Filter
diff --git a/myserver/include/filter/gzip/gzip_decompress.h b/myserver/include/filter/gzip/gzip_decompress.h
old mode 100755
new mode 100644
index e6f2fbf..bdeb21e
--- a/myserver/include/filter/gzip/gzip_decompress.h
+++ b/myserver/include/filter/gzip/gzip_decompress.h
@@ -17,17 +17,17 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef GZIP_DECOMPRESS_H
-#define GZIP_DECOMPRESS_H
+# define GZIP_DECOMPRESS_H
 
-#include "stdafx.h"
-#include <include/filter/filter.h>
-#include <include/filter/gzip/gzip.h>
+# include "stdafx.h"
+# include <include/filter/filter.h>
+# include <include/filter/gzip/gzip.h>
 
-#ifdef HAVE_ZLIB
-# include "zlib.h"
-#else
-# define z_stream (void*)
-#endif
+# ifdef HAVE_ZLIB
+#  include "zlib.h"
+# else
+#  define z_stream (void*)
+# endif
 
 
 class GzipDecompress : public Filter
diff --git a/myserver/include/filter/memory_stream.h b/myserver/include/filter/memory_stream.h
index 0c96066..52e5fb5 100644
--- a/myserver/include/filter/memory_stream.h
+++ b/myserver/include/filter/memory_stream.h
@@ -17,11 +17,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef MEMORY_STREAM_H
-#define MEMORY_STREAM_H
+# define MEMORY_STREAM_H
 
-#include "stdafx.h"
-#include <include/filter/stream.h>
-#include <include/base/mem_buff/mem_buff.h>
+# include "stdafx.h"
+# include <include/filter/stream.h>
+# include <include/base/mem_buff/mem_buff.h>
 
 class MemoryStream : public Stream
 {
diff --git a/myserver/include/filter/stream.h b/myserver/include/filter/stream.h
index 40a5ad0..ca8c2e8 100644
--- a/myserver/include/filter/stream.h
+++ b/myserver/include/filter/stream.h
@@ -17,21 +17,21 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef STREAM_H
-#define STREAM_H
+# define STREAM_H
 
-#include "stdafx.h"
+# include "stdafx.h"
 
-#ifdef WIN32
+# ifdef WIN32
 typedef u_int Handle;
-#else
+# else
 typedef int Handle;
-#endif
+# endif
 
-#ifdef WIN32
+# ifdef WIN32
 typedef HANDLE FileHandle;
-#else
+# else
 typedef int FileHandle;
-#endif
+# endif
 
 /*!
  *Abstract class to handle virtual data streams.
diff --git a/myserver/include/http_handler/cgi/cgi.h b/myserver/include/http_handler/cgi/cgi.h
index 77bbc16..f6a9232 100644
--- a/myserver/include/http_handler/cgi/cgi.h
+++ b/myserver/include/http_handler/cgi/cgi.h
@@ -17,12 +17,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef CGI_H
-#define CGI_H
+# define CGI_H
 
-#include <include/protocol/http/http_response.h>
-#include <include/protocol/http/http_request.h>
-#include <include/protocol/http/http_headers.h>
-#include <include/protocol/http/http_data_handler.h>
+# include <include/protocol/http/http_response.h>
+# include <include/protocol/http/http_request.h>
+# include <include/protocol/http/http_headers.h>
+# include <include/protocol/http/http_data_handler.h>
 
 class Pipe;
 class FiltersChain;
diff --git a/myserver/include/http_handler/fastcgi/fastcgi.h b/myserver/include/http_handler/fastcgi/fastcgi.h
index c590e83..a94ca76 100644
--- a/myserver/include/http_handler/fastcgi/fastcgi.h
+++ b/myserver/include/http_handler/fastcgi/fastcgi.h
@@ -17,29 +17,29 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef FASTCGI_H
-#define FASTCGI_H
-
-#include "stdafx.h"
-#include <include/protocol/http/http_headers.h>
-#include <include/base/utility.h>
-#include <include/base/socket/socket.h>
-#include <include/conf/vhost/vhost.h>
-#include <include/protocol/http/http_errors.h>
-#include <include/connection/connection.h>
-#include <include/base/string/stringutils.h>
-#include <include/base/thread/thread.h>
-#include <include/base/sync/mutex.h>
-#include <include/protocol/http/http_data_handler.h>
-#include <include/base/hash_map/hash_map.h>
-#include <include/base/process/process_server_manager.h>
-#include <string>
+# define FASTCGI_H
+
+# include "stdafx.h"
+# include <include/protocol/http/http_headers.h>
+# include <include/base/utility.h>
+# include <include/base/socket/socket.h>
+# include <include/conf/vhost/vhost.h>
+# include <include/protocol/http/http_errors.h>
+# include <include/connection/connection.h>
+# include <include/base/string/stringutils.h>
+# include <include/base/thread/thread.h>
+# include <include/base/sync/mutex.h>
+# include <include/protocol/http/http_data_handler.h>
+# include <include/base/hash_map/hash_map.h>
+# include <include/base/process/process_server_manager.h>
+# include <string>
 
 using namespace std;
 
 /*!
  *Listening socket file number.
  */
-#define FCGI_LISTENSOCK_FILENO 0
+# define FCGI_LISTENSOCK_FILENO 0
 
 typedef struct
 {
@@ -56,28 +56,28 @@ typedef struct
 /*!
  *Value for version component of FcgiHeader.
  */
-#define FCGIVERSION_1           1
+# define FCGIVERSION_1           1
 
 /*!
  *Current version of the FastCGI protocol.
  */
-#define FCGIVERSION FCGIVERSION_1
+# define FCGIVERSION FCGIVERSION_1
 
 /*!
  *Values for type component of FcgiHeader
  */
-#define FCGIBEGIN_REQUEST       1
-#define FCGIABORT_REQUEST       2
-#define FCGIEND_REQUEST         3
-#define FCGIPARAMS              4
-#define FCGISTDIN               5
-#define FCGISTDOUT              6
-#define FCGISTDERR              7
-#define FCGIDATA                8
-#define FCGIGET_VALUES          9
-#define FCGIGET_VALUES_RESULT  10
-#define FCGIUNKNOWN_TYPE       11
-#define FCGIMAXTYPE (FCGIUNKNOWN_TYPE)
+# define FCGIBEGIN_REQUEST       1
+# define FCGIABORT_REQUEST       2
+# define FCGIEND_REQUEST         3
+# define FCGIPARAMS              4
+# define FCGISTDIN               5
+# define FCGISTDOUT              6
+# define FCGISTDERR              7
+# define FCGIDATA                8
+# define FCGIGET_VALUES          9
+# define FCGIGET_VALUES_RESULT  10
+# define FCGIUNKNOWN_TYPE       11
+# define FCGIMAXTYPE (FCGIUNKNOWN_TYPE)
 
 typedef struct
 {
@@ -96,14 +96,14 @@ typedef struct
 /*!
  *Mask for flags component of FcgiBeginRequestBody.
  */
-#define FCGIKEEP_CONN  1
+# define FCGIKEEP_CONN  1
 
 /*!
  *Values for role component of FcgiBeginRequestBody.
  */
-#define FCGIRESPONDER  1
-#define FCGIAUTHORIZER 2
-#define FCGIFILTER     3
+# define FCGIRESPONDER  1
+# define FCGIAUTHORIZER 2
+# define FCGIFILTER     3
 
 typedef struct
 {
@@ -124,10 +124,10 @@ typedef struct
 /*!
  *Values for protocolStatus component of FcgiEndRequestBody.
  */
-#define FCGIREQUEST_COMPLETE 0
-#define FCGICANT_MPX_CONN    1
-#define FCGIOVERLOADED       2
-#define FCGIUNKNOWN_ROLE     3
+# define FCGIREQUEST_COMPLETE 0
+# define FCGICANT_MPX_CONN    1
+# define FCGIOVERLOADED       2
+# define FCGIUNKNOWN_ROLE     3
 
 typedef struct
 {
diff --git a/myserver/include/http_handler/http_dir/http_dir.h b/myserver/include/http_handler/http_dir/http_dir.h
index fbd69a9..3bec692 100644
--- a/myserver/include/http_handler/http_dir/http_dir.h
+++ b/myserver/include/http_handler/http_dir/http_dir.h
@@ -17,12 +17,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef HTTP_DIR_H
-#define HTTP_DIR_H
-#include "stdafx.h"
-#include <include/protocol/protocol.h>
-#include <include/protocol/http/http_headers.h>
-#include <include/protocol/http/http_data_handler.h>
-#include <list>
+# define HTTP_DIR_H
+# include "stdafx.h"
+# include <include/protocol/protocol.h>
+# include <include/protocol/http/http_headers.h>
+# include <include/protocol/http/http_data_handler.h>
+# include <list>
 
 using namespace std;
 
diff --git a/myserver/include/http_handler/http_file/http_file.h b/myserver/include/http_handler/http_file/http_file.h
index c9c40af..933538b 100644
--- a/myserver/include/http_handler/http_file/http_file.h
+++ b/myserver/include/http_handler/http_file/http_file.h
@@ -17,12 +17,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef HTTP_FILE_H
-#define HTTP_FILE_H
-#include "stdafx.h"
+# define HTTP_FILE_H
+# include "stdafx.h"
 
-#include <include/protocol/protocol.h>
-#include <include/protocol/http/http_headers.h>
-#include <include/protocol/http/http_data_handler.h>
+# include <include/protocol/protocol.h>
+# include <include/protocol/http/http_headers.h>
+# include <include/protocol/http/http_data_handler.h>
 
 class HttpFile  : public HttpDataHandler
 {
diff --git a/myserver/include/http_handler/isapi/isapi.h b/myserver/include/http_handler/isapi/isapi.h
index bd0ccdb..58558d1 100644
--- a/myserver/include/http_handler/isapi/isapi.h
+++ b/myserver/include/http_handler/isapi/isapi.h
@@ -17,53 +17,53 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef ISAPI_H
-#define ISAPI_H
-#include "stdafx.h"
-#include <include/protocol/http/http_headers.h>
-#include <include/base/utility.h>
-#include <include/protocol/http/http_errors.h>
-#include <include/connection/connection.h>
-#include <include/base/thread/thread.h>
-#include <include/base/sync/mutex.h>
-#include <include/protocol/http/http_data_handler.h>
-#include <include/filter/filters_chain.h>
-#ifdef WIN32
+# define ISAPI_H
+# include "stdafx.h"
+# include <include/protocol/http/http_headers.h>
+# include <include/base/utility.h>
+# include <include/protocol/http/http_errors.h>
+# include <include/connection/connection.h>
+# include <include/base/thread/thread.h>
+# include <include/base/sync/mutex.h>
+# include <include/protocol/http/http_data_handler.h>
+# include <include/filter/filters_chain.h>
+# ifdef WIN32
 
 typedef LPVOID HCONN;
 
-#define HSE_VERSION_MAJOR 5
-#define HSE_VERSION_MINOR 1
-#define HSE_LOG_BUFFER_LEN 80
-#define HSE_MAX_EXT_DLL_NAME_LEN 256
-
-#define HSE_STATUS_SUCCESS 1
-#define HSE_STATUS_SUCCESS_AND_KEEP_CONN 2
-#define HSE_STATUS_PENDING 3
-#define HSE_STATUS_ERROR 4
-
-#define HSE_REQ_BASE 0
-#define HSE_REQ_SEND_URL_REDIRECT_RESP (HSE_REQ_BASE + 1)
-#define HSE_REQ_SEND_URL (HSE_REQ_BASE + 2)
-#define HSE_REQ_SEND_RESPONSE_HEADER (HSE_REQ_BASE + 3)
-#define HSE_REQ_DONE_WITH_SESSION (HSE_REQ_BASE + 4)
-#define HSE_REQ_END_RESERVED 1000
-#define HSE_REQ_MAP_URL_TO_PATH (HSE_REQ_END_RESERVED+1)
-#define HSE_REQ_GET_SSPI_INFO (HSE_REQ_END_RESERVED+2)
-#define HSE_REQ_TRANSMIT_FILE (HSE_REQ_END_RESERVED+6)
-#define HSE_REQ_MAP_URL_TO_PATH_EX (HSE_REQ_END_RESERVED+12)
-#define HSE_REQ_ASYNC_READ_CLIENT (HSE_REQ_END_RESERVED+10)
-#define HSE_REQ_IS_KEEP_CONN (HSE_REQ_END_RESERVED+8)
-
-#define HSE_URL_FLAGS_READ        0x00000001
-#define HSE_URL_FLAGS_WRITE        0x00000002
-#define HSE_URL_FLAGS_EXECUTE      0x00000004
-#define HSE_URL_FLAGS_SSL        0x00000008
-#define HSE_URL_FLAGS_DONT_CACHE    0x00000010
-#define HSE_URL_FLAGS_NEGO_CERT      0x00000020
-#define HSE_URL_FLAGS_REQUIRE_CERT    0x00000040
-#define HSE_URL_FLAGS_MAP_CERT      0x00000080
-#define HSE_URL_FLAGS_SSL128      0x00000100
-#define HSE_URL_FLAGS_SCRIPT      0x00000200
+#  define HSE_VERSION_MAJOR 5
+#  define HSE_VERSION_MINOR 1
+#  define HSE_LOG_BUFFER_LEN 80
+#  define HSE_MAX_EXT_DLL_NAME_LEN 256
+
+#  define HSE_STATUS_SUCCESS 1
+#  define HSE_STATUS_SUCCESS_AND_KEEP_CONN 2
+#  define HSE_STATUS_PENDING 3
+#  define HSE_STATUS_ERROR 4
+
+#  define HSE_REQ_BASE 0
+#  define HSE_REQ_SEND_URL_REDIRECT_RESP (HSE_REQ_BASE + 1)
+#  define HSE_REQ_SEND_URL (HSE_REQ_BASE + 2)
+#  define HSE_REQ_SEND_RESPONSE_HEADER (HSE_REQ_BASE + 3)
+#  define HSE_REQ_DONE_WITH_SESSION (HSE_REQ_BASE + 4)
+#  define HSE_REQ_END_RESERVED 1000
+#  define HSE_REQ_MAP_URL_TO_PATH (HSE_REQ_END_RESERVED+1)
+#  define HSE_REQ_GET_SSPI_INFO (HSE_REQ_END_RESERVED+2)
+#  define HSE_REQ_TRANSMIT_FILE (HSE_REQ_END_RESERVED+6)
+#  define HSE_REQ_MAP_URL_TO_PATH_EX (HSE_REQ_END_RESERVED+12)
+#  define HSE_REQ_ASYNC_READ_CLIENT (HSE_REQ_END_RESERVED+10)
+#  define HSE_REQ_IS_KEEP_CONN (HSE_REQ_END_RESERVED+8)
+
+#  define HSE_URL_FLAGS_READ        0x00000001
+#  define HSE_URL_FLAGS_WRITE        0x00000002
+#  define HSE_URL_FLAGS_EXECUTE      0x00000004
+#  define HSE_URL_FLAGS_SSL        0x00000008
+#  define HSE_URL_FLAGS_DONT_CACHE    0x00000010
+#  define HSE_URL_FLAGS_NEGO_CERT      0x00000020
+#  define HSE_URL_FLAGS_REQUIRE_CERT    0x00000040
+#  define HSE_URL_FLAGS_MAP_CERT      0x00000080
+#  define HSE_URL_FLAGS_SSL128      0x00000100
+#  define HSE_URL_FLAGS_SCRIPT      0x00000200
 
 
 
@@ -125,12 +125,12 @@ struct ConnTableRecord
 typedef BOOL (WINAPI * PFN_GETEXTENSIONVERSION)(HSE_VERSION_INFO *pVer);
 typedef DWORD (WINAPI * PFN_HTTPEXTENSIONPROC)(EXTENSION_CONTROL_BLOCK *pECB);
 
-#endif
+# endif
 
 class Isapi  : public HttpDataHandler
 {
 public:
-#ifdef WIN32
+# ifdef WIN32
   static ConnTableRecord *HConnRecord(HCONN hConn);
   int Redirect(HttpThreadContext* td,ConnectionPtr a,char *URL);
   int Senduri(HttpThreadContext* td,ConnectionPtr a,char *URL);
@@ -139,7 +139,7 @@ public:
                                   LPVOID output, LPDWORD maxLen);
   static BOOL buildAllRawHeaders(HttpThreadContext* td,ConnectionPtr a,
                                  LPVOID output, LPDWORD maxLen);
-#endif
+# endif
   Isapi();
   static Mutex *isapiMutex;
   virtual int load ();
@@ -148,14 +148,14 @@ public:
                    const char *cgipath = 0, bool execute = false,
                    bool onlyHeader = false);
 private:
-#ifdef WIN32
+# ifdef WIN32
   static int initialized;
   static ConnTableRecord *connTable;
   static  u_long maxConnections;
-#endif
+# endif
 };
 
-#ifdef WIN32
+# ifdef WIN32
 BOOL WINAPI ISAPI_ServerSupportFunctionExport(HCONN hConn, DWORD dwHSERRequest,
                                               LPVOID lpvBuffer, LPDWORD lpdwSize,
                                               LPDWORD lpdwDataType);
@@ -163,6 +163,6 @@ BOOL WINAPI ISAPI_ReadClientExport(HCONN hConn, LPVOID lpvBuffer, LPDWORD lpdwSi
 BOOL WINAPI ISAPI_WriteClientExport(HCONN hConn, LPVOID Buffer, LPDWORD lpdwBytes,
                                     DWORD dwReserved);
 BOOL WINAPI ISAPI_GetServerVariableExport(HCONN, LPSTR, LPVOID, LPDWORD);
-#endif
+# endif
 
 #endif
diff --git a/myserver/include/http_handler/mscgi/mscgi.h b/myserver/include/http_handler/mscgi/mscgi.h
index fb408ca..9c20357 100644
--- a/myserver/include/http_handler/mscgi/mscgi.h
+++ b/myserver/include/http_handler/mscgi/mscgi.h
@@ -17,17 +17,17 @@
 */
 
 #ifndef MSCGI_H
-#define MSCGI_H
-#include "stdafx.h"
-#include <include/protocol/http/http_request.h>
-#include <include/protocol/http/http_response.h>
-#include <include/connection/connection.h>
-#include <include/conf/mime/mime_manager.h>
-#include <include/base/file/file.h>
-#include <include/server/server.h>
-#include <include/protocol/http/http_headers.h>
-#include <include/protocol/http/http_data_handler.h>
-#include <include/base/dynamic_lib/dynamiclib.h>
+# define MSCGI_H
+# include "stdafx.h"
+# include <include/protocol/http/http_request.h>
+# include <include/protocol/http/http_response.h>
+# include <include/connection/connection.h>
+# include <include/conf/mime/mime_manager.h>
+# include <include/base/file/file.h>
+# include <include/server/server.h>
+# include <include/protocol/http/http_headers.h>
+# include <include/protocol/http/http_data_handler.h>
+# include <include/base/dynamic_lib/dynamiclib.h>
 struct HttpThreadContext;
 
 class MsCgi;
diff --git a/myserver/include/http_handler/mscgi/mscgi_manager.h b/myserver/include/http_handler/mscgi/mscgi_manager.h
index 5d35859..9432a3b 100644
--- a/myserver/include/http_handler/mscgi/mscgi_manager.h
+++ b/myserver/include/http_handler/mscgi/mscgi_manager.h
@@ -17,28 +17,28 @@ License along with this library; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
 #ifndef CGI_MANAGER_H
-#define CGI_MANAGER_H
+# define CGI_MANAGER_H
 
-#ifdef WIN32
-#define EXPORTABLE _declspec(dllexport)
-#endif
+# ifdef WIN32
+#  define EXPORTABLE _declspec(dllexport)
+# endif
 
-#include "stdafx.h"
+# include "stdafx.h"
 
-#include <include/server/server.h>
-#include <include/protocol/http/http.h>
-#include <include/http_handler/mscgi/mscgi.h>
-#include <include/base/file/file.h>
-#include <include/protocol/http/http_request.h>
-#include <include/protocol/http/http_response.h>
-#include <include/base/string/stringutils.h>
-#define LOCAL_BUFFER_DIM 150
+# include <include/server/server.h>
+# include <include/protocol/http/http.h>
+# include <include/http_handler/mscgi/mscgi.h>
+# include <include/base/file/file.h>
+# include <include/protocol/http/http_request.h>
+# include <include/protocol/http/http_response.h>
+# include <include/base/string/stringutils.h>
+# define LOCAL_BUFFER_DIM 150
 
-#ifdef WIN32
+# ifdef WIN32
 class EXPORTABLE MscgiManager
-#else
+# else
 class MscgiManager
-#endif
+# endif
 {
 public:
 	Server *getServer();
diff --git a/myserver/include/http_handler/proxy/proxy.h b/myserver/include/http_handler/proxy/proxy.h
index 131d0bd..b008c43 100644
--- a/myserver/include/http_handler/proxy/proxy.h
+++ b/myserver/include/http_handler/proxy/proxy.h
@@ -17,12 +17,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef PROXY_H
-#define PROXY_H
+# define PROXY_H
 
-#include <include/protocol/http/http_response.h>
-#include <include/protocol/http/http_request.h>
-#include <include/protocol/http/http_headers.h>
-#include <include/protocol/http/http_data_handler.h>
+# include <include/protocol/http/http_response.h>
+# include <include/protocol/http/http_request.h>
+# include <include/protocol/http/http_headers.h>
+# include <include/protocol/http/http_data_handler.h>
 
 class FiltersChain;
 class Socket;
diff --git a/myserver/include/http_handler/scgi/scgi.h b/myserver/include/http_handler/scgi/scgi.h
index 0d1c309..ba0270a 100644
--- a/myserver/include/http_handler/scgi/scgi.h
+++ b/myserver/include/http_handler/scgi/scgi.h
@@ -17,23 +17,23 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef SCGI_H
-#define SCGI_H
+# define SCGI_H
 
-#include "stdafx.h"
-#include <include/protocol/http/http_headers.h>
-#include <include/base/utility.h>
-#include <include/base/socket/socket.h>
-#include <include/conf/vhost/vhost.h>
-#include <include/protocol/http/http_errors.h>
-#include <include/connection/connection.h>
-#include <include/base/string/stringutils.h>
-#include <include/base/thread/thread.h>
-#include <include/base/sync/mutex.h>
-#include <include/protocol/http/http_data_handler.h>
-#include <include/base/hash_map/hash_map.h>
-#include <include/base/process/process_server_manager.h>
-#include <include/filter/filters_chain.h>
-#include <string>
+# include "stdafx.h"
+# include <include/protocol/http/http_headers.h>
+# include <include/base/utility.h>
+# include <include/base/socket/socket.h>
+# include <include/conf/vhost/vhost.h>
+# include <include/protocol/http/http_errors.h>
+# include <include/connection/connection.h>
+# include <include/base/string/stringutils.h>
+# include <include/base/thread/thread.h>
+# include <include/base/sync/mutex.h>
+# include <include/protocol/http/http_data_handler.h>
+# include <include/base/hash_map/hash_map.h>
+# include <include/base/process/process_server_manager.h>
+# include <include/filter/filters_chain.h>
+# include <string>
 
 using namespace std;
 
diff --git a/myserver/include/http_handler/wincgi/wincgi.h b/myserver/include/http_handler/wincgi/wincgi.h
index 52d1baf..b8bed15 100644
--- a/myserver/include/http_handler/wincgi/wincgi.h
+++ b/myserver/include/http_handler/wincgi/wincgi.h
@@ -17,13 +17,13 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef WINCGI_H
-#define WINCGI_H
+# define WINCGI_H
 
-#include <include/protocol/http/http_request.h>
-#include <include/protocol/http/http_response.h>
-#include <include/conf/mime/mime_manager.h>
-#include <include/protocol/http/http_headers.h>
-#include <include/protocol/http/http_data_handler.h>
+# include <include/protocol/http/http_request.h>
+# include <include/protocol/http/http_response.h>
+# include <include/conf/mime/mime_manager.h>
+# include <include/protocol/http/http_headers.h>
+# include <include/protocol/http/http_data_handler.h>
 
 class WinCgi : public HttpDataHandler
 {
diff --git a/myserver/include/log/log_manager.h b/myserver/include/log/log_manager.h
index e3a4270..869e812 100644
--- a/myserver/include/log/log_manager.h
+++ b/myserver/include/log/log_manager.h
@@ -17,17 +17,17 @@
 */
 
 #ifndef LOG_MANAGER_H
-#define LOG_MANAGER_H
+# define LOG_MANAGER_H
 
-#include <algorithm>
-#include <map>
-#include <string>
+# include <algorithm>
+# include <map>
+# include <string>
 
-#include <include/base/sync/mutex.h>
-#include <include/filter/filters_factory.h>
-#include <include/log/stream/log_stream.h>
-#include <include/log/stream/log_stream_factory.h>
-#include <cstdarg>
+# include <include/base/sync/mutex.h>
+# include <include/filter/filters_factory.h>
+# include <include/log/stream/log_stream.h>
+# include <include/log/stream/log_stream_factory.h>
+# include <cstdarg>
 
 
 using namespace std;
diff --git a/myserver/include/log/stream/console_stream.h b/myserver/include/log/stream/console_stream.h
index a182a2f..8fc6488 100644
--- a/myserver/include/log/stream/console_stream.h
+++ b/myserver/include/log/stream/console_stream.h
@@ -17,14 +17,14 @@
 */
 
 #ifndef CONSOLE_STREAM_H
-#define CONSOLE_STREAM_H
+# define CONSOLE_STREAM_H
 
-#include <list>
-#include <map>
-#include <string>
+# include <list>
+# include <map>
+# include <string>
 
-#include <include/log/stream/log_stream.h>
-#include <include/filter/console.h>
+# include <include/log/stream/log_stream.h>
+# include <include/filter/console.h>
 
 class ConsoleStream : public LogStream
 {
diff --git a/myserver/include/log/stream/console_stream_creator.h b/myserver/include/log/stream/console_stream_creator.h
index 7d4e0b5..7e41953 100644
--- a/myserver/include/log/stream/console_stream_creator.h
+++ b/myserver/include/log/stream/console_stream_creator.h
@@ -17,10 +17,10 @@
 */
 
 #ifndef CONSOLE_STREAM_CREATOR_H
-#define CONSOLE_STREAM_CREATOR_H
+# define CONSOLE_STREAM_CREATOR_H
 
-#include <include/log/stream/log_stream_creator.h>
-#include <include/log/stream/console_stream.h>
+# include <include/log/stream/log_stream_creator.h>
+# include <include/log/stream/console_stream.h>
 
 class ConsoleStreamCreator : public LogStreamCreator
 {
diff --git a/myserver/include/log/stream/file_stream.h b/myserver/include/log/stream/file_stream.h
index 65d6879..4f3f0c7 100644
--- a/myserver/include/log/stream/file_stream.h
+++ b/myserver/include/log/stream/file_stream.h
@@ -17,17 +17,17 @@
 */
 
 #ifndef FILE_STREAM_H
-#define FILE_STREAM_H
+# define FILE_STREAM_H
 
-#include <list>
-#include <sstream>
-#include <string>
+# include <list>
+# include <sstream>
+# include <string>
 
-#include <include/base/file/file.h>
-#include <include/base/file/files_utility.h>
-#include <include/base/string/stringutils.h>
-#include <include/base/utility.h>
-#include <include/log/stream/log_stream.h>
+# include <include/base/file/file.h>
+# include <include/base/file/files_utility.h>
+# include <include/base/string/stringutils.h>
+# include <include/base/utility.h>
+# include <include/log/stream/log_stream.h>
 
 class FileStream : public LogStream
 {
diff --git a/myserver/include/log/stream/file_stream_creator.h b/myserver/include/log/stream/file_stream_creator.h
index d1e6776..474306f 100644
--- a/myserver/include/log/stream/file_stream_creator.h
+++ b/myserver/include/log/stream/file_stream_creator.h
@@ -17,10 +17,10 @@
 */
 
 #ifndef FILE_STREAM_CREATOR_H
-#define FILE_STREAM_CREATOR_H
+# define FILE_STREAM_CREATOR_H
 
-#include <include/log/stream/log_stream_creator.h>
-#include <include/log/stream/file_stream.h>
+# include <include/log/stream/log_stream_creator.h>
+# include <include/log/stream/file_stream.h>
 
 class FileStreamCreator : public LogStreamCreator
 {
diff --git a/myserver/include/log/stream/log_stream.h b/myserver/include/log/stream/log_stream.h
index 14570d2..cd115dd 100644
--- a/myserver/include/log/stream/log_stream.h
+++ b/myserver/include/log/stream/log_stream.h
@@ -17,15 +17,15 @@
 */
 
 #ifndef LOG_STREAM_H
-#define LOG_STREAM_H
+# define LOG_STREAM_H
 
-#include <list>
-#include <string>
+# include <list>
+# include <string>
 
-#include <include/filter/filters_chain.h>
-#include <include/filter/filters_factory.h>
-#include <include/filter/stream.h>
-#include <include/base/sync/mutex.h>
+# include <include/filter/filters_chain.h>
+# include <include/filter/filters_factory.h>
+# include <include/filter/stream.h>
+# include <include/base/sync/mutex.h>
 
 using namespace std;
 
diff --git a/myserver/include/log/stream/log_stream_creator.h b/myserver/include/log/stream/log_stream_creator.h
index 01b85fe..1d3f35d 100644
--- a/myserver/include/log/stream/log_stream_creator.h
+++ b/myserver/include/log/stream/log_stream_creator.h
@@ -17,13 +17,13 @@
 */
 
 #ifndef LOG_STREAM_CREATOR_H
-#define LOG_STREAM_CREATOR_H
+# define LOG_STREAM_CREATOR_H
 
-#include <list>
-#include <string>
+# include <list>
+# include <string>
 
-#include <include/log/stream/log_stream.h>
-#include <include/filter/filters_factory.h>
+# include <include/log/stream/log_stream.h>
+# include <include/filter/filters_factory.h>
 
 class LogStreamCreator
 {
diff --git a/myserver/include/log/stream/log_stream_factory.h b/myserver/include/log/stream/log_stream_factory.h
index 58a58ed..0d0432f 100644
--- a/myserver/include/log/stream/log_stream_factory.h
+++ b/myserver/include/log/stream/log_stream_factory.h
@@ -17,17 +17,17 @@
 */
 
 #ifndef LOG_STREAM_FACTORY_H
-#define LOG_STREAM_FACTORY_H
+# define LOG_STREAM_FACTORY_H
 
-#include <list>
-#include <map>
-#include <string>
+# include <list>
+# include <map>
+# include <string>
 
-#include <include/log/stream/log_stream.h>
-#include <include/log/stream/console_stream_creator.h>
-#include <include/log/stream/file_stream_creator.h>
-#include <include/log/stream/socket_stream_creator.h>
-#include <include/log/stream/log_stream_creator.h>
+# include <include/log/stream/log_stream.h>
+# include <include/log/stream/console_stream_creator.h>
+# include <include/log/stream/file_stream_creator.h>
+# include <include/log/stream/socket_stream_creator.h>
+# include <include/log/stream/log_stream_creator.h>
 
 using namespace std;
 
diff --git a/myserver/include/log/stream/socket_stream.h b/myserver/include/log/stream/socket_stream.h
index f7cd2fb..71bec1c 100644
--- a/myserver/include/log/stream/socket_stream.h
+++ b/myserver/include/log/stream/socket_stream.h
@@ -17,13 +17,13 @@
 */
 
 #ifndef SOCKET_STREAM_H
-#define SOCKET_STREAM_H
+# define SOCKET_STREAM_H
 
-#include <list>
-#include <string>
+# include <list>
+# include <string>
 
-#include <include/base/socket/socket.h>
-#include <include/log/stream/log_stream.h>
+# include <include/base/socket/socket.h>
+# include <include/log/stream/log_stream.h>
 
 class SocketStream : public LogStream
 {
diff --git a/myserver/include/log/stream/socket_stream_creator.h b/myserver/include/log/stream/socket_stream_creator.h
index 224b17c..01ac35f 100644
--- a/myserver/include/log/stream/socket_stream_creator.h
+++ b/myserver/include/log/stream/socket_stream_creator.h
@@ -17,12 +17,12 @@
 */
 
 #ifndef SOCKET_STREAM_CREATOR_H
-#define SOCKET_STREAM_CREATOR_H
+# define SOCKET_STREAM_CREATOR_H
 
-#include <include/log/stream/log_stream_creator.h>
-#include <include/log/stream/socket_stream.h>
+# include <include/log/stream/log_stream_creator.h>
+# include <include/log/stream/socket_stream.h>
 
-#include <stdlib.h>
+# include <stdlib.h>
 
 class SocketStreamCreator : public LogStreamCreator
 {
diff --git a/myserver/include/plugin/plugin.h b/myserver/include/plugin/plugin.h
old mode 100755
new mode 100644
index 9bdfe0a..f69e6f7
--- a/myserver/include/plugin/plugin.h
+++ b/myserver/include/plugin/plugin.h
@@ -17,12 +17,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef PLUGIN_H
-#define PLUGIN_H
+# define PLUGIN_H
 
-#include "stdafx.h"
-#include <include/base/dynamic_lib/dynamiclib.h>
-#include <include/base/hash_map/hash_map.h>
-#include <string>
+# include "stdafx.h"
+# include <include/base/dynamic_lib/dynamiclib.h>
+# include <include/base/hash_map/hash_map.h>
+# include <string>
 
 using namespace std;
 
diff --git a/myserver/include/plugin/plugin_info.h b/myserver/include/plugin/plugin_info.h
old mode 100755
new mode 100644
index 95e3c16..27a3770
--- a/myserver/include/plugin/plugin_info.h
+++ b/myserver/include/plugin/plugin_info.h
@@ -17,14 +17,14 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef PLUGIN_INFO_H
-#define PLUGIN_INFO_H
-
-#include "stdafx.h"
-#include <include/base/hash_map/hash_map.h>
-#include <string>
-#include <utility>
-#include <include/plugin/plugin.h>
-#include <include/base/regex/myserver_regex.h>
+# define PLUGIN_INFO_H
+
+# include "stdafx.h"
+# include <include/base/hash_map/hash_map.h>
+# include <string>
+# include <utility>
+# include <include/plugin/plugin.h>
+# include <include/base/regex/myserver_regex.h>
 
 
 using namespace std;
diff --git a/myserver/include/plugin/plugins_manager.h b/myserver/include/plugin/plugins_manager.h
old mode 100755
new mode 100644
index 10769c5..4842dfd
--- a/myserver/include/plugin/plugins_manager.h
+++ b/myserver/include/plugin/plugins_manager.h
@@ -17,14 +17,14 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 #ifndef PLUGINS_MANAGER_H
-#define PLUGINS_MANAGER_H
-
-#include "stdafx.h"
-#include <include/plugin/plugin.h>
-#include <include/plugin/plugin_info.h>
-#include <include/base/dynamic_lib/dynamiclib.h>
-#include <include/base/hash_map/hash_map.h>
-#include <string>
+# define PLUGINS_MANAGER_H
+
+# include "stdafx.h"
+# include <include/plugin/plugin.h>
+# include <include/plugin/plugin_info.h>
+# include <include/base/dynamic_lib/dynamiclib.h>
+# include <include/base/hash_map/hash_map.h>
+# include <string>
 using namespace std;
 
 class Server;
diff --git a/myserver/include/protocol/control/control_errors.h b/myserver/include/protocol/control/control_errors.h
old mode 100755
new mode 100644
index 3f6ff5c..b453290
--- a/myserver/include/protocol/control/control_errors.h
+++ b/myserver/include/protocol/control/control_errors.h
@@ -17,40 +17,40 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef CONTROL_ERRORS_H
-#define CONTROL_ERRORS_H
+# define CONTROL_ERRORS_H
 /*!
  *These are all the errors that the control server can return to a client.
  *Use these definitions instead of hardly-code the value.
  */
 
   /*! The request was accepted and served. */
-#define CONTROL_OK            100
+# define CONTROL_OK            100
 
   /*! A generic error was encountered. */
-#define CONTROL_ERROR         200
+# define CONTROL_ERROR         200
 
   /*! An internal server error happened. */
-#define CONTROL_INTERNAL      201
+# define CONTROL_INTERNAL      201
 
   /*! The Authorization was not accepted. */
-#define CONTROL_AUTH          202
+# define CONTROL_AUTH          202
 
   /*! A malformed request was sent. */
-#define CONTROL_MALFORMED     203
+# define CONTROL_MALFORMED     203
 
   /*! A bad command was specified. */
-#define CONTROL_CMD_NOT_FOUND    204
+# define CONTROL_CMD_NOT_FOUND    204
 
   /*! A bad length field was specified. */
-#define CONTROL_BAD_LEN     205
+# define CONTROL_BAD_LEN     205
 
   /*! The server is too busy to handle the request. */
-#define CONTROL_SERVER_BUSY      206
+# define CONTROL_SERVER_BUSY      206
 
   /*! The client uses a version of this protocol that we cannot understand. */
-#define CONTROL_BAD_VERSION      207
+# define CONTROL_BAD_VERSION      207
 
   /*! The requested file doesn't exist on the local FS. */
-#define CONTROL_FILE_NOT_FOUND      208
+# define CONTROL_FILE_NOT_FOUND      208
 
 #endif
diff --git a/myserver/include/protocol/control/control_header.h b/myserver/include/protocol/control/control_header.h
old mode 100755
new mode 100644
index 9ee46b1..b3804dd
--- a/myserver/include/protocol/control/control_header.h
+++ b/myserver/include/protocol/control/control_header.h
@@ -17,9 +17,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef CONTROLHEADER_H
-#define CONTROLHEADER_H
-#include "stdafx.h"
-#include <include/protocol/protocol.h>
+# define CONTROLHEADER_H
+# include "stdafx.h"
+# include <include/protocol/protocol.h>
 
 class ControlHeader
 {
diff --git a/myserver/include/protocol/control/control_protocol.h b/myserver/include/protocol/control/control_protocol.h
old mode 100755
new mode 100644
index 2d3464d..4e305a1
--- a/myserver/include/protocol/control/control_protocol.h
+++ b/myserver/include/protocol/control/control_protocol.h
@@ -17,13 +17,13 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef CONTROL_PROTOCOL_H
-#define CONTROL_PROTOCOL_H
-#include "stdafx.h"
-#include <include/protocol/protocol.h>
-#include <include/protocol/control/control_header.h>
-#include <include/connections_scheduler/connections_scheduler.h>
+# define CONTROL_PROTOCOL_H
+# include "stdafx.h"
+# include <include/protocol/protocol.h>
+# include <include/protocol/control/control_header.h>
+# include <include/connections_scheduler/connections_scheduler.h>
 
-#include <string>
+# include <string>
 
 using namespace std;
 
diff --git a/myserver/include/protocol/ftp/ftp.h b/myserver/include/protocol/ftp/ftp.h
old mode 100755
new mode 100644
index 61dcc1c..64dc8e9
--- a/myserver/include/protocol/ftp/ftp.h
+++ b/myserver/include/protocol/ftp/ftp.h
@@ -18,18 +18,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
 
 #ifndef FTP_H
-#define FTP_H
-#include "stdafx.h"
-#include <include/protocol/protocol.h>
-#include <include/connection/connection.h>
-#include <include/base/mem_buff/mem_buff.h>
-#include <include/base/xml/xml_parser.h>
-#include <include/protocol/ftp/ftp_common.h>
-
-#include <include/protocol/ftp/ftp_parser.h>
-#include <include/protocol/ftp/ftp_lexer.h>
-
-#include <include/conf/security/security_token.h>
+# define FTP_H
+# include "stdafx.h"
+# include <include/protocol/protocol.h>
+# include <include/connection/connection.h>
+# include <include/base/mem_buff/mem_buff.h>
+# include <include/base/xml/xml_parser.h>
+# include <include/protocol/ftp/ftp_common.h>
+
+# include <include/protocol/ftp/ftp_parser.h>
+# include <include/protocol/ftp/ftp_lexer.h>
+
+# include <include/conf/security/security_token.h>
 class Ftp;
 
 class FtpuserData:public ProtocolBuffer
diff --git a/myserver/include/protocol/ftp/ftp_common.h b/myserver/include/protocol/ftp/ftp_common.h
index fec113e..f5f1323 100644
--- a/myserver/include/protocol/ftp/ftp_common.h
+++ b/myserver/include/protocol/ftp/ftp_common.h
@@ -18,11 +18,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
 
 #ifndef __FTP_COMMON_H__
-#define __FTP_COMMON_H__
+# define __FTP_COMMON_H__
 
-#include <string>
+# include <string>
 
-#define PARSER_STR_LEN	512
+# define PARSER_STR_LEN	512
 
 struct FtpHost
 {
diff --git a/myserver/include/protocol/ftp/ftp_lexer.h b/myserver/include/protocol/ftp/ftp_lexer.h
index 87aef87..d2de699 100644
--- a/myserver/include/protocol/ftp/ftp_lexer.h
+++ b/myserver/include/protocol/ftp/ftp_lexer.h
@@ -1,57 +1,57 @@
 #ifndef yyHEADER_H
-#define yyHEADER_H 1
-#define yyIN_HEADER 1
+# define yyHEADER_H 1
+# define yyIN_HEADER 1
 
-#line 6 "../../../include/protocol/ftp/ftp_lexer.h"
+# line 6 "../../../include/protocol/ftp/ftp_lexer.h"
 
-#line 8 "../../../include/protocol/ftp/ftp_lexer.h"
+# line 8 "../../../include/protocol/ftp/ftp_lexer.h"
 
-#define  YY_INT_ALIGNED short int
+# define YY_INT_ALIGNED short int
 
 /* A lexical scanner generated by flex */
 
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
-#if YY_FLEX_SUBMINOR_VERSION > 0
-#define FLEX_BETA
-#endif
+# define FLEX_SCANNER
+# define YY_FLEX_MAJOR_VERSION 2
+# define YY_FLEX_MINOR_VERSION 5
+# define YY_FLEX_SUBMINOR_VERSION 35
+# if YY_FLEX_SUBMINOR_VERSION > 0
+#  define FLEX_BETA
+# endif
 
 /* First, we deal with  platform-specific or compiler-specific issues. */
 
 /* begin standard C headers. */
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <stdlib.h>
+# include <stdio.h>
+# include <string.h>
+# include <errno.h>
+# include <stdlib.h>
 
 /* end standard C headers. */
 
 /* flex integer type definitions */
 
-#ifndef FLEXINT_H
-#define FLEXINT_H
+# ifndef FLEXINT_H
+#  define FLEXINT_H
 
 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
 
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#  if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 
 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
  * if you want the limit (max/min) macros for int types.
  */
-#ifndef __STDC_LIMIT_MACROS
-#define __STDC_LIMIT_MACROS 1
-#endif
+#   ifndef __STDC_LIMIT_MACROS
+#    define __STDC_LIMIT_MACROS 1
+#   endif
 
-#include <inttypes.h>
+#   include <inttypes.h>
 typedef int8_t flex_int8_t;
 typedef uint8_t flex_uint8_t;
 typedef int16_t flex_int16_t;
 typedef uint16_t flex_uint16_t;
 typedef int32_t flex_int32_t;
 typedef uint32_t flex_uint32_t;
-#else
+#  else
 typedef signed char flex_int8_t;
 typedef short int flex_int16_t;
 typedef int flex_int32_t;
@@ -60,101 +60,101 @@ typedef unsigned short int flex_uint16_t;
 typedef unsigned int flex_uint32_t;
 
 /* Limits of integral types. */
-#ifndef INT8_MIN
-#define INT8_MIN               (-128)
-#endif
-#ifndef INT16_MIN
-#define INT16_MIN              (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN              (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX               (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX              (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX              (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX              (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX             (65535U)
-#endif
-#ifndef UINT32_MAX
-#define UINT32_MAX             (4294967295U)
-#endif
-
-#endif /* ! C99 */
-
-#endif /* ! FLEXINT_H */
-
-#ifdef __cplusplus
+#   ifndef INT8_MIN
+#    define INT8_MIN               (-128)
+#   endif
+#   ifndef INT16_MIN
+#    define INT16_MIN              (-32767-1)
+#   endif
+#   ifndef INT32_MIN
+#    define INT32_MIN              (-2147483647-1)
+#   endif
+#   ifndef INT8_MAX
+#    define INT8_MAX               (127)
+#   endif
+#   ifndef INT16_MAX
+#    define INT16_MAX              (32767)
+#   endif
+#   ifndef INT32_MAX
+#    define INT32_MAX              (2147483647)
+#   endif
+#   ifndef UINT8_MAX
+#    define UINT8_MAX              (255U)
+#   endif
+#   ifndef UINT16_MAX
+#    define UINT16_MAX             (65535U)
+#   endif
+#   ifndef UINT32_MAX
+#    define UINT32_MAX             (4294967295U)
+#   endif
+
+#  endif /* ! C99 */
+
+# endif /* ! FLEXINT_H */
+
+# ifdef __cplusplus
 
 /* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
+#  define YY_USE_CONST
 
-#else	/* ! __cplusplus */
+# else	/* ! __cplusplus */
 
 /* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
+#  if defined (__STDC__)
 
-#define YY_USE_CONST
+#   define YY_USE_CONST
 
-#endif	/* defined (__STDC__) */
-#endif	/* ! __cplusplus */
+#  endif	/* defined (__STDC__) */
+# endif	/* ! __cplusplus */
 
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
+# ifdef YY_USE_CONST
+#  define yyconst const
+# else
+#  define yyconst
+# endif
 
 /* An opaque pointer. */
-#ifndef YY_TYPEDEF_YY_SCANNER_T
-#define YY_TYPEDEF_YY_SCANNER_T
+# ifndef YY_TYPEDEF_YY_SCANNER_T
+#  define YY_TYPEDEF_YY_SCANNER_T
 typedef void* yyscan_t;
-#endif
+# endif
 
 /* For convenience, these vars (plus the bison vars far below)
    are macros in the reentrant scanner. */
-#define yyin yyg->yyin_r
-#define yyout yyg->yyout_r
-#define yyextra yyg->yyextra_r
-#define yyleng yyg->yyleng_r
-#define yytext yyg->yytext_r
-#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
-#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
-#define yy_flex_debug yyg->yy_flex_debug_r
+# define yyin yyg->yyin_r
+# define yyout yyg->yyout_r
+# define yyextra yyg->yyextra_r
+# define yyleng yyg->yyleng_r
+# define yytext yyg->yytext_r
+# define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
+# define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
+# define yy_flex_debug yyg->yy_flex_debug_r
 
 /* Size of default input buffer. */
-#ifndef YY_BUF_SIZE
-#ifdef __ia64__
+# ifndef YY_BUF_SIZE
+#  ifdef __ia64__
 /* On IA-64, the buffer size is 16k, not 8k.
  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
  * Ditto for the __ia64__ case accordingly.
  */
-#define YY_BUF_SIZE 32768
-#else
-#define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
-#endif
-
-#ifndef YY_TYPEDEF_YY_BUFFER_STATE
-#define YY_TYPEDEF_YY_BUFFER_STATE
+#   define YY_BUF_SIZE 32768
+#  else
+#   define YY_BUF_SIZE 16384
+#  endif /* __ia64__ */
+# endif
+
+# ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#  define YY_TYPEDEF_YY_BUFFER_STATE
 typedef struct yy_buffer_state *YY_BUFFER_STATE;
-#endif
+# endif
 
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
+# ifndef YY_TYPEDEF_YY_SIZE_T
+#  define YY_TYPEDEF_YY_SIZE_T
 typedef size_t yy_size_t;
-#endif
+# endif
 
-#ifndef YY_STRUCT_YY_BUFFER_STATE
-#define YY_STRUCT_YY_BUFFER_STATE
+# ifndef YY_STRUCT_YY_BUFFER_STATE
+#  define YY_STRUCT_YY_BUFFER_STATE
 struct yy_buffer_state
 	{
 	FILE *yy_input_file;
@@ -202,7 +202,7 @@ struct yy_buffer_state
 	int yy_buffer_status;
 
 	};
-#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+# endif /* !YY_STRUCT_YY_BUFFER_STATE */
 
 void yyrestart (FILE *input_file ,yyscan_t yyscanner );
 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
@@ -222,30 +222,30 @@ void yyfree (void * ,yyscan_t yyscanner );
 
 /* Begin user sect3 */
 
-#define yywrap(n) 1
-#define YY_SKIP_YYWRAP
+# define yywrap(n) 1
+# define YY_SKIP_YYWRAP
 
-#define yytext_ptr yytext_r
+# define yytext_ptr yytext_r
 
-#ifdef YY_HEADER_EXPORT_START_CONDITIONS
-#define INITIAL 0
-#define SHORT_STRING 1
-#define STRING 2
-#define IPV4_ADDR 3
+# ifdef YY_HEADER_EXPORT_START_CONDITIONS
+#  define INITIAL 0
+#  define SHORT_STRING 1
+#  define STRING 2
+#  define IPV4_ADDR 3
 
-#endif
+# endif
 
-#ifndef YY_NO_UNISTD_H
+# ifndef YY_NO_UNISTD_H
 /* Special case for "unistd.h", since it is non-ANSI. We include it way
  * down here because we want the user's section 1 to have been scanned first.
  * The user has a chance to override it with an option.
  */
-#include <unistd.h>
-#endif
+#  include <unistd.h>
+# endif
 
-#ifndef YY_EXTRA_TYPE
-#define YY_EXTRA_TYPE void *
-#endif
+# ifndef YY_EXTRA_TYPE
+#  define YY_EXTRA_TYPE void *
+# endif
 
 int yylex_init (yyscan_t* scanner);
 
@@ -292,71 +292,71 @@ void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
  * section 1.
  */
 
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
+# ifndef YY_SKIP_YYWRAP
+#  ifdef __cplusplus
 extern "C" int yywrap (yyscan_t yyscanner );
-#else
+#  else
 extern int yywrap (yyscan_t yyscanner );
-#endif
-#endif
+#  endif
+# endif
 
-#ifndef yytext_ptr
+# ifndef yytext_ptr
 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
-#endif
+# endif
 
-#ifdef YY_NEED_STRLEN
+# ifdef YY_NEED_STRLEN
 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
-#endif
+# endif
 
-#ifndef YY_NO_INPUT
+# ifndef YY_NO_INPUT
 
-#endif
+# endif
 
 /* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
+# ifndef YY_READ_BUF_SIZE
+#  ifdef __ia64__
 /* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
-#define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
-#endif
+#   define YY_READ_BUF_SIZE 16384
+#  else
+#   define YY_READ_BUF_SIZE 8192
+#  endif /* __ia64__ */
+# endif
 
 /* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
+# ifndef YY_START_STACK_INCR
+#  define YY_START_STACK_INCR 25
+# endif
 
 /* Default declaration of generated scanner - a define so the user can
  * easily add parameters.
  */
-#ifndef YY_DECL
-#define YY_DECL_IS_OURS 1
+# ifndef YY_DECL
+#  define YY_DECL_IS_OURS 1
 
 extern int yylex \
                (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
 
-#define YY_DECL int yylex \
+#  define YY_DECL int yylex \
                (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
-#endif /* !YY_DECL */
+# endif /* !YY_DECL */
 
 /* yy_get_previous_state - get the state just before the EOB char was reached */
 
-#undef YY_NEW_FILE
-#undef YY_FLUSH_BUFFER
-#undef yy_set_bol
-#undef yy_new_buffer
-#undef yy_set_interactive
-#undef YY_DO_BEFORE_ACTION
+# undef YY_NEW_FILE
+# undef YY_FLUSH_BUFFER
+# undef yy_set_bol
+# undef yy_new_buffer
+# undef yy_set_interactive
+# undef YY_DO_BEFORE_ACTION
 
-#ifdef YY_DECL_IS_OURS
-#undef YY_DECL_IS_OURS
-#undef YY_DECL
-#endif
+# ifdef YY_DECL_IS_OURS
+#  undef YY_DECL_IS_OURS
+#  undef YY_DECL
+# endif
 
-#line 341 "ftp_lexer.lpp"
+# line 341 "ftp_lexer.lpp"
 
 
-#line 361 "../../../include/protocol/ftp/ftp_lexer.h"
-#undef yyIN_HEADER
+# line 361 "../../../include/protocol/ftp/ftp_lexer.h"
+# undef yyIN_HEADER
 #endif /* yyHEADER_H */
diff --git a/myserver/include/protocol/ftp/ftp_parser.h b/myserver/include/protocol/ftp/ftp_parser.h
index d43b69b..d105256 100644
--- a/myserver/include/protocol/ftp/ftp_parser.h
+++ b/myserver/include/protocol/ftp/ftp_parser.h
@@ -129,7 +129,7 @@ typedef union YYSTYPE
 {
 
 /* Line 1676 of yacc.c  */
-#line 15 "ftp_parser.ypp"
+# line 15 "ftp_parser.ypp"
 
 	int		m_nInt;
 	char		m_nChar;
@@ -139,7 +139,7 @@ typedef union YYSTYPE
 
 
 /* Line 1676 of yacc.c  */
-#line 143 "../../../include/protocol/ftp/ftp_parser.h"
+# line 143 "../../../include/protocol/ftp/ftp_parser.h"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
diff --git a/myserver/include/protocol/http/dyn_http_command.h b/myserver/include/protocol/http/dyn_http_command.h
old mode 100755
new mode 100644
index 6ae1a1b..b873e15
--- a/myserver/include/protocol/http/dyn_http_command.h
+++ b/myserver/include/protocol/http/dyn_http_command.h
@@ -17,16 +17,16 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef DYN_HTTP_COMMAND_H
-#define DYN_HTTP_COMMAND_H
+# define DYN_HTTP_COMMAND_H
 
-#include "stdafx.h"
-#include <include/base/xml/xml_parser.h>
-#include <include/protocol/protocol.h>
-#include <include/connection/connection.h>
-#include <include/base/dynamic_lib/dynamiclib.h>
-#include <include/protocol/http/http_headers.h>
-#include <include/base/hash_map/hash_map.h>
-#include <string>
+# include "stdafx.h"
+# include <include/base/xml/xml_parser.h>
+# include <include/protocol/protocol.h>
+# include <include/connection/connection.h>
+# include <include/base/dynamic_lib/dynamiclib.h>
+# include <include/protocol/http/http_headers.h>
+# include <include/base/hash_map/hash_map.h>
+# include <string>
 using namespace std;
 
 class DynamicHttpCommand
diff --git a/myserver/include/protocol/http/dyn_http_command_manager.h b/myserver/include/protocol/http/dyn_http_command_manager.h
old mode 100755
new mode 100644
index 132f188..44c4fd9
--- a/myserver/include/protocol/http/dyn_http_command_manager.h
+++ b/myserver/include/protocol/http/dyn_http_command_manager.h
@@ -17,16 +17,16 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef DYN_HTTP_COMMAND_MANAGER_H
-#define DYN_HTTP_COMMAND_MANAGER_H
-
-#include "stdafx.h"
-#include <include/base/xml/xml_parser.h>
-#include <include/protocol/protocol.h>
-#include <include/connection/connection.h>
-#include <include/base/dynamic_lib/dynamiclib.h>
-#include <include/protocol/http/http_headers.h>
-#include <include/base/hash_map/hash_map.h>
-#include <string>
+# define DYN_HTTP_COMMAND_MANAGER_H
+
+# include "stdafx.h"
+# include <include/base/xml/xml_parser.h>
+# include <include/protocol/protocol.h>
+# include <include/connection/connection.h>
+# include <include/base/dynamic_lib/dynamiclib.h>
+# include <include/protocol/http/http_headers.h>
+# include <include/base/hash_map/hash_map.h>
+# include <string>
 
 class DynamicHttpCommand;
 
diff --git a/myserver/include/protocol/http/dyn_http_manager.h b/myserver/include/protocol/http/dyn_http_manager.h
old mode 100755
new mode 100644
index 0dc3dca..9941ada
--- a/myserver/include/protocol/http/dyn_http_manager.h
+++ b/myserver/include/protocol/http/dyn_http_manager.h
@@ -17,16 +17,16 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef DYN_HTTP_MANAGER_H
-#define DYN_HTTP_MANAGER_H
-
-#include "stdafx.h"
-#include <include/base/xml/xml_parser.h>
-#include <include/protocol/protocol.h>
-#include <include/connection/connection.h>
-#include <include/base/dynamic_lib/dynamiclib.h>
-#include <include/protocol/http/http_headers.h>
-#include <include/base/hash_map/hash_map.h>
-#include <string>
+# define DYN_HTTP_MANAGER_H
+
+# include "stdafx.h"
+# include <include/base/xml/xml_parser.h>
+# include <include/protocol/protocol.h>
+# include <include/connection/connection.h>
+# include <include/base/dynamic_lib/dynamiclib.h>
+# include <include/protocol/http/http_headers.h>
+# include <include/base/hash_map/hash_map.h>
+# include <string>
 using namespace std;
 
 
diff --git a/myserver/include/protocol/http/dyn_http_manager_list.h b/myserver/include/protocol/http/dyn_http_manager_list.h
old mode 100755
new mode 100644
index 7751050..c77af1c
--- a/myserver/include/protocol/http/dyn_http_manager_list.h
+++ b/myserver/include/protocol/http/dyn_http_manager_list.h
@@ -17,16 +17,16 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef DYN_HTTP_MANAGER_LIST_H
-#define DYN_HTTP_MANAGER_LIST_H
+# define DYN_HTTP_MANAGER_LIST_H
 
-#include "stdafx.h"
-#include <include/base/xml/xml_parser.h>
-#include <include/protocol/protocol.h>
-#include <include/connection/connection.h>
-#include <include/base/dynamic_lib/dynamiclib.h>
-#include <include/protocol/http/http_headers.h>
-#include <include/base/hash_map/hash_map.h>
-#include <string>
+# include "stdafx.h"
+# include <include/base/xml/xml_parser.h>
+# include <include/protocol/protocol.h>
+# include <include/connection/connection.h>
+# include <include/base/dynamic_lib/dynamiclib.h>
+# include <include/protocol/http/http_headers.h>
+# include <include/base/hash_map/hash_map.h>
+# include <string>
 using namespace std;
 
 class HttpDataHandler;
diff --git a/myserver/include/protocol/http/env/env.h b/myserver/include/protocol/http/env/env.h
index 116f58d..0537b63 100644
--- a/myserver/include/protocol/http/env/env.h
+++ b/myserver/include/protocol/http/env/env.h
@@ -17,12 +17,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef ENV_H
-#define ENV_H
+# define ENV_H
 
-#include <include/protocol/http/http_response.h>
-#include <include/protocol/http/http_request.h>
-#include <include/protocol/http/http_headers.h>
-#include <include/protocol/http/http_data_handler.h>
+# include <include/protocol/http/http_response.h>
+# include <include/protocol/http/http_request.h>
+# include <include/protocol/http/http_headers.h>
+# include <include/protocol/http/http_data_handler.h>
 
 class Env
 {
diff --git a/myserver/include/protocol/http/http.h b/myserver/include/protocol/http/http.h
index 6ac1c98..3ff27b9 100644
--- a/myserver/include/protocol/http/http.h
+++ b/myserver/include/protocol/http/http.h
@@ -17,27 +17,27 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef HTTP_H
-#define HTTP_H
-#include "stdafx.h"
-#include <include/protocol/http/http_thread_context.h>
-#include <include/protocol/protocol.h>
-#include <include/protocol/http/http_headers.h>
-#include <include/conf/security/security_cache.h>
-#include <include/base/xml/xml_parser.h>
-#include <include/base/thread/thread.h>
-#include <include/base/sync/mutex.h>
-#include <include/protocol/http/dyn_http_command_manager.h>
-#include <include/protocol/http/dyn_http_command.h>
-#include <include/protocol/http/dyn_http_manager_list.h>
-#include <include/protocol/http/dyn_http_manager.h>
-#include <include/base/multicast/multicast.h>
-#include <include/protocol/http/http_data_handler.h>
-#include <include/base/string/securestr.h>
-
-#include <string>
-#include <sstream>
-#include <vector>
-#include <memory>
+# define HTTP_H
+# include "stdafx.h"
+# include <include/protocol/http/http_thread_context.h>
+# include <include/protocol/protocol.h>
+# include <include/protocol/http/http_headers.h>
+# include <include/conf/security/security_cache.h>
+# include <include/base/xml/xml_parser.h>
+# include <include/base/thread/thread.h>
+# include <include/base/sync/mutex.h>
+# include <include/protocol/http/dyn_http_command_manager.h>
+# include <include/protocol/http/dyn_http_command.h>
+# include <include/protocol/http/dyn_http_manager_list.h>
+# include <include/protocol/http/dyn_http_manager.h>
+# include <include/base/multicast/multicast.h>
+# include <include/protocol/http/http_data_handler.h>
+# include <include/base/string/securestr.h>
+
+# include <string>
+# include <sstream>
+# include <vector>
+# include <memory>
 
 using namespace std;
 
diff --git a/myserver/include/protocol/http/http_data_handler.h b/myserver/include/protocol/http/http_data_handler.h
index 80962a0..260eaaf 100644
--- a/myserver/include/protocol/http/http_data_handler.h
+++ b/myserver/include/protocol/http/http_data_handler.h
@@ -17,13 +17,13 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef HTTP_DATA_HANDLER_H
-#define HTTP_DATA_HANDLER_H
+# define HTTP_DATA_HANDLER_H
 
-#include "stdafx.h"
-#include <include/protocol/protocol.h>
-#include "include/protocol/http/http_headers.h"
-#include <include/filter/filters_chain.h>
-#include <include/filter/memory_stream.h>
+# include "stdafx.h"
+# include <include/protocol/protocol.h>
+# include "include/protocol/http/http_headers.h"
+# include <include/filter/filters_chain.h>
+# include <include/filter/memory_stream.h>
 
 
 /*!
diff --git a/myserver/include/protocol/http/http_data_read.h b/myserver/include/protocol/http/http_data_read.h
index a50cb11..4b1bbcd 100644
--- a/myserver/include/protocol/http/http_data_read.h
+++ b/myserver/include/protocol/http/http_data_read.h
@@ -17,24 +17,24 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef HTTP_DATA_READ_H
-#define HTTP_DATA_READ_H
-#include "stdafx.h"
-#include <include/protocol/http/http_thread_context.h>
-#include <include/protocol/protocol.h>
-#include <include/protocol/http/http_headers.h>
-#include <include/conf/security/security_cache.h>
-#include <include/base/xml/xml_parser.h>
-#include <include/base/thread/thread.h>
-#include <include/base/sync/mutex.h>
-#include <include/protocol/http/dyn_http_command_manager.h>
-#include <include/protocol/http/dyn_http_command.h>
-#include <include/protocol/http/dyn_http_manager_list.h>
-#include <include/protocol/http/dyn_http_manager.h>
-#include <include/base/multicast/multicast.h>
-#include <include/protocol/http/http_data_handler.h>
-#include <string>
-#include <sstream>
-#include <vector>
+# define HTTP_DATA_READ_H
+# include "stdafx.h"
+# include <include/protocol/http/http_thread_context.h>
+# include <include/protocol/protocol.h>
+# include <include/protocol/http/http_headers.h>
+# include <include/conf/security/security_cache.h>
+# include <include/base/xml/xml_parser.h>
+# include <include/base/thread/thread.h>
+# include <include/base/sync/mutex.h>
+# include <include/protocol/http/dyn_http_command_manager.h>
+# include <include/protocol/http/dyn_http_command.h>
+# include <include/protocol/http/dyn_http_manager_list.h>
+# include <include/protocol/http/dyn_http_manager.h>
+# include <include/base/multicast/multicast.h>
+# include <include/protocol/http/http_data_handler.h>
+# include <string>
+# include <sstream>
+# include <vector>
 using namespace std;
 
 
diff --git a/myserver/include/protocol/http/http_errors.h b/myserver/include/protocol/http/http_errors.h
index 7a09290..6f1c0e4 100644
--- a/myserver/include/protocol/http/http_errors.h
+++ b/myserver/include/protocol/http/http_errors.h
@@ -18,10 +18,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 #ifndef HTTP_ERRORS_H
-#define HTTP_ERRORS_H
+# define HTTP_ERRORS_H
 
-#include <string>
-#include <include/base/hash_map/hash_map.h>
+# include <string>
+# include <include/base/hash_map/hash_map.h>
 
 using namespace std;
 
diff --git a/myserver/include/protocol/http/http_header.h b/myserver/include/protocol/http/http_header.h
index 7db45eb..2a53ad0 100644
--- a/myserver/include/protocol/http/http_header.h
+++ b/myserver/include/protocol/http/http_header.h
@@ -20,7 +20,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/base/hash_map/hash_map.h>
 
 #ifndef HTTP_HEADER_H
-#define HTTP_HEADER_H
+# define HTTP_HEADER_H
 
 using namespace std;
 
diff --git a/myserver/include/protocol/http/http_headers.h b/myserver/include/protocol/http/http_headers.h
old mode 100755
new mode 100644
index 26f3a98..a480da2
--- a/myserver/include/protocol/http/http_headers.h
+++ b/myserver/include/protocol/http/http_headers.h
@@ -17,28 +17,28 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef HTTP_HEADERS_H
-#define HTTP_HEADERS_H
+# define HTTP_HEADERS_H
 
-#include "stdafx.h"
-#include <include/connection/connection.h>
+# include "stdafx.h"
+# include <include/connection/connection.h>
 
 extern "C" {
-#ifdef WIN32
-#include <direct.h>
-#include <errno.h>
-#else
-#include <string.h>
-#include <errno.h>
-#endif
+# ifdef WIN32
+#  include <direct.h>
+#  include <errno.h>
+# else
+#  include <string.h>
+#  include <errno.h>
+# endif
 }
 
 
-#include <string>
+# include <string>
 using namespace std;
 
 
-#define HTTP_AUTH_SCHEME_BASIC 0
-#define HTTP_AUTH_SCHEME_DIGEST 1
+# define HTTP_AUTH_SCHEME_BASIC 0
+# define HTTP_AUTH_SCHEME_DIGEST 1
 
 struct HttpThreadContext;
 struct HttpRequestHeader;
diff --git a/myserver/include/protocol/http/http_req_security_domain.h b/myserver/include/protocol/http/http_req_security_domain.h
index d3a7d5f..b32c4ee 100644
--- a/myserver/include/protocol/http/http_req_security_domain.h
+++ b/myserver/include/protocol/http/http_req_security_domain.h
@@ -17,13 +17,13 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef HTTP_REQ_SECURITY_DOMAIN_H
-#define HTTP_REQ_SECURITY_DOMAIN_H
+# define HTTP_REQ_SECURITY_DOMAIN_H
 
-#include "stdafx.h"
+# include "stdafx.h"
 
-#include <include/conf/security/security_domain.h>
-#include <include/protocol/http/http_request.h>
-#include <string>
+# include <include/conf/security/security_domain.h>
+# include <include/protocol/http/http_request.h>
+# include <string>
 
 using namespace std;
 
diff --git a/myserver/include/protocol/http/http_request.h b/myserver/include/protocol/http/http_request.h
index 9c968df..33ef265 100644
--- a/myserver/include/protocol/http/http_request.h
+++ b/myserver/include/protocol/http/http_request.h
@@ -21,20 +21,20 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/protocol/http/http_header.h>
 
 #ifndef HTTP_REQUEST_H
-#define HTTP_REQUEST_H
+# define HTTP_REQUEST_H
 
 using namespace std;
 
 
 /*! Max length for a HTTP request fields. */
-#define HTTP_REQUEST_CMD_DIM 16
-#define HTTP_REQUEST_VER_DIM 10
-#define HTTP_REQUEST_AUTH_DIM 16
-#define HTTP_REQUEST_CONTENT_LENGTH_DIM 12
-#define HTTP_REQUEST_URI_DIM 4096
-#define HTTP_REQUEST_URI_OPTS_DIM 4096
-#define HTTP_REQUEST_OTHER_DIM 4096
-#define HTTP_REQUEST_RANGE_TYPE_DIM 16
+# define HTTP_REQUEST_CMD_DIM 16
+# define HTTP_REQUEST_VER_DIM 10
+# define HTTP_REQUEST_AUTH_DIM 16
+# define HTTP_REQUEST_CONTENT_LENGTH_DIM 12
+# define HTTP_REQUEST_URI_DIM 4096
+# define HTTP_REQUEST_URI_OPTS_DIM 4096
+# define HTTP_REQUEST_OTHER_DIM 4096
+# define HTTP_REQUEST_RANGE_TYPE_DIM 16
 
 
 /*!
diff --git a/myserver/include/protocol/http/http_response.h b/myserver/include/protocol/http/http_response.h
index 414f2bc..bc6b901 100644
--- a/myserver/include/protocol/http/http_response.h
+++ b/myserver/include/protocol/http/http_response.h
@@ -21,27 +21,27 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/protocol/http/http_header.h>
 
 #ifndef HTTP_RESPONSE_H
-#define HTTP_RESPONSE_H
+# define HTTP_RESPONSE_H
 
 using namespace std;
 
 /*! Max length for a HTTP response fields. */
-#define HTTP_RESPONSE_VER_DIM 10
-#define HTTP_RESPONSE_SERVER_NAME_DIM 64
-#define HTTP_RESPONSE_CONTENT_TYPE_DIM 48
-#define HTTP_RESPONSE_CONTENT_RANGE_DIM 32
-#define HTTP_RESPONSE_CONNECTION_DIM 32
-#define HTTP_RESPONSE_MIME_VER_DIM 8
-#define HTTP_RESPONSE_COOKIE_DIM 8192
-#define HTTP_RESPONSE_CONTENT_LENGTH_DIM 8
-#define HTTP_RESPONSE_ERROR_TYPE_DIM 32
-#define HTTP_RESPONSE_LOCATION_DIM MAX_PATH
-#define HTTP_RESPONSE_DATE_DIM 32
-#define HTTP_RESPONSE_DATE_EXPIRES_DIM 32
-#define HTTP_RESPONSE_CACHE_CONTROL_DIM 64
-#define HTTP_RESPONSE_AUTH_DIM 256
-#define HTTP_RESPONSE_OTHER_DIM 512
-#define HTTP_RESPONSE_LAST_MODIFIED_DIM 32
+# define HTTP_RESPONSE_VER_DIM 10
+# define HTTP_RESPONSE_SERVER_NAME_DIM 64
+# define HTTP_RESPONSE_CONTENT_TYPE_DIM 48
+# define HTTP_RESPONSE_CONTENT_RANGE_DIM 32
+# define HTTP_RESPONSE_CONNECTION_DIM 32
+# define HTTP_RESPONSE_MIME_VER_DIM 8
+# define HTTP_RESPONSE_COOKIE_DIM 8192
+# define HTTP_RESPONSE_CONTENT_LENGTH_DIM 8
+# define HTTP_RESPONSE_ERROR_TYPE_DIM 32
+# define HTTP_RESPONSE_LOCATION_DIM MAX_PATH
+# define HTTP_RESPONSE_DATE_DIM 32
+# define HTTP_RESPONSE_DATE_EXPIRES_DIM 32
+# define HTTP_RESPONSE_CACHE_CONTROL_DIM 64
+# define HTTP_RESPONSE_AUTH_DIM 256
+# define HTTP_RESPONSE_OTHER_DIM 512
+# define HTTP_RESPONSE_LAST_MODIFIED_DIM 32
 
 /*!
  *Structure to describe an HTTP response
diff --git a/myserver/include/protocol/http/http_thread_context.h b/myserver/include/protocol/http/http_thread_context.h
old mode 100755
new mode 100644
index dcde452..c7b26c6
--- a/myserver/include/protocol/http/http_thread_context.h
+++ b/myserver/include/protocol/http/http_thread_context.h
@@ -17,28 +17,28 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef HTTP_THREAD_CONTEXT_H
-#define HTTP_THREAD_CONTEXT_H
+# define HTTP_THREAD_CONTEXT_H
 
-#include "stdafx.h"
-#include <include/protocol/http/http_request.h>
-#include <include/protocol/http/http_response.h>
-#include <include/base/string/stringutils.h>
-#include <include/base/file/file.h>
-#include <include/base/mem_buff/mem_buff.h>
-#include <include/connection/connection.h>
-#include <include/conf/mime/mime_manager.h>
-#include <include/conf/security/security_token.h>
+# include "stdafx.h"
+# include <include/protocol/http/http_request.h>
+# include <include/protocol/http/http_response.h>
+# include <include/base/string/stringutils.h>
+# include <include/base/file/file.h>
+# include <include/base/mem_buff/mem_buff.h>
+# include <include/connection/connection.h>
+# include <include/conf/mime/mime_manager.h>
+# include <include/conf/security/security_token.h>
 
 extern "C" {
-#ifdef WIN32
-#include <direct.h>
-#include <errno.h>
-#else
-#include <string.h>
-#include <errno.h>
-#endif
+# ifdef WIN32
+#  include <direct.h>
+#  include <errno.h>
+# else
+#  include <string.h>
+#  include <errno.h>
+# endif
 }
-#include <string>
+# include <string>
 using namespace std;
 
 
diff --git a/myserver/include/protocol/https/https.h b/myserver/include/protocol/https/https.h
old mode 100755
new mode 100644
index afc4dfa..f455e42
--- a/myserver/include/protocol/https/https.h
+++ b/myserver/include/protocol/https/https.h
@@ -17,9 +17,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef HTTPS_H
-#define HTTPS_H
-#include "stdafx.h"
-#include <include/protocol/http/http.h>
+# define HTTPS_H
+# include "stdafx.h"
+# include <include/protocol/http/http.h>
 
 class Https : public Http
 {
diff --git a/myserver/include/protocol/protocol.h b/myserver/include/protocol/protocol.h
old mode 100755
new mode 100644
index cabb96a..6443aca
--- a/myserver/include/protocol/protocol.h
+++ b/myserver/include/protocol/protocol.h
@@ -17,14 +17,14 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef PROTOCOL_H
-#define PROTOCOL_H
-#include "stdafx.h"
-#include <include/base/xml/xml_parser.h>
-#include <include/connection/connection.h>
+# define PROTOCOL_H
+# include "stdafx.h"
+# include <include/base/xml/xml_parser.h>
+# include <include/connection/connection.h>
 /*! Various options that can be use for the protocol.  */
-#define PROTOCOL_USES_SSL 1
-#define PROTOCOL_FAST_CHECK 2
-#define PROTOCOL_DENY_DELETE 4
+# define PROTOCOL_USES_SSL 1
+# define PROTOCOL_FAST_CHECK 2
+# define PROTOCOL_DENY_DELETE 4
 
 /*!
  *This is the base class to derive other protocols implementations for the server.
diff --git a/myserver/include/protocol/protocol_buffer.h b/myserver/include/protocol/protocol_buffer.h
index acb67f8..4012792 100644
--- a/myserver/include/protocol/protocol_buffer.h
+++ b/myserver/include/protocol/protocol_buffer.h
@@ -17,7 +17,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef PROTOCOL_BUFFER_H
-#define PROTOCOL_BUFFER_H
+# define PROTOCOL_BUFFER_H
 
 /*!
  *Base class to handle a buffer in the connection.
diff --git a/myserver/include/protocol/protocols_manager.h b/myserver/include/protocol/protocols_manager.h
old mode 100755
new mode 100644
index 9f66cdf..b64ef40
--- a/myserver/include/protocol/protocols_manager.h
+++ b/myserver/include/protocol/protocols_manager.h
@@ -17,16 +17,16 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef PROTOCOLS_MANAGER_H
-#define PROTOCOLS_MANAGER_H
-#include "stdafx.h"
-#include <include/base/xml/xml_parser.h>
-#include <include/protocol/protocol.h>
-#include <include/connection/connection.h>
-#include <include/base/dynamic_lib/dynamiclib.h>
-#include <include/plugin/plugin.h>
-#include <include/base/hash_map/hash_map.h>
-#include <list>
-#include <string>
+# define PROTOCOLS_MANAGER_H
+# include "stdafx.h"
+# include <include/base/xml/xml_parser.h>
+# include <include/protocol/protocol.h>
+# include <include/connection/connection.h>
+# include <include/base/dynamic_lib/dynamiclib.h>
+# include <include/plugin/plugin.h>
+# include <include/base/hash_map/hash_map.h>
+# include <list>
+# include <string>
 
 using namespace std;
 
diff --git a/myserver/include/protocol/url.h b/myserver/include/protocol/url.h
index 305a545..836304d 100644
--- a/myserver/include/protocol/url.h
+++ b/myserver/include/protocol/url.h
@@ -17,10 +17,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef URL_H
-#define URL_H
-#include "stdafx.h"
+# define URL_H
+# include "stdafx.h"
 
-#include <string>
+# include <string>
 
 using namespace std;
 
diff --git a/myserver/include/server/clients_thread.h b/myserver/include/server/clients_thread.h
index 406de83..aa3c240 100644
--- a/myserver/include/server/clients_thread.h
+++ b/myserver/include/server/clients_thread.h
@@ -17,11 +17,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef CLIENTS_THREAD_H
-#define CLIENTS_THREAD_H
-#include "stdafx.h"
-#include <include/base/utility.h>
-#include <include/connection/connection.h>
-#include <include/base/mem_buff/mem_buff.h>
+# define CLIENTS_THREAD_H
+# include "stdafx.h"
+# include <include/base/utility.h>
+# include <include/connection/connection.h>
+# include <include/base/mem_buff/mem_buff.h>
 
 class FtpProtocol;
 class HttpProtocol;
diff --git a/myserver/include/server/server.h b/myserver/include/server/server.h
index 1c67d51..4a5b80e 100644
--- a/myserver/include/server/server.h
+++ b/myserver/include/server/server.h
@@ -17,52 +17,52 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef SERVER_H
-#define SERVER_H
-
-#include "stdafx.h"
-#include <include/base/thread/thread.h>
-#include <include/base/utility.h>
-#include <include/base/xml/xml_parser.h>
-#include <include/base/utility.h>
-#include <include/connection/connection.h>
-#include <include/base/socket/socket.h>
-#include <include/base/sync/event.h>
-#include <include/conf/mime/mime_manager.h>
-#include <include/conf/vhost/vhost_manager.h>
-#include <include/protocol/protocols_manager.h>
-#include <include/connection/connection.h>
-#include <include/log/log_manager.h>
-#include <include/filter/filters_factory.h>
-#include <include/plugin/plugins_manager.h>
-#include <include/base/hash_map/hash_map.h>
-#include <include/base/home_dir/home_dir.h>
-#include <include/base/files_cache/cached_file_factory.h>
-#include <include/base/process/process_server_manager.h>
-#include <include/connections_scheduler/listen_threads.h>
-#include <include/base/multicast/multicast.h>
-#include <include/connections_scheduler/connections_scheduler.h>
-
-#include <include/conf/nodetree.h>
-
-#include <include/conf/security/security_manager.h>
-#include <include/conf/security/auth_method_factory.h>
-#include <include/conf/security/validator_factory.h>
-
-#include <include/base/slab/slab.h>
-
-#include <string>
-#include <list>
+# define SERVER_H
+
+# include "stdafx.h"
+# include <include/base/thread/thread.h>
+# include <include/base/utility.h>
+# include <include/base/xml/xml_parser.h>
+# include <include/base/utility.h>
+# include <include/connection/connection.h>
+# include <include/base/socket/socket.h>
+# include <include/base/sync/event.h>
+# include <include/conf/mime/mime_manager.h>
+# include <include/conf/vhost/vhost_manager.h>
+# include <include/protocol/protocols_manager.h>
+# include <include/connection/connection.h>
+# include <include/log/log_manager.h>
+# include <include/filter/filters_factory.h>
+# include <include/plugin/plugins_manager.h>
+# include <include/base/hash_map/hash_map.h>
+# include <include/base/home_dir/home_dir.h>
+# include <include/base/files_cache/cached_file_factory.h>
+# include <include/base/process/process_server_manager.h>
+# include <include/connections_scheduler/listen_threads.h>
+# include <include/base/multicast/multicast.h>
+# include <include/connections_scheduler/connections_scheduler.h>
+
+# include <include/conf/nodetree.h>
+
+# include <include/conf/security/security_manager.h>
+# include <include/conf/security/auth_method_factory.h>
+# include <include/conf/security/validator_factory.h>
+
+# include <include/base/slab/slab.h>
+
+# include <string>
+# include <list>
 
 using namespace std;
 
 /*!
  *Definition for new threads entry-point.
  */
-#ifdef WIN32
+# ifdef WIN32
 unsigned int __stdcall listenServer(void* pParam);
-#else
+# else
 void* listenServer(void* pParam);
-#endif
+# endif
 
 class Server : public MulticastRegistry<string, void*, int>
 {
@@ -168,12 +168,12 @@ private:
 
   XmlParser configurationFileManager;
 
-#ifdef WIN32
+# ifdef WIN32
   friend int __stdcall control_handler(u_long control_type);
-#endif
-#ifdef NOT_WIN
+# endif
+# ifdef NOT_WIN
   friend int control_handler (u_long control_type);
-#endif
+# endif
   /*!
    *When the flag mustEndServer is 1 all the threads are
    *stopped and the application stop its execution.
diff --git a/myserver/src/base/base64/mime_utils.cpp b/myserver/src/base/base64/mime_utils.cpp
index fbcc4e9..709896a 100644
--- a/myserver/src/base/base64/mime_utils.cpp
+++ b/myserver/src/base/base64/mime_utils.cpp
@@ -27,7 +27,7 @@ extern "C"
 #include <string.h>
 
 #ifndef WIN32
-#include <ctype.h>
+# include <ctype.h>
 #endif
 }
 
diff --git a/myserver/src/base/dynamic_lib/dynamiclib.cpp b/myserver/src/base/dynamic_lib/dynamiclib.cpp
index 7e480f8..521ca84 100644
--- a/myserver/src/base/dynamic_lib/dynamiclib.cpp
+++ b/myserver/src/base/dynamic_lib/dynamiclib.cpp
@@ -52,9 +52,9 @@ int DynamicLibrary::loadLibrary (const char* filename, int globally)
   else
     flag = RTLD_LOCAL | RTLD_LAZY;
 
-#ifdef RTLD_DEEPBIND
+# ifdef RTLD_DEEPBIND
   flag |= RTLD_DEEPBIND;
-#endif
+# endif
 
   handle = dlopen (filename, flag);
 #endif
diff --git a/myserver/src/base/file/file.cpp b/myserver/src/base/file/file.cpp
index 1f599c7..b5b59ad 100644
--- a/myserver/src/base/file/file.cpp
+++ b/myserver/src/base/file/file.cpp
@@ -23,27 +23,27 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #ifndef WIN32
 extern "C" {
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <time.h>
-
-#ifdef SENDFILE
-#include <fcntl.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/sendfile.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-#endif
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <errno.h>
+# include <stdio.h>
+# include <fcntl.h>
+# include <stdlib.h>
+# include <string.h>
+# include <math.h>
+# include <time.h>
+
+# ifdef SENDFILE
+#  include <fcntl.h>
+#  include <stdlib.h>
+#  include <stdio.h>
+#  include <sys/sendfile.h>
+#  include <sys/stat.h>
+#  include <sys/types.h>
+#  include <unistd.h>
+# endif
 
 
 }
diff --git a/myserver/src/base/file/files_utility.cpp b/myserver/src/base/file/files_utility.cpp
index 56be830..ad641c3 100644
--- a/myserver/src/base/file/files_utility.cpp
+++ b/myserver/src/base/file/files_utility.cpp
@@ -745,10 +745,10 @@ void FilesUtility::resetTmpPath ()
 #else
   const char *tmpDir = getenv ("TMPDIR");
 
-#ifdef P_tmpdir
+# ifdef P_tmpdir
   if (tmpDir == NULL)
     tmpDir = P_tmpdir;
-#endif
+# endif
 
   if (tmpDir == NULL)
     tmpDir = "/tmp";
diff --git a/myserver/src/base/home_dir/home_dir.cpp b/myserver/src/base/home_dir/home_dir.cpp
old mode 100755
new mode 100644
index 0bc94fb..6798ec3
--- a/myserver/src/base/home_dir/home_dir.cpp
+++ b/myserver/src/base/home_dir/home_dir.cpp
@@ -43,11 +43,11 @@ extern "C"
 # include <netdb.h>
 # include <unistd.h>
 # include <signal.h>
-#ifdef HAVE_PTHREAD
-# include <pthread.h>
-#endif
+# ifdef HAVE_PTHREAD
+#  include <pthread.h>
+# endif
 
-#include <sys/wait.h>
+# include <sys/wait.h>
 #endif
 }
 
diff --git a/myserver/src/base/md5/md5.cpp b/myserver/src/base/md5/md5.cpp
index 4d1f061..a16b75a 100644
--- a/myserver/src/base/md5/md5.cpp
+++ b/myserver/src/base/md5/md5.cpp
@@ -52,7 +52,7 @@ byteSwap(unsigned int *buf, unsigned int words)
 }
 #else
 /*! On the little endian architectures does nothing. */
-#define byteSwap(buf,words)
+# define byteSwap(buf,words)
 #endif
 
 /*!
@@ -161,13 +161,13 @@ void Md5::final(unsigned char digest[16])
 /* The four core functions - F1 is optimized somewhat */
 
 /* #define F1(x, y, z) (x & y | ~x & z) */
-#define F1(x, y, z) (z ^ (x & (y ^ z)))
-#define F2(x, y, z) F1(z, x, y)
-#define F3(x, y, z) (x ^ y ^ z)
-#define F4(x, y, z) (y ^ (x | ~z))
+# define F1(x, y, z) (z ^ (x & (y ^ z)))
+# define F2(x, y, z) F1(z, x, y)
+# define F3(x, y, z) (x ^ y ^ z)
+# define F4(x, y, z) (y ^ (x | ~z))
 
 /* This is the central step in the MD5 algorithm. */
-#define MD5STEP(f,w,x,y,z,in,s) \
+# define MD5STEP(f,w,x,y,z,in,s) \
    (w += f(x,y,z) + in, w = (w<<s | w>>(32-s)) + x)
 
 /*!
diff --git a/myserver/src/base/mem_buff/mem_buff.cpp b/myserver/src/base/mem_buff/mem_buff.cpp
index 5d0a79a..e7a89f5 100644
--- a/myserver/src/base/mem_buff/mem_buff.cpp
+++ b/myserver/src/base/mem_buff/mem_buff.cpp
@@ -22,7 +22,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <string.h>
 
 #ifndef DONT_MATCH_LENGTH
-#include <math.h> // for the log10 function
+# include <math.h> // for the log10 function
 #endif
 
 // Used by the CRC algorithm
diff --git a/myserver/src/base/multicast/multicast.cpp b/myserver/src/base/multicast/multicast.cpp
index 771814a..6f93dae 100644
--- a/myserver/src/base/multicast/multicast.cpp
+++ b/myserver/src/base/multicast/multicast.cpp
@@ -16,7 +16,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 #include <include/base/multicast/multicast.h>
 #ifndef MULTICAST_CPP
-#define MULTICAST_CPP
+# define MULTICAST_CPP
 
 /*!
  *Register the handler for the specified message type.
diff --git a/myserver/src/base/pipe/pipe.cpp b/myserver/src/base/pipe/pipe.cpp
index 5dc9180..05522c3 100644
--- a/myserver/src/base/pipe/pipe.cpp
+++ b/myserver/src/base/pipe/pipe.cpp
@@ -98,11 +98,11 @@ int Pipe::create (bool readPipe)
 {
 #ifndef WIN32
 
-#ifdef HAVE_PIPE
+# ifdef HAVE_PIPE
   return pipe (handles);
-#else
+# else
   return 1;
-#endif
+# endif
 
 #else
   HANDLE tmp;
diff --git a/myserver/src/base/process/fork_server.cpp b/myserver/src/base/process/fork_server.cpp
index 05b846c..a57d49e 100644
--- a/myserver/src/base/process/fork_server.cpp
+++ b/myserver/src/base/process/fork_server.cpp
@@ -22,8 +22,8 @@
 #ifndef WIN32
 extern "C"
 {
-#include <unistd.h>
-#include <sys/wait.h>
+# include <unistd.h>
+# include <sys/wait.h>
 }
 #endif
 /*!
diff --git a/myserver/src/base/process/process.cpp b/myserver/src/base/process/process.cpp
old mode 100755
new mode 100644
index e10f544..180ffff
--- a/myserver/src/base/process/process.cpp
+++ b/myserver/src/base/process/process.cpp
@@ -60,7 +60,7 @@ extern "C"
 #endif
 
 #ifdef WIN32
-#include <direct.h>
+# include <direct.h>
 #endif
 
 #ifdef HAVE_PTHREAD
@@ -317,11 +317,11 @@ uid_t Process::getUid (const char *user)
         return uid;
     }
 
-#ifdef GETPWNAM
+# ifdef GETPWNAM
   struct passwd *u = getpwnam (user);
   if (u != NULL)
     return u->pw_uid;
-#endif
+# endif
 
 #endif
 
@@ -343,11 +343,11 @@ gid_t Process::getGid (const char *grp)
         return gid;
     }
 
-#ifdef GRP
+# ifdef GRP
   struct group *g = getgrnam (grp);
   if (g != NULL)
     return g->gr_gid;
-#endif
+# endif
 
 #endif
 
@@ -374,7 +374,7 @@ int Process::isProcessAlive ()
 
 #ifndef WIN32
   int status = 0;
-#ifdef PROCESS_ALIVE_USEWAITPID
+# ifdef PROCESS_ALIVE_USEWAITPID
   int ret;
   do
   {
@@ -384,7 +384,7 @@ int Process::isProcessAlive ()
   if (!ret)
     return 1;
   return 0;
-#else
+# else
   /* Send the pseudo-signal 0 to check if the process is alive.  */
   int ret;
   do
@@ -399,7 +399,7 @@ int Process::isProcessAlive ()
   waitpid (pid, &status, WNOHANG | WUNTRACED);
 
   return 0;
-#endif
+# endif
 
 #endif
   return 0;
@@ -512,7 +512,7 @@ int Process::setAdditionalGroups (u_long len, u_long *groups)
 {
 #ifndef WIN32
 
-#if HAVE_SETGROUPS
+# if HAVE_SETGROUPS
   u_long i;
   int ret;
   gid_t *gids = new gid_t[len];
@@ -531,9 +531,9 @@ int Process::setAdditionalGroups (u_long len, u_long *groups)
     return 0;
   return ret;
 
-#else
+# else
   return 0;
-#endif
+# endif
 
 #else
   return 0;
diff --git a/myserver/src/base/safetime/safetime.cpp b/myserver/src/base/safetime/safetime.cpp
index 7e4d8be..b5519f9 100644
--- a/myserver/src/base/safetime/safetime.cpp
+++ b/myserver/src/base/safetime/safetime.cpp
@@ -25,14 +25,14 @@ extern "C" {
 #include <string.h>
 #include <ctype.h>
 #ifndef WIN32
-#include <stdio.h>
+# include <stdio.h>
 #endif
 }
 
 #ifndef WIN32
-#if !HAVE_LOCALTIME_R
+# if !HAVE_LOCALTIME_R
 static Mutex mutex;
-#endif
+# endif
 #endif
 
 /*!
@@ -41,9 +41,9 @@ static Mutex mutex;
 void myserver_safetime_init()
 {
 #ifndef WIN32
-#if !HAVE_LOCALTIME_R
+# if !HAVE_LOCALTIME_R
   mutex.init();
-#endif
+# endif
 #endif
 }
 
@@ -53,9 +53,9 @@ void myserver_safetime_init()
 void myserver_safetime_destroy()
 {
 #ifndef WIN32
-#if !HAVE_LOCALTIME_R
+# if !HAVE_LOCALTIME_R
   mutex.destroy();
-#endif
+# endif
 #endif
 }
 
diff --git a/myserver/src/base/socket/socket.cpp b/myserver/src/base/socket/socket.cpp
index fc0b5db..ba9c5d7 100644
--- a/myserver/src/base/socket/socket.cpp
+++ b/myserver/src/base/socket/socket.cpp
@@ -23,13 +23,13 @@ extern "C" {
 #include <string.h>
 #include <stdio.h>
 #ifndef WIN32
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <netdb.h>
-#include <unistd.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
+# include <sys/types.h>
+# include <sys/socket.h>
+# include <sys/ioctl.h>
+# include <netdb.h>
+# include <unistd.h>
+# include <netinet/in.h>
+# include <arpa/inet.h>
 #endif
 #include <errno.h>
 }
@@ -333,11 +333,11 @@ int Socket::getLocalIPsList(string &out)
     /*! Print all the interfaces IPs. */
     for(i= 0; (localhe->h_addr_list[i]); i++)
     {
-#ifdef WIN32
+# ifdef WIN32
       ia.S_un.S_addr = *((u_long FAR*) (localhe->h_addr_list[i]));
-#else
+# else
       ia.s_addr = *((u_long *) (localhe->h_addr_list[i]));
-#endif
+# endif
       stream << ( (i != 0) ? ", " : "") << inet_ntoa(ia);
     }
 
@@ -660,9 +660,9 @@ u_long Socket::bytesToRead()
 #ifdef FIONREAD
   ioctlsocket(FIONREAD,&nBytesToRead);
 #else
-#ifdef I_NREAD
+# ifdef I_NREAD
   ::ioctlsocket( I_NREAD, &nBytesToRead ) ;
-#endif
+# endif
 #endif
   return nBytesToRead;
 }
diff --git a/myserver/src/base/socket/ssl_socket.cpp b/myserver/src/base/socket/ssl_socket.cpp
index db9b74d..c244236 100644
--- a/myserver/src/base/socket/ssl_socket.cpp
+++ b/myserver/src/base/socket/ssl_socket.cpp
@@ -24,13 +24,13 @@ extern "C" {
 #include <string.h>
 #include <stdio.h>
 #ifndef WIN32
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <netdb.h>
-#include <unistd.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
+# include <sys/types.h>
+# include <sys/socket.h>
+# include <sys/ioctl.h>
+# include <netdb.h>
+# include <unistd.h>
+# include <netinet/in.h>
+# include <arpa/inet.h>
 #endif
 }
 
diff --git a/myserver/src/base/socket_pair/socket_pair.cpp b/myserver/src/base/socket_pair/socket_pair.cpp
index 29b9042..d0938b4 100644
--- a/myserver/src/base/socket_pair/socket_pair.cpp
+++ b/myserver/src/base/socket_pair/socket_pair.cpp
@@ -22,23 +22,23 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #ifndef WIN32
 extern "C" {
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <time.h>
-
-#include <sys/socket.h>
-#include <sys/uio.h>
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <errno.h>
+# include <stdio.h>
+# include <fcntl.h>
+# include <stdlib.h>
+# include <string.h>
+# include <math.h>
+# include <time.h>
+
+# include <sys/socket.h>
+# include <sys/uio.h>
 }
 #else
-#include <windows.h>
+# include <windows.h>
 #endif
 
 #include <string>
@@ -60,9 +60,9 @@ SocketPair::SocketPair ()
 int SocketPair::create ()
 {
 #ifdef WIN32
-#define LOCAL_SOCKETPAIR_AF AF_INET
+# define LOCAL_SOCKETPAIR_AF AF_INET
 #else
-#define LOCAL_SOCKETPAIR_AF AF_UNIX
+# define LOCAL_SOCKETPAIR_AF AF_UNIX
 #endif
 
   int af = LOCAL_SOCKETPAIR_AF;
diff --git a/myserver/src/base/string/stringutils.cpp b/myserver/src/base/string/stringutils.cpp
index 71aed2c..83618ff 100644
--- a/myserver/src/base/string/stringutils.cpp
+++ b/myserver/src/base/string/stringutils.cpp
@@ -478,18 +478,18 @@ const char* getLocalLogFormatDate (const time_t t, char* out, int len)
   offset = -timezone;
 #else
 
-#ifdef GETTIMEOFDAY
+# ifdef GETTIMEOFDAY
   struct timeval tv;
   struct timezone tz;
 
   gettimeofday (&tv, &tz);
   offset = -tz.tz_minuteswest * 60;
 
-#else
+# else
   TIME_ZONE_INFORMATION tzi;
   GetTimeZoneInformation (&tzi);
   offset = -tzi.Bias * 60;
-#endif
+# endif
 
 #endif
 
diff --git a/myserver/src/base/sync/event.cpp b/myserver/src/base/sync/event.cpp
old mode 100755
new mode 100644
index 347bfc2..3033038
--- a/myserver/src/base/sync/event.cpp
+++ b/myserver/src/base/sync/event.cpp
@@ -25,23 +25,23 @@ extern "C" {
 #include <stdarg.h>
 #include <stdio.h>
 #ifndef WIN32
-#include <errno.h>
-#include <netdb.h>
-#include <unistd.h>
-#include <signal.h>
-#ifdef HAVE_PTHREAD
-#include <time.h>
-#include <sys/time.h>
-#include <pthread.h>
-#endif
-#include <sys/wait.h>
+# include <errno.h>
+# include <netdb.h>
+# include <unistd.h>
+# include <signal.h>
+# ifdef HAVE_PTHREAD
+#  include <time.h>
+#  include <sys/time.h>
+#  include <pthread.h>
+# endif
+# include <sys/wait.h>
 #endif
 }
 
 #include <sys/types.h>
 
 #ifdef WIN32
-#include <direct.h>
+# include <direct.h>
 #endif
 
 /*!
diff --git a/myserver/src/base/sync/mutex.cpp b/myserver/src/base/sync/mutex.cpp
old mode 100755
new mode 100644
index 172ffad..82b00c8
--- a/myserver/src/base/sync/mutex.cpp
+++ b/myserver/src/base/sync/mutex.cpp
@@ -26,21 +26,21 @@ extern "C" {
 #include <stdarg.h>
 #include <stdio.h>
 #ifndef WIN32
-#include <errno.h>
-#include <netdb.h>
-#include <unistd.h>
-#include <signal.h>
-#ifdef HAVE_PTHREAD
-#include <pthread.h>
-#endif
-#include <sys/wait.h>
+# include <errno.h>
+# include <netdb.h>
+# include <unistd.h>
+# include <signal.h>
+# ifdef HAVE_PTHREAD
+#  include <pthread.h>
+# endif
+# include <sys/wait.h>
 #endif
 }
 
 #include <sys/types.h>
 
 #ifdef WIN32
-#include <direct.h>
+# include <direct.h>
 #endif
 
 /*!
@@ -65,13 +65,13 @@ int Mutex::init()
 #ifdef HAVE_PTHREAD
 
 
-#if 0
+# if 0
   pthread_mutexattr_t mta;
   pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_NORMAL);
   ret = pthread_mutex_init(&mutex, &mta);
-#else
+# else
   ret = pthread_mutex_init(&mutex,(pthread_mutexattr_t*) NULL);
-#endif
+# endif
 
 
 #else
@@ -104,14 +104,14 @@ int Mutex::destroy()
 int Mutex::lock(u_long /*id*/)
 {
 #ifdef HAVE_PTHREAD
-#ifdef PTHREAD_ALTERNATE_LOCK
+# ifdef PTHREAD_ALTERNATE_LOCK
   pthread_mutex_lock(&mutex);
-#else
+# else
   while(pthread_mutex_trylock(&mutex) == EBUSY)
   {
     Thread::wait(1);
   }
-#endif
+# endif
 
 #else
   WaitForSingleObject(mutex, INFINITE);
diff --git a/myserver/src/base/sync/read_write_lock.cpp b/myserver/src/base/sync/read_write_lock.cpp
old mode 100755
new mode 100644
diff --git a/myserver/src/base/sync/recursive_mutex.cpp b/myserver/src/base/sync/recursive_mutex.cpp
old mode 100755
new mode 100644
index 8dc37c9..680be0b
--- a/myserver/src/base/sync/recursive_mutex.cpp
+++ b/myserver/src/base/sync/recursive_mutex.cpp
@@ -25,21 +25,21 @@ extern "C" {
 #include <stdarg.h>
 #include <stdio.h>
 #ifndef WIN32
-#include <errno.h>
-#include <netdb.h>
-#include <unistd.h>
-#include <signal.h>
-#ifdef HAVE_PTHREAD
-#include <pthread.h>
-#endif
-#include <sys/wait.h>
+# include <errno.h>
+# include <netdb.h>
+# include <unistd.h>
+# include <signal.h>
+# ifdef HAVE_PTHREAD
+#  include <pthread.h>
+# endif
+# include <sys/wait.h>
 #endif
 }
 
 #include <sys/types.h>
 
 #ifdef WIN32
-#include <direct.h>
+# include <direct.h>
 #endif
 
 /*!
diff --git a/myserver/src/base/sync/semaphore.cpp b/myserver/src/base/sync/semaphore.cpp
old mode 100755
new mode 100644
index cd9b739..980570e
--- a/myserver/src/base/sync/semaphore.cpp
+++ b/myserver/src/base/sync/semaphore.cpp
@@ -42,10 +42,10 @@ extern "C" {
 #include <sys/types.h>
 
 #ifdef WIN32
-#include <direct.h>
+# include <direct.h>
 #endif
 
-#define  PTHREAD_ALTERNATE_LOCK 1
+#define PTHREAD_ALTERNATE_LOCK 1
 
 /*!
  *Constructor for the semaphore class.
@@ -101,13 +101,13 @@ int Semaphore::lock(u_long /*id*/)
   int err = 0;
 #ifdef HAVE_PTHREAD
 
-#ifdef PTHREAD_ALTERNATE_LOCK
+# ifdef PTHREAD_ALTERNATE_LOCK
   err = sem_wait(&semaphore);
-#else
+# else
   timespec ts =  {3, 0};
   while(sem_timedwait(&semaphore, &ts) && errno == ETIMEDOUT)
     Thread::wait(1);
-#endif
+# endif
 
 #else
   err = (WaitForSingleObject(semaphore, INFINITE) == WAIT_FAILED) ? 1 : 0;
diff --git a/myserver/src/base/thread/thread.cpp b/myserver/src/base/thread/thread.cpp
old mode 100755
new mode 100644
diff --git a/myserver/src/base/xml/xml_parser.cpp b/myserver/src/base/xml/xml_parser.cpp
index 0c12f07..770a3c8 100644
--- a/myserver/src/base/xml/xml_parser.cpp
+++ b/myserver/src/base/xml/xml_parser.cpp
@@ -510,11 +510,11 @@ void XmlParser::setAttr(const char * name, const char * value)
  */
 void XmlParser::addLineFeed()
 {
-  #ifdef WIN32
+#ifdef WIN32
     xmlNodePtr endline = xmlNewDocText(doc, (const xmlChar *)"\r\n");
-  #else
+#else
     xmlNodePtr endline = xmlNewDocText(doc, (const xmlChar *)"\n");
-  #endif
+#endif
 
   xmlAddChild(cur, endline);
 }
diff --git a/myserver/src/filter/gzip/gzip.cpp b/myserver/src/filter/gzip/gzip.cpp
old mode 100755
new mode 100644
diff --git a/myserver/src/filter/gzip/gzip_decompress.cpp b/myserver/src/filter/gzip/gzip_decompress.cpp
old mode 100755
new mode 100644
diff --git a/myserver/src/filter/stream.cpp b/myserver/src/filter/stream.cpp
index 01581e9..a50f883 100644
--- a/myserver/src/filter/stream.cpp
+++ b/myserver/src/filter/stream.cpp
@@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
- #include <include/filter/stream.h>
+#include <include/filter/stream.h>
 
 #include <string>
 #include <sstream>
diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index 671e612..806e47a 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -453,9 +453,9 @@ int main  (int argn, char **argv)
       cout << MYSERVER_VERSION << endl;
 
       cout
-#ifdef __DATE__
+# ifdef __DATE__
         << "Compiled on " << __DATE__
-#endif
+# endif
         << endl;
 
       cout << "http://www.gnu.org/software/myserver" << endl;
@@ -476,9 +476,9 @@ int main  (int argn, char **argv)
       if (!strcmpi (argv[1], "REGISTER"))
         {
           registerService ();
-#ifndef ARGP
+# ifndef ARGP
           runAsService ();
-#endif
+# endif
           runas = MYSERVER_RUNAS_SERVICE;
           return 0;
         }
@@ -545,14 +545,14 @@ int main  (int argn, char **argv)
 
           if (pid)
             {
-#ifdef ARGP
+# ifdef ARGP
               if(input.pidFileName)
                 writePidfile (input.pidFileName);
               else
                 writePidfile();
-#else
+# else
               writePidfile ();
-#endif
+# endif
               return 0;
             }
           /*
@@ -595,10 +595,10 @@ int writePidfile (const char* filename)
 
   if (filename == NULL)
     {
-#ifdef PREFIX
+# ifdef PREFIX
       file.assign (PREFIX);
       file.append ("/");
-#endif
+# endif
       file.append ("/var/run/myserver.pid");
     }
 
diff --git a/myserver/src/plugin/plugin.cpp b/myserver/src/plugin/plugin.cpp
old mode 100755
new mode 100644
diff --git a/myserver/src/plugin/plugin_info.cpp b/myserver/src/plugin/plugin_info.cpp
old mode 100755
new mode 100644
diff --git a/myserver/src/plugin/plugins_manager.cpp b/myserver/src/plugin/plugins_manager.cpp
old mode 100755
new mode 100644
diff --git a/myserver/src/protocol/control/control_header.cpp b/myserver/src/protocol/control/control_header.cpp
old mode 100755
new mode 100644
index d11cf3e..f3ea4f7
--- a/myserver/src/protocol/control/control_header.cpp
+++ b/myserver/src/protocol/control/control_header.cpp
@@ -23,12 +23,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 extern "C"
 {
 #ifdef WIN32
-#include <direct.h>
-#include <errno.h>
+# include <direct.h>
+# include <errno.h>
 #endif
 #ifndef WIN32
-#include <string.h>
-#include <errno.h>
+# include <string.h>
+# include <errno.h>
 #endif
 }
 
diff --git a/myserver/src/protocol/control/control_protocol.cpp b/myserver/src/protocol/control/control_protocol.cpp
old mode 100755
new mode 100644
diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
old mode 100755
new mode 100644
diff --git a/myserver/src/protocol/ftp/ftp_lexer.cpp b/myserver/src/protocol/ftp/ftp_lexer.cpp
index a612c9a..0ed4ff6 100644
--- a/myserver/src/protocol/ftp/ftp_lexer.cpp
+++ b/myserver/src/protocol/ftp/ftp_lexer.cpp
@@ -2,7 +2,7 @@
 
 #line 4 "ftp_lexer.cpp"
 
-#define  YY_INT_ALIGNED short int
+#define YY_INT_ALIGNED short int
 
 /* A lexical scanner generated by flex */
 
@@ -11,7 +11,7 @@
 #define YY_FLEX_MINOR_VERSION 5
 #define YY_FLEX_SUBMINOR_VERSION 35
 #if YY_FLEX_SUBMINOR_VERSION > 0
-#define FLEX_BETA
+# define FLEX_BETA
 #endif
 
 /* First, we deal with  platform-specific or compiler-specific issues. */
@@ -27,27 +27,27 @@
 /* flex integer type definitions */
 
 #ifndef FLEXINT_H
-#define FLEXINT_H
+# define FLEXINT_H
 
 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
 
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+# if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 
 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
  * if you want the limit (max/min) macros for int types. 
  */
-#ifndef __STDC_LIMIT_MACROS
-#define __STDC_LIMIT_MACROS 1
-#endif
+#  ifndef __STDC_LIMIT_MACROS
+#   define __STDC_LIMIT_MACROS 1
+#  endif
 
-#include <inttypes.h>
+#  include <inttypes.h>
 typedef int8_t flex_int8_t;
 typedef uint8_t flex_uint8_t;
 typedef int16_t flex_int16_t;
 typedef uint16_t flex_uint16_t;
 typedef int32_t flex_int32_t;
 typedef uint32_t flex_uint32_t;
-#else
+# else
 typedef signed char flex_int8_t;
 typedef short int flex_int16_t;
 typedef int flex_int32_t;
@@ -56,57 +56,57 @@ typedef unsigned short int flex_uint16_t;
 typedef unsigned int flex_uint32_t;
 
 /* Limits of integral types. */
-#ifndef INT8_MIN
-#define INT8_MIN               (-128)
-#endif
-#ifndef INT16_MIN
-#define INT16_MIN              (-32767-1)
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN              (-2147483647-1)
-#endif
-#ifndef INT8_MAX
-#define INT8_MAX               (127)
-#endif
-#ifndef INT16_MAX
-#define INT16_MAX              (32767)
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX              (2147483647)
-#endif
-#ifndef UINT8_MAX
-#define UINT8_MAX              (255U)
-#endif
-#ifndef UINT16_MAX
-#define UINT16_MAX             (65535U)
-#endif
-#ifndef UINT32_MAX
-#define UINT32_MAX             (4294967295U)
-#endif
-
-#endif /* ! C99 */
+#  ifndef INT8_MIN
+#   define INT8_MIN               (-128)
+#  endif
+#  ifndef INT16_MIN
+#   define INT16_MIN              (-32767-1)
+#  endif
+#  ifndef INT32_MIN
+#   define INT32_MIN              (-2147483647-1)
+#  endif
+#  ifndef INT8_MAX
+#   define INT8_MAX               (127)
+#  endif
+#  ifndef INT16_MAX
+#   define INT16_MAX              (32767)
+#  endif
+#  ifndef INT32_MAX
+#   define INT32_MAX              (2147483647)
+#  endif
+#  ifndef UINT8_MAX
+#   define UINT8_MAX              (255U)
+#  endif
+#  ifndef UINT16_MAX
+#   define UINT16_MAX             (65535U)
+#  endif
+#  ifndef UINT32_MAX
+#   define UINT32_MAX             (4294967295U)
+#  endif
+
+# endif /* ! C99 */
 
 #endif /* ! FLEXINT_H */
 
 #ifdef __cplusplus
 
 /* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
+# define YY_USE_CONST
 
 #else	/* ! __cplusplus */
 
 /* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
+# if defined (__STDC__)
 
-#define YY_USE_CONST
+#  define YY_USE_CONST
 
-#endif	/* defined (__STDC__) */
+# endif	/* defined (__STDC__) */
 #endif	/* ! __cplusplus */
 
 #ifdef YY_USE_CONST
-#define yyconst const
+# define yyconst const
 #else
-#define yyconst
+# define yyconst
 #endif
 
 /* Returned upon end-of-file. */
@@ -121,7 +121,7 @@ typedef unsigned int flex_uint32_t;
 
 /* An opaque pointer. */
 #ifndef YY_TYPEDEF_YY_SCANNER_T
-#define YY_TYPEDEF_YY_SCANNER_T
+# define YY_TYPEDEF_YY_SCANNER_T
 typedef void* yyscan_t;
 #endif
 
@@ -159,15 +159,15 @@ typedef void* yyscan_t;
 
 /* Size of default input buffer. */
 #ifndef YY_BUF_SIZE
-#ifdef __ia64__
+# ifdef __ia64__
 /* On IA-64, the buffer size is 16k, not 8k.
  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
  * Ditto for the __ia64__ case accordingly.
  */
-#define YY_BUF_SIZE 32768
-#else
-#define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
+#  define YY_BUF_SIZE 32768
+# else
+#  define YY_BUF_SIZE 16384
+# endif /* __ia64__ */
 #endif
 
 /* The state buf must be large enough to hold one state per character in the main buffer.
@@ -175,7 +175,7 @@ typedef void* yyscan_t;
 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
 
 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
-#define YY_TYPEDEF_YY_BUFFER_STATE
+# define YY_TYPEDEF_YY_BUFFER_STATE
 typedef struct yy_buffer_state *YY_BUFFER_STATE;
 #endif
 
@@ -183,7 +183,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
 #define EOB_ACT_END_OF_FILE 1
 #define EOB_ACT_LAST_MATCH 2
 
-    #define YY_LESS_LINENO(n)
+#define YY_LESS_LINENO(n)
     
 /* Return all but the first "n" matched characters back to the input stream. */
 #define yyless(n) \
@@ -202,12 +202,12 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
 
 #ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
+# define YY_TYPEDEF_YY_SIZE_T
 typedef size_t yy_size_t;
 #endif
 
 #ifndef YY_STRUCT_YY_BUFFER_STATE
-#define YY_STRUCT_YY_BUFFER_STATE
+# define YY_STRUCT_YY_BUFFER_STATE
 struct yy_buffer_state
 	{
 	FILE *yy_input_file;
@@ -254,8 +254,8 @@ struct yy_buffer_state
 
 	int yy_buffer_status;
 
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
+# define YY_BUFFER_NEW 0
+# define YY_BUFFER_NORMAL 1
 	/* When an EOF's been seen but there's still some text to process
 	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
 	 * shouldn't try reading from the input source any more.  We might
@@ -266,7 +266,7 @@ struct yy_buffer_state
 	 * (via yyrestart()), so that the user can continue scanning by
 	 * just pointing yyin at a new input file.
 	 */
-#define YY_BUFFER_EOF_PENDING 2
+# define YY_BUFFER_EOF_PENDING 2
 
 	};
 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
@@ -585,11 +585,11 @@ static yyconst flex_int16_t yy_chk[368] =
  * down here because we want the user's section 1 to have been scanned first.
  * The user has a chance to override it with an option.
  */
-#include <unistd.h>
+# include <unistd.h>
 #endif
 
 #ifndef YY_EXTRA_TYPE
-#define YY_EXTRA_TYPE void *
+# define YY_EXTRA_TYPE void *
 #endif
 
 /* Holds the entire state of the reentrant scanner. */
@@ -634,9 +634,9 @@ static int yy_init_globals (yyscan_t yyscanner );
 
     /* This must go here because YYSTYPE and YYLTYPE are included
      * from bison output in section 1.*/
-    #    define yylval yyg->yylval_r
+#define yylval yyg->yylval_r
     
-    #    define yylloc yyg->yylloc_r
+#define yylloc yyg->yylloc_r
     
 int yylex_init (yyscan_t* scanner);
 
@@ -684,11 +684,11 @@ void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
  */
 
 #ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
+# ifdef __cplusplus
 extern "C" int yywrap (yyscan_t yyscanner );
-#else
+# else
 extern int yywrap (yyscan_t yyscanner );
-#endif
+# endif
 #endif
 
     static void yyunput (int c,char *buf_ptr  ,yyscan_t yyscanner);
@@ -703,22 +703,22 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
 
 #ifndef YY_NO_INPUT
 
-#ifdef __cplusplus
+# ifdef __cplusplus
 static int yyinput (yyscan_t yyscanner );
-#else
+# else
 static int input (yyscan_t yyscanner );
-#endif
+# endif
 
 #endif
 
 /* Amount of stuff to slurp up with each read. */
 #ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
+# ifdef __ia64__
 /* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
-#define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
+#  define YY_READ_BUF_SIZE 16384
+# else
+#  define YY_READ_BUF_SIZE 8192
+# endif /* __ia64__ */
 #endif
 
 /* Copy whatever the last rule matched to the standard output. */
@@ -726,14 +726,14 @@ static int input (yyscan_t yyscanner );
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+# define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
 #endif
 
 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
  * is returned in "result".
  */
 #ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
+# define YY_INPUT(buf,result,max_size) \
 	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
 		{ \
 		int c = '*'; \
@@ -770,17 +770,17 @@ static int input (yyscan_t yyscanner );
  * some compilers to complain about unreachable statements.
  */
 #ifndef yyterminate
-#define yyterminate() return YY_NULL
+# define yyterminate() return YY_NULL
 #endif
 
 /* Number of entries by which start-condition stack grows. */
 #ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
+# define YY_START_STACK_INCR 25
 #endif
 
 /* Report a fatal error. */
 #ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
+# define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
 #endif
 
 /* end tables serialization structures and prototypes */
@@ -789,12 +789,12 @@ static int input (yyscan_t yyscanner );
  * easily add parameters.
  */
 #ifndef YY_DECL
-#define YY_DECL_IS_OURS 1
+# define YY_DECL_IS_OURS 1
 
 extern int yylex \
                (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
 
-#define YY_DECL int yylex \
+# define YY_DECL int yylex \
                (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
 #endif /* !YY_DECL */
 
@@ -802,12 +802,12 @@ extern int yylex \
  * have been set up.
  */
 #ifndef YY_USER_ACTION
-#define YY_USER_ACTION
+# define YY_USER_ACTION
 #endif
 
 /* Code executed at the end of each rule. */
 #ifndef YY_BREAK
-#define YY_BREAK break;
+# define YY_BREAK break;
 #endif
 
 #define YY_RULE_SETUP \
@@ -1780,11 +1780,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
 }
 
 #ifndef YY_NO_INPUT
-#ifdef __cplusplus
+# ifdef __cplusplus
     static int yyinput (yyscan_t yyscanner)
-#else
+# else
     static int input  (yyscan_t yyscanner)
-#endif
+# endif
 
 {
 	int c;
@@ -1832,11 +1832,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
 
 					if ( ! yyg->yy_did_buffer_switch_on_eof )
 						YY_NEW_FILE;
-#ifdef __cplusplus
+# ifdef __cplusplus
 					return yyinput(yyscanner);
-#else
+# else
 					return input(yyscanner);
-#endif
+# endif
 					}
 
 				case EOB_ACT_CONTINUE_SCAN:
@@ -2217,7 +2217,7 @@ YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len , yysc
 }
 
 #ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
+# define YY_EXIT_FAILURE 2
 #endif
 
 static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
diff --git a/myserver/src/protocol/ftp/ftp_parser.cpp b/myserver/src/protocol/ftp/ftp_parser.cpp
index 09fa198..f7bfb81 100644
--- a/myserver/src/protocol/ftp/ftp_parser.cpp
+++ b/myserver/src/protocol/ftp/ftp_parser.cpp
@@ -195,7 +195,7 @@ typedef union YYSTYPE
 {
 
 /* Line 214 of yacc.c  */
-#line 15 "ftp_parser.ypp"
+# line 15 "ftp_parser.ypp"
 
 	int		m_nInt;
 	char		m_nChar;
@@ -205,7 +205,7 @@ typedef union YYSTYPE
 
 
 /* Line 214 of yacc.c  */
-#line 209 "ftp_parser.cpp"
+# line 209 "ftp_parser.cpp"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -307,15 +307,15 @@ typedef short int yytype_int16;
 #ifndef lint
 # define YYID(n) (n)
 #else
-#if (defined __STDC__ || defined __C99__FUNC__ \
+# if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static int
 YYID (int yyi)
-#else
+# else
 static int
 YYID (yyi)
     int yyi;
-#endif
+# endif
 {
   return yyi;
 }
@@ -586,7 +586,7 @@ static const char *const yytname[] =
 };
 #endif
 
-# ifdef YYPRINT
+#ifdef YYPRINT
 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
    token YYLEX-NUM.  */
 static const yytype_uint16 yytoknum[] =
@@ -598,7 +598,7 @@ static const yytype_uint16 yytoknum[] =
      295,   296,   114,    44,   115,    98,    99,   102,   112,    97,
      105,   101,   108,   110,   116
 };
-# endif
+#endif
 
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const yytype_uint8 yyr1[] =
@@ -885,11 +885,11 @@ do {									  \
 `--------------------------------*/
 
 /*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
+# if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, Ftp *pContext)
-#else
+# else
 static void
 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, pContext)
     FILE *yyoutput;
@@ -897,7 +897,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, pContext)
     YYSTYPE const * const yyvaluep;
     YYLTYPE const * const yylocationp;
     Ftp *pContext;
-#endif
+# endif
 {
   if (!yyvaluep)
     return;
@@ -921,11 +921,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, pContext)
 | Print this symbol on YYOUTPUT.  |
 `--------------------------------*/
 
-#if (defined __STDC__ || defined __C99__FUNC__ \
+# if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, Ftp *pContext)
-#else
+# else
 static void
 yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, pContext)
     FILE *yyoutput;
@@ -933,7 +933,7 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, pContext)
     YYSTYPE const * const yyvaluep;
     YYLTYPE const * const yylocationp;
     Ftp *pContext;
-#endif
+# endif
 {
   if (yytype < YYNTOKENS)
     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
@@ -951,16 +951,16 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, pContext)
 | TOP (included).                                                   |
 `------------------------------------------------------------------*/
 
-#if (defined __STDC__ || defined __C99__FUNC__ \
+# if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
+# else
 static void
 yy_stack_print (yybottom, yytop)
     yytype_int16 *yybottom;
     yytype_int16 *yytop;
-#endif
+# endif
 {
   YYFPRINTF (stderr, "Stack now");
   for (; yybottom <= yytop; yybottom++)
@@ -982,18 +982,18 @@ do {								\
 | Report that the YYRULE is going to be reduced.  |
 `------------------------------------------------*/
 
-#if (defined __STDC__ || defined __C99__FUNC__ \
+# if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
 yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, Ftp *pContext)
-#else
+# else
 static void
 yy_reduce_print (yyvsp, yylsp, yyrule, pContext)
     YYSTYPE *yyvsp;
     YYLTYPE *yylsp;
     int yyrule;
     Ftp *pContext;
-#endif
+# endif
 {
   int yynrhs = yyr2[yyrule];
   int yyi;
@@ -1029,7 +1029,7 @@ int yydebug;
 
 
 /* YYINITDEPTH -- initial size of the parser's stacks.  */
-#ifndef	YYINITDEPTH
+#ifndef YYINITDEPTH
 # define YYINITDEPTH 200
 #endif
 
@@ -1053,15 +1053,15 @@ int yydebug;
 #   define yystrlen strlen
 #  else
 /* Return the length of YYSTR.  */
-#if (defined __STDC__ || defined __C99__FUNC__ \
+#   if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static YYSIZE_T
 yystrlen (const char *yystr)
-#else
+#   else
 static YYSIZE_T
 yystrlen (yystr)
     const char *yystr;
-#endif
+#   endif
 {
   YYSIZE_T yylen;
   for (yylen = 0; yystr[yylen]; yylen++)
@@ -1077,16 +1077,16 @@ yystrlen (yystr)
 #  else
 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
    YYDEST.  */
-#if (defined __STDC__ || defined __C99__FUNC__ \
+#   if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static char *
 yystpcpy (char *yydest, const char *yysrc)
-#else
+#   else
 static char *
 yystpcpy (yydest, yysrc)
     char *yydest;
     const char *yysrc;
-#endif
+#   endif
 {
   char *yyd = yydest;
   const char *yys = yysrc;
@@ -1294,17 +1294,17 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, pContext)
 
 /* Prevent warnings from -Wmissing-prototypes.  */
 #ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
+# if defined __STDC__ || defined __cplusplus
 int yyparse (void *YYPARSE_PARAM);
-#else
+# else
 int yyparse ();
-#endif
+# endif
 #else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
+# if defined __STDC__ || defined __cplusplus
 int yyparse (Ftp *pContext);
-#else
+# else
 int yyparse ();
-#endif
+# endif
 #endif /* ! YYPARSE_PARAM */
 
 
@@ -1316,25 +1316,25 @@ int yyparse ();
 `-------------------------*/
 
 #ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
+# if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 int
 yyparse (void *YYPARSE_PARAM)
-#else
+# else
 int
 yyparse (YYPARSE_PARAM)
     void *YYPARSE_PARAM;
-#endif
+# endif
 #else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
+# if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 int
 yyparse (Ftp *pContext)
-#else
+# else
 int
 yyparse (pContext)
     Ftp *pContext;
-#endif
+# endif
 #endif
 {
 /* The lookahead symbol.  */
diff --git a/myserver/src/protocol/http/dyn_http_command.cpp b/myserver/src/protocol/http/dyn_http_command.cpp
old mode 100755
new mode 100644
diff --git a/myserver/src/protocol/http/dyn_http_command_manager.cpp b/myserver/src/protocol/http/dyn_http_command_manager.cpp
old mode 100755
new mode 100644
diff --git a/myserver/src/protocol/http/dyn_http_manager.cpp b/myserver/src/protocol/http/dyn_http_manager.cpp
old mode 100755
new mode 100644
diff --git a/myserver/src/protocol/http/dyn_http_manager_list.cpp b/myserver/src/protocol/http/dyn_http_manager_list.cpp
old mode 100755
new mode 100644
diff --git a/myserver/src/protocol/http/env/env.cpp b/myserver/src/protocol/http/env/env.cpp
index 04478e0..aa5aaca 100644
--- a/myserver/src/protocol/http/env/env.cpp
+++ b/myserver/src/protocol/http/env/env.cpp
@@ -28,7 +28,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 extern "C" {
 #ifdef WIN32
-#include <direct.h>
+# include <direct.h>
 #endif
 #include <string.h>
 }
@@ -58,11 +58,11 @@ void Env::buildEnvironmentString(HttpThreadContext* td, char *cgiEnv,
 #ifdef WIN32
   memCgi << " (WIN32)";
 #else
-#ifdef HOST_STR
+# ifdef HOST_STR
   memCgi << " " << HOST_STR;
-#else
+# else
   memCgi << " (Unknown)";
-#endif
+# endif
 #endif
   /* Must use REDIRECT_STATUS for php and others.  */
   memCgi << end_str << "REDIRECT_STATUS=TRUE";
diff --git a/myserver/src/protocol/http/http_headers.cpp b/myserver/src/protocol/http/http_headers.cpp
old mode 100755
new mode 100644
diff --git a/myserver/src/protocol/http/http_request.cpp b/myserver/src/protocol/http/http_request.cpp
old mode 100755
new mode 100644
diff --git a/myserver/src/protocol/http/http_response.cpp b/myserver/src/protocol/http/http_response.cpp
old mode 100755
new mode 100644
diff --git a/myserver/src/protocol/http/http_thread_context.cpp b/myserver/src/protocol/http/http_thread_context.cpp
old mode 100755
new mode 100644
diff --git a/myserver/src/protocol/https/https.cpp b/myserver/src/protocol/https/https.cpp
old mode 100755
new mode 100644
index e066ff5..714d341
--- a/myserver/src/protocol/https/https.cpp
+++ b/myserver/src/protocol/https/https.cpp
@@ -21,12 +21,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 extern "C"
 {
 #ifdef WIN32
-#include <direct.h>
-#include <errno.h>
+# include <direct.h>
+# include <errno.h>
 #endif
 #ifndef WIN32
-#include <string.h>
-#include <errno.h>
+# include <string.h>
+# include <errno.h>
 #endif
 }
 
diff --git a/myserver/src/protocol/protocol.cpp b/myserver/src/protocol/protocol.cpp
old mode 100755
new mode 100644
diff --git a/myserver/src/protocol/protocols_manager.cpp b/myserver/src/protocol/protocols_manager.cpp
old mode 100755
new mode 100644
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index d627d46..491f32c 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -616,13 +616,13 @@ void Server::displayBoot ()
 
   if (logLocation.find ("console://") != string::npos)
     {
-#ifdef WIN32
+# ifdef WIN32
       _flushall();
       system ("cls");
-#else
+# else
       sync ();
       system ("clear");
-#endif
+# endif
     }
 
 #endif /* CLEAR_BOOT_SCREEN.  */
diff --git a/myserver/tests/test_log_manager.cpp b/myserver/tests/test_log_manager.cpp
index a7ac8bc..5036dd5 100644
--- a/myserver/tests/test_log_manager.cpp
+++ b/myserver/tests/test_log_manager.cpp
@@ -19,8 +19,8 @@
 #include <string>
 
 #ifndef WIN32
-#include <unistd.h>
-#include <sys/types.h>
+# include <unistd.h>
+# include <sys/types.h>
 #endif
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_socket.cpp b/myserver/tests/test_socket.cpp
index ebaaa7d..38b6282 100644
--- a/myserver/tests/test_socket.cpp
+++ b/myserver/tests/test_socket.cpp
@@ -27,8 +27,8 @@ extern "C"
 {
 #include <string.h>
 #ifndef WIN32
-#include <errno.h>
-#include <arpa/inet.h>
+# include <errno.h>
+# include <arpa/inet.h>
 #endif
 }
 #include <iostream>
diff --git a/myserver/tests/test_ssl_socket.cpp b/myserver/tests/test_ssl_socket.cpp
index b377db8..a93bc3a 100644
--- a/myserver/tests/test_ssl_socket.cpp
+++ b/myserver/tests/test_ssl_socket.cpp
@@ -32,8 +32,8 @@ extern "C"
 {
 #include <string.h>
 #ifndef WIN32
-#include <errno.h>
-#include <arpa/inet.h>
+# include <errno.h>
+# include <arpa/inet.h>
 #endif
 }
 
diff --git a/myserver/tests/test_unix_socket.cpp b/myserver/tests/test_unix_socket.cpp
index a8c289d..05327d4 100644
--- a/myserver/tests/test_unix_socket.cpp
+++ b/myserver/tests/test_unix_socket.cpp
@@ -29,7 +29,7 @@
 
 #ifdef AF_UNIX
 
-#define TEST_STRING "Hello World!"
+# define TEST_STRING "Hello World!"
 
 struct UnixSocketServerType
 {

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/base/base64/mime_utils.h          |    2 +-
 myserver/include/base/bitvec/bitvec.h              |    2 +-
 myserver/include/base/dynamic_lib/dynamiclib.h     |   18 +-
 myserver/include/base/file/file.h                  |   12 +-
 myserver/include/base/file/files_utility.h         |   10 +-
 myserver/include/base/files_cache/cached_file.h    |   12 +-
 .../include/base/files_cache/cached_file_buffer.h  |   12 +-
 .../include/base/files_cache/cached_file_factory.h |   22 +-
 myserver/include/base/hash_map/hash_map.h          |   14 +-
 myserver/include/base/home_dir/home_dir.h          |   20 +-
 myserver/include/base/md5/md5.h                    |    2 +-
 myserver/include/base/mem_buff/mem_buff.h          |   36 ++--
 myserver/include/base/multicast/multicast.h        |   12 +-
 myserver/include/base/pipe/pipe.h                  |   14 +-
 myserver/include/base/process/fork_server.h        |    2 +-
 myserver/include/base/process/process.h            |   18 +-
 .../include/base/process/process_server_manager.h  |   22 +-
 myserver/include/base/regex/myserver_regex.h       |    2 +-
 myserver/include/base/safetime/safetime.h          |   18 +-
 myserver/include/base/slab/slab.h                  |    2 +-
 myserver/include/base/socket/socket.h              |   58 ++--
 myserver/include/base/socket/ssl_socket.h          |   36 ++--
 myserver/include/base/socket_pair/socket_pair.h    |   10 +-
 myserver/include/base/ssl/ssl.h                    |    8 +-
 myserver/include/base/string/stringutils.h         |   18 +-
 myserver/include/base/sync/event.h                 |   16 +-
 myserver/include/base/sync/mutex.h                 |   14 +-
 myserver/include/base/sync/read_write_lock.h       |    6 +-
 myserver/include/base/sync/recursive_mutex.h       |    6 +-
 myserver/include/base/sync/semaphore.h             |   12 +-
 myserver/include/base/thread/thread.h              |   28 +-
 myserver/include/base/unix_socket/unix_socket.h    |   24 +-
 myserver/include/base/utility.h                    |   22 +-
 myserver/include/base/xml/xml_parser.h             |   20 +-
 myserver/include/conf/mime/mime_manager.h          |   42 ++--
 myserver/include/conf/nodetree.h                   |    4 +-
 myserver/include/conf/security/auth_domain.h       |    8 +-
 myserver/include/conf/security/auth_method.h       |    6 +-
 .../include/conf/security/auth_method_factory.h    |    8 +-
 myserver/include/conf/security/security_cache.h    |   18 +-
 myserver/include/conf/security/security_domain.h   |    6 +-
 myserver/include/conf/security/security_manager.h  |   16 +-
 myserver/include/conf/security/security_token.h    |   10 +-
 myserver/include/conf/security/validator.h         |   14 +-
 myserver/include/conf/security/validator_factory.h |    8 +-
 myserver/include/conf/security/xml_validator.h     |   18 +-
 myserver/include/conf/vhost/ip.h                   |    6 +-
 myserver/include/conf/vhost/vhost.h                |   38 ++--
 myserver/include/conf/vhost/vhost_manager.h        |    8 +-
 myserver/include/conf/xml_conf.h                   |   10 +-
 myserver/include/connection/connection.h           |   14 +-
 .../connections_scheduler/connections_scheduler.h  |   28 +-
 .../include/connections_scheduler/listen_threads.h |   12 +-
 myserver/include/filter/console.h                  |   14 +-
 myserver/include/filter/filter.h                   |    8 +-
 myserver/include/filter/filters_chain.h            |   12 +-
 myserver/include/filter/filters_factory.h          |   14 +-
 myserver/include/filter/gzip/gzip.h                |   20 +-
 myserver/include/filter/gzip/gzip_decompress.h     |   18 +-
 myserver/include/filter/memory_stream.h            |    8 +-
 myserver/include/filter/stream.h                   |   16 +-
 myserver/include/http_handler/cgi/cgi.h            |   10 +-
 myserver/include/http_handler/fastcgi/fastcgi.h    |   78 +++---
 myserver/include/http_handler/http_dir/http_dir.h  |   12 +-
 .../include/http_handler/http_file/http_file.h     |   10 +-
 myserver/include/http_handler/isapi/isapi.h        |  102 ++++----
 myserver/include/http_handler/mscgi/mscgi.h        |   22 +-
 .../include/http_handler/mscgi/mscgi_manager.h     |   32 +-
 myserver/include/http_handler/proxy/proxy.h        |   10 +-
 myserver/include/http_handler/scgi/scgi.h          |   32 +-
 myserver/include/http_handler/wincgi/wincgi.h      |   12 +-
 myserver/include/log/log_manager.h                 |   18 +-
 myserver/include/log/stream/console_stream.h       |   12 +-
 .../include/log/stream/console_stream_creator.h    |    6 +-
 myserver/include/log/stream/file_stream.h          |   18 +-
 myserver/include/log/stream/file_stream_creator.h  |    6 +-
 myserver/include/log/stream/log_stream.h           |   14 +-
 myserver/include/log/stream/log_stream_creator.h   |   10 +-
 myserver/include/log/stream/log_stream_factory.h   |   18 +-
 myserver/include/log/stream/socket_stream.h        |   10 +-
 .../include/log/stream/socket_stream_creator.h     |    8 +-
 myserver/include/plugin/plugin.h                   |   10 +-
 myserver/include/plugin/plugin_info.h              |   14 +-
 myserver/include/plugin/plugins_manager.h          |   14 +-
 myserver/include/protocol/control/control_errors.h |   22 +-
 myserver/include/protocol/control/control_header.h |    6 +-
 .../include/protocol/control/control_protocol.h    |   12 +-
 myserver/include/protocol/ftp/ftp.h                |   20 +-
 myserver/include/protocol/ftp/ftp_common.h         |    6 +-
 myserver/include/protocol/ftp/ftp_lexer.h          |  298 ++++++++++----------
 myserver/include/protocol/ftp/ftp_parser.h         |    4 +-
 myserver/include/protocol/http/dyn_http_command.h  |   18 +-
 .../protocol/http/dyn_http_command_manager.h       |   20 +-
 myserver/include/protocol/http/dyn_http_manager.h  |   20 +-
 .../include/protocol/http/dyn_http_manager_list.h  |   18 +-
 myserver/include/protocol/http/env/env.h           |   10 +-
 myserver/include/protocol/http/http.h              |   40 ++--
 myserver/include/protocol/http/http_data_handler.h |   12 +-
 myserver/include/protocol/http/http_data_read.h    |   36 ++--
 myserver/include/protocol/http/http_errors.h       |    6 +-
 myserver/include/protocol/http/http_header.h       |    2 +-
 myserver/include/protocol/http/http_headers.h      |   26 +-
 .../protocol/http/http_req_security_domain.h       |   10 +-
 myserver/include/protocol/http/http_request.h      |   18 +-
 myserver/include/protocol/http/http_response.h     |   34 ++--
 .../include/protocol/http/http_thread_context.h    |   38 ++--
 myserver/include/protocol/https/https.h            |    6 +-
 myserver/include/protocol/protocol.h               |   14 +-
 myserver/include/protocol/protocol_buffer.h        |    2 +-
 myserver/include/protocol/protocols_manager.h      |   20 +-
 myserver/include/protocol/url.h                    |    6 +-
 myserver/include/server/clients_thread.h           |   10 +-
 myserver/include/server/server.h                   |   84 +++---
 myserver/src/base/base64/mime_utils.cpp            |    2 +-
 myserver/src/base/dynamic_lib/dynamiclib.cpp       |    4 +-
 myserver/src/base/file/file.cpp                    |   40 ++--
 myserver/src/base/file/files_utility.cpp           |    4 +-
 myserver/src/base/home_dir/home_dir.cpp            |    8 +-
 myserver/src/base/md5/md5.cpp                      |   12 +-
 myserver/src/base/mem_buff/mem_buff.cpp            |    2 +-
 myserver/src/base/multicast/multicast.cpp          |    2 +-
 myserver/src/base/pipe/pipe.cpp                    |    6 +-
 myserver/src/base/process/fork_server.cpp          |    4 +-
 myserver/src/base/process/process.cpp              |   22 +-
 myserver/src/base/safetime/safetime.cpp            |   14 +-
 myserver/src/base/socket/socket.cpp                |   24 +-
 myserver/src/base/socket/ssl_socket.cpp            |   14 +-
 myserver/src/base/socket_pair/socket_pair.cpp      |   34 ++--
 myserver/src/base/string/stringutils.cpp           |    6 +-
 myserver/src/base/sync/event.cpp                   |   22 +-
 myserver/src/base/sync/mutex.cpp                   |   30 +-
 myserver/src/base/sync/recursive_mutex.cpp         |   18 +-
 myserver/src/base/sync/semaphore.cpp               |   10 +-
 myserver/src/base/xml/xml_parser.cpp               |    6 +-
 myserver/src/filter/stream.cpp                     |    2 +-
 myserver/src/myserver.cpp                          |   18 +-
 myserver/src/protocol/control/control_header.cpp   |    8 +-
 myserver/src/protocol/ftp/ftp_lexer.cpp            |  176 ++++++------
 myserver/src/protocol/ftp/ftp_parser.cpp           |   76 +++---
 myserver/src/protocol/http/env/env.cpp             |    8 +-
 myserver/src/protocol/https/https.cpp              |    8 +-
 myserver/src/server/server.cpp                     |    6 +-
 myserver/tests/test_log_manager.cpp                |    4 +-
 myserver/tests/test_socket.cpp                     |    4 +-
 myserver/tests/test_ssl_socket.cpp                 |    4 +-
 myserver/tests/test_unix_socket.cpp                |    2 +-
 146 files changed, 1405 insertions(+), 1405 deletions(-)
 mode change 100755 => 100644 myserver/include/base/home_dir/home_dir.h
 mode change 100755 => 100644 myserver/include/base/process/process.h
 mode change 100755 => 100644 myserver/include/base/string/securestr.h
 mode change 100755 => 100644 myserver/include/base/sync/event.h
 mode change 100755 => 100644 myserver/include/base/sync/mutex.h
 mode change 100755 => 100644 myserver/include/base/sync/read_write_lock.h
 mode change 100755 => 100644 myserver/include/base/sync/recursive_mutex.h
 mode change 100755 => 100644 myserver/include/base/sync/semaphore.h
 mode change 100755 => 100644 myserver/include/base/thread/thread.h
 mode change 100755 => 100644 myserver/include/filter/gzip/gzip.h
 mode change 100755 => 100644 myserver/include/filter/gzip/gzip_decompress.h
 mode change 100755 => 100644 myserver/include/plugin/plugin.h
 mode change 100755 => 100644 myserver/include/plugin/plugin_info.h
 mode change 100755 => 100644 myserver/include/plugin/plugins_manager.h
 mode change 100755 => 100644 myserver/include/protocol/control/control_errors.h
 mode change 100755 => 100644 myserver/include/protocol/control/control_header.h
 mode change 100755 => 100644 myserver/include/protocol/control/control_protocol.h
 mode change 100755 => 100644 myserver/include/protocol/ftp/ftp.h
 mode change 100755 => 100644 myserver/include/protocol/http/dyn_http_command.h
 mode change 100755 => 100644 myserver/include/protocol/http/dyn_http_command_manager.h
 mode change 100755 => 100644 myserver/include/protocol/http/dyn_http_manager.h
 mode change 100755 => 100644 myserver/include/protocol/http/dyn_http_manager_list.h
 mode change 100755 => 100644 myserver/include/protocol/http/http_headers.h
 mode change 100755 => 100644 myserver/include/protocol/http/http_thread_context.h
 mode change 100755 => 100644 myserver/include/protocol/https/https.h
 mode change 100755 => 100644 myserver/include/protocol/protocol.h
 mode change 100755 => 100644 myserver/include/protocol/protocols_manager.h
 mode change 100755 => 100644 myserver/src/base/home_dir/home_dir.cpp
 mode change 100755 => 100644 myserver/src/base/process/process.cpp
 mode change 100755 => 100644 myserver/src/base/sync/event.cpp
 mode change 100755 => 100644 myserver/src/base/sync/mutex.cpp
 mode change 100755 => 100644 myserver/src/base/sync/read_write_lock.cpp
 mode change 100755 => 100644 myserver/src/base/sync/recursive_mutex.cpp
 mode change 100755 => 100644 myserver/src/base/sync/semaphore.cpp
 mode change 100755 => 100644 myserver/src/base/thread/thread.cpp
 mode change 100755 => 100644 myserver/src/filter/gzip/gzip.cpp
 mode change 100755 => 100644 myserver/src/filter/gzip/gzip_decompress.cpp
 mode change 100755 => 100644 myserver/src/plugin/plugin.cpp
 mode change 100755 => 100644 myserver/src/plugin/plugin_info.cpp
 mode change 100755 => 100644 myserver/src/plugin/plugins_manager.cpp
 mode change 100755 => 100644 myserver/src/protocol/control/control_header.cpp
 mode change 100755 => 100644 myserver/src/protocol/control/control_protocol.cpp
 mode change 100755 => 100644 myserver/src/protocol/ftp/ftp.cpp
 mode change 100755 => 100644 myserver/src/protocol/http/dyn_http_command.cpp
 mode change 100755 => 100644 myserver/src/protocol/http/dyn_http_command_manager.cpp
 mode change 100755 => 100644 myserver/src/protocol/http/dyn_http_manager.cpp
 mode change 100755 => 100644 myserver/src/protocol/http/dyn_http_manager_list.cpp
 mode change 100755 => 100644 myserver/src/protocol/http/http_headers.cpp
 mode change 100755 => 100644 myserver/src/protocol/http/http_request.cpp
 mode change 100755 => 100644 myserver/src/protocol/http/http_response.cpp
 mode change 100755 => 100644 myserver/src/protocol/http/http_thread_context.cpp
 mode change 100755 => 100644 myserver/src/protocol/https/https.cpp
 mode change 100755 => 100644 myserver/src/protocol/protocol.cpp
 mode change 100755 => 100644 myserver/src/protocol/protocols_manager.cpp


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Mon Sep 21 17:35:28 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MpqXg-0000vA-Hx
	for mharc-myserver-commit@gnu.org; Mon, 21 Sep 2009 17:35:28 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MpqXd-0000tW-UC
	for myserver-commit@gnu.org; Mon, 21 Sep 2009 17:35:26 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MpqXZ-0000qc-U0
	for myserver-commit@gnu.org; Mon, 21 Sep 2009 17:35:24 -0400
Received: from [199.232.76.173] (port=47717 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MpqXZ-0000qZ-Ko
	for myserver-commit@gnu.org; Mon, 21 Sep 2009 17:35:21 -0400
Received: from savannah.gnu.org ([199.232.41.3]:55816 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <maarons@gnu.org>) id 1MpqXX-00006g-S8
	for myserver-commit@gnu.org; Mon, 21 Sep 2009 17:35:21 -0400
Received: from [10.0.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <maarons@gnu.org>) id 1MpqXX-0007Ug-Bf
	for myserver-commit@gnu.org; Mon, 21 Sep 2009 21:35:19 +0000
Received: from maarons by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <maarons@savannah.gnu.org>) id 1MpqXU-0007U4-W9
	for myserver-commit@gnu.org; Mon, 21 Sep 2009 21:35:19 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: fbbd04b9971c9082900bb42eead1603e49c2cabf
X-Git-Newrev: b18ca5038ef434b7591e98a45c2d70bb44a7c899
Message-Id: <E1MpqXU-0007U4-W9@cvs.savannah.gnu.org>
From: Marek Aaron Sapota <maarons@gnu.org>
Date: Mon, 21 Sep 2009 21:35:18 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. b18ca5038ef434b7591e98a45c2d70bb44a7c899
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 21 Sep 2009 21:35:27 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  b18ca5038ef434b7591e98a45c2d70bb44a7c899 (commit)
       via  3641026142fb24a045e924886ab62ffeec57bfff (commit)
       via  9fc46f18b4ef4ade688654312e367665d21d2151 (commit)
       via  73cbe627d301c9fe883087fd5041f125e9284d5e (commit)
      from  fbbd04b9971c9082900bb42eead1603e49c2cabf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit b18ca5038ef434b7591e98a45c2d70bb44a7c899
Merge: 3641026 fbbd04b
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Mon Sep 21 23:34:59 2009 +0200

    Merge branch 'master' of git.sv.gnu.org:/srv/git/myserver




commit 3641026142fb24a045e924886ab62ffeec57bfff
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Mon Sep 21 16:49:58 2009 +0200

    Added back images to menu bar.

diff --git a/myserver/src/GUI/MyServerControl b/myserver/src/GUI/MyServerControl
index 10c2f40..a5ebd1e 100755
--- a/myserver/src/GUI/MyServerControl
+++ b/myserver/src/GUI/MyServerControl
@@ -42,11 +42,20 @@ class PyGTKControl():
         self.statusbar = gtk.Statusbar()
         self.menubar = gtk.MenuBar()
 
+        class MenuItemWithStockImage(gtk.ImageMenuItem):
+            '''ImageMenuItem with custom label and stock image.'''
+            def __init__(self, label, stock_id):
+                '''label - text that will be shown in menu, stock_id - id of
+                stock image that will be used.'''
+                gtk.ImageMenuItem.__init__(self, label)
+                self.set_image(gtk.image_new_from_stock(
+                        stock_id, gtk.ICON_SIZE_MENU))
+
         file_menu_item = gtk.MenuItem('_File')
         self.menubar.append(file_menu_item)
         file_menu = gtk.Menu()
         file_menu_item.set_submenu(file_menu)
-        new_menu_item = gtk.MenuItem('New')
+        new_menu_item = gtk.ImageMenuItem(gtk.STOCK_NEW)
         file_menu.append(new_menu_item)
         new_menu = gtk.Menu()
         new_menu_item.set_submenu(new_menu)
@@ -62,7 +71,7 @@ class PyGTKControl():
         new_vhost_menu_item.connect('activate',
                                     self.on_new_vhost_menu_item_activate)
         new_menu.append(new_vhost_menu_item)
-        open_menu_item = gtk.MenuItem('Open')
+        open_menu_item = gtk.ImageMenuItem(gtk.STOCK_OPEN)
         file_menu.append(open_menu_item)
         open_menu = gtk.Menu()
         open_menu_item.set_submenu(open_menu)
@@ -78,7 +87,7 @@ class PyGTKControl():
         open_vhost_menu_item.connect('activate',
                                      self.on_open_vhost_menu_item_activate)
         open_menu.append(open_vhost_menu_item)
-        save_menu_item = gtk.MenuItem('Save')
+        save_menu_item = gtk.ImageMenuItem(gtk.STOCK_SAVE)
         file_menu.append(save_menu_item)
         save_menu = gtk.Menu()
         save_menu_item.set_submenu(save_menu)
@@ -94,7 +103,7 @@ class PyGTKControl():
         save_vhost_menu_item.connect('activate',
                                      self.on_save_vhost_menu_item_activate)
         save_menu.append(save_vhost_menu_item)
-        save_as_menu_item = gtk.MenuItem('Save as')
+        save_as_menu_item = gtk.ImageMenuItem(gtk.STOCK_SAVE_AS)
         file_menu.append(save_as_menu_item)
         save_as_menu = gtk.Menu()
         save_as_menu_item.set_submenu(save_as_menu)
@@ -112,7 +121,7 @@ class PyGTKControl():
         save_as_menu.append(save_as_vhost_menu_item)
         separator = gtk.SeparatorMenuItem()
         file_menu.append(separator)
-        quit_menu_item = gtk.MenuItem('Quit')
+        quit_menu_item = gtk.ImageMenuItem(gtk.STOCK_QUIT)
         quit_menu_item.connect('activate', self.on_quit_menu_item_activate)
         file_menu.append(quit_menu_item)
 
@@ -120,17 +129,17 @@ class PyGTKControl():
         self.menubar.append(remote_menu_item)
         remote_menu = gtk.Menu()
         remote_menu_item.set_submenu(remote_menu)
-        connect_menu_item = gtk.MenuItem('Connect')
+        connect_menu_item = gtk.ImageMenuItem(gtk.STOCK_CONNECT)
         connect_menu_item.connect('activate',
                                   self.on_connect_menu_item_activate)
         remote_menu.append(connect_menu_item)
-        disconnect_menu_item = gtk.MenuItem('Disconnect')
+        disconnect_menu_item = gtk.ImageMenuItem(gtk.STOCK_DISCONNECT)
         disconnect_menu_item.connect('activate',
                                      self.on_disconnect_menu_item_activate)
         remote_menu.append(disconnect_menu_item)
         separator = gtk.SeparatorMenuItem()
         remote_menu.append(separator)
-        get_menu_item = gtk.MenuItem('Get')
+        get_menu_item = MenuItemWithStockImage('Get', gtk.STOCK_GO_DOWN)
         remote_menu.append(get_menu_item)
         get_menu = gtk.Menu()
         get_menu_item.set_submenu(get_menu)
@@ -146,7 +155,7 @@ class PyGTKControl():
         get_vhost_menu_item.connect('activate',
                                     self.on_get_vhost_menu_item_activate)
         get_menu.append(get_vhost_menu_item)
-        put_menu_item = gtk.MenuItem('Put')
+        put_menu_item = MenuItemWithStockImage('Put', gtk.STOCK_GO_UP)
         remote_menu.append(put_menu_item)
         put_menu = gtk.Menu()
         put_menu_item.set_submenu(put_menu)
@@ -168,7 +177,7 @@ class PyGTKControl():
         definitions_menu = gtk.Menu()
         definitions_menu_item.set_submenu(definitions_menu)
         add_unknown_definition_menu_item = \
-            gtk.MenuItem('Add unknown definition')
+            MenuItemWithStockImage('Add unknown definition', gtk.STOCK_ADD)
         add_unknown_definition_menu_item.connect(
             'activate',
             self.on_add_unknown_definition_menu_item_activate)
@@ -178,17 +187,20 @@ class PyGTKControl():
         self.menubar.append(mime_types_menu_item)
         mime_types_menu = gtk.Menu()
         mime_types_menu_item.set_submenu(mime_types_menu)
-        add_mime_type_menu_item = gtk.MenuItem('Add MIME type')
+        add_mime_type_menu_item = MenuItemWithStockImage(
+            'Add MIME type', gtk.STOCK_ADD)
         add_mime_type_menu_item.connect(
             'activate',
             self.on_add_mime_type_menu_item_activate)
         mime_types_menu.append(add_mime_type_menu_item)
-        remove_mime_type_menu_item = gtk.MenuItem('Remove MIME type')
+        remove_mime_type_menu_item = MenuItemWithStockImage(
+            'Remove MIME type', gtk.STOCK_DELETE)
         remove_mime_type_menu_item.connect(
             'activate',
             self.on_remove_mime_type_menu_item_activate)
         mime_types_menu.append(remove_mime_type_menu_item)
-        add_definition_to_mime_menu_item = gtk.MenuItem('Add definition MIME type')
+        add_definition_to_mime_menu_item = MenuItemWithStockImage(
+            'Add definition MIME type', gtk.STOCK_ADD)
         add_definition_to_mime_menu_item.connect(
             'activate',
             self.on_add_definition_to_mime_menu_item_activate)
@@ -198,20 +210,24 @@ class PyGTKControl():
         self.menubar.append(vhost_menu_item)
         vhost_menu = gtk.Menu()
         vhost_menu_item.set_submenu(vhost_menu)
-        add_vhost_menu_item = gtk.MenuItem('Add VHost')
+        add_vhost_menu_item = MenuItemWithStockImage(
+            'Add VHost', gtk.STOCK_ADD)
         add_vhost_menu_item.connect('activate',
                                     self.on_add_vhost_menu_item_activate)
         vhost_menu.append(add_vhost_menu_item)
-        remove_vhost_menu_item = gtk.MenuItem('Remove VHost')
+        remove_vhost_menu_item = MenuItemWithStockImage(
+            'Remove VHost', gtk.STOCK_DELETE)
         remove_vhost_menu_item.connect('activate',
                                        self.on_remove_vhost_menu_item_activate)
         vhost_menu.append(remove_vhost_menu_item)
-        add_log_to_vhost_menu_item = gtk.MenuItem('Add log to VHost')
+        add_log_to_vhost_menu_item = MenuItemWithStockImage(
+            'Add log to VHost', gtk.STOCK_ADD)
         add_log_to_vhost_menu_item.connect(
             'activate',
             self.on_add_log_to_vhost_menu_item_activate)
         vhost_menu.append(add_log_to_vhost_menu_item)
-        remove_log_from_vhost_menu_item = gtk.MenuItem('Remove log from VHost')
+        remove_log_from_vhost_menu_item = MenuItemWithStockImage(
+            'Remove log from VHost', gtk.STOCK_DELETE)
         remove_log_from_vhost_menu_item.connect(
             'activate',
             self.on_remove_log_from_vhost_menu_item_activate)
@@ -221,17 +237,19 @@ class PyGTKControl():
         self.menubar.append(security_menu_item)
         security_menu = gtk.Menu()
         security_menu_item.set_submenu(security_menu)
-        save_security_menu_item = gtk.MenuItem('Save security')
+        save_security_menu_item = MenuItemWithStockImage(
+            'Save security', gtk.STOCK_SAVE)
         save_security_menu_item.connect(
             'activate',
             self.on_save_security_menu_item_activate)
         security_menu.append(save_security_menu_item)
 
-        help_menu_item = gtk.MenuItem('_Help')
+        help_menu_item = gtk.ImageMenuItem(gtk.STOCK_HELP)
+        help_menu_item.set_image(None)
         self.menubar.append(help_menu_item)
         help_menu = gtk.Menu()
         help_menu_item.set_submenu(help_menu)
-        about_menu_item = gtk.MenuItem('About')
+        about_menu_item = gtk.ImageMenuItem(gtk.STOCK_ABOUT)
         about_menu_item.connect('activate',
                                 self.on_about_menu_item_activate)
         help_menu.append(about_menu_item)



commit 9fc46f18b4ef4ade688654312e367665d21d2151
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Thu Sep 17 09:40:06 2009 +0200

    Glade isn't used at all.

diff --git a/myserver/src/GUI/Makefile.am b/myserver/src/GUI/Makefile.am
index 946f24d..e9c4d43 100644
--- a/myserver/src/GUI/Makefile.am
+++ b/myserver/src/GUI/Makefile.am
@@ -2,5 +2,5 @@ install:
 if BUILD_GUI
 	python setup.py install --prefix=${prefix}
 	mkdir -p ${bindir}
-	cp MyServerControl.py PyGTKControl.glade ${bindir}
+	cp MyServerControl.py ${bindir}
 endif
diff --git a/myserver/src/GUI/MyServer/GUI/AboutWindow.py b/myserver/src/GUI/MyServer/GUI/AboutWindow.py
index 252081f..2f2bb71 100644
--- a/myserver/src/GUI/MyServer/GUI/AboutWindow.py
+++ b/myserver/src/GUI/MyServer/GUI/AboutWindow.py
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-'''
+copyright_notice = '''
 MyServer
 Copyright (C) 2009 Free Software Foundation, Inc.
 This program is free software; you can redistribute it and/or modify
@@ -16,16 +16,697 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '''
 
+gpl_v3 = '''
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+'''
+
 import gtk
-import gtk.glade
 
 class About():
     '''GNU MyServer Control about window.'''
 
     def __init__(self):
-        self.gladefile = 'PyGTKControl.glade'
-        self.widgets = gtk.glade.XML(self.gladefile, 'aboutdialog')
-        self.widgets.signal_autoconnect(self)
+        self.window = gtk.AboutDialog()
+        self.window.connect('response', self.on_aboutdialog_response)
+        self.window.set_program_name('GNU MyServer Control')
+        self.window.set_version('v0.9')
+        self.window.set_copyright(copyright_notice)
+        self.window.set_license(gpl_v3)
+        self.window.set_website('http://www.gnu.org/software/myserver/')
+        self.window.show_all()
 
     def on_aboutdialog_response(self, widget, response):
         widget.destroy()
diff --git a/myserver/src/GUI/MyServer/GUI/ConnectionWindow.py b/myserver/src/GUI/MyServer/GUI/ConnectionWindow.py
index 16d4ddf..1635e30 100644
--- a/myserver/src/GUI/MyServer/GUI/ConnectionWindow.py
+++ b/myserver/src/GUI/MyServer/GUI/ConnectionWindow.py
@@ -17,29 +17,55 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '''
 
 import gtk
-import gtk.glade
+from MyServer.pycontrollib.controller import Controller
 
 class Connection():
-    def __init__(self):
-        self.gladefile = 'PyGTKControl.glade'
-        self.widgets = gtk.glade.XML(self.gladefile, 'connectiondialog')
-        self.widgets.signal_autoconnect(self)
+    def __init__(self, parent):
+        self.parent = parent
+        self.window = gtk.Dialog('Connect',
+                                 None,
+                                 gtk.DIALOG_MODAL | \
+                                     gtk.DIALOG_DESTROY_WITH_PARENT,
+                                 (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,
+                                  gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
+        self.host_label = gtk.Label('host:')
+        self.host_entry = gtk.Entry()
+        self.port_label = gtk.Label('port:')
+        self.port_entry = gtk.Entry()
+        self.username_label = gtk.Label('username:')
+        self.username_entry = gtk.Entry()
+        self.password_label = gtk.Label('password:')
+        self.password_entry = gtk.Entry()
+        table = gtk.Table(4, 2)
+        table.attach(self.host_label, 0, 1, 0, 1, gtk.FILL, gtk.FILL)
+        table.attach(self.host_entry, 1, 2, 0, 1, yoptions = gtk.FILL)
+        table.attach(self.port_label, 0, 1, 1, 2, gtk.FILL, gtk.FILL)
+        table.attach(self.port_entry, 1, 2, 1, 2, yoptions = gtk.FILL)
+        table.attach(self.username_label, 0, 1, 2, 3, gtk.FILL, gtk.FILL)
+        table.attach(self.username_entry, 1, 2, 2, 3, yoptions = gtk.FILL)
+        table.attach(self.password_label, 0, 1, 3, 4, gtk.FILL, gtk.FILL)
+        table.attach(self.password_entry, 1, 2, 3, 4, yoptions = gtk.FILL)
+        self.window.vbox.pack_start(table)
+        self.window.connect('response', self.on_connectiondialog_response)
+        self.window.show_all()
+        self.window.run()
 
-    def destroy(self):
-        '''Destroys this widget.'''
-        self.widgets.get_widget('connectiondialog').destroy()
-
-    def on_cancel_button_clicked(self, widget):
-        self.destroy()
+    def on_connectiondialog_response(self, widget, response):
+        if response == gtk.RESPONSE_ACCEPT:
+            self.parent.controller = Controller(
+                self.get_host(), self.get_port(),
+                self.get_username(), self.get_password())
+            self.parent.controller.connect()
+        self.window.destroy()
 
     def get_host(self):
-        return self.widgets.get_widget('host_entry').get_text()
+        return self.host_entry.get_text()
 
     def get_port(self):
-        return self.widgets.get_widget('port_entry').get_text()
+        return self.port_entry.get_text()
 
     def get_username(self):
-        return self.widgets.get_widget('username_entry').get_text()
+        return self.username_entry.get_text()
 
     def get_password(self):
-        return self.widgets.get_widget('password_entry').get_text()
+        return self.password_entry.get_text()
diff --git a/myserver/src/GUI/MyServerControl b/myserver/src/GUI/MyServerControl
index c689ca4..10c2f40 100755
--- a/myserver/src/GUI/MyServerControl
+++ b/myserver/src/GUI/MyServerControl
@@ -23,7 +23,6 @@ import os
 import sys
 from MyServer.pycontrollib.config import MyServerConfig
 from MyServer.pycontrollib.mimetypes import MIMETypes
-from MyServer.pycontrollib.controller import Controller
 from MyServer.pycontrollib.vhost import VHosts
 from MyServer.GUI import GUIConfig
 from MyServer.GUI.AboutWindow import About
@@ -276,15 +275,7 @@ class PyGTKControl():
 
     def on_connect_menu_item_activate(self, widget):
         '''Show connection dialog.'''
-        dialog = Connection()
-        def connect(widget):
-            self.controller = Controller(
-                dialog.get_host(), dialog.get_port(),
-                dialog.get_username(), dialog.get_password())
-            self.controller.connect()
-            dialog.destroy()
-        dialog.widgets.get_widget('ok_button').connect('clicked', connect)
-        dialog.widgets.get_widget('connectiondialog').show()
+        dialog = Connection(self)
 
     def on_disconnect_menu_item_activate(self, widget):
         '''Disconnect from server.'''
diff --git a/myserver/src/GUI/PyGTKControl.glade b/myserver/src/GUI/PyGTKControl.glade
deleted file mode 100644
index fb843a0..0000000
--- a/myserver/src/GUI/PyGTKControl.glade
+++ /dev/null
@@ -1,1436 +0,0 @@
-<?xml version="1.0"?>
-<glade-interface>
-  <!-- interface-requires gtk+ 2.16 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkWindow" id="window">
-    <property name="visible">True</property>
-    <signal name="destroy" handler="on_window_destroy"/>
-    <child>
-      <widget class="GtkVBox" id="vbox1">
-        <property name="visible">True</property>
-        <property name="orientation">vertical</property>
-        <child>
-          <widget class="GtkMenuBar" id="menubar">
-            <property name="visible">True</property>
-            <child>
-              <widget class="GtkMenuItem" id="file_menu_item">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_File</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="file_menu">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="new_menu_item">
-                        <property name="label">New</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <child>
-                          <widget class="GtkMenu" id="new_menu">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkMenuItem" id="new_config_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">New server configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_new_config_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="new_mime_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">New MIME configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_new_mime_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="new_vhost_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">New VHost configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_new_vhost_menu_item_activate"/>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="new_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-new</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="open_menu_item">
-                        <property name="label">Open</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <child>
-                          <widget class="GtkMenu" id="open_menu">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkMenuItem" id="open_config_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Open server configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_open_config_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="open_mime_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Open MIME configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_open_mime_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="open_vhost_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Open VHost configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_open_vhost_menu_item_activate"/>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="open_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-open</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="save_menu_item">
-                        <property name="label">Save</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <child>
-                          <widget class="GtkMenu" id="save_menu">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkMenuItem" id="save_config_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Save server configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_save_config_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="save_mime_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Save MIME configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_save_mime_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="save_vhost_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Save VHost configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_save_vhost_menu_item_activate"/>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="save_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-save</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="save_as_menu_item">
-                        <property name="label">Save as</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <child>
-                          <widget class="GtkMenu" id="save_as_menu">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkMenuItem" id="save_as_config_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Save server configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_save_as_config_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="save_as_mime_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Save MIME configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_save_as_mime_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="save_as_vhost_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Save VHost configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_save_as_vhost_menu_item_activate"/>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="save_as_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-save-as</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkSeparatorMenuItem" id="separator1">
-                        <property name="visible">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="quit_menu_item">
-                        <property name="label">gtk-quit</property>
-                        <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="on_quit_menu_item_activate"/>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="remote_menu_item">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Remote</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="remote_menu">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="connect_menu_item">
-                        <property name="label">gtk-connect</property>
-                        <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="on_connect_menu_item_activate"/>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="disconnect_menu_item">
-                        <property name="label">gtk-disconnect</property>
-                        <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="on_disconnect_menu_item_activate"/>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkSeparatorMenuItem" id="separator2">
-                        <property name="visible">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="get_menu_item">
-                        <property name="label">Get</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <child>
-                          <widget class="GtkMenu" id="get_menu">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkMenuItem" id="get_config_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Get server configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_get_config_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="get_mime_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Get MIME configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_get_mime_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="get_vhost_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Get VHost configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_get_vhost_menu_item_activate"/>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="get_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-go-down</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="put_menu_item">
-                        <property name="label">Put</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <child>
-                          <widget class="GtkMenu" id="put_menu">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkMenuItem" id="put_config_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Put server configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_put_config_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="put_mime_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Put MIME configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_put_mime_menu_item_activate"/>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkMenuItem" id="put_vhost_menu_item">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Put VHost configuration</property>
-                                <property name="use_underline">True</property>
-                                <signal name="activate" handler="on_put_vhost_menu_item_activate"/>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="put_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-redo</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="definitions_menu_item">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Definitions</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="definitions_menu">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="add_unknown_definition_menu_item">
-                        <property name="label">Add unknown definition</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_add_unknown_definition_menu_item_activate"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="add_unknown_definition_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-add</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="mime_types_menu_item">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_MIME Types</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="mime_types_menu">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="add_mime_type_menu_item">
-                        <property name="label">Add MIME type</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_add_mime_type_menu_item_activate"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="add_mime_type_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-add</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="remove_mime_type_menu_item">
-                        <property name="label">Remove MIME type</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_remove_mime_type_menu_item_activate"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="remove_mime_type_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-remove</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="add_definition_to_mime_menu_item">
-                        <property name="label">Add definition to MIME type</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_add_definition_to_mime_menu_item_activate"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="add_definition_to_mime_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-add</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="vhost_menu_item">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_VHosts</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="vhost_menu">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="add_vhost_menu_item">
-                        <property name="label">Add VHost</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_add_vhost_menu_item_activate"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="add_vhost_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-add</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="remove_vhost_menu_item">
-                        <property name="label">Remove VHost</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_remove_vhost_menu_item_activate"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="remove_vhost_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-remove</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="add_log_to_vhost_menu_item">
-                        <property name="label">Add log to VHost</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_add_log_to_vhost_menu_item_activate"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="add_log_to_vhost_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-add</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="remove_log_from_vhost_menu_item">
-                        <property name="label">Remove log from VHost</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_remove_log_from_vhost_menu_item_activate"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="remove_log_from_vhost_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-remove</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="security_menu_item">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Security</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="security_menu">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="save_security_menu_item">
-                        <property name="label">Save security</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="on_save_security_menu_item_activate"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="save_security_image">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-save</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="help_menu_item">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">_Help</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="help_menu">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="about_menu_item">
-                        <property name="label">gtk-about</property>
-                        <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="on_about_menu_item_activate"/>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkNotebook" id="notebook">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkStatusbar" id="statusbar">
-            <property name="visible">True</property>
-            <property name="spacing">2</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkAboutDialog" id="aboutdialog">
-    <property name="visible">True</property>
-    <property name="border_width">5</property>
-    <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
-    <property name="program_name">GNU MyServer Control</property>
-    <property name="version">v0.0</property>
-    <property name="copyright" translatable="yes">Copyright (C) 2009 Free Software Foundation, Inc.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.</property>
-    <property name="website">http://www.gnu.org/software/myserver/</property>
-    <property name="license">                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. &lt;http://fsf.org/&gt;
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
-  To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-  Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    &lt;one line to give the program's name and a brief idea of what it does.&gt;
-    Copyright (C) &lt;year&gt;  &lt;name of author&gt;
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    &lt;program&gt;  Copyright (C) &lt;year&gt;  &lt;name of author&gt;
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-&lt;http://www.gnu.org/licenses/&gt;.
-
-  The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-&lt;http://www.gnu.org/philosophy/why-not-lgpl.html&gt;.
-</property>
-    <signal name="response" handler="on_aboutdialog_response"/>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox">
-        <property name="visible">True</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">2</property>
-        <child>
-          <placeholder/>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkDialog" id="connectiondialog">
-    <property name="border_width">5</property>
-    <property name="type_hint">normal</property>
-    <property name="has_separator">False</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox">
-        <property name="visible">True</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkTable" id="table">
-            <property name="visible">True</property>
-            <property name="n_rows">4</property>
-            <property name="n_columns">2</property>
-            <child>
-              <widget class="GtkLabel" id="host_label">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">host</property>
-              </widget>
-              <packing>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="port_label">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">port</property>
-              </widget>
-              <packing>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="username_label">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">username</property>
-              </widget>
-              <packing>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="password_label">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">password</property>
-              </widget>
-              <packing>
-                <property name="top_attach">3</property>
-                <property name="bottom_attach">4</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkEntry" id="host_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">&#x25CF;</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkEntry" id="port_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">&#x25CF;</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">1</property>
-                <property name="bottom_attach">2</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkEntry" id="username_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">&#x25CF;</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkEntry" id="password_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="invisible_char">&#x25CF;</property>
-              </widget>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="right_attach">2</property>
-                <property name="top_attach">3</property>
-                <property name="bottom_attach">4</property>
-                <property name="y_options">GTK_FILL</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <widget class="GtkButton" id="cancel_button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-                <signal name="clicked" handler="on_cancel_button_clicked"/>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="ok_button">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-                <signal name="clicked" handler="on_ok_button_clicked"/>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>



commit 73cbe627d301c9fe883087fd5041f125e9284d5e
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Wed Sep 16 18:54:11 2009 +0200

    Removed main window's dependency on Glade.

diff --git a/myserver/src/GUI/MyServerControl b/myserver/src/GUI/MyServerControl
index 54dcc16..c689ca4 100755
--- a/myserver/src/GUI/MyServerControl
+++ b/myserver/src/GUI/MyServerControl
@@ -17,9 +17,7 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '''
 
-from __future__ import print_function
 import gtk
-import gtk.glade
 import gobject
 import os
 import sys
@@ -40,9 +38,213 @@ class PyGTKControl():
     '''GNU MyServer Control main window.'''
 
     def __init__(self):
-        self.gladefile = os.path.join(os.path.dirname(sys.argv[0]), 'PyGTKControl.glade')
-        self.widgets = gtk.glade.XML(self.gladefile, 'window')
-        self.widgets.signal_autoconnect(self)
+        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
+        self.notebook = gtk.Notebook()
+        self.statusbar = gtk.Statusbar()
+        self.menubar = gtk.MenuBar()
+
+        file_menu_item = gtk.MenuItem('_File')
+        self.menubar.append(file_menu_item)
+        file_menu = gtk.Menu()
+        file_menu_item.set_submenu(file_menu)
+        new_menu_item = gtk.MenuItem('New')
+        file_menu.append(new_menu_item)
+        new_menu = gtk.Menu()
+        new_menu_item.set_submenu(new_menu)
+        new_config_menu_item = gtk.MenuItem('New server configuration')
+        new_config_menu_item.connect('activate',
+                                     self.on_new_config_menu_item_activate)
+        new_menu.append(new_config_menu_item)
+        new_mime_menu_item = gtk.MenuItem('New MIME configuration')
+        new_mime_menu_item.connect('activate',
+                                   self.on_new_mime_menu_item_activate)
+        new_menu.append(new_mime_menu_item)
+        new_vhost_menu_item = gtk.MenuItem('New VHost configuration')
+        new_vhost_menu_item.connect('activate',
+                                    self.on_new_vhost_menu_item_activate)
+        new_menu.append(new_vhost_menu_item)
+        open_menu_item = gtk.MenuItem('Open')
+        file_menu.append(open_menu_item)
+        open_menu = gtk.Menu()
+        open_menu_item.set_submenu(open_menu)
+        open_config_menu_item = gtk.MenuItem('Open server configuration')
+        open_config_menu_item.connect('activate',
+                                      self.on_open_config_menu_item_activate)
+        open_menu.append(open_config_menu_item)
+        open_mime_menu_item = gtk.MenuItem('Open MIME configuration')
+        open_mime_menu_item.connect('activate',
+                                    self.on_open_mime_menu_item_activate)
+        open_menu.append(open_mime_menu_item)
+        open_vhost_menu_item = gtk.MenuItem('Open VHost configuration')
+        open_vhost_menu_item.connect('activate',
+                                     self.on_open_vhost_menu_item_activate)
+        open_menu.append(open_vhost_menu_item)
+        save_menu_item = gtk.MenuItem('Save')
+        file_menu.append(save_menu_item)
+        save_menu = gtk.Menu()
+        save_menu_item.set_submenu(save_menu)
+        save_config_menu_item = gtk.MenuItem('Save server configuration')
+        save_config_menu_item.connect('activate',
+                                      self.on_save_config_menu_item_activate)
+        save_menu.append(save_config_menu_item)
+        save_mime_menu_item = gtk.MenuItem('Save MIME configuration')
+        save_mime_menu_item.connect('activate',
+                                    self.on_save_mime_menu_item_activate)
+        save_menu.append(save_mime_menu_item)
+        save_vhost_menu_item = gtk.MenuItem('Save VHost configuration')
+        save_vhost_menu_item.connect('activate',
+                                     self.on_save_vhost_menu_item_activate)
+        save_menu.append(save_vhost_menu_item)
+        save_as_menu_item = gtk.MenuItem('Save as')
+        file_menu.append(save_as_menu_item)
+        save_as_menu = gtk.Menu()
+        save_as_menu_item.set_submenu(save_as_menu)
+        save_as_config_menu_item = gtk.MenuItem('Save server configuration')
+        save_as_config_menu_item.connect('activate',
+                                         self.on_save_as_config_menu_item_activate)
+        save_as_menu.append(save_as_config_menu_item)
+        save_as_mime_menu_item = gtk.MenuItem('Save MIME configuration')
+        save_as_mime_menu_item.connect('activate',
+                                       self.on_save_as_mime_menu_item_activate)
+        save_as_menu.append(save_as_mime_menu_item)
+        save_as_vhost_menu_item = gtk.MenuItem('Save VHost configuration')
+        save_as_vhost_menu_item.connect('activate',
+                                        self.on_save_as_vhost_menu_item_activate)
+        save_as_menu.append(save_as_vhost_menu_item)
+        separator = gtk.SeparatorMenuItem()
+        file_menu.append(separator)
+        quit_menu_item = gtk.MenuItem('Quit')
+        quit_menu_item.connect('activate', self.on_quit_menu_item_activate)
+        file_menu.append(quit_menu_item)
+
+        remote_menu_item = gtk.MenuItem('_Remote')
+        self.menubar.append(remote_menu_item)
+        remote_menu = gtk.Menu()
+        remote_menu_item.set_submenu(remote_menu)
+        connect_menu_item = gtk.MenuItem('Connect')
+        connect_menu_item.connect('activate',
+                                  self.on_connect_menu_item_activate)
+        remote_menu.append(connect_menu_item)
+        disconnect_menu_item = gtk.MenuItem('Disconnect')
+        disconnect_menu_item.connect('activate',
+                                     self.on_disconnect_menu_item_activate)
+        remote_menu.append(disconnect_menu_item)
+        separator = gtk.SeparatorMenuItem()
+        remote_menu.append(separator)
+        get_menu_item = gtk.MenuItem('Get')
+        remote_menu.append(get_menu_item)
+        get_menu = gtk.Menu()
+        get_menu_item.set_submenu(get_menu)
+        get_config_menu_item = gtk.MenuItem('Get server configuration')
+        get_config_menu_item.connect('activate',
+                                     self.on_get_config_menu_item_activate)
+        get_menu.append(get_config_menu_item)
+        get_mime_menu_item = gtk.MenuItem('Get MIME configuration')
+        get_mime_menu_item.connect('activate',
+                                   self.on_get_mime_menu_item_activate)
+        get_menu.append(get_mime_menu_item)
+        get_vhost_menu_item = gtk.MenuItem('Get VHost configuration')
+        get_vhost_menu_item.connect('activate',
+                                    self.on_get_vhost_menu_item_activate)
+        get_menu.append(get_vhost_menu_item)
+        put_menu_item = gtk.MenuItem('Put')
+        remote_menu.append(put_menu_item)
+        put_menu = gtk.Menu()
+        put_menu_item.set_submenu(put_menu)
+        put_config_menu_item = gtk.MenuItem('Put server configuration')
+        put_config_menu_item.connect('activate',
+                                     self.on_put_config_menu_item_activate)
+        put_menu.append(put_config_menu_item)
+        put_mime_menu_item = gtk.MenuItem('Put MIME configuration')
+        put_mime_menu_item.connect('activate',
+                                   self.on_put_mime_menu_item_activate)
+        put_menu.append(put_mime_menu_item)
+        put_vhost_menu_item = gtk.MenuItem('Put VHost configuration')
+        put_vhost_menu_item.connect('activate',
+                                    self.on_put_vhost_menu_item_activate)
+        put_menu.append(put_vhost_menu_item)
+
+        definitions_menu_item = gtk.MenuItem('_Definitions')
+        self.menubar.append(definitions_menu_item)
+        definitions_menu = gtk.Menu()
+        definitions_menu_item.set_submenu(definitions_menu)
+        add_unknown_definition_menu_item = \
+            gtk.MenuItem('Add unknown definition')
+        add_unknown_definition_menu_item.connect(
+            'activate',
+            self.on_add_unknown_definition_menu_item_activate)
+        definitions_menu.append(add_unknown_definition_menu_item)
+
+        mime_types_menu_item = gtk.MenuItem('_MIME types')
+        self.menubar.append(mime_types_menu_item)
+        mime_types_menu = gtk.Menu()
+        mime_types_menu_item.set_submenu(mime_types_menu)
+        add_mime_type_menu_item = gtk.MenuItem('Add MIME type')
+        add_mime_type_menu_item.connect(
+            'activate',
+            self.on_add_mime_type_menu_item_activate)
+        mime_types_menu.append(add_mime_type_menu_item)
+        remove_mime_type_menu_item = gtk.MenuItem('Remove MIME type')
+        remove_mime_type_menu_item.connect(
+            'activate',
+            self.on_remove_mime_type_menu_item_activate)
+        mime_types_menu.append(remove_mime_type_menu_item)
+        add_definition_to_mime_menu_item = gtk.MenuItem('Add definition MIME type')
+        add_definition_to_mime_menu_item.connect(
+            'activate',
+            self.on_add_definition_to_mime_menu_item_activate)
+        mime_types_menu.append(add_definition_to_mime_menu_item)
+
+        vhost_menu_item = gtk.MenuItem('_VHosts')
+        self.menubar.append(vhost_menu_item)
+        vhost_menu = gtk.Menu()
+        vhost_menu_item.set_submenu(vhost_menu)
+        add_vhost_menu_item = gtk.MenuItem('Add VHost')
+        add_vhost_menu_item.connect('activate',
+                                    self.on_add_vhost_menu_item_activate)
+        vhost_menu.append(add_vhost_menu_item)
+        remove_vhost_menu_item = gtk.MenuItem('Remove VHost')
+        remove_vhost_menu_item.connect('activate',
+                                       self.on_remove_vhost_menu_item_activate)
+        vhost_menu.append(remove_vhost_menu_item)
+        add_log_to_vhost_menu_item = gtk.MenuItem('Add log to VHost')
+        add_log_to_vhost_menu_item.connect(
+            'activate',
+            self.on_add_log_to_vhost_menu_item_activate)
+        vhost_menu.append(add_log_to_vhost_menu_item)
+        remove_log_from_vhost_menu_item = gtk.MenuItem('Remove log from VHost')
+        remove_log_from_vhost_menu_item.connect(
+            'activate',
+            self.on_remove_log_from_vhost_menu_item_activate)
+        vhost_menu.append(remove_log_from_vhost_menu_item)
+
+        security_menu_item = gtk.MenuItem('_Security')
+        self.menubar.append(security_menu_item)
+        security_menu = gtk.Menu()
+        security_menu_item.set_submenu(security_menu)
+        save_security_menu_item = gtk.MenuItem('Save security')
+        save_security_menu_item.connect(
+            'activate',
+            self.on_save_security_menu_item_activate)
+        security_menu.append(save_security_menu_item)
+
+        help_menu_item = gtk.MenuItem('_Help')
+        self.menubar.append(help_menu_item)
+        help_menu = gtk.Menu()
+        help_menu_item.set_submenu(help_menu)
+        about_menu_item = gtk.MenuItem('About')
+        about_menu_item.connect('activate',
+                                self.on_about_menu_item_activate)
+        help_menu.append(about_menu_item)
+
+        box = gtk.VBox()
+        box.pack_end(self.statusbar)
+        box.pack_end(self.notebook)
+        box.pack_end(self.menubar)
+        self.window.add(box)
+
+        self.window.connect('destroy', self.on_window_destroy)
+
         self.construct_options()
         self.construct_mime()
         self.construct_vhosts()
@@ -58,6 +260,8 @@ class PyGTKControl():
         self.vhost_custom_attrib = {}
         self.controller = None
 
+        self.window.show_all()
+
     def on_window_destroy(self, widget):
         '''Exits program.'''
         gtk.main_quit()
@@ -397,11 +601,10 @@ class PyGTKControl():
                 tree_model.append(None, (option, tooltip_text, True, False, '',
                                          False, {}, ))
 
-            self.widgets.get_widget('notebook').append_page(
-                panels, gtk.Label(tab))
+            self.notebook.append_page(panels, gtk.Label(tab))
 
         self.on_new_config_menu_item_activate()
-        self.widgets.get_widget('notebook').show_all()
+        self.notebook.show_all()
 
     def construct_mime(self):
         '''Reads mime options from file and prepares GUI.'''
@@ -424,10 +627,9 @@ class PyGTKControl():
         vpanels.pack1(panels)
 
         self.mime_tab = ((table, tree, ), (def_table, def_tree), )
-        self.widgets.get_widget('notebook').append_page(
-            vpanels, gtk.Label('MIME Type'))
+        self.notebook.append_page(vpanels, gtk.Label('MIME Type'))
 
-        self.widgets.get_widget('notebook').show_all()
+        self.notebook.show_all()
 
     def construct_vhosts(self):
         '''Reads vhost options from file and prepares GUI.'''
@@ -438,10 +640,9 @@ class PyGTKControl():
         panels.pack2(table.scroll, True, False)
 
         self.vhost_tab = (table, tree, )
-        self.widgets.get_widget('notebook').append_page(
-            panels, gtk.Label('VHosts'))
+        self.notebook.append_page(panels, gtk.Label('VHosts'))
 
-        self.widgets.get_widget('notebook').show_all()
+        self.notebook.show_all()
 
     def construct_browser(self):
         '''Constructs file browser.'''
@@ -451,10 +652,9 @@ class PyGTKControl():
         self.browser_table = BrowserTable(self.security_table.read_from_file)
         panels.pack1(self.browser_table, True, False)
         
-        self.widgets.get_widget('notebook').append_page(
-            panels, gtk.Label('File browser'))
+        self.notebook.append_page(panels, gtk.Label('File browser'))
 
-        self.widgets.get_widget('notebook').show_all()
+        self.notebook.show_all()
 
     def on_save_security_menu_item_activate(self, widget):
         self.security_table.write_to_file(

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/GUI/Makefile.am                      |    2 +-
 myserver/src/GUI/MyServer/GUI/AboutWindow.py      |  691 ++++++++++-
 myserver/src/GUI/MyServer/GUI/ConnectionWindow.py |   56 +-
 myserver/src/GUI/MyServerControl                  |  263 ++++-
 myserver/src/GUI/PyGTKControl.glade               | 1436 ---------------------
 5 files changed, 964 insertions(+), 1484 deletions(-)
 delete mode 100644 myserver/src/GUI/PyGTKControl.glade


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Sep 25 12:43:17 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MrDt6-000142-UB
	for mharc-myserver-commit@gnu.org; Fri, 25 Sep 2009 12:43:17 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MrDt5-00013H-IU
	for myserver-commit@gnu.org; Fri, 25 Sep 2009 12:43:15 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MrDt4-000129-CM
	for myserver-commit@gnu.org; Fri, 25 Sep 2009 12:43:14 -0400
Received: from [199.232.76.173] (port=56134 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MrDt4-00011y-4n
	for myserver-commit@gnu.org; Fri, 25 Sep 2009 12:43:14 -0400
Received: from savannah.gnu.org ([199.232.41.3]:52289 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MrDt3-0000Xv-Ey
	for myserver-commit@gnu.org; Fri, 25 Sep 2009 12:43:13 -0400
Received: from [10.0.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MrDt2-0008Mj-Po
	for myserver-commit@gnu.org; Fri, 25 Sep 2009 16:43:12 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MrDt0-0008M8-V9
	for myserver-commit@gnu.org; Fri, 25 Sep 2009 16:43:12 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: b18ca5038ef434b7591e98a45c2d70bb44a7c899
X-Git-Newrev: 45e9429f80e9c33f15bd5a914863fe28f6fb8c70
Message-Id: <E1MrDt0-0008M8-V9@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Fri, 25 Sep 2009 16:43:12 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 45e9429f80e9c33f15bd5a914863fe28f6fb8c70
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 25 Sep 2009 16:43:15 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  45e9429f80e9c33f15bd5a914863fe28f6fb8c70 (commit)
       via  1d7834daa745078dbcfc1777a90298fe210e336f (commit)
       via  204bed30d22e4d7334aaba0377223ae863541bc5 (commit)
      from  b18ca5038ef434b7591e98a45c2d70bb44a7c899 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 45e9429f80e9c33f15bd5a914863fe28f6fb8c70
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Sep 25 15:58:21 2009 +0200

    Remove unused method from the Server class.

diff --git a/myserver/include/server/server.h b/myserver/include/server/server.h
index 742c7a1..4bead7b 100644
--- a/myserver/include/server/server.h
+++ b/myserver/include/server/server.h
@@ -138,7 +138,6 @@ public:
   {return log (str.c_str());};
   int setLogLocation (string);
   u_long getBuffersize ();
-  u_long getBuffersize2 ();
   u_long getThrottlingRate ();
   int waitNewConnection (u_long tid, u_long timeout);
   ListenThreads *getListenThreads (){return &listenThreads;}
diff --git a/myserver/src/server/clients_thread.cpp b/myserver/src/server/clients_thread.cpp
index e191201..8fcecb9 100644
--- a/myserver/src/server/clients_thread.cpp
+++ b/myserver/src/server/clients_thread.cpp
@@ -137,8 +137,7 @@ DEFINE_THREAD(clients_thread, pParam)
 
   ct->threadIsRunning = true;
   ct->threadIsStopped = false;
-  ct->buffersize = ct->server->getBuffersize ();
-  ct->secondaryBufferSize = ct->server->getBuffersize2 ();
+  ct->buffersize = ct->secondaryBufferSize = ct->server->getBuffersize ();
 
   ct->buffer.setLength (ct->buffersize);
   ct->buffer.m_nSizeLimit = ct->buffersize;
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 927dfa1..383474e 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -1882,14 +1882,6 @@ u_long Server::getBuffersize ()
 }
 
 /*!
- *Get the size for the second buffer.
- */
-u_long Server::getBuffersize2 ()
-{
-  return secondaryBufferSize;
-}
-
-/*!
  * Set a global descriptor.
  */
 void Server::setGlobalData (const char* name, void* data)



commit 1d7834daa745078dbcfc1777a90298fe210e336f
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Sep 25 15:57:46 2009 +0200

    Allow definition of NodeTree in the security and in the MIME configuration files

diff --git a/myserver/include/conf/mime/mime_manager.h b/myserver/include/conf/mime/mime_manager.h
index d38c38d..1c7a724 100644
--- a/myserver/include/conf/mime/mime_manager.h
+++ b/myserver/include/conf/mime/mime_manager.h
@@ -24,7 +24,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 # include <include/base/sync/mutex.h>
 # include <include/base/xml/xml_parser.h>
 # include <include/base/regex/myserver_regex.h>
-
+# include <include/conf/nodetree.h>
 
 # ifdef WIN32
 #  include <windows.h>
@@ -58,28 +58,29 @@ struct PathRegex
 
 struct MimeRecord
 {
-	list<string> filters;
-	list<string> extensions;
-	string mimeType;
-	string cmdName;
-	string cgiManager;
+  list<string> filters;
+  list<string> extensions;
+  string mimeType;
+  string cmdName;
+  string cgiManager;
   bool selfExecuted;
   list<Regex*> pathRegex;
-  HashMap<string, string*> hashedData;
+  HashMap<string, NodeTree<string>*> hashedData;
 
-	MimeRecord ();
-	MimeRecord (MimeRecord&);
-	int addFilter (const char*, bool acceptDuplicate = true);
-	~MimeRecord ();
-	void clear ();
+  MimeRecord ();
+  MimeRecord (MimeRecord&);
+  int addFilter (const char*, bool acceptDuplicate = true);
+  ~MimeRecord ();
+  void clear ();
   const char* getData(string &name);
+  NodeTree<string>* getNodeTree (string &name);
 };
 
 
 class MimeManagerHandler
 {
 public:
-	virtual MimeRecord* getMIME (const char *file){return NULL;}
+  virtual MimeRecord* getMIME (const char *file){return NULL;}
   virtual MimeRecord* getMIME (string const &file)
   {return getMIME (file.c_str ());}
 };
@@ -87,28 +88,28 @@ public:
 class MimeManager
 {
 public:
-	MimeManager ();
+  MimeManager ();
   ~MimeManager ();
-	u_long getNumMIMELoaded ();
+  u_long getNumMIMELoaded ();
 
   u_long loadXML (XmlParser* parser);
-	u_long loadXML (const char *filename);
-	u_long loadXML (string &filename) {return loadXML (filename.c_str ());}
+  u_long loadXML (const char *filename);
+  u_long loadXML (string &filename) {return loadXML (filename.c_str ());}
 
-	MimeRecord* getMIME (const char *file, const char *handler = NULL);
+  MimeRecord* getMIME (const char *file, const char *handler = NULL);
   MimeRecord* getMIME (string const &file, const char *handler = NULL);
 
   bool isLoaded ();
-	void clean ();
-	int addRecord (MimeRecord *record);
+  void clean ();
+  int addRecord (MimeRecord *record);
 
   static MimeRecord *readRecord (xmlNodePtr node);
 
   void registerHandler (string &name, MimeManagerHandler *handler);
 
 protected:
-	const char *getFilename ();
-	void clearRecords ();
+  const char *getFilename ();
+  void clearRecords ();
 
 private:
   HashMap<string, MimeManagerHandler*> handlers;
@@ -117,8 +118,8 @@ private:
   vector<MimeRecord*> records;
   list<PathRegex*> pathRegex;
 
-	u_long numMimeTypesLoaded;
-	string filename;
+  u_long numMimeTypesLoaded;
+  string filename;
 };
 
 #endif
diff --git a/myserver/include/conf/security/security_token.h b/myserver/include/conf/security/security_token.h
index 1d03b2d..07f75d0 100644
--- a/myserver/include/conf/security/security_token.h
+++ b/myserver/include/conf/security/security_token.h
@@ -54,7 +54,6 @@ public:
   const char* getData (const char* name, int domains, const char *def = NULL);
   NodeTree<string>* getNodeTree (string& key, int domains, NodeTree<string>* def = NULL);
 
-
   string& getUser ()
   {
     return user;
@@ -65,7 +64,7 @@ public:
     return password;
   }
 
-	HashMap<string,string*>* getValues ()
+  HashMap<string, NodeTree<string>*>* getValues ()
   {
     return &values;
   }
@@ -224,7 +223,7 @@ private:
   int providedMask;
 
   /*! Stored values.  */
-	HashMap<string,string*> values;
+  HashMap<string, NodeTree<string>*> values;
 
   /*! If it is true the security manager will use the cached values.  */
   bool done;
diff --git a/myserver/src/conf/mime/mime_manager.cpp b/myserver/src/conf/mime/mime_manager.cpp
index a680c1a..a29d68f 100644
--- a/myserver/src/conf/mime/mime_manager.cpp
+++ b/myserver/src/conf/mime/mime_manager.cpp
@@ -116,25 +116,30 @@ void MimeRecord::clear ()
     delete *it;
   }
 
-  HashMap<string, string*>::Iterator it = hashedData.begin ();
+  HashMap<string, NodeTree<string>*>::Iterator it = hashedData.begin ();
   for (;it != hashedData.end (); it++)
-  {
     delete (*it);
-  }
   hashedData.clear ();
 
-
   pathRegex.clear ();
 }
 
 /*!
+ * Get the node tree stored in the hash dictionary for the `name' key.
+ */
+NodeTree<string>* MimeRecord::getNodeTree (string &name)
+{
+  return hashedData.get (name);
+}
+
+/*!
  * Get the value stored in the hash dictionary for the `name' key.
  */
 const char* MimeRecord::getData(string &name)
 {
-  string *str = hashedData.get (name);
+  NodeTree<string> *str = hashedData.get (name);
   if (str)
-    return str->c_str ();
+    return str->getValue ()->c_str ();
 
   return NULL;
 }
@@ -207,8 +212,9 @@ MimeRecord *MimeManager::readRecord (xmlNodePtr node)
       if (name && value)
       {
         string key (name);
-        string *v = new string (value);
-        rc->hashedData.put(key, v);
+	string val (value);
+	NodeTree<string> *nt = new NodeTree<string> (val);
+        rc->hashedData.put(key, nt);
       }
 
     }
diff --git a/myserver/src/conf/security/security_token.cpp b/myserver/src/conf/security/security_token.cpp
index b9af5c8..ffcf5d0 100644
--- a/myserver/src/conf/security/security_token.cpp
+++ b/myserver/src/conf/security/security_token.cpp
@@ -47,10 +47,12 @@ void SecurityToken::reset ()
   directory = NULL;
   sysdirectory = NULL;
   resource = NULL;
-
+  HashMap<string, NodeTree<string>*>::Iterator it = values.begin ();
+  for (;it != values.end (); it++)
+    delete (*it);
+  values.clear ();
 }
 
-
 /*!
  *Get the value for the variable using the specified domains.
  *\param key Variable name.
@@ -63,14 +65,13 @@ void SecurityToken::reset ()
  */
 NodeTree<string>* SecurityToken::getNodeTree (string& key, int domains, NodeTree<string>* def)
 {
-/*
   if (domains & MYSERVER_SECURITY_CONF)
   {
     string strName (key);
     NodeTree<string>* ret = values.get (strName);
 
     if (ret)
-      return ret->c_str ();
+      return ret;
   }
 
   if (mimeRecord && (domains & MYSERVER_MIME_CONF))
@@ -81,7 +82,7 @@ NodeTree<string>* SecurityToken::getNodeTree (string& key, int domains, NodeTree
     if (ret)
       return ret;
   }
-*/
+
   if (vhost && (domains & MYSERVER_VHOST_CONF))
   {
     NodeTree<string>* ret = vhost->getNodeTree (key);
@@ -117,10 +118,10 @@ const char* SecurityToken::getData (const char* name, int domains, const char *d
   if (domains & MYSERVER_SECURITY_CONF)
   {
     string strName (name);
-    string *ret = values.get (strName);
+    NodeTree<string> *ret = values.get (strName);
 
     if (ret)
-      return ret->c_str ();
+      return ret->getValue ()->c_str ();
   }
 
   if (mimeRecord && (domains & MYSERVER_MIME_CONF))
diff --git a/myserver/src/conf/security/xml_validator.cpp b/myserver/src/conf/security/xml_validator.cpp
index 5db26f0..a5fe690 100644
--- a/myserver/src/conf/security/xml_validator.cpp
+++ b/myserver/src/conf/security/xml_validator.cpp
@@ -371,9 +371,9 @@ void XmlValidator::doDefine (xmlNodePtr node, SecurityToken *st, HashMap<string,
   if (!value)
     return;
 
-  string *valStr = new string ((const char *)value);
-
-  string *old = st->getValues ()->put (name, valStr);
+  string valStr ((const char*)value);
+  NodeTree<string> *nt = new NodeTree<string> (valStr);
+  NodeTree<string> *old = st->getValues ()->put (name, nt);
 
   if (old)
     delete old;



commit 204bed30d22e4d7334aaba0377223ae863541bc5
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Sep 25 15:21:49 2009 +0200

    Move the XmlValidator definition inside the Server class.

diff --git a/myserver/include/server/server.h b/myserver/include/server/server.h
index 4a5b80e..742c7a1 100644
--- a/myserver/include/server/server.h
+++ b/myserver/include/server/server.h
@@ -64,6 +64,8 @@ unsigned int __stdcall listenServer(void* pParam);
 void* listenServer(void* pParam);
 # endif
 
+class XmlValidator;
+
 class Server : public MulticastRegistry<string, void*, int>
 {
 public:
@@ -165,6 +167,7 @@ public:
   XmlParser *getXmlConfiguration ();
 private:
   friend class ClientsThread;
+  XmlValidator *xmlValidator;
 
   XmlParser configurationFileManager;
 
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 491f32c..927dfa1 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -90,6 +90,7 @@ Server::Server () : connectionsScheduler (this),
   purgeThreadsThreshold = 1;
   freeThreads = 0;
   logManager = new LogManager (&filtersFactory);
+  xmlValidator = new XmlValidator ();
   initLogManager ();
   connectionsPoolLock.init ();
 }
@@ -258,6 +259,9 @@ Server::~Server ()
     delete externalPath;
   externalPath = 0;
 
+  if (xmlValidator)
+    delete xmlValidator;
+
   if (path)
     delete path;
   path = 0;
@@ -441,11 +445,9 @@ int Server::postLoad ()
 void Server::loadPlugins ()
 {
   string xml ("xml");
-  //FIXME: xmlV is never freed.
-  XmlValidator *xmlV = new XmlValidator ();
 
-  validatorFactory.addValidator (xml, xmlV);
-  authMethodFactory.addAuthMethod (xml, (AuthMethod*) xmlV);
+  validatorFactory.addValidator (xml, xmlValidator);
+  authMethodFactory.addAuthMethod (xml, (AuthMethod*) xmlValidator);
 
   if (filtersFactory.insert ("gzip", Gzip::factory))
     log (MYSERVER_LOG_MSG_ERROR, _("Error while loading plugins"));

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/conf/mime/mime_manager.h       |   49 ++++++++++++-----------
 myserver/include/conf/security/security_token.h |    5 +-
 myserver/include/server/server.h                |    4 +-
 myserver/src/conf/mime/mime_manager.cpp         |   22 ++++++----
 myserver/src/conf/security/security_token.cpp   |   15 ++++---
 myserver/src/conf/security/xml_validator.cpp    |    6 +-
 myserver/src/server/clients_thread.cpp          |    3 +-
 myserver/src/server/server.cpp                  |   18 +++------
 8 files changed, 62 insertions(+), 60 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Sep 25 16:31:08 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MrHRb-0002ND-PI
	for mharc-myserver-commit@gnu.org; Fri, 25 Sep 2009 16:31:07 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MrHRZ-0002Ls-9c
	for myserver-commit@gnu.org; Fri, 25 Sep 2009 16:31:05 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MrHRY-0002L7-Dn
	for myserver-commit@gnu.org; Fri, 25 Sep 2009 16:31:04 -0400
Received: from [199.232.76.173] (port=39010 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MrHRY-0002Ku-80
	for myserver-commit@gnu.org; Fri, 25 Sep 2009 16:31:04 -0400
Received: from savannah.gnu.org ([199.232.41.3]:53275 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MrHRX-0002uj-U2
	for myserver-commit@gnu.org; Fri, 25 Sep 2009 16:31:04 -0400
Received: from [10.0.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MrHRX-0002NT-72
	for myserver-commit@gnu.org; Fri, 25 Sep 2009 20:31:03 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MrHRU-0002N0-FK
	for myserver-commit@gnu.org; Fri, 25 Sep 2009 20:31:03 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 45e9429f80e9c33f15bd5a914863fe28f6fb8c70
X-Git-Newrev: 01a174502a9a888210f32a33b10abc2d51b120d7
Message-Id: <E1MrHRU-0002N0-FK@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Fri, 25 Sep 2009 20:31:02 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 01a174502a9a888210f32a33b10abc2d51b120d7
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 25 Sep 2009 20:31:05 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  01a174502a9a888210f32a33b10abc2d51b120d7 (commit)
      from  45e9429f80e9c33f15bd5a914863fe28f6fb8c70 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 01a174502a9a888210f32a33b10abc2d51b120d7
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Sep 25 22:30:01 2009 +0200

    Prevent a deadlock when logging to the main server log from the `LogManager' class.

diff --git a/myserver/include/log/log_manager.h b/myserver/include/log/log_manager.h
index 869e812..218b2c9 100644
--- a/myserver/include/log/log_manager.h
+++ b/myserver/include/log/log_manager.h
@@ -96,7 +96,6 @@ private:
   int add (const void *owner, string type, string location, LogStream* ls);
   int computeNewLine ();
   void associateLoggingLevelsWithNames ();
-  int log (const string &, LoggingLevel);
 
   LoggingLevel level;
   Mutex* mutex;
diff --git a/myserver/src/log/log_manager.cpp b/myserver/src/log/log_manager.cpp
index 3a9a02a..0558311 100644
--- a/myserver/src/log/log_manager.cpp
+++ b/myserver/src/log/log_manager.cpp
@@ -114,32 +114,33 @@ LogManager::add (const void *owner, string type, string location,
           failure = add (owner) || add (owner, type) ||
             add (owner, type, location, ls);
         }
+      mutex->unlock ();
+      return failure;
     }
-  else
-    {
-      int oldSize;
-      int newSize;
-      ostringstream oss;
 
-      oldSize = logStreamOwners[location].size ();
-      if (!containsOwner (owner))
-        {
-          failure = add (owner) || add (owner, type) ||
-            add (owner, type, location, logStreams[location]);
-        }
-      else if (!contains (owner, type))
-        {
-          failure = add (owner, type) ||
-            add (owner, type, location, logStreams[location]);
-        }
-      newSize = logStreamOwners[location].size ();
-      if (!failure && newSize > oldSize)
-        {
-          oss << "Warning: \'" << location << "\' shared between " << newSize << " objects.";
-          log (oss.str (), MYSERVER_LOG_MSG_WARNING);
-        }
+  int oldSize;
+  int newSize;
+  ostringstream oss;
+
+  oldSize = logStreamOwners[location].size ();
+  if (!containsOwner (owner))
+    {
+      failure = add (owner) || add (owner, type) ||
+        add (owner, type, location, logStreams[location]);
+    }
+  else if (!contains (owner, type))
+    {
+      failure = add (owner, type) ||
+        add (owner, type, location, logStreams[location]);
     }
+  newSize = logStreamOwners[location].size ();
+
   mutex->unlock ();
+
+  if (!failure && newSize > oldSize && Server::getInstance ())
+    return Server::getInstance ()->log (MYSERVER_LOG_MSG_WARNING,
+                                     _("The %s log is shared among %i objects"),
+                                        location.c_str (), newSize);
   return failure;
 }
 
@@ -1113,23 +1114,6 @@ LogManager::getOwnersList (string location, list<const void*>* l)
 }
 
 /*!
- * Write a message on the main MyServer log.
- *
- * \param msg The message to write.
- * \param l The message logging level.
- *
- * \return 0 on success, 1 on error.
- */
-int
-LogManager::log (const string & msg, LoggingLevel l)
-{
-  if (Server::getInstance ())
-    return Server::getInstance ()->log (msg.c_str (), l);
-
-  return 1;
-}
-
-/*!
  * \return a list of strings each representing one of logging levels that
  * MyServer understands.
  */
@@ -1139,9 +1123,8 @@ LogManager::getLoggingLevelsByNames ()
   list<string> l;
   for (map<LoggingLevel, string>::iterator it = loggingLevels.begin ();
        it != loggingLevels.end (); it++)
-    {
       l.push_back (it->second);
-    }
+
   return l;
 }
 

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/log/log_manager.h |    1 -
 myserver/src/log/log_manager.cpp   |   65 +++++++++++++----------------------
 2 files changed, 24 insertions(+), 42 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Sep 25 18:57:39 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MrJjP-0006kZ-6Z
	for mharc-myserver-commit@gnu.org; Fri, 25 Sep 2009 18:57:39 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MrJjN-0006kU-DA
	for myserver-commit@gnu.org; Fri, 25 Sep 2009 18:57:37 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MrJjL-0006kI-Uk
	for myserver-commit@gnu.org; Fri, 25 Sep 2009 18:57:36 -0400
Received: from [199.232.76.173] (port=43300 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MrJjL-0006kF-Q1
	for myserver-commit@gnu.org; Fri, 25 Sep 2009 18:57:35 -0400
Received: from savannah.gnu.org ([199.232.41.3]:35649 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MrJjL-0002xW-DU
	for myserver-commit@gnu.org; Fri, 25 Sep 2009 18:57:35 -0400
Received: from [10.0.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MrJjK-0002Tp-Tx
	for myserver-commit@gnu.org; Fri, 25 Sep 2009 22:57:35 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MrJjH-0002T8-R8
	for myserver-commit@gnu.org; Fri, 25 Sep 2009 22:57:34 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 01a174502a9a888210f32a33b10abc2d51b120d7
X-Git-Newrev: 5b8d3e1e3625554a873b5aacd6aa587fb1bb8860
Message-Id: <E1MrJjH-0002T8-R8@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Fri, 25 Sep 2009 22:57:34 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 5b8d3e1e3625554a873b5aacd6aa587fb1bb8860
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 25 Sep 2009 22:57:37 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  5b8d3e1e3625554a873b5aacd6aa587fb1bb8860 (commit)
       via  82cfc3d5fbace45927f79de0a35333b387c478a7 (commit)
      from  01a174502a9a888210f32a33b10abc2d51b120d7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 5b8d3e1e3625554a873b5aacd6aa587fb1bb8860
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Sep 26 00:56:26 2009 +0200

    Remove some obsoleted macro definitions.

diff --git a/myserver/stdafx.h b/myserver/stdafx.h
index 187319d..b0b969e 100644
--- a/myserver/stdafx.h
+++ b/myserver/stdafx.h
@@ -56,20 +56,10 @@ extern "C"
 #endif
 }
 
-#ifndef MAX_PATH
-# ifdef PATH_MAX
-#  define MAX_PATH PATH_MAX
-# else
-#  define MAX_PATH 255
-# endif
-#endif
-
 #ifndef HOST_NAME_MAX
 # define HOST_NAME_MAX 255
 #endif
 
-#define USE_NEW
-
 typedef unsigned long DWORD;
 typedef unsigned int u_int;
 typedef unsigned long u_long;



commit 82cfc3d5fbace45927f79de0a35333b387c478a7
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Sep 26 00:45:26 2009 +0200

    `Vhost::accessesLogWrite' appends a newline character.

diff --git a/myserver/src/conf/vhost/vhost.cpp b/myserver/src/conf/vhost/vhost.cpp
index 83fb370..2444164 100644
--- a/myserver/src/conf/vhost/vhost.cpp
+++ b/myserver/src/conf/vhost/vhost.cpp
@@ -368,7 +368,7 @@ Vhost::accessesLogWrite (const char* fmt, ...)
   va_list argptr;
   va_start (argptr, fmt);
   int ret = logManager->log (this, accessLogType, MYSERVER_LOG_MSG_INFO, false,
-                             false, fmt, argptr);
+                             true, fmt, argptr);
   va_end (argptr);
   return ret;
 }
diff --git a/myserver/src/protocol/control/control_protocol.cpp b/myserver/src/protocol/control/control_protocol.cpp
index f90b6a1..51e2aa6 100644
--- a/myserver/src/protocol/control/control_protocol.cpp
+++ b/myserver/src/protocol/control/control_protocol.cpp
@@ -538,9 +538,9 @@ int ControlProtocol::addToLog (int retCode, ConnectionPtr con, char *b1,
 #else
   sprintf(b1,
 #endif
-  "%s [%s] %s:%s:%s - %s  - %i\r\n", con->getIpAddr (), time.c_str (),
-  header.getCommand (),  header.getVersion (), header.getOptions (),
-  header.getAuthLogin () , retCode);
+  "%s [%s] %s:%s:%s - %s - %i", con->getIpAddr (), time.c_str (),
+          header.getCommand (),  header.getVersion (), header.getOptions (),
+          header.getAuthLogin (), retCode);
   con->host->accessesLogWrite ("%s", b1);
   return 0;
 }
diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index fa98a2c..ec6a914 100644
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -450,13 +450,7 @@ void Ftp::logAccess (int nReplyCode, const std::string & sCustomText)
   td.secondaryBuffer->setLength (0);
   *td.secondaryBuffer << time
     << " " << td.pConnection->getIpAddr ()
-    << " " << msgCode << " " << sCustomText;
-
-#ifdef WIN32
-  *td.secondaryBuffer << "\r\n" << end_str;
-#else
-  *td.secondaryBuffer << "\n" << end_str;
-#endif
+    << " " << msgCode << " " << sCustomText << end_str;
 
   if (td.pConnection->host)
     td.pConnection->host->accessesLogWrite ("%s", td.secondaryBuffer->getBuffer ());
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index bb96053..7c8c164 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -750,11 +750,9 @@ int Http::logHTTPaccess ()
             *td->secondaryBuffer << " " << (referer ? referer->value->c_str () : "")
             << " " << (userAgent ? userAgent->value->c_str () : "");
         }
-#ifdef WIN32
-      *td->secondaryBuffer << "\r\n" << end_str;
-#else
-      *td->secondaryBuffer << "\n" << end_str;
-#endif
+
+      *td->secondaryBuffer << end_str;
+
       /*!
        * Request the access to the log file then append the message.
        */

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/conf/vhost/vhost.cpp                  |    2 +-
 myserver/src/protocol/control/control_protocol.cpp |    6 +++---
 myserver/src/protocol/ftp/ftp.cpp                  |    8 +-------
 myserver/src/protocol/http/http.cpp                |    8 +++-----
 myserver/stdafx.h                                  |   10 ----------
 5 files changed, 8 insertions(+), 26 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sat Sep 26 11:04:38 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MrYpC-0006ap-Cz
	for mharc-myserver-commit@gnu.org; Sat, 26 Sep 2009 11:04:38 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MrYp9-0006V8-6M
	for myserver-commit@gnu.org; Sat, 26 Sep 2009 11:04:35 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MrYp6-0006RN-Q2
	for myserver-commit@gnu.org; Sat, 26 Sep 2009 11:04:33 -0400
Received: from [199.232.76.173] (port=33343 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MrYp6-0006R8-Hb
	for myserver-commit@gnu.org; Sat, 26 Sep 2009 11:04:32 -0400
Received: from savannah.gnu.org ([199.232.41.3]:56923 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <maarons@gnu.org>) id 1MrYp5-0003DN-LZ
	for myserver-commit@gnu.org; Sat, 26 Sep 2009 11:04:32 -0400
Received: from [10.0.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <maarons@gnu.org>) id 1MrYp5-0000SK-4u
	for myserver-commit@gnu.org; Sat, 26 Sep 2009 15:04:31 +0000
Received: from maarons by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <maarons@savannah.gnu.org>) id 1MrYp2-0000RX-NM
	for myserver-commit@gnu.org; Sat, 26 Sep 2009 15:04:31 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 5b8d3e1e3625554a873b5aacd6aa587fb1bb8860
X-Git-Newrev: 41ff453f65e602d4cf87cc433556236b6acb217b
Message-Id: <E1MrYp2-0000RX-NM@cvs.savannah.gnu.org>
From: Marek Aaron Sapota <maarons@gnu.org>
Date: Sat, 26 Sep 2009 15:04:30 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 41ff453f65e602d4cf87cc433556236b6acb217b
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 26 Sep 2009 15:04:35 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  41ff453f65e602d4cf87cc433556236b6acb217b (commit)
       via  475f2236dfaded807e834d6155c8fbffd059ea4d (commit)
      from  5b8d3e1e3625554a873b5aacd6aa587fb1bb8860 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 41ff453f65e602d4cf87cc433556236b6acb217b
Merge: 475f223 5b8d3e1
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Sep 26 17:04:22 2009 +0200

    Merge branch 'master' of git.sv.gnu.org:/srv/git/myserver




commit 475f2236dfaded807e834d6155c8fbffd059ea4d
Author: Marek Aaron Sapota <maarons@gnu.org>
Date:   Sat Sep 26 17:02:35 2009 +0200

    About dialog in GUI uses COPYING and version files.
    
    About dialog in GUI uses COPYING and version files to get license and
    MyServer version.

diff --git a/myserver/src/GUI/Makefile.am b/myserver/src/GUI/Makefile.am
index e9c4d43..b8761d1 100644
--- a/myserver/src/GUI/Makefile.am
+++ b/myserver/src/GUI/Makefile.am
@@ -1,6 +1,6 @@
 install:
 if BUILD_GUI
-	python setup.py install --prefix=${prefix}
-	mkdir -p ${bindir}
-	cp MyServerControl.py ${bindir}
+	cp ../../COPYING MyServer/GUI/
+	cp ../../version MyServer/GUI/
+	python setup.py install --prefix=${prefix} --install-scripts=${bindir}
 endif
diff --git a/myserver/src/GUI/MyServer/GUI/AboutWindow.py b/myserver/src/GUI/MyServer/GUI/AboutWindow.py
index 2f2bb71..64376f1 100644
--- a/myserver/src/GUI/MyServer/GUI/AboutWindow.py
+++ b/myserver/src/GUI/MyServer/GUI/AboutWindow.py
@@ -16,685 +16,14 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '''
 
-gpl_v3 = '''
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
-  To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-  Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    <program>  Copyright (C) <year>  <name of author>
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
-  The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
-'''
-
+import os
 import gtk
 
+with open(os.path.join(os.path.dirname(__file__), 'COPYING')) as file:
+    gpl_v3 = file.read()
+with open(os.path.join(os.path.dirname(__file__), 'version')) as file:
+    version = 'v' + file.read()
+
 class About():
     '''GNU MyServer Control about window.'''
 
@@ -702,7 +31,7 @@ class About():
         self.window = gtk.AboutDialog()
         self.window.connect('response', self.on_aboutdialog_response)
         self.window.set_program_name('GNU MyServer Control')
-        self.window.set_version('v0.9')
+        self.window.set_version(version)
         self.window.set_copyright(copyright_notice)
         self.window.set_license(gpl_v3)
         self.window.set_website('http://www.gnu.org/software/myserver/')
diff --git a/myserver/src/GUI/setup.py b/myserver/src/GUI/setup.py
index f327e72..3d720ea 100644
--- a/myserver/src/GUI/setup.py
+++ b/myserver/src/GUI/setup.py
@@ -17,6 +17,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '''
 
 from distutils.core import setup
-setup(name = 'MyServer', version = '0.0',
+
+with open('../../version') as file:
+    version = file.read()
+
+setup(name = 'MyServer', version = version,
+      scripts = ['MyServerControl'],
       py_modules = ['MyServer.__init__'],
-      packages = ['MyServer/pycontrol', 'MyServer/pycontrollib', 'MyServer.GUI'])
+      packages = ['MyServer.pycontrol', 'MyServer.pycontrollib', 'MyServer.GUI'],
+      package_data = {'': ['COPYING', 'version']})

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/GUI/Makefile.am                 |    6 +-
 myserver/src/GUI/MyServer/GUI/AboutWindow.py |  685 +-------------------------
 myserver/src/GUI/setup.py                    |   10 +-
 3 files changed, 18 insertions(+), 683 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sat Sep 26 16:42:59 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Mre6d-0000cY-M1
	for mharc-myserver-commit@gnu.org; Sat, 26 Sep 2009 16:42:59 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Mre6c-0000cR-AI
	for myserver-commit@gnu.org; Sat, 26 Sep 2009 16:42:58 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Mre6b-0000cF-HN
	for myserver-commit@gnu.org; Sat, 26 Sep 2009 16:42:58 -0400
Received: from [199.232.76.173] (port=44777 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Mre6b-0000cC-CL
	for myserver-commit@gnu.org; Sat, 26 Sep 2009 16:42:57 -0400
Received: from savannah.gnu.org ([199.232.41.3]:51379 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1Mre6a-0001bb-Sz
	for myserver-commit@gnu.org; Sat, 26 Sep 2009 16:42:57 -0400
Received: from [10.0.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Mre6a-0003vE-B7
	for myserver-commit@gnu.org; Sat, 26 Sep 2009 20:42:56 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1Mre6X-0003uj-DS
	for myserver-commit@gnu.org; Sat, 26 Sep 2009 20:42:56 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 41ff453f65e602d4cf87cc433556236b6acb217b
X-Git-Newrev: c1a004a4dbe93748127a1bcf09b265cca2dab034
Message-Id: <E1Mre6X-0003uj-DS@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sat, 26 Sep 2009 20:42:55 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. c1a004a4dbe93748127a1bcf09b265cca2dab034
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 26 Sep 2009 20:42:58 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  c1a004a4dbe93748127a1bcf09b265cca2dab034 (commit)
      from  41ff453f65e602d4cf87cc433556236b6acb217b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit c1a004a4dbe93748127a1bcf09b265cca2dab034
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Sep 26 22:42:15 2009 +0200

    Remove some members from the `HttpResponseHeader' struct, leaving their definitions in the hash map.

diff --git a/myserver/include/protocol/http/http_response.h b/myserver/include/protocol/http/http_response.h
index bc6b901..579f801 100644
--- a/myserver/include/protocol/http/http_response.h
+++ b/myserver/include/protocol/http/http_response.h
@@ -1,7 +1,7 @@
 /* -*- mode: c++ -*- */
 /*
 MyServer
-Copyright (C) 2002, 2003, 2004, 2008 Free Software Foundation, Inc.
+Copyright (C) 2002, 2003, 2004, 2008, 2009 Free Software Foundation, Inc.
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 3 of the License, or
@@ -84,15 +84,10 @@ struct HttpResponseHeader : public HttpHeader
 	string serverName;
 	string contentType;
 	string connection;
-	string mimeVer;
 	string cookie;
 	string contentLength;
 	string errorType;
-	string lastModified;
-	string location;
-	string date;
-	string dateExp;
-	string auth;
+
 	HashMap<string,HttpResponseHeader::Entry*> other;
   HttpResponseHeader();
   ~HttpResponseHeader();
diff --git a/myserver/src/http_handler/fastcgi/fastcgi.cpp b/myserver/src/http_handler/fastcgi/fastcgi.cpp
index 12aef47..59b929b 100644
--- a/myserver/src/http_handler/fastcgi/fastcgi.cpp
+++ b/myserver/src/http_handler/fastcgi/fastcgi.cpp
@@ -751,12 +751,13 @@ int FastCgi::handleHeader (FcgiContext* con, FiltersChain* chain, bool* response
 
   if(!con->td->appendOutputs)
   {
-    if(con->td->response.location[0])
-    {
-      *responseCompleted = true;
-      con->td->http->sendHTTPRedirect((char*)con->td->response.location.c_str());
-      return 0;
-    }
+    string *location = con->td->response.getValue ("Location", NULL);
+    if (location)
+      {
+        *responseCompleted = true;
+        con->td->http->sendHTTPRedirect (location->c_str ());
+        return 0;
+      }
 
     u_long hdrLen = HttpHeaders::buildHTTPResponseHeader(con->td->secondaryBuffer->getBuffer(),
                                                          &con->td->response);
diff --git a/myserver/src/http_handler/http_file/http_file.cpp b/myserver/src/http_handler/http_file/http_file.cpp
index 98047fe..cc82bd4 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -261,13 +261,13 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
       return td->http->raiseHTTPError(500);
 
     getRFC822GMTTime (lastMT, tmpTime, HTTP_RESPONSE_LAST_MODIFIED_DIM);
-    td->response.lastModified.assign (tmpTime);
+    td->response.setValue ("Last-Modified", tmpTime.c_str ());
 
     HttpRequestHeader::Entry *ifModifiedSince =
       td->request.other.get ("Last-Modified");
 
     if (ifModifiedSince && ifModifiedSince->value->length () &&
-       !ifModifiedSince->value->compare(td->response.lastModified.c_str ()))
+        !ifModifiedSince->value->compare (tmpTime))
       return td->http->sendHTTPNonModified ();
 
     file = Server::getInstance ()->getCachedFiles ()->open (filenamePath);
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 7c8c164..02cb972 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -1424,9 +1424,6 @@ int Http::raiseHTTPError (int ID)
           return sendHTTPRedirect (nURL.str ().c_str ());
         }
 
-      getRFC822GMTTime (time, HTTP_RESPONSE_DATE_EXPIRES_DIM);
-      td->response.dateExp.assign (time);
-
       if (useMessagesFiles)
         {
           string page;
diff --git a/myserver/src/protocol/http/http_headers.cpp b/myserver/src/protocol/http/http_headers.cpp
index e935b51..1bb3136 100644
--- a/myserver/src/protocol/http/http_headers.cpp
+++ b/myserver/src/protocol/http/http_headers.cpp
@@ -81,14 +81,6 @@ u_long HttpHeaders::buildHTTPResponseHeader (char *str,
       pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
     }
 
-  if (response->lastModified.length ())
-    {
-      pos += myserver_strlcpy (pos,"Last-Modified: ", MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, response->lastModified.c_str (),
-                               MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos,"\r\n", MAX-(long)(pos-str));
-    }
-
   if (response->connection.length ())
     {
       pos += myserver_strlcpy (pos,"Connection: ", MAX-(long)(pos-str));
@@ -135,13 +127,6 @@ u_long HttpHeaders::buildHTTPResponseHeader (char *str,
         }
     }
 
-  if (response->mimeVer.length ())
-    {
-      pos += myserver_strlcpy (pos, "MIME-Version: ", MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, response->mimeVer.c_str (), MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
-    }
-
   if (response->contentType.length ())
     {
       pos += myserver_strlcpy (pos, "Content-Type: ", MAX-(long)(pos-str));
@@ -149,35 +134,6 @@ u_long HttpHeaders::buildHTTPResponseHeader (char *str,
       pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
     }
 
-  if (response->date.length ())
-    {
-      pos += myserver_strlcpy(pos, "Date: ", MAX-(long)(pos-str));
-      pos += myserver_strlcpy(pos, response->date.c_str (), MAX-(long)(pos-str));
-      pos += myserver_strlcpy(pos, "\r\n", MAX-(long)(pos-str));
-    }
-
-  if (response->dateExp.length ())
-    {
-      pos += myserver_strlcpy (pos, "Expires: ", MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, response->dateExp.c_str (), MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
-    }
-
-  if (response->auth.length ())
-    {
-      pos += myserver_strlcpy(pos, "WWW-Authenticate: ", MAX-(long)(pos-str));
-      pos += myserver_strlcpy(pos, response->auth.c_str (), MAX-(long)(pos-str));
-      pos += myserver_strlcpy(pos, "\r\n", MAX-(long)(pos-str));
-    }
-
-  if (response->location.length ())
-    {
-      pos += myserver_strlcpy (pos, "Location: ", MAX - (long)(pos - str));
-      pos += myserver_strlcpy (pos, response->location.c_str (),
-                               MAX - (long)(pos-str));
-      pos += myserver_strlcpy (pos, "\r\n", MAX - (long)(pos - str));
-    }
-
   if (response->other.size ())
     {
       HashMap<string, HttpResponseHeader::Entry*>::Iterator it =
@@ -294,23 +250,13 @@ u_long HttpHeaders::buildHTTPRequestHeader (char * str,HttpRequestHeader* reques
  */
 void HttpHeaders::buildDefaultHTTPResponseHeader(HttpResponseHeader* response)
 {
-  string date;
   resetHTTPResponse(response);
-  /*!
-   * By default use:
-   * -# the MIME type of the page equal to text/html.
-   * -# the version of the HTTP protocol to 1.1.
-   * -# the date of the page and the expire date to the current time.
-   * -# set the name of the server.
-   * -# set the page that it is not an error page.
-   */
+
   response->contentType.assign ("text/html");
   response->ver.assign ("HTTP/1.1");
-  getRFC822GMTTime(date,HTTP_RESPONSE_DATE_DIM);
-  response->date.assign (date);
-  response->dateExp.assign (date);
+
   response->serverName.assign ("GNU MyServer ");
-  response->serverName.append(MYSERVER_VERSION);
+  response->serverName.append (MYSERVER_VERSION);
 }
 
 /*!
@@ -1089,28 +1035,6 @@ int HttpHeaders::buildHTTPResponseHeaderStruct(const char *input,
         if (token)
           response->serverName.assign (token);
       }
-    else if (!strcmpi(command,"Location"))
-      {
-        token = strtok (NULL, "\r\n\0" );
-        lineControlled = 1;
-
-        while (token && *token == ' ')
-          token++;
-
-        if (token)
-          response->location.assign (token);
-      }
-    else if (!strcmpi(command,"Last-Modified"))
-      {
-        token = strtok (NULL, "\r\n\0" );
-        lineControlled = 1;
-
-        while (token && *token == ' ')
-          token++;
-
-        if (token)
-          response->lastModified.assign (token);
-    }
     else if (!strcmpi(command,"Status"))
       {
         token = strtok (NULL, "\r\n\0" );
@@ -1124,17 +1048,6 @@ int HttpHeaders::buildHTTPResponseHeaderStruct(const char *input,
           if (token)
             response->httpStatus = atoi(token);
       }
-    else if (!strcmpi(command,"Date"))
-      {
-        token = strtok (NULL, "\r\n\0" );
-        lineControlled = 1;
-
-        while (token && *token == ' ')
-          token++;
-
-        if (token)
-          response->date.assign (token);
-      }
     else if (!strcmpi(command,"Content-Type"))
       {
         token = strtok (NULL, "\r\n\0" );
@@ -1146,17 +1059,6 @@ int HttpHeaders::buildHTTPResponseHeaderStruct(const char *input,
         if (token)
           response->contentType.assign (token);
       }
-    else if (!strcmpi(command,"MIME-Version"))
-      {
-        token = strtok (NULL, "\r\n\0" );
-        lineControlled = 1;
-
-        while (token && *token == ' ')
-          token++;
-
-        if (token)
-          response->mimeVer.assign (token);
-      }
     else if (!strcmpi(command,"Set-Cookie"))
       {
         token = strtok (NULL, "\r\n\0" );
@@ -1190,13 +1092,7 @@ int HttpHeaders::buildHTTPResponseHeaderStruct(const char *input,
         if (token)
           response->connection.assign (token);
       }
-    else if (!strcmpi (command,"Expires"))
-      {
-        token = strtok (NULL, "\r\n\0" );
-        lineControlled = 1;
-        if (token)
-          response->dateExp.assign (token);
-      }
+
     /*
      *If the line is not controlled arrive with the token
      *at the end of the line.
diff --git a/myserver/src/protocol/http/http_response.cpp b/myserver/src/protocol/http/http_response.cpp
index b6876d3..2749859 100644
--- a/myserver/src/protocol/http/http_response.cpp
+++ b/myserver/src/protocol/http/http_response.cpp
@@ -1,18 +1,18 @@
 /*
-MyServer
-Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  MyServer
+  Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "stdafx.h"
@@ -25,7 +25,7 @@ using namespace std;
 /*!
  *Create the object.
  */
-HttpResponseHeader::HttpResponseHeader()
+HttpResponseHeader::HttpResponseHeader ()
 {
   free();
 }
@@ -34,10 +34,10 @@ HttpResponseHeader::HttpResponseHeader()
 /*!
  *Destroy the object.
  */
-HttpResponseHeader::~HttpResponseHeader()
+HttpResponseHeader::~HttpResponseHeader ()
 {
-  HashMap<string, HttpResponseHeader::Entry*>::Iterator it = other.begin();
-  for(;it != other.end(); it++)
+  HashMap<string, HttpResponseHeader::Entry*>::Iterator it = other.begin ();
+  for (;it != other.end(); it++)
     delete (*it);
 }
 
@@ -46,234 +46,146 @@ HttpResponseHeader::~HttpResponseHeader()
  */
 void HttpResponseHeader::free()
 {
-  ver.clear();
-  serverName.clear();
-  contentType.clear();
-  connection.clear();
-  mimeVer.clear();
-  cookie.clear();
-  contentLength.clear();
-  errorType.clear();
-  location.clear();
-  date.clear();
-  auth.clear();
-  dateExp.clear();
-  {
-    HashMap<string, HttpResponseHeader::Entry*>::Iterator it = other.begin();
-    for(;it != other.end(); it++){
-      delete (*it);
-    }
-  }
-  other.clear();
-  lastModified.clear();
+  ver.clear ();
+  serverName.clear ();
+  contentType.clear ();
+  connection.clear ();
+  cookie.clear ();
+  contentLength.clear ();
+  errorType.clear ();
+
+  HashMap<string, HttpResponseHeader::Entry*>::Iterator it = other.begin ();
+  for (;it != other.end (); it++)
+    delete (*it);
+
+  other.clear ();
 }
 
 /*!
  *Get the value of the [name] field.
  */
-string* HttpResponseHeader::getValue(const char* name, string* out)
+string* HttpResponseHeader::getValue (const char* name, string* out)
 {
-  if(!strcmpi(name, "Ver"))
-  {
-    if(out)
-      out->assign(ver.c_str());
-    return &ver;
-  }
-
-  if(!strcmpi(name, "Server"))
-  {
-    if(out)
-      out->assign(serverName.c_str());
-    return &ver;
-  }
-
-  if(!strcmpi(name, "Content-Type"))
-  {
-    if(out)
-      out->assign(contentType.c_str());
-    return &contentType;
-  }
-
-  if(!strcmpi(name, "Connection"))
-  {
-    if(out)
-      out->assign(connection.c_str());
-    return &connection;
-  }
-
-  if(!strcmpi(name, "Content-Type"))
-  {
-    if(out)
-      out->assign(contentType.c_str());
-    return &contentType;
-  }
-
-  if(!strcmpi(name, "MIME-Version"))
-  {
-    if(out)
-      out->assign(mimeVer.c_str());
-    return &mimeVer;
-  }
-
-  if(!strcmpi(name, "Cookie"))
-  {
-    if(out)
-      out->assign(cookie.c_str());
-    return &cookie;
-  }
+  if (!strcmpi (name, "Ver"))
+    {
+      if (out)
+        out->assign (ver.c_str ());
+      return &ver;
+    }
 
-  if(!strcmpi(name, "Content-Length"))
-  {
-    if(out)
-      out->assign(contentLength.c_str());
-    return &contentLength;
-  }
+  if (!strcmpi (name, "Server"))
+    {
+      if (out)
+        out->assign (serverName.c_str ());
+      return &ver;
+    }
 
-  if(!strcmpi(name, "Last-Modified"))
-  {
-    if(out)
-      out->assign(lastModified.c_str());
-    return &lastModified;
-  }
+  if (!strcmpi (name, "Content-Type"))
+    {
+      if (out)
+        out->assign (contentType.c_str ());
+      return &contentType;
+    }
 
-  if(!strcmpi(name, "Location"))
-  {
-    if(out)
-      out->assign(location.c_str());
-    return &location;
-  }
+  if (!strcmpi (name, "Connection"))
+    {
+      if (out)
+        out->assign (connection.c_str ());
+      return &connection;
+    }
 
-  if(!strcmpi(name, "Date"))
-  {
-    if(out)
-      out->assign(date.c_str());
-    return &date;
-  }
+  if (!strcmpi (name, "Content-Type"))
+    {
+      if (out)
+        out->assign (contentType.c_str ());
+      return &contentType;
+    }
 
-  if(!strcmpi(name, "Date-Expires"))
-  {
-    if(out)
-      out->assign(dateExp.c_str());
-    return &dateExp;
-  }
+  if (!strcmpi (name, "Cookie"))
+    {
+      if (out)
+        out->assign (cookie.c_str ());
+      return &cookie;
+    }
 
-  if(!strcmpi(name, "WWW-Authenticate"))
-  {
-    if(out)
-      out->assign(auth.c_str());
-    return &auth;
-  }
+  if (!strcmpi (name, "Content-Length"))
+    {
+      if (out)
+        out->assign (contentLength.c_str ());
+      return &contentLength;
+    }
 
-  {
-    HttpResponseHeader::Entry *e = other.get(name);
-    if(e)
+  HttpResponseHeader::Entry *e = other.get(name);
+  if (e)
     {
-      if(out)
-        out->assign(*(e->value));
+      if (out)
+        out->assign (*(e->value));
       return e->value;
     }
-    return 0;
-  }
+  return 0;
 }
 
-
 /*!
  *Set the value of the [name] field to [in].
  */
-string* HttpResponseHeader::setValue(const char* name, const char* in)
+string* HttpResponseHeader::setValue (const char* name, const char* in)
 {
-  if(!strcmpi(name, "Ver"))
-  {
-    ver.assign(in);
-    return &ver;
-  }
-
-  if(!strcmpi(name, "Server"))
-  {
-    serverName.assign(in);
-    return &ver;
-  }
-
-  if(!strcmpi(name, "Content-Type"))
-  {
-    contentType.assign(in);
-    return &contentType;
-  }
-
-  if(!strcmpi(name, "Connection"))
-  {
-    connection.assign(in);
-    return &connection;
-  }
-
-  if(!strcmpi(name, "Content-Type"))
-  {
-    contentType.assign(in);
-    return &contentType;
-  }
-
-  if(!strcmpi(name, "MIME-Version"))
-  {
-    mimeVer.assign(in);
-    return &mimeVer;
-  }
+  if (!strcmpi (name, "Ver"))
+    {
+      ver.assign (in);
+      return &ver;
+    }
 
-  if(!strcmpi(name, "Cookie"))
-  {
-    cookie.assign(in);
-    return &cookie;
-  }
+  if (!strcmpi (name, "Server"))
+    {
+      serverName.assign (in);
+      return &serverName;
+    }
 
-  if(!strcmpi(name, "Content-Length"))
-  {
-    contentLength.assign(in);
-    return &contentLength;
-  }
+  if (!strcmpi (name, "Content-Type"))
+    {
+      contentType.assign (in);
+      return &contentType;
+    }
 
-  if(!strcmpi(name, "Last-Modified"))
-  {
-    lastModified.assign(in);
-    return &lastModified;
-  }
+  if (!strcmpi (name, "Connection"))
+    {
+      connection.assign (in);
+      return &connection;
+    }
 
-  if(!strcmpi(name, "Location"))
-  {
-    location.assign(in);
-    return &location;
-  }
+  if (!strcmpi (name, "Content-Type"))
+    {
+      contentType.assign (in);
+      return &contentType;
+    }
 
-  if(!strcmpi(name, "Date"))
-  {
-    date.assign(in);
-    return &date;
-  }
+  if (!strcmpi (name, "Cookie"))
+    {
+      cookie.assign (in);
+      return &cookie;
+    }
 
-  if(!strcmpi(name, "Date-Expires"))
-  {
-    dateExp.assign(in);
-    return &dateExp;
-  }
+  if (!strcmpi (name, "Content-Length"))
+    {
+      contentLength.assign (in);
+      return &contentLength;
+    }
 
-  if(!strcmpi(name, "WWW-Authenticate"))
   {
-    auth.assign(in);
-    return &auth;
-  }
-
- {
-   HttpResponseHeader::Entry *e = other.get(name);
-   if(e)
-   {
-     e->value->assign(in);
-     return (e->value);
-   }
-   else
-   {
-     e = new HttpResponseHeader::Entry;
-     e->name->assign(name);
-     e->value->assign(in);
-     other.put(*e->name, e);
-   }
+    HttpResponseHeader::Entry *e = other.get(name);
+    if (e)
+      {
+        e->value->assign (in);
+        return (e->value);
+      }
+    else
+      {
+        e = new HttpResponseHeader::Entry;
+        e->name->assign (name);
+        e->value->assign (in);
+        other.put (*e->name, e);
+      }
 
     return 0;
   }
@@ -283,7 +195,7 @@ string* HttpResponseHeader::setValue(const char* name, const char* in)
  *Get the kind of HTTP status code specified by the httpStatus variable.
  *\return the HTTP status kind.
  */
-int HttpResponseHeader::getStatusType()
+int HttpResponseHeader::getStatusType ()
 {
   if (httpStatus < 200)
     return HttpResponseHeader::INFORMATIONAL;
diff --git a/myserver/tests/test_http_response.cpp b/myserver/tests/test_http_response.cpp
index 9f9b649..d8af7a9 100644
--- a/myserver/tests/test_http_response.cpp
+++ b/myserver/tests/test_http_response.cpp
@@ -112,14 +112,9 @@ public:
     CPPUNIT_ASSERT(header.serverName.length() == 0);
     CPPUNIT_ASSERT(header.contentType.length() == 0);
     CPPUNIT_ASSERT(header.connection.length() == 0);
-    CPPUNIT_ASSERT(header.mimeVer.length() == 0);
     CPPUNIT_ASSERT(header.cookie.length() == 0);
     CPPUNIT_ASSERT(header.contentLength.length() == 0);
     CPPUNIT_ASSERT(header.errorType.length() == 0);
-    CPPUNIT_ASSERT(header.location.length() == 0);
-    CPPUNIT_ASSERT(header.date.length() == 0);
-    CPPUNIT_ASSERT(header.auth.length() == 0);
-    CPPUNIT_ASSERT(header.dateExp.length() == 0);
  }
 
 

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/protocol/http/http_response.h    |    9 +-
 myserver/src/http_handler/fastcgi/fastcgi.cpp     |   13 +-
 myserver/src/http_handler/http_file/http_file.cpp |    4 +-
 myserver/src/protocol/http/http.cpp               |    3 -
 myserver/src/protocol/http/http_headers.cpp       |  112 +-------
 myserver/src/protocol/http/http_response.cpp      |  346 ++++++++-------------
 myserver/tests/test_http_response.cpp             |    5 -
 7 files changed, 144 insertions(+), 348 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Sep 27 05:28:45 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Mrq3h-0002mp-QC
	for mharc-myserver-commit@gnu.org; Sun, 27 Sep 2009 05:28:45 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Mrq3e-0002ke-Rh
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 05:28:43 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Mrq3c-0002im-Ln
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 05:28:42 -0400
Received: from [199.232.76.173] (port=42436 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Mrq3c-0002ia-GX
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 05:28:40 -0400
Received: from savannah.gnu.org ([199.232.41.3]:47938 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1Mrq3b-0007vM-Ms
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 05:28:40 -0400
Received: from [10.0.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Mrq3a-000852-Tq
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 09:28:39 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1Mrq3X-00084Y-Oo
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 09:28:38 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: c1a004a4dbe93748127a1bcf09b265cca2dab034
X-Git-Newrev: b78c1582c451a266d9cdb97c4d01634a1a6c766d
Message-Id: <E1Mrq3X-00084Y-Oo@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 27 Sep 2009 09:28:37 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. b78c1582c451a266d9cdb97c4d01634a1a6c766d
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 27 Sep 2009 09:28:43 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  b78c1582c451a266d9cdb97c4d01634a1a6c766d (commit)
      from  c1a004a4dbe93748127a1bcf09b265cca2dab034 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit b78c1582c451a266d9cdb97c4d01634a1a6c766d
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Sep 27 11:24:36 2009 +0200

    Remove some members from the `HttpResponseHeader' struct.
    
    If the same header field is found several times, then it is joined on
    a single line comma separed.

diff --git a/myserver/include/protocol/http/http_response.h b/myserver/include/protocol/http/http_response.h
index 579f801..a362efd 100644
--- a/myserver/include/protocol/http/http_response.h
+++ b/myserver/include/protocol/http/http_response.h
@@ -27,24 +27,11 @@ using namespace std;
 
 /*! Max length for a HTTP response fields. */
 # define HTTP_RESPONSE_VER_DIM 10
-# define HTTP_RESPONSE_SERVER_NAME_DIM 64
-# define HTTP_RESPONSE_CONTENT_TYPE_DIM 48
-# define HTTP_RESPONSE_CONTENT_RANGE_DIM 32
-# define HTTP_RESPONSE_CONNECTION_DIM 32
-# define HTTP_RESPONSE_MIME_VER_DIM 8
-# define HTTP_RESPONSE_COOKIE_DIM 8192
-# define HTTP_RESPONSE_CONTENT_LENGTH_DIM 8
-# define HTTP_RESPONSE_ERROR_TYPE_DIM 32
-# define HTTP_RESPONSE_LOCATION_DIM MAX_PATH
-# define HTTP_RESPONSE_DATE_DIM 32
-# define HTTP_RESPONSE_DATE_EXPIRES_DIM 32
-# define HTTP_RESPONSE_CACHE_CONTROL_DIM 64
-# define HTTP_RESPONSE_AUTH_DIM 256
-# define HTTP_RESPONSE_OTHER_DIM 512
-# define HTTP_RESPONSE_LAST_MODIFIED_DIM 32
+# define HTTP_RESPONSE_OTHER_DIM 4096
+
 
 /*!
- *Structure to describe an HTTP response
+ * Structure to describe an HTTP response
  */
 struct HttpResponseHeader : public HttpHeader
 {
@@ -81,10 +68,6 @@ struct HttpResponseHeader : public HttpHeader
   };
 	int httpStatus;
 	string ver;
-	string serverName;
-	string contentType;
-	string connection;
-	string cookie;
 	string contentLength;
 	string errorType;
 
diff --git a/myserver/src/http_handler/cgi/cgi.cpp b/myserver/src/http_handler/cgi/cgi.cpp
index df68e9c..7851192 100644
--- a/myserver/src/http_handler/cgi/cgi.cpp
+++ b/myserver/src/http_handler/cgi/cgi.cpp
@@ -492,7 +492,7 @@ int Cgi::sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chai
   if (!nph)
     {
       if (keepalive)
-        td->response.connection.assign ("keep-alive");
+        td->response.setValue ("Connection", "keep-alive");
 
       /* Send the header.  */
       if (headerSize)
diff --git a/myserver/src/http_handler/http_dir/http_dir.cpp b/myserver/src/http_handler/http_dir/http_dir.cpp
index d048d61..57df24d 100644
--- a/myserver/src/http_handler/http_dir/http_dir.cpp
+++ b/myserver/src/http_handler/http_dir/http_dir.cpp
@@ -337,7 +337,7 @@ int HttpDir::send(HttpThreadContext* td,
 
   checkDataChunks(td, &keepalive, &useChunks);
 
-  td->response.contentType.assign("text/html");
+  td->response.setValue ("ContentType", "text/html");
 
   if(!td->appendOutputs)
   {
diff --git a/myserver/src/http_handler/http_file/http_file.cpp b/myserver/src/http_handler/http_file/http_file.cpp
index cc82bd4..7e4a576 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -55,7 +55,7 @@ int HttpFile::putFile (HttpThreadContext* td,
 
     if(td->request.isKeepAlive())
       {
-        td->response.connection.assign("keep-alive");
+        td->response.setValue ("Connection", "keep-alive");
         keepalive = 1;
       }
 
@@ -260,7 +260,7 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
     if (lastMT == -1)
       return td->http->raiseHTTPError(500);
 
-    getRFC822GMTTime (lastMT, tmpTime, HTTP_RESPONSE_LAST_MODIFIED_DIM);
+    getRFC822GMTTime (lastMT, tmpTime, 32);
     td->response.setValue ("Last-Modified", tmpTime.c_str ());
 
     HttpRequestHeader::Entry *ifModifiedSince =
@@ -453,9 +453,9 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
       }
 
     if (keepalive)
-      td->response.connection.assign("keep-alive");
+      td->response.setValue ("Connection", "keep-alive");
     else
-      td->response.connection.assign("close");
+      td->response.setValue ("Connection", "close");
 
     if (useModifiers)
       {
diff --git a/myserver/src/http_handler/mscgi/mscgi_manager.cpp b/myserver/src/http_handler/mscgi/mscgi_manager.cpp
index 289bca1..17a00bb 100644
--- a/myserver/src/http_handler/mscgi/mscgi_manager.cpp
+++ b/myserver/src/http_handler/mscgi/mscgi_manager.cpp
@@ -1,6 +1,6 @@
 /*
 MyServer
-Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation; either
@@ -250,7 +250,7 @@ MsCgiData* MscgiManager::getCgiData()
  */
 void MscgiManager::setContentType(const char * type)
 {
-  td->response.contentType.assign(type, HTTP_RESPONSE_CONTENT_TYPE_DIM);
+  td->response.setValue ("ContentType", type);
 }
 
 /*!
diff --git a/myserver/src/protocol/http/env/env.cpp b/myserver/src/protocol/http/env/env.cpp
index aa5aaca..d1e7d72 100644
--- a/myserver/src/protocol/http/env/env.cpp
+++ b/myserver/src/protocol/http/env/env.cpp
@@ -26,7 +26,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <sstream>
 #include <algorithm>
 
-extern "C" {
+extern "C"
+{
 #ifdef WIN32
 # include <direct.h>
 #endif
@@ -179,11 +180,11 @@ void Env::buildEnvironmentString(HttpThreadContext* td, char *cgiEnv,
   memCgi << td->request.uri.c_str();
 
   memCgi << end_str << "DATE_GMT=";
-  getRFC822GMTTime(strTmp, HTTP_RESPONSE_DATE_DIM);
+  getRFC822GMTTime(strTmp, 32);
   memCgi << strTmp;
 
   memCgi << end_str << "DATE_LOCAL=";
-  getRFC822LocalTime(strTmp, HTTP_RESPONSE_DATE_DIM);
+  getRFC822LocalTime(strTmp, 32);
   memCgi << strTmp;
 
   memCgi << end_str << "DOCUMENT_ROOT=";
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 02cb972..e2d38a4 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -102,7 +102,7 @@ int Http::optionsHTTPRESOURCE (string& filename, int yetmapped)
       if (ret != 200)
         return raiseHTTPError (ret);
 
-      getRFC822GMTTime (time, HTTP_RESPONSE_DATE_DIM);
+      getRFC822GMTTime (time, 32);
       td->secondaryBuffer->setLength (0);
       *td->secondaryBuffer << "HTTP/1.1 200 OK\r\n";
       *td->secondaryBuffer << "Date: " << time;
@@ -150,7 +150,7 @@ int Http::traceHTTPRESOURCE (string& filename, int yetmapped)
         return raiseHTTPError (ret);
 
       tmp.intToStr (contentLength, tmpStr, 12);
-      getRFC822GMTTime (time, HTTP_RESPONSE_DATE_DIM);
+      getRFC822GMTTime (time, 32);
 
       td->secondaryBuffer->setLength (0);
       *td->secondaryBuffer << "HTTP/1.1 200 OK\r\n";
@@ -408,10 +408,7 @@ int Http::preprocessHttpRequest (string& filename, int yetmapped, int* permissio
   try
     {
       if (td->request.isKeepAlive ())
-        {
-          td->response.connection.assign ("keep-alive");
-        }
-
+        td->response.setValue("Connection", "keep-alive");
 
       ret = getFilePermissions (filename, directory, file,
                                 td->filenamePath, yetmapped, permissions);
@@ -643,17 +640,15 @@ Http::sendHTTPResource (string& uri, int systemrequest, int onlyHeader,
           return processDefaultFile (uri, td->permissions, onlyHeader);
         }
 
-      td->response.contentType[0] = '\0';
-
       /* If not specified differently, set the default content type to text/html.  */
       if (td->mime)
         {
-          td->response.contentType.assign (td->mime->mimeType);
+          td->response.setValue ("ContentType", td->mime->mimeType.c_str ());
           cgiManager = td->mime->cgiManager.c_str ();
         }
       else
         {
-          td->response.contentType.assign ("text/html");
+          td->response.setValue ("ContentType", "text/html");
           cgiManager = "";
         }
 
@@ -712,7 +707,7 @@ int Http::logHTTPaccess ()
 
       *td->secondaryBuffer << " [";
 
-      getLocalLogFormatDate (time, HTTP_RESPONSE_DATE_DIM);
+      getLocalLogFormatDate (time, 32);
       *td->secondaryBuffer << time << "] \"";
 
       if (td->request.cmd.length ())
@@ -1327,7 +1322,7 @@ int Http::requestAuthorization ()
       return raiseHTTPError (501);
     }
   *td->secondaryBuffer << "Date: ";
-  getRFC822GMTTime (time, HTTP_RESPONSE_DATE_DIM);
+  getRFC822GMTTime (time, 32);
   *td->secondaryBuffer << time
           << "\r\n\r\n";
   if (td->connection->socket->send (td->secondaryBuffer->getBuffer (),
@@ -1376,10 +1371,9 @@ int Http::raiseHTTPError (int ID)
       td->lastError = ID;
 
       HttpHeaders::buildDefaultHTTPResponseHeader (&(td->response));
+
       if (connection && !stringcmpi (connection->value->c_str (), "keep-alive"))
-        {
-          td->response.connection.assign ("keep-alive");
-        }
+        td->response.setValue ("Connection", "keep-alive");
 
       td->response.httpStatus = ID;
 
@@ -1530,7 +1524,7 @@ Internal Server Error\n\
   *td->secondaryBuffer << tmp;
   *td->secondaryBuffer << "\r\n";
   *td->secondaryBuffer << "Date: ";
-  getRFC822GMTTime (time, HTTP_RESPONSE_DATE_DIM);
+  getRFC822GMTTime (time, 32);
   *td->secondaryBuffer << time;
   *td->secondaryBuffer << "\r\n\r\n";
 
@@ -1720,7 +1714,7 @@ int Http::sendHTTPRedirect (const char *newURL)
     *td->secondaryBuffer << "Connection: close\r\n";
 
   *td->secondaryBuffer << "Date: ";
-  getRFC822GMTTime (time, HTTP_RESPONSE_DATE_DIM);
+  getRFC822GMTTime (time, 32);
   *td->secondaryBuffer << time
           << "\r\n\r\n";
   if (td->connection->socket->send (td->secondaryBuffer->getBuffer (),
@@ -1752,7 +1746,7 @@ int Http::sendHTTPNonModified ()
   else
     *td->secondaryBuffer << "Connection: close\r\n";
 
-  getRFC822GMTTime (time, HTTP_RESPONSE_DATE_DIM);
+  getRFC822GMTTime (time, 32);
 
   *td->secondaryBuffer << "Date: " << time << "\r\n\r\n";
 
diff --git a/myserver/src/protocol/http/http_headers.cpp b/myserver/src/protocol/http/http_headers.cpp
index 1bb3136..e4fa388 100644
--- a/myserver/src/protocol/http/http_headers.cpp
+++ b/myserver/src/protocol/http/http_headers.cpp
@@ -68,31 +68,6 @@ u_long HttpHeaders::buildHTTPResponseHeader (char *str,
   else
     pos += sprintf (str,"%s 200 OK\r\n",response->ver.c_str ());
 
-  if (response->serverName.length ())
-    {
-      pos += myserver_strlcpy (pos, "Server: ", MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, response->serverName.c_str (), MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
-    }
-  else
-    {
-      pos += myserver_strlcpy (pos, "Server: GNU MyServer ", MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, MYSERVER_VERSION,  MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
-    }
-
-  if (response->connection.length ())
-    {
-      pos += myserver_strlcpy (pos,"Connection: ", MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, response->connection.c_str (),
-                             MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
-    }
-  else
-    {
-      pos += myserver_strlcpy (pos, "Connection: Close\r\n", MAX-(long)(pos-str));
-    }
-
   if (response->contentLength.length ())
     {
       /*
@@ -109,48 +84,17 @@ u_long HttpHeaders::buildHTTPResponseHeader (char *str,
         }
     }
 
-  if (response->cookie.length ())
+  HashMap<string, HttpResponseHeader::Entry*>::Iterator it =
+    response->other.begin();
+  for (; it != response->other.end(); it++)
     {
-      string cookie;
-      const char *token = response->cookie.c_str ();
-      int max = response->cookie.length ();
-      while (token)
-        {
-          int len = getCharInString (token, "\n", max);
-          if (len == -1 || *token=='\n')
-        break;
-          cookie.assign ("Set-Cookie: ");
-          cookie.append (token, len);
-          cookie.append ("\r\n");
-          pos += myserver_strlcpy (pos, cookie.c_str (), MAX-(long)(pos-str));
-          token += len + 1;
-        }
-    }
-
-  if (response->contentType.length ())
-    {
-      pos += myserver_strlcpy (pos, "Content-Type: ", MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, response->contentType.c_str (), MAX-(long)(pos-str));
+      HttpResponseHeader::Entry *e = *it;
+      pos += myserver_strlcpy (pos, e->name->c_str (), MAX-(long)(pos-str));
+      pos += myserver_strlcpy (pos, ": ", MAX-(long)(pos-str));
+      pos += myserver_strlcpy (pos, e->value->c_str (), MAX-(long)(pos-str));
       pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
     }
 
-  if (response->other.size ())
-    {
-      HashMap<string, HttpResponseHeader::Entry*>::Iterator it =
-        response->other.begin();
-    for (; it != response->other.end(); it++)
-      {
-        HttpResponseHeader::Entry *e = *it;
-        if (e)
-          {
-            pos += myserver_strlcpy (pos, e->name->c_str (), MAX-(long)(pos-str));
-            pos += myserver_strlcpy (pos, ": ", MAX-(long)(pos-str));
-            pos += myserver_strlcpy (pos, e->value->c_str (), MAX-(long)(pos-str));
-            pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
-          }
-      }
-    }
-
   pos += myserver_strlcpy (pos, "Accept-Ranges: bytes\r\n", MAX-(long)(pos-str));
 
   pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
@@ -252,11 +196,9 @@ void HttpHeaders::buildDefaultHTTPResponseHeader(HttpResponseHeader* response)
 {
   resetHTTPResponse(response);
 
-  response->contentType.assign ("text/html");
+  response->setValue ("Content-Type", "text/html");
   response->ver.assign ("HTTP/1.1");
-
-  response->serverName.assign ("GNU MyServer ");
-  response->serverName.append (MYSERVER_VERSION);
+  response->setValue ("Server", "GNU MyServer " MYSERVER_VERSION);
 }
 
 /*!
@@ -1024,17 +966,6 @@ int HttpHeaders::buildHTTPResponseHeaderStruct(const char *input,
         if (token)
           response->errorType.assign (token);
       }
-    else if (!strcmpi(command,"Server"))
-      {
-        token = strtok (NULL, "\r\n\0" );
-        lineControlled = 1;
-
-        while (token && *token == ' ')
-          token++;
-
-        if (token)
-          response->serverName.assign (token);
-      }
     else if (!strcmpi(command,"Status"))
       {
         token = strtok (NULL, "\r\n\0" );
@@ -1043,37 +974,11 @@ int HttpHeaders::buildHTTPResponseHeaderStruct(const char *input,
         while (token && *token == ' ')
           token++;
 
-        /*! If the response status is different from 200 don't modify it. */
+        /* If the response status is different from 200 don't modify it. */
         if (response->httpStatus == 200)
           if (token)
             response->httpStatus = atoi(token);
       }
-    else if (!strcmpi(command,"Content-Type"))
-      {
-        token = strtok (NULL, "\r\n\0" );
-        lineControlled = 1;
-
-        while (token && *token == ' ')
-          token++;
-
-        if (token)
-          response->contentType.assign (token);
-      }
-    else if (!strcmpi(command,"Set-Cookie"))
-      {
-        token = strtok (NULL, "\r\n\0" );
-        lineControlled = 1;
-
-        while (token && *token == ' ')
-          token++;
-
-        if (token)
-          {
-            /* Divide multiple cookies.  */
-            response->cookie.append(token );
-            response->cookie.append("\n");
-          }
-      }
     else if (!strcmpi (command, "Content-Length"))
       {
         token = strtok (NULL, "\r\n\0" );
@@ -1084,14 +989,6 @@ int HttpHeaders::buildHTTPResponseHeaderStruct(const char *input,
 
         response->contentLength.assign (token);
       }
-    else if (!strcmpi (command, "Connection"))
-      {
-        token = strtok (NULL, "\r\n\0" );
-        lineControlled = 1;
-
-        if (token)
-          response->connection.assign (token);
-      }
 
     /*
      *If the line is not controlled arrive with the token
@@ -1106,24 +1003,28 @@ int HttpHeaders::buildHTTPResponseHeaderStruct(const char *input,
 
         if (token)
           {
-            HttpResponseHeader::Entry *e;
+            
             if (strlen (command) > HTTP_RESPONSE_OTHER_DIM ||
                 strlen (token) > HTTP_RESPONSE_OTHER_DIM)
-              return 0;
+              {
+                validResponse = 0;
+                break;
+              }
 
-            e = new HttpResponseHeader::Entry();
-            if (e)
+            HttpResponseHeader::Entry *old = NULL;
+            HttpResponseHeader::Entry *e = new HttpResponseHeader::Entry();
+            e->name->assign (command);
+            string cmdString (command);
+            old = response->other.put (cmdString, e);
+            if (old)
               {
-                e->name->assign (command);
-                e->value->assign (token);
-                {
-                  HttpResponseHeader::Entry *old = 0;
-                  string cmdString (command);
-                  old = response->other.put (cmdString, e);
-                  if (old)
-                    delete old;
-                }
+                e->value->assign (*old->value);
+                e->value->append (", ");
+                e->value->append (token);
+                delete old;
               }
+            else
+              e->value->assign (token);
           }
       }
     token = strtok (NULL, cmdSeps);
diff --git a/myserver/src/protocol/http/http_response.cpp b/myserver/src/protocol/http/http_response.cpp
index 2749859..e592557 100644
--- a/myserver/src/protocol/http/http_response.cpp
+++ b/myserver/src/protocol/http/http_response.cpp
@@ -47,10 +47,6 @@ HttpResponseHeader::~HttpResponseHeader ()
 void HttpResponseHeader::free()
 {
   ver.clear ();
-  serverName.clear ();
-  contentType.clear ();
-  connection.clear ();
-  cookie.clear ();
   contentLength.clear ();
   errorType.clear ();
 
@@ -73,41 +69,6 @@ string* HttpResponseHeader::getValue (const char* name, string* out)
       return &ver;
     }
 
-  if (!strcmpi (name, "Server"))
-    {
-      if (out)
-        out->assign (serverName.c_str ());
-      return &ver;
-    }
-
-  if (!strcmpi (name, "Content-Type"))
-    {
-      if (out)
-        out->assign (contentType.c_str ());
-      return &contentType;
-    }
-
-  if (!strcmpi (name, "Connection"))
-    {
-      if (out)
-        out->assign (connection.c_str ());
-      return &connection;
-    }
-
-  if (!strcmpi (name, "Content-Type"))
-    {
-      if (out)
-        out->assign (contentType.c_str ());
-      return &contentType;
-    }
-
-  if (!strcmpi (name, "Cookie"))
-    {
-      if (out)
-        out->assign (cookie.c_str ());
-      return &cookie;
-    }
-
   if (!strcmpi (name, "Content-Length"))
     {
       if (out)
@@ -136,36 +97,6 @@ string* HttpResponseHeader::setValue (const char* name, const char* in)
       return &ver;
     }
 
-  if (!strcmpi (name, "Server"))
-    {
-      serverName.assign (in);
-      return &serverName;
-    }
-
-  if (!strcmpi (name, "Content-Type"))
-    {
-      contentType.assign (in);
-      return &contentType;
-    }
-
-  if (!strcmpi (name, "Connection"))
-    {
-      connection.assign (in);
-      return &connection;
-    }
-
-  if (!strcmpi (name, "Content-Type"))
-    {
-      contentType.assign (in);
-      return &contentType;
-    }
-
-  if (!strcmpi (name, "Cookie"))
-    {
-      cookie.assign (in);
-      return &cookie;
-    }
-
   if (!strcmpi (name, "Content-Length"))
     {
       contentLength.assign (in);
diff --git a/myserver/tests/test_http_response.cpp b/myserver/tests/test_http_response.cpp
index d8af7a9..9519b09 100644
--- a/myserver/tests/test_http_response.cpp
+++ b/myserver/tests/test_http_response.cpp
@@ -1,19 +1,19 @@
 /*
- MyServer
- Copyright (C) 2008 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
+  MyServer
+  Copyright (C) 2008 Free Software Foundation, Inc.
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
 
 #include <ctype.h>
 
@@ -36,22 +36,23 @@ class TestHttpResponse : public CppUnit::TestFixture
   CPPUNIT_TEST_SUITE( TestHttpResponse );
   CPPUNIT_TEST( testSimpleHeader );
   CPPUNIT_TEST( testInvalidResponse );
+  CPPUNIT_TEST( testJoinField );
   CPPUNIT_TEST( testValidResponse );
   CPPUNIT_TEST( testReset );
   CPPUNIT_TEST_SUITE_END();
 
 public:
-  void setUp()
+  void setUp ()
   {
 
   }
 
-  void tearDown()
+  void tearDown ()
   {
 
   }
 
-  void testSimpleHeader()
+  void testSimpleHeader ()
   {
     HttpResponseHeader header;
     const char * responseStr = "HTTP/1.1 200 Success\r\nContent-Length: 0\r\n\r\n";
@@ -65,7 +66,29 @@ public:
     CPPUNIT_ASSERT(ret != 0);
   }
 
-  void testValidResponse()
+  void testJoinField ()
+  {
+    HttpResponseHeader header;
+    u_long nbtr;
+    const char * responseStr =
+      "HTTP/1.1 200 Success\r\n\
+Content-Length: 0\r\n\
+ToJoin: a\r\n\
+ToJoin: b\r\n";
+
+    int ret = HttpHeaders::buildHTTPResponseHeaderStruct(responseStr, &header, &nbtr);
+    CPPUNIT_ASSERT(ret != 0);
+
+    string *v = header.getValue ("ToJoin", NULL);
+    CPPUNIT_ASSERT(v);
+
+    CPPUNIT_ASSERT(v->find ("a") != string::npos);
+    CPPUNIT_ASSERT(v->find ("b") != string::npos);
+    CPPUNIT_ASSERT(v->find (",") != string::npos);
+    CPPUNIT_ASSERT(v->find ("x") == string::npos);
+  }
+
+  void testValidResponse ()
   {
     HttpResponseHeader header;
     const char * responseStr = "HTTP/1.1 200 Success\r\nContent-Length: 0\r\n\r\n";
@@ -80,7 +103,7 @@ public:
   }
 
 
-  void testInvalidResponse()
+  void testInvalidResponse ()
   {
     HttpResponseHeader header;
     const char * responseStr = "Not really HTTP response";
@@ -102,21 +125,16 @@ public:
     CPPUNIT_ASSERT_EQUAL(ret, 0);
   }
 
-  void testReset()
+  void testReset ()
   {
     HttpResponseHeader header;
 
     HttpHeaders::resetHTTPResponse(&header);
 
     CPPUNIT_ASSERT(header.ver.length() == 0);
-    CPPUNIT_ASSERT(header.serverName.length() == 0);
-    CPPUNIT_ASSERT(header.contentType.length() == 0);
-    CPPUNIT_ASSERT(header.connection.length() == 0);
-    CPPUNIT_ASSERT(header.cookie.length() == 0);
     CPPUNIT_ASSERT(header.contentLength.length() == 0);
     CPPUNIT_ASSERT(header.errorType.length() == 0);
- }
-
+  }
 
   void testStatusType ()
   {

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/protocol/http/http_response.h    |   23 +---
 myserver/src/http_handler/cgi/cgi.cpp             |    2 +-
 myserver/src/http_handler/http_dir/http_dir.cpp   |    2 +-
 myserver/src/http_handler/http_file/http_file.cpp |    8 +-
 myserver/src/http_handler/mscgi/mscgi_manager.cpp |    4 +-
 myserver/src/protocol/http/env/env.cpp            |    7 +-
 myserver/src/protocol/http/http.cpp               |   30 ++---
 myserver/src/protocol/http/http_headers.cpp       |  153 ++++-----------------
 myserver/src/protocol/http/http_response.cpp      |   69 ---------
 myserver/tests/test_http_response.cpp             |   72 ++++++----
 10 files changed, 99 insertions(+), 271 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Sep 27 09:45:42 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Mru4M-0003dE-2u
	for mharc-myserver-commit@gnu.org; Sun, 27 Sep 2009 09:45:42 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Mru4K-0003av-Pp
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 09:45:40 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Mru4K-0003aj-0B
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 09:45:40 -0400
Received: from [199.232.76.173] (port=43339 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Mru4J-0003ag-R6
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 09:45:39 -0400
Received: from savannah.gnu.org ([199.232.41.3]:59347 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1Mru4J-0004yk-CJ
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 09:45:39 -0400
Received: from [10.0.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Mru4I-0004Jt-Iu
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 13:45:38 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1Mru4F-0004JL-1e
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 13:45:38 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: b78c1582c451a266d9cdb97c4d01634a1a6c766d
X-Git-Newrev: a175b9733e1c41bae691347f11773f35ffcc4865
Message-Id: <E1Mru4F-0004JL-1e@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 27 Sep 2009 13:45:37 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. a175b9733e1c41bae691347f11773f35ffcc4865
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 27 Sep 2009 13:45:41 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  a175b9733e1c41bae691347f11773f35ffcc4865 (commit)
       via  f95977c5721f0abc385d811632079c163c7ec752 (commit)
      from  b78c1582c451a266d9cdb97c4d01634a1a6c766d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit a175b9733e1c41bae691347f11773f35ffcc4865
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Sep 27 15:45:26 2009 +0200

    Processes spawned by the ProcessServerManager and CGI ones can specify a different chroot

diff --git a/myserver/documentation/process_security.texi b/myserver/documentation/process_security.texi
index 4b7ece9..fb89869 100644
--- a/myserver/documentation/process_security.texi
+++ b/myserver/documentation/process_security.texi
@@ -33,6 +33,13 @@ of the new process with both uid and gid to 1000.
 <DEFINE name="cgi.gid" value="1000" />
 @end example
 
+It is also possible to specify a new root directory location using the
+cgi.chroot attribute:
+
+@example
+<DEFINE name="cgi.chroot" value="/some/where" />
+@end example
+
 @section Fork Server
 In a POSIX environment the @code{fork} syscall is used to execute new
 processes.  It clones the caller process keeping any open file or
@@ -71,7 +78,7 @@ FastCGI/SCGI configuration inside MIME types by its name.
 <DEFINE name="server.process_servers">
   <DEFINE server="/opt/bin/fastcgi_server" domain="fastcgi"
           host="localhost" port="2010" local="yes" uid="1000"
-          gid="1000"/>
+          chroot="/chroot" gid="1000"/>
 </DEFINE>
 @end example
 
@@ -88,6 +95,11 @@ It is possible to specify a different uid/gid for the local server
 process and don't maintain the original myserver process privileges.
 It can be done using the @code{uid} and @code{gid} elements.
 
+Also, it is possible to use a different root directory, mapping the
+@file{/} path to what is specied in the @code{chroot} attribute.
+Any file lookup can't go upper what is specied in the chroot.  Pay
+attention that any path specified in @code{server} must be relative to
+the new chroot.
 
 The following code, declare an already running FastCGI server and
 registers it on the @code{fcgi} extension:
diff --git a/myserver/include/base/process/process_server_manager.h b/myserver/include/base/process/process_server_manager.h
index 2725b6a..1d5754d 100644
--- a/myserver/include/base/process/process_server_manager.h
+++ b/myserver/include/base/process/process_server_manager.h
@@ -51,7 +51,7 @@ public:
 		string host;
 		Process process;
 		u_short port;
-		struct ServerDomain* sd;
+		struct ServerDomain *sd;
 		bool isLocal;
 
 		void terminate()
@@ -67,7 +67,7 @@ public:
 	struct ServerDomain
 	{
 		string domainName;
-		HashMap<string, vector<Server*>* > servers;
+		HashMap<string, vector<Server*> *> servers;
 		void (*clear)(Server*);
 		ServerDomain()
 		{
@@ -75,30 +75,31 @@ public:
 		}
 	};
 
-	ServerDomain* createDomain(const char* name);
-	ServerDomain* getDomain(const char* name);
+	ServerDomain *createDomain(const char *name);
+	ServerDomain *getDomain(const char *name);
 	void clear();
-	Server* getServer(const char* domain, const char* name, int seed = 0);
+	Server *getServer(const char *domain, const char *name, int seed = 0);
 	ProcessServerManager();
 	~ProcessServerManager();
-	int connect(Socket* sock, Server* server);
+	int connect(Socket *sock, Server *server);
 	void setMaxServers(int max){maxServers = max;}
 	int getMaxServers(){return maxServers;}
-	void removeDomain(const char* domain);
-	int domainServers(const char* domain);
+	void removeDomain(const char *domain);
+	int domainServers(const char *domain);
 	void load();
-	Server* runAndAddServer(const char* domain, const char* name,
-                          int uid = 0, int gid = 0, u_short port = 0);
-	Server* addRemoteServer(const char* domain, const char* name,
-													const char* host, u_short port);
+	Server *runAndAddServer(const char *domain, const char *name,
+                          const char *chroot = NULL, int uid = 0,
+                          int gid = 0, u_short port = 0);
+	Server *addRemoteServer(const char *domain, const char *name,
+													const char *host, u_short port);
 private:
 	int maxServers;
 	int nServers;
   Mutex mutex;
 	HashMap<string, ServerDomain*> domains;
-  int runServer(Server* server, const char* path, int uid = 0,
-                int gid = 0, u_short port = 0);
-	void addServer(Server* server, const char* domain, const char* name);
+  int runServer (Server *server, const char *path, u_short port = 0,
+                 const char *chroot = NULL, int uid = 0, int gid = 0);
+	void addServer (Server *server, const char *domain, const char *name);
 };
 
 #endif
diff --git a/myserver/src/base/process/process_server_manager.cpp b/myserver/src/base/process/process_server_manager.cpp
index 701106b..4ce9f32 100644
--- a/myserver/src/base/process/process_server_manager.cpp
+++ b/myserver/src/base/process/process_server_manager.cpp
@@ -58,6 +58,7 @@ void ProcessServerManager::load ()
   string localKey ("local");
   string uidKey ("uid");
   string gidKey ("gid");
+  string chrootKey ("chroot");
 
   list<NodeTree<string>*> *children = node->getChildren ();
 
@@ -69,6 +70,7 @@ void ProcessServerManager::load ()
       string host;
       string name;
       string port;
+      const char *chroot = NULL;
       string local;
       bool localBool = true;
       int uid = 0;
@@ -97,6 +99,9 @@ void ProcessServerManager::load ()
       if (n->getAttr (gidKey))
         gid = atoi (n->getAttr (gidKey)->c_str ());
 
+      if (n->getAttr (chrootKey))
+        chroot = n->getAttr (chrootKey)->c_str ();
+
       if (!local.compare("YES") || !local.compare("yes"))
         localBool = true;
       else
@@ -110,7 +115,7 @@ void ProcessServerManager::load ()
             portN = atoi (port.c_str());
 
           if (localBool)
-            runAndAddServer (domain.c_str(), name.c_str(), uid, gid, portN);
+            runAndAddServer (domain.c_str(), name.c_str(), chroot, uid, gid, portN);
           else
             {
               if (portN)
@@ -236,22 +241,22 @@ ProcessServerManager::getServer(const char* domain, const char* name, int seed)
 
   if(s && s->isLocal && !s->process.isProcessAlive())
   {
-    s->socket.close();
-    s->process.terminateProcess();
-    if(!s->path.length())
-      s->path.assign(name);
+    s->socket.close ();
+    s->process.terminateProcess ();
+    if (!s->path.length ())
+      s->path.assign (name);
 
     s->port = 0;
 
-    if(runServer(s, s->path.c_str(), s->port))
-    {
-      sd->servers.remove(name);
-      delete s;
-      s = 0;
-    }
+    if (runServer (s, s->path.c_str(), s->port))
+      {
+        sd->servers.remove (name);
+        delete s;
+        s = 0;
+      }
   }
 
-  mutex.unlock();
+  mutex.unlock ();
   return s;
 }
 
@@ -359,16 +364,19 @@ int ProcessServerManager::domainServers(const char* domain)
  *Run and add a server to the collection.
  *\param domain The server's domain.
  *\param path The path to the executable.
+ *\param chroot The new process chroot.
  *\param uid User id to use for the new process.
  *\param gid Group id to use for the new process.
  *\param port Port to use for the server.
  */
 ProcessServerManager::Server*
-ProcessServerManager::runAndAddServer(const char* domain,  const char* path,
-                                      int uid, int gid, u_short port)
+ProcessServerManager::runAndAddServer(const char *domain, const char *path,
+                                      const char *chroot, int uid, int gid,
+                                      u_short port)
 {
   Server* server = new Server;
-  if(runServer(server, path, uid, gid, port))
+
+  if (runServer (server, path, port, chroot, uid, gid))
   {
     delete server;
     return 0;
@@ -381,13 +389,14 @@ ProcessServerManager::runAndAddServer(const char* domain,  const char* path,
  *Run a new server.
  *\param server The server object.
  *\param path The path to the executable.
+ *\param port The listening port.
+ *\param chroot The new process chroot.
  *\param uid User id to use for the new process.
  *\param gid Group id to use for the new process.
- *\param port The listening port.
  */
-int ProcessServerManager::runServer(ProcessServerManager::Server* server,
-                                    const char* path, int uid, int gid,
-                                    u_short port)
+int ProcessServerManager::runServer (ProcessServerManager::Server* server,
+                                     const char* path, u_short port,
+                                     const char *chroot, int uid, int gid)
 {
   StartProcInfo spi;
   MYSERVER_SOCKADDRIN serverSockAddrIn;
@@ -398,10 +407,9 @@ int ProcessServerManager::runServer(ProcessServerManager::Server* server,
 
   if(nServers >= maxServers)
   {
-    ostringstream stream;
-    stream << "Cannot run process " << path
-           << ": Reached max number of servers";
-    ::Server::getInstance()->log(stream.str().c_str(), MYSERVER_LOG_MSG_ERROR);
+    ::Server::getInstance()->log(MYSERVER_LOG_MSG_ERROR,
+                      _("Cannot run process %s: Reached max number of servers"),
+                                 path);
     return 1;
   }
 
@@ -448,6 +456,8 @@ int ProcessServerManager::runServer(ProcessServerManager::Server* server,
   spi.arg.assign(moreArg);
   spi.cmdLine.assign(path);
   server->path.assign(path);
+  if (chroot)
+    spi.chroot.assign (chroot);
 
   spi.uid = uid;
   spi.gid = gid;
diff --git a/myserver/src/http_handler/cgi/cgi.cpp b/myserver/src/http_handler/cgi/cgi.cpp
index 7851192..16fbe10 100644
--- a/myserver/src/http_handler/cgi/cgi.cpp
+++ b/myserver/src/http_handler/cgi/cgi.cpp
@@ -239,14 +239,18 @@ int Cgi::send (HttpThreadContext* td, const char* scriptpath,
   spi.cmdLine = cmdLine.str ();
   spi.cwd.assign (td->scriptDir);
 
-  spi.gid =  atoi (td->securityToken.getData ("cgi.gid", MYSERVER_VHOST_CONF |
-                                                    MYSERVER_MIME_CONF |
-                                                    MYSERVER_SECURITY_CONF |
-                                                    MYSERVER_SERVER_CONF, "0"));
-  spi.uid =  atoi (td->securityToken.getData ("cgi.uid", MYSERVER_VHOST_CONF |
-                                                    MYSERVER_MIME_CONF |
-                                                    MYSERVER_SECURITY_CONF |
-                                                    MYSERVER_SERVER_CONF, "0"));
+  spi.gid = atoi (td->securityToken.getData ("cgi.gid", MYSERVER_VHOST_CONF |
+                                             MYSERVER_MIME_CONF |
+                                             MYSERVER_SECURITY_CONF |
+                                             MYSERVER_SERVER_CONF, "0"));
+  spi.uid = atoi (td->securityToken.getData ("cgi.uid", MYSERVER_VHOST_CONF |
+                                             MYSERVER_MIME_CONF |
+                                             MYSERVER_SECURITY_CONF |
+                                             MYSERVER_SERVER_CONF, "0"));
+  spi.chroot.assign (td->securityToken.getData ("cgi.chroot", MYSERVER_VHOST_CONF |
+                                                MYSERVER_MIME_CONF |
+                                                MYSERVER_SECURITY_CONF |
+                                                MYSERVER_SERVER_CONF, ""));
 
   spi.stdError = (FileHandle) stdOutFile.getWriteHandle ();
   spi.stdIn = (FileHandle) stdInFile.getHandle ();



commit f95977c5721f0abc385d811632079c163c7ec752
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Sep 27 14:58:59 2009 +0200

    A new process creation supports a chroot now.

diff --git a/myserver/include/base/process/process.h b/myserver/include/base/process/process.h
index cd9a405..421c8a9 100644
--- a/myserver/include/base/process/process.h
+++ b/myserver/include/base/process/process.h
@@ -66,6 +66,11 @@ struct StartProcInfo
   /*! Pointer to a NULL terminated array of
    *  file pointers to close.  */
   FileHandle *handlesToClose;
+
+  /* If the length > 0 then change the current root
+     directory to the specified value before execute
+     the process.  */
+  string chroot;
 };
 
 class Process
@@ -81,6 +86,7 @@ public:
   int exec (StartProcInfo *spi, bool waitEnd = false);
   int terminateProcess();
   int isProcessAlive();
+  static int chroot (const char *root);
   static int setuid(const char*);
   static int setgid(const char*);
 	static int setAdditionalGroups(u_long len, u_long *groups);
diff --git a/myserver/src/base/process/fork_server.cpp b/myserver/src/base/process/fork_server.cpp
index a57d49e..9c88288 100644
--- a/myserver/src/base/process/fork_server.cpp
+++ b/myserver/src/base/process/fork_server.cpp
@@ -127,6 +127,7 @@ int ForkServer::handleRequest (Socket *sock)
   char *exec;
   char *cwd;
   char *arg;
+  char *chroot;
   char *env;
 
   readInt (sock, &flags);
@@ -147,6 +148,7 @@ int ForkServer::handleRequest (Socket *sock)
   readString (sock, &cwd);
 
   readString (sock, &arg);
+  readString (sock, &chroot);
 
   string argS (arg);
 
@@ -180,10 +182,9 @@ int ForkServer::handleRequest (Socket *sock)
   spi.stdIn = stdIn;
   spi.stdOut = stdOut;
   spi.stdError = stdErr;
-
   spi.uid.assign (uid);
   spi.gid.assign (gid);
-
+  spi.chroot.assign (chroot);
   spi.cmd.assign (exec);
   spi.arg.assign (arg);
   spi.cwd.assign (cwd);
@@ -201,6 +202,7 @@ int ForkServer::handleRequest (Socket *sock)
   delete [] cwd;
   delete [] arg;
   delete [] env;
+  delete [] chroot;
 
   if (flags & FLAG_USE_IN)
     close (stdIn);
@@ -210,9 +212,8 @@ int ForkServer::handleRequest (Socket *sock)
 
   if (flags & FLAG_USE_ERR)
     close (stdErr);
-
-  return 0;
 #endif
+
   return 0;
 }
 
@@ -316,6 +317,7 @@ int ForkServer::executeProcess (StartProcInfo *spi,
       writeString (&sock, spi->cmd.c_str (), spi->cmd.length ());
       writeString (&sock, spi->cwd.c_str (), spi->cwd.length ());
       writeString (&sock, spi->arg.c_str (), spi->arg.length ());
+      writeString (&sock, spi->chroot.c_str (), spi->chroot.length ());
 
       if (env)
         for (len = 0; env[len] != '\0' || env[len + 1] != '\0' ; len++);
diff --git a/myserver/src/base/process/process.cpp b/myserver/src/base/process/process.cpp
index 180ffff..4291c88 100644
--- a/myserver/src/base/process/process.cpp
+++ b/myserver/src/base/process/process.cpp
@@ -135,6 +135,20 @@ int Process::generateArgList (const char **args, size_t size, const char *proc,
   return 0;
 }
 
+/*!
+ * Change the process root directory to the specified one.
+ * \param root The new root directory.
+ * On success 0 is returned.
+ */
+int Process::chroot (const char *root)
+{
+#ifdef WIN32
+  return -1;
+#else
+  return chroot (root);
+#endif
+}
+
 
 /*!
  * Generate the env array for execve.
@@ -232,11 +246,14 @@ int Process::exec (StartProcInfo* spi, bool waitEnd)
       const char *envp[size];
       const char *args[size];
 
-      if (spi->gid.length ())
-        Process::setgid (spi->gid.c_str ());
+      if (spi->chroot.length () && Process::chroot (spi->chroot.c_str ()))
+        exit (1);
+
+      if (spi->gid.length () && Process::setgid (spi->gid.c_str ()))
+        exit (1);
 
-      if (spi->uid.length ())
-        Process::setuid (spi->uid.c_str ());
+      if (spi->uid.length () && Process::setuid (spi->uid.c_str ()))
+        exit (1);
 
       if (generateArgList (args, size, spi->cmd.c_str (), spi->arg))
         exit (1);
@@ -245,7 +262,7 @@ int Process::exec (StartProcInfo* spi, bool waitEnd)
         exit (1);
 
       if (spi->cwd.length ()
-          && chdir ((const char*)(spi->cwd.c_str())) == -1)
+          && chdir (spi->cwd.c_str()) == -1)
         exit (1);
 
       if ((long)spi->stdOut == -1)

-----------------------------------------------------------------------

Summary of changes:
 myserver/documentation/process_security.texi       |   14 +++++-
 myserver/include/base/process/process.h            |    6 ++
 .../include/base/process/process_server_manager.h  |   31 ++++++-----
 myserver/src/base/process/fork_server.cpp          |   10 ++--
 myserver/src/base/process/process.cpp              |   27 ++++++++--
 .../src/base/process/process_server_manager.cpp    |   56 ++++++++++++--------
 myserver/src/http_handler/cgi/cgi.cpp              |   20 ++++---
 7 files changed, 108 insertions(+), 56 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Sep 27 09:56:10 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MruET-0000L8-HO
	for mharc-myserver-commit@gnu.org; Sun, 27 Sep 2009 09:56:09 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MruER-0000K1-Mm
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 09:56:08 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MruEP-0000In-Cw
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 09:56:06 -0400
Received: from [199.232.76.173] (port=40572 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MruEO-0000Ij-IL
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 09:56:04 -0400
Received: from savannah.gnu.org ([199.232.41.3]:49540 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MruEO-0006lW-4Q
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 09:56:04 -0400
Received: from [10.0.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MruEN-0004up-J3
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 13:56:03 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MruEL-0004uN-WC
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 13:56:03 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: a175b9733e1c41bae691347f11773f35ffcc4865
X-Git-Newrev: 6a4fdd086002dc0fdddc34b5e09a113bee216053
Message-Id: <E1MruEL-0004uN-WC@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 27 Sep 2009 13:56:02 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 6a4fdd086002dc0fdddc34b5e09a113bee216053
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 27 Sep 2009 13:56:08 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  6a4fdd086002dc0fdddc34b5e09a113bee216053 (commit)
      from  a175b9733e1c41bae691347f11773f35ffcc4865 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 6a4fdd086002dc0fdddc34b5e09a113bee216053
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Sep 27 15:55:52 2009 +0200

    Surround the error message with the _ macro

diff --git a/myserver/src/base/process/process_server_manager.cpp b/myserver/src/base/process/process_server_manager.cpp
index 4ce9f32..0e56470 100644
--- a/myserver/src/base/process/process_server_manager.cpp
+++ b/myserver/src/base/process/process_server_manager.cpp
@@ -121,19 +121,14 @@ void ProcessServerManager::load ()
               if (portN)
                 addRemoteServer (domain.c_str(), name.c_str(), host.c_str(), portN);
               else
-                {
-                  ostringstream msg;
-                  msg << "Error: incomplete remote PROCESS_SERVER block, "
-                      << domain  << ":" << name << " needs a port";
-                  ::Server::getInstance ()->log (msg.str ().c_str (), MYSERVER_LOG_MSG_ERROR);
-                }
+                ::Server::getInstance ()->log (MYSERVER_LOG_MSG_ERROR,
+           _("Error: incomplete remote PROCESS_SERVER block, %s:%s needs a port"),
+                                                 domain, name);
             }
         }
       else
-        {
-          const char *msg = "Error: incomplete PROCESS_SERVER block";
-          ::Server::getInstance ()->log (msg, MYSERVER_LOG_MSG_ERROR);
-        }
+        ::Server::getInstance ()->log (MYSERVER_LOG_MSG_ERROR,
+                                   _("Error: incomplete PROCESS_SERVER block"));
     }
 
 }
@@ -354,10 +349,10 @@ void ProcessServerManager::removeDomain (const char* domain)
  *Count how many servers are present in a domain.
  *\param domain The server domain.
  */
-int ProcessServerManager::domainServers(const char* domain)
+int ProcessServerManager::domainServers (const char* domain)
 {
-  ServerDomain* serverDomain = getDomain(domain);
-  return serverDomain ? serverDomain->servers.size() : 0;
+  ServerDomain* serverDomain = getDomain (domain);
+  return serverDomain ? serverDomain->servers.size () : 0;
 }
 
 /*!
@@ -370,9 +365,9 @@ int ProcessServerManager::domainServers(const char* domain)
  *\param port Port to use for the server.
  */
 ProcessServerManager::Server*
-ProcessServerManager::runAndAddServer(const char *domain, const char *path,
-                                      const char *chroot, int uid, int gid,
-                                      u_short port)
+ProcessServerManager::runAndAddServer (const char *domain, const char *path,
+                                       const char *chroot, int uid, int gid,
+                                       u_short port)
 {
   Server* server = new Server;
 
@@ -405,15 +400,15 @@ int ProcessServerManager::runServer (ProcessServerManager::Server* server,
   server->host.assign("localhost");
   server->isLocal = true;
 
-  if(nServers >= maxServers)
-  {
-    ::Server::getInstance()->log(MYSERVER_LOG_MSG_ERROR,
+  if (nServers >= maxServers)
+    {
+      ::Server::getInstance ()->log (MYSERVER_LOG_MSG_ERROR,
                       _("Cannot run process %s: Reached max number of servers"),
                                  path);
-    return 1;
-  }
+      return 1;
+    }
 
-  if(port)
+  if (port)
     server->port = port;
   else
     server->port = 0;
@@ -422,31 +417,31 @@ int ProcessServerManager::runServer (ProcessServerManager::Server* server,
   string moreArg;
   int subString = path[0] == '"';
   int i;
-  int len = strlen(path);
+  int len = strlen (path);
 
-  for(i = 1; i < len; i++)
+  for (i = 1; i < len; i++)
     {
-      if(!subString && path[i] == ' ')
+      if (!subString && path[i] == ' ')
         break;
 
-      if(path[i] == '"' && path[i - 1] != '\\')
+      if (path[i] == '"' && path[i - 1] != '\\')
         subString = !subString;
     }
 
-  if(i < len)
+  if (i < len)
     {
       string tmpString(path);
       int begin = tmpString[0] == '"' ? 1 : 0;
       int end   = tmpString[i] == '"' ? i + 1 : i ;
-      tmpCgiPath.assign(tmpString.substr(begin, end));
-      moreArg.assign(tmpString.substr(i, len));
+      tmpCgiPath.assign (tmpString.substr (begin, end));
+      moreArg.assign (tmpString.substr(i, len));
     }
   else
     {
       int begin = (path[0] == '"') ? 1 : 0;
-      int end   = (path[len] == '"') ? len-1 : len;
-      tmpCgiPath.assign(&path[begin], end-begin);
-      moreArg.assign("");
+      int end   = (path[len] == '"') ? len - 1 : len;
+      tmpCgiPath.assign (&path[begin], end - begin);
+      moreArg.assign ("");
     }
 
   spi.envString = 0;

-----------------------------------------------------------------------

Summary of changes:
 .../src/base/process/process_server_manager.cpp    |   59 +++++++++-----------
 1 files changed, 27 insertions(+), 32 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Sep 27 10:42:01 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Mruwq-0003gv-TZ
	for mharc-myserver-commit@gnu.org; Sun, 27 Sep 2009 10:42:00 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Mruwn-0003ej-GS
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 10:41:57 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Mruwm-0003eA-QL
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 10:41:57 -0400
Received: from [199.232.76.173] (port=39574 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Mruwm-0003dz-Jb
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 10:41:56 -0400
Received: from savannah.gnu.org ([199.232.41.3]:36815 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1Mruwj-0004Jx-Od
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 10:41:54 -0400
Received: from [10.0.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Mruwi-0007ph-St
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 14:41:52 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1Mruwi-0007pA-D5
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 14:41:52 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 6a4fdd086002dc0fdddc34b5e09a113bee216053
X-Git-Newrev: daa9b4d535d29ef44830eb561ae837754d1811f6
Message-Id: <E1Mruwi-0007pA-D5@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 27 Sep 2009 14:41:52 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. daa9b4d535d29ef44830eb561ae837754d1811f6
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 27 Sep 2009 14:41:57 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  daa9b4d535d29ef44830eb561ae837754d1811f6 (commit)
       via  3023c04b2dc30ed398602a47156948c2a5b2c20f (commit)
      from  6a4fdd086002dc0fdddc34b5e09a113bee216053 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit daa9b4d535d29ef44830eb561ae837754d1811f6
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Sep 27 16:41:49 2009 +0200

    When `make check' is used in the root directory, run only the tests suite

diff --git a/myserver/Makefile.am b/myserver/Makefile.am
index 8b80a2e..3891b2a 100644
--- a/myserver/Makefile.am
+++ b/myserver/Makefile.am
@@ -19,3 +19,6 @@ localedir.h: Makefile
 
 all: localedir.h
 # Generate the localedir.h file before any other rule.
+
+check-recursive:
+	(cd tests; $(MAKE) check)
diff --git a/myserver/tests/Makefile.am b/myserver/tests/Makefile.am
index b4b07a9..83007d8 100644
--- a/myserver/tests/Makefile.am
+++ b/myserver/tests/Makefile.am
@@ -16,3 +16,7 @@ tests_suite_LDADD = ../src/libmyserver.a $(CPPUNIT_LDFLAGS) $(PTHREAD_LIB) $(IDN
 
 
 install:
+
+
+check:
+	./tests_suite$(EXEEXT)



commit 3023c04b2dc30ed398602a47156948c2a5b2c20f
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Sep 27 16:18:03 2009 +0200

    Pass the right type to the log function.

diff --git a/myserver/src/base/process/process_server_manager.cpp b/myserver/src/base/process/process_server_manager.cpp
index 0e56470..cad6f48 100644
--- a/myserver/src/base/process/process_server_manager.cpp
+++ b/myserver/src/base/process/process_server_manager.cpp
@@ -123,7 +123,7 @@ void ProcessServerManager::load ()
               else
                 ::Server::getInstance ()->log (MYSERVER_LOG_MSG_ERROR,
            _("Error: incomplete remote PROCESS_SERVER block, %s:%s needs a port"),
-                                                 domain, name);
+                                               domain.c_str (), name.c_str ());
             }
         }
       else

-----------------------------------------------------------------------

Summary of changes:
 myserver/Makefile.am                               |    3 +++
 .../src/base/process/process_server_manager.cpp    |    2 +-
 myserver/tests/Makefile.am                         |    4 ++++
 3 files changed, 8 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Sep 27 11:51:25 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Mrw21-0006ly-Fq
	for mharc-myserver-commit@gnu.org; Sun, 27 Sep 2009 11:51:25 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Mrw1z-0006lG-SX
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 11:51:23 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Mrw1y-0006k9-NA
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 11:51:22 -0400
Received: from [199.232.76.173] (port=59821 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Mrw1y-0006k4-HL
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 11:51:22 -0400
Received: from savannah.gnu.org ([199.232.41.3]:58899 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1Mrw1y-0007v8-4r
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 11:51:22 -0400
Received: from [10.0.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Mrw1x-0002y0-Jn
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 15:51:21 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1Mrw1w-0002xU-Cp
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 15:51:21 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: daa9b4d535d29ef44830eb561ae837754d1811f6
X-Git-Newrev: 5fc61cbfaa52cf4bfea6b7a8d2ec57475a5ec2a5
Message-Id: <E1Mrw1w-0002xU-Cp@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 27 Sep 2009 15:51:21 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 5fc61cbfaa52cf4bfea6b7a8d2ec57475a5ec2a5
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 27 Sep 2009 15:51:24 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  5fc61cbfaa52cf4bfea6b7a8d2ec57475a5ec2a5 (commit)
       via  e3b877395231b2496932772f89972538a8872176 (commit)
      from  daa9b4d535d29ef44830eb561ae837754d1811f6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 5fc61cbfaa52cf4bfea6b7a8d2ec57475a5ec2a5
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Sep 27 17:47:31 2009 +0200

    Fix some possible memleaks

diff --git a/myserver/src/conf/mime/mime_manager.cpp b/myserver/src/conf/mime/mime_manager.cpp
index a29d68f..2432b2b 100644
--- a/myserver/src/conf/mime/mime_manager.cpp
+++ b/myserver/src/conf/mime/mime_manager.cpp
@@ -229,7 +229,10 @@ MimeRecord *MimeManager::readRecord (xmlNodePtr node)
           Regex *r = new Regex;
 
           if (r->compile ((const char*)attrs->children->content, 0))
-            return NULL;
+            {
+              delete r;
+              return NULL;
+            }
 
           rc->pathRegex.push_back (r);
         }
diff --git a/myserver/src/conf/vhost/ip.cpp b/myserver/src/conf/vhost/ip.cpp
index 70874c5..a72867f 100644
--- a/myserver/src/conf/vhost/ip.cpp
+++ b/myserver/src/conf/vhost/ip.cpp
@@ -1,6 +1,6 @@
 /*
   MyServer
-  Copyright (C) 2008 Free Software Foundation, Inc.
+  Copyright (C) 2008, 2009 Free Software Foundation, Inc.
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
@@ -33,6 +33,7 @@ IpRange *IpRange::RangeFactory(const std::string &ipRange)
     return pV6;
   */
 
+  delete pV4;
   return NULL;
 }
 



commit e3b877395231b2496932772f89972538a8872176
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Sep 27 17:44:42 2009 +0200

    Close the pidfile file on error.

diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index 806e47a..a8c1245 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -610,7 +610,10 @@ int writePidfile (const char* filename)
   sprintf (buff,"%i\n", pid);
   ret = write (pidfile, buff, strlen(buff));
   if(ret == -1)
-    return -1;
+    {
+      close (pidfile);
+      return -1;
+    }
   return close (pidfile);
 }
 #endif

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/conf/mime/mime_manager.cpp |    5 ++++-
 myserver/src/conf/vhost/ip.cpp          |    3 ++-
 myserver/src/myserver.cpp               |    5 ++++-
 3 files changed, 10 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Sep 27 15:44:03 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Mrzf9-0008VQ-Tf
	for mharc-myserver-commit@gnu.org; Sun, 27 Sep 2009 15:44:03 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Mrzf8-0008Uk-5z
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 15:44:02 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Mrzf7-0008UF-3G
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 15:44:01 -0400
Received: from [199.232.76.173] (port=52766 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Mrzf6-0008UA-VA
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 15:44:00 -0400
Received: from savannah.gnu.org ([199.232.41.3]:40475 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1Mrzf6-0007Cm-HH
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 15:44:00 -0400
Received: from [10.0.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1Mrzf5-0007Io-Vn
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 19:44:00 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1Mrzf1-0007IA-FM
	for myserver-commit@gnu.org; Sun, 27 Sep 2009 19:43:59 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 5fc61cbfaa52cf4bfea6b7a8d2ec57475a5ec2a5
X-Git-Newrev: 2257ee59d9898d39b720317246ccd4ae7febc097
Message-Id: <E1Mrzf1-0007IA-FM@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 27 Sep 2009 19:43:58 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 2257ee59d9898d39b720317246ccd4ae7febc097
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 27 Sep 2009 19:44:02 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  2257ee59d9898d39b720317246ccd4ae7febc097 (commit)
      from  5fc61cbfaa52cf4bfea6b7a8d2ec57475a5ec2a5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 2257ee59d9898d39b720317246ccd4ae7febc097
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Sep 27 21:39:37 2009 +0200

    By default use silent automake rules.

diff --git a/myserver/configure.ac b/myserver/configure.ac
index b5f863a..5a8ceef 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -26,6 +26,7 @@ AC_CANONICAL_HOST
 AC_CANONICAL_TARGET
 
 AM_INIT_AUTOMAKE([gnu])
+AM_SILENT_RULES([yes])
 
 AC_CONFIG_MACRO_DIR([m4])
 
@@ -128,9 +129,7 @@ case "${host}" in
              ])
     fi
 
-
-
-        AC_SUBST(PTHREAD_LIB)
+    AC_SUBST(PTHREAD_LIB)
 
     dnl Looking for dl
     AC_SEARCH_LIBS([dlopen], [dl c], have_dl=yes)

-----------------------------------------------------------------------

Summary of changes:
 myserver/configure.ac |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Mon Sep 28 16:51:02 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MsNBV-0006w0-Rf
	for mharc-myserver-commit@gnu.org; Mon, 28 Sep 2009 16:51:01 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MsNBU-0006vE-0C
	for myserver-commit@gnu.org; Mon, 28 Sep 2009 16:51:00 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MsNBT-0006uj-3S
	for myserver-commit@gnu.org; Mon, 28 Sep 2009 16:50:59 -0400
Received: from [199.232.76.173] (port=54477 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MsNBS-0006ud-Qc
	for myserver-commit@gnu.org; Mon, 28 Sep 2009 16:50:58 -0400
Received: from savannah.gnu.org ([199.232.41.3]:36660 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MsNBS-0006jN-Aw
	for myserver-commit@gnu.org; Mon, 28 Sep 2009 16:50:58 -0400
Received: from [10.0.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MsNBR-0004eu-MH
	for myserver-commit@gnu.org; Mon, 28 Sep 2009 20:50:57 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MsNBO-0004eL-8X
	for myserver-commit@gnu.org; Mon, 28 Sep 2009 20:50:57 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 2257ee59d9898d39b720317246ccd4ae7febc097
X-Git-Newrev: b96d1c45627f35ff04385d5a7b5f8c5735947767
Message-Id: <E1MsNBO-0004eL-8X@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Mon, 28 Sep 2009 20:50:56 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. b96d1c45627f35ff04385d5a7b5f8c5735947767
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 28 Sep 2009 20:51:00 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  b96d1c45627f35ff04385d5a7b5f8c5735947767 (commit)
       via  9003318618f35f4cee1c5de5471d35cec1c07661 (commit)
       via  0d689f340da2601a6d4b001e9b9cb3bec9e7aa35 (commit)
      from  2257ee59d9898d39b720317246ccd4ae7febc097 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit b96d1c45627f35ff04385d5a7b5f8c5735947767
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Sep 28 22:50:28 2009 +0200

    Accept a --cfgdir option to specify a different path where look for configuration files.

diff --git a/myserver/documentation/basic_configuration.texi b/myserver/documentation/basic_configuration.texi
index 0b5a879..d211224 100644
--- a/myserver/documentation/basic_configuration.texi
+++ b/myserver/documentation/basic_configuration.texi
@@ -24,6 +24,11 @@ following order:
 @item Global scope inside /etc/myserver.
 @end enumerate
 
+It is possible to specify a different directory where looks for
+configuration files by the @code{--cfgdir} argument to the myserver
+process.  In case a path is specified, then the configuration files
+are looked exclusively in this directory.
+
 @section Server administrator
 CGI scripts can get the server administrator e-mail and show them to
 the user (through the SERVER_ADMIN environment variable). 
diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index 9268b3a..c7acd0b 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -115,7 +115,7 @@ void registerSignals ()
   sigaction(SIGCHLD, &sa, (struct sigaction *)NULL);
 #else
   SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), ENABLE_PROCESSED_INPUT);
-  SetConsoleCtrlHandler( (PHANDLER_ROUTINE) SignalHandler, TRUE );
+  SetConsoleCtrlHandler((PHANDLER_ROUTINE) SignalHandler, TRUE);
 #endif
 }
 
@@ -127,25 +127,41 @@ struct argp_input
 {
   /* Print the version for MyServer?  */
   int version;
-  char* logFileName;
+
+  /* Define the main log file.  */
+  const char *logFileName;
+
   /* Define how run the server.  */
   int runas;
-  char* pidFileName;
+
+  /* If executed as a daemon, write the pid to this file.  */
+  const char *pidFileName;
+
+  /* Define an alternate location for the configuration files.  */
+  const char *confFilesLocation;
+
+  /* Specify if the fork server is used.  */
   int useForkServer;
 };
 
 static char doc[] = "GNU MyServer ";
 static char argsDoc[] = "";
 
+enum
+{
+ CONFIG_OPT = UCHAR_MAX + 1
+};
+
 /* Use the GNU C argp parser under not windows environments.  */
 static struct argp_option options[] =
   {
     /* LONG NAME - SHORT NAME - PARAMETER NAME - FLAGS - DESCRIPTION.  */
-    {"version", 'v', "VERSION", OPTION_ARG_OPTIONAL , "Print the version for the application"},
-    {"run", 'r', "RUN", OPTION_ARG_OPTIONAL, "Specify how run the server (by default console mode)"},
-    {"log", 'l', "location", 0, "Specify the location (in the format protocol://resource) to use to log main myserver messages"},
-    {"pidfile", 'p', "pidfile", 0, "Specify the file where write the PID"},
-    {"fork_server", 'f', "", OPTION_ARG_OPTIONAL, "Specify if use a fork server"},
+    {"version", 'v', "VERSION", OPTION_ARG_OPTIONAL , _("Print the version for the application")},
+    {"run", 'r', "RUN", OPTION_ARG_OPTIONAL, _("Specify how run the server (by default console mode)")},
+    {"log", 'l', "location", 0, _("Specify the location (using the format protocol://resource) to use as the main log.")},
+    {"pidfile", 'p', "file", 0, _("Specify the file where write the PID")},
+    {"fork_server", 'f', NULL, 0, _("Specify if use a fork server")},
+    {"cfgdir", CONFIG_OPT, "dir", 0, _("Specify an alternate directory where look for configuration files")},
     {0}
   };
 
@@ -182,6 +198,10 @@ static error_t parseOpt(int key, char *arg, struct argp_state *state)
       in->pidFileName = arg;
       break;
 
+    case CONFIG_OPT:
+      in->confFilesLocation = arg;
+      break;
+
     case ARGP_KEY_ARG:
     case ARGP_KEY_END:
       break;
@@ -231,9 +251,10 @@ int loadExternalPath(string &externalPath)
 
 /*!
  * Load the vhost configuration files locations.
+ * If DIR is specified, look only in this directory.
  * Return nonzero on errors.
  */
-int loadConfFileLocation (string &outFile, string fileName)
+int loadConfFileLocation (string &outFile, string fileName, const char *dir)
 {
   try
     {
@@ -242,6 +263,17 @@ int loadConfFileLocation (string &outFile, string fileName)
 #ifdef WIN32
       outFile = fileName;
 #else
+
+      if (dir)
+        {
+          outFile = dir;
+          if (outFile.at (outFile.length () - 1) != '/')
+            outFile += "/";
+
+          outFile += fileName;
+          return !FilesUtility::fileExists (outFile);
+        }
+
       /* Look for .xml files in the following order:
 
          1) current working directory
@@ -276,15 +308,16 @@ int loadConfFileLocation (string &outFile, string fileName)
 int loadConfFilesLocation (string &mainConfigurationFile,
                            string &mimeConfigurationFile,
                            string &vhostConfigurationFile,
-                           string &externalPath)
+                           string &externalPath,
+                           const char *dir)
 {
-  if (loadConfFileLocation (mainConfigurationFile, "myserver.xml"))
+  if (loadConfFileLocation (mainConfigurationFile, "myserver.xml", dir))
     return -1;
 
-  if (loadConfFileLocation (mimeConfigurationFile, "MIMEtypes.xml"))
+  if (loadConfFileLocation (mimeConfigurationFile, "MIMEtypes.xml", dir))
     return -1;
 
-  if (loadConfFileLocation (vhostConfigurationFile, "virtualhosts.xml"))
+  if (loadConfFileLocation (vhostConfigurationFile, "virtualhosts.xml", dir))
     return -1;
 
   if (loadExternalPath (externalPath))
@@ -366,22 +399,23 @@ int main  (int argn, char **argv)
 #ifdef ARGP
   /* Reset the struct.  */
   input.version = 0;
-  input.logFileName = 0;
+  input.confFilesLocation = NULL;
+  input.logFileName = NULL;
   input.runas = MYSERVER_RUNAS_CONSOLE;
-  input.pidFileName = 0;
+  input.pidFileName = NULL;
   input.useForkServer = 0;
 
   /* Call the parser.  */
   argp_parse (&myserverArgp, argn, argv, 0, 0, &input);
   runas = input.runas;
-  if (input.logFileName)
+
+  if (input.logFileName
+      && Server::getInstance ()->setLogLocation (input.logFileName))
     {
-      if (Server::getInstance ()->setLogLocation (input.logFileName))
-        {
-          cout << "Error setting the location for the MyServer's main log" << endl;
-          return 1;
-        }
+      cout << "Error setting the location for the MyServer's main log" << endl;
+      return 1;
     }
+
   /* If the version flag is up, show the version and exit.  */
   if (input.version)
     {
@@ -450,7 +484,8 @@ int main  (int argn, char **argv)
   try
     {
       setcwdBuffer ();
-      loadConfFilesLocation (mainConf, mimeConf, vhostConf, externPath);
+      loadConfFilesLocation (mainConf, mimeConf, vhostConf, externPath,
+                             input.confFilesLocation);
 
       switch(runas)
         {
@@ -521,7 +556,7 @@ int main  (int argn, char **argv)
 int writePidfile (const char* filename)
 {
   int pidfile;
-  pid_t pid = getpid();
+  pid_t pid = getpid ();
   char buff[12];
   int ret;
   string file = "";
@@ -594,29 +629,29 @@ void  __stdcall myServerMainNT (u_long, LPTSTR*)
     };
 
 
-  MyServiceStatusHandle = RegisterServiceCtrlHandler( "GNU MyServer",
-                                                      myServerCtrlHandler );
+  MyServiceStatusHandle = RegisterServiceCtrlHandler("GNU MyServer",
+                                                      myServerCtrlHandler);
   if(MyServiceStatusHandle)
     {
       MyServiceStatus.dwCurrentState = SERVICE_START_PENDING;
-      SetServiceStatus( MyServiceStatusHandle, &MyServiceStatus );
+      SetServiceStatus(MyServiceStatusHandle, &MyServiceStatus);
 
       MyServiceStatus.dwControlsAccepted |= (SERVICE_ACCEPT_STOP
                                              | SERVICE_ACCEPT_SHUTDOWN);
       MyServiceStatus.dwCurrentState = SERVICE_RUNNING;
-      SetServiceStatus( MyServiceStatusHandle, &MyServiceStatus );
+      SetServiceStatus(MyServiceStatusHandle, &MyServiceStatus);
 
 
-      loadConfFilesLocation (mainConf, mimeConf, vhostConf, externPath);
+      loadConfFilesLocation (mainConf, mimeConf, vhostConf, externPath, NULL);
       Server::getInstance()->start (mainConf, mimeConf, vhostConf, externPath);
 
       MyServiceStatus.dwCurrentState = SERVICE_STOP_PENDING;
-      SetServiceStatus( MyServiceStatusHandle, &MyServiceStatus );
+      SetServiceStatus(MyServiceStatusHandle, &MyServiceStatus);
 
       MyServiceStatus.dwControlsAccepted &= ~(SERVICE_ACCEPT_STOP
                                               | SERVICE_ACCEPT_SHUTDOWN);
       MyServiceStatus.dwCurrentState = SERVICE_STOPPED;
-      SetServiceStatus( MyServiceStatusHandle, &MyServiceStatus );
+      SetServiceStatus(MyServiceStatusHandle, &MyServiceStatus);
     }
 
 }
@@ -626,7 +661,7 @@ void  __stdcall myServerMainNT (u_long, LPTSTR*)
  */
 void __stdcall myServerCtrlHandler(u_long fdwControl)
 {
-  switch ( fdwControl )
+  switch (fdwControl)
     {
     case SERVICE_CONTROL_INTERROGATE:
       break;
@@ -634,8 +669,8 @@ void __stdcall myServerCtrlHandler(u_long fdwControl)
     case SERVICE_CONTROL_SHUTDOWN:
     case SERVICE_CONTROL_STOP:
       MyServiceStatus.dwCurrentState = SERVICE_STOP_PENDING;
-      SetServiceStatus( MyServiceStatusHandle, &MyServiceStatus );
-      Server::getInstance()->stop();
+      SetServiceStatus (MyServiceStatusHandle, &MyServiceStatus);
+      Server::getInstance ()->stop ();
       return;
 
     case SERVICE_CONTROL_PAUSE:
@@ -644,12 +679,12 @@ void __stdcall myServerCtrlHandler(u_long fdwControl)
     case SERVICE_CONTROL_CONTINUE:
       break;
     default:
-      if ( fdwControl >= 128 && fdwControl <= 255 )
+      if (fdwControl >= 128 && fdwControl <= 255)
         break;
       else
         break;
     }
-  SetServiceStatus( MyServiceStatusHandle, &MyServiceStatus );
+  SetServiceStatus (MyServiceStatusHandle, &MyServiceStatus);
 }
 #endif
 
@@ -669,11 +704,11 @@ void runService ()
   if (!StartServiceCtrlDispatcher (serviceTable))
     {
       if (GetLastError () == ERROR_INVALID_DATA)
-          Server::getInstance ()->log("Invalid data");
+        Server::getInstance ()->log("Invalid data");
       else if (GetLastError () == ERROR_SERVICE_ALREADY_RUNNING)
-          Server::getInstance ()->log("Already running");
+        Server::getInstance ()->log("Already running");
       else
-          Server::getInstance ()->log("Error running service");
+        Server::getInstance ()->log("Error running service");
     }
 #endif
 }



commit 9003318618f35f4cee1c5de5471d35cec1c07661
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Sep 28 21:07:52 2009 +0200

    Give a slightly saner --version message.

diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index 7ae203e..9268b3a 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -385,15 +385,13 @@ int main  (int argn, char **argv)
   /* If the version flag is up, show the version and exit.  */
   if (input.version)
     {
-      cout << MYSERVER_VERSION << endl;
-
-      cout
-# ifdef __DATE__
-        << "Compiled on " << __DATE__
-# endif
-        << endl;
-
-      cout << "http://www.gnu.org/software/myserver" << endl;
+      cout << "GNU MyServer " << MYSERVER_VERSION << endl
+           << "Copyright (C) 2009 Free Software Foundation, Inc." << endl
+           << "License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>." << endl
+           << "This is free software: you are free to change and redistribute it." << endl
+           << "There is NO WARRANTY, to the extent permitted by law." << endl
+           << endl
+           << "http://www.gnu.org/software/myserver" << endl;
       return 0;
     }
 #else



commit 0d689f340da2601a6d4b001e9b9cb3bec9e7aa35
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Sep 28 20:51:32 2009 +0200

    Refactor the same repeated statements in a single function.

diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index a8c1245..7ae203e 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -206,19 +206,17 @@ int loadExternalPath(string &externalPath)
   try
     {
       externalPath = "";
-
 #ifdef WIN32
-      externalPath.assign("plugins");
+      externalPath.assign ("plugins");
 #else
       if (FilesUtility::fileExists ("plugins"))
-        externalPath.assign("plugins");
+        externalPath.assign ("plugins");
       else
         {
 # ifdef PREFIX
-          externalPath.assign(PREFIX);
-          externalPath.append("/lib/myserver/plugins");
+          externalPath.assign (PREFIX "/lib/myserver/plugins");
 # else
-          externalPath.assign("/usr/lib/myserver/plugins");
+          externalPath.assign ("/usr/local/lib/myserver/plugins");
 # endif
         }
 
@@ -230,126 +228,63 @@ int loadExternalPath(string &externalPath)
   return 0;
 }
 
-/*!
- * Load the vhost configuration files locations.
- * Return nonzero on errors.
- */
-int loadVHostConfFilesLocation (string &vhostConfigurationFile)
-{
-  try
-    {
-      vhostConfigurationFile = "";
-
-#ifdef WIN32
-      vhostConfigurationFile.assign ("virtualhosts.xml");
-#else
-      /*
-       * Look for .xml files in the following order.
-       *1) myserver executable working directory
-       *2) ~/.myserver/
-       *3) /etc/myserver/
-       *4) default files will be copied in myserver executable working
-       */
-      if (FilesUtility::fileExists ("virtualhosts.xml"))
-        vhostConfigurationFile.assign ("virtualhosts.xml");
-      else if (FilesUtility::fileExists ("~/.myserver/virtualhosts.xml"))
-        vhostConfigurationFile.assign ("~/.myserver/virtualhosts.xml");
-      else if (FilesUtility::fileExists ("/etc/myserver/virtualhosts.xml"))
-        vhostConfigurationFile.assign("/etc/myserver/virtualhosts.xml");
-#endif
-    }
-  catch (...)
-    {
-    }
-  return 0;
-}
-
 
 /*!
- * Load the mime configuration files locations.
+ * Load the vhost configuration files locations.
  * Return nonzero on errors.
  */
-int loadMimeConfFilesLocation (string &mimeConfigurationFile)
+int loadConfFileLocation (string &outFile, string fileName)
 {
   try
     {
-      mimeConfigurationFile = "";
+      outFile = "";
 
 #ifdef WIN32
-      mimeConfigurationFile.assign ("MIMEtypes.xml");
+      outFile = fileName;
 #else
-      /*
-       *Under an *nix environment look for .xml files in the following order.
-       *1) myserver executable working directory
-       *2) ~/.myserver/
-       *3) /etc/myserver/
-       *4) default files will be copied in myserver executable working
-       */
-      if (FilesUtility::fileExists ("MIMEtypes.xml"))
-        mimeConfigurationFile.assign ("MIMEtypes.xml");
-      else if (FilesUtility::fileExists ("~/.myserver/MIMEtypes.xml"))
-        mimeConfigurationFile.assign ("~/.myserver/MIMEtypes.xml");
-      else if (FilesUtility::fileExists ("/etc/myserver/MIMEtypes.xml"))
-        mimeConfigurationFile.assign("/etc/myserver/MIMEtypes.xml");
-#endif
-    }
-  catch (...)
-    {
-    }
-  return 0;
-}
+      /* Look for .xml files in the following order:
 
+         1) current working directory
+         2) ~/.myserver/
+         3) /etc/myserver/
+      */
+      if (FilesUtility::fileExists (fileName))
+        {
+          outFile = fileName;
+          return 0;
+        }
 
-/*!
- * Load the main configuration files locations.
- * Return nonzero on errors.
- */
-int loadMainConfFilesLocation (string &mainConfigurationFile)
-{
-  try
-    {
-      mainConfigurationFile = "";
+      outFile = "~/.myserver/" + fileName;
+      if (FilesUtility::fileExists (outFile))
+        return 0;
 
-#ifdef WIN32
-      mainConfigurationFile.assign ("myserver.xml");
-#else
-      /*
-       * Look for .xml files in the following order.
-       * 1) myserver executable working directory
-       * 2) ~/.myserver/
-       * 3) /etc/myserver/
-       * 4) default files will be copied in myserver executable working
-       */
-      if (FilesUtility::fileExists ("myserver.xml"))
-        mainConfigurationFile.assign ("myserver.xml");
-      else if (FilesUtility::fileExists ("~/.myserver/myserver.xml"))
-        mainConfigurationFile.assign ("~/.myserver/myserver.xml");
-      else if (FilesUtility::fileExists ("/etc/myserver/myserver.xml"))
-        mainConfigurationFile.assign ("/etc/myserver/myserver.xml");
+      outFile = "/etc/myserver/" + fileName;
+      if (FilesUtility::fileExists (outFile))
+        return 0;
 #endif
     }
   catch (...)
     {
     }
-  return 0;
+  return 1;
 }
 
-
 /*!
  * Load the configuration files locations.
  * Return nonzero on errors.
  */
 int loadConfFilesLocation (string &mainConfigurationFile,
-     string &mimeConfigurationFile, string &vhostConfigurationFile,
+                           string &mimeConfigurationFile,
+                           string &vhostConfigurationFile,
                            string &externalPath)
 {
-  if (loadMainConfFilesLocation (mainConfigurationFile))
+  if (loadConfFileLocation (mainConfigurationFile, "myserver.xml"))
     return -1;
 
-  if (loadMimeConfFilesLocation (mimeConfigurationFile))
+  if (loadConfFileLocation (mimeConfigurationFile, "MIMEtypes.xml"))
     return -1;
 
-  if (loadVHostConfFilesLocation (vhostConfigurationFile))
+  if (loadConfFileLocation (vhostConfigurationFile, "virtualhosts.xml"))
     return -1;
 
   if (loadExternalPath (externalPath))

-----------------------------------------------------------------------

Summary of changes:
 myserver/documentation/basic_configuration.texi |    5 +
 myserver/src/myserver.cpp                       |  238 ++++++++++-------------
 2 files changed, 108 insertions(+), 135 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Tue Sep 29 17:27:55 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MskEl-0007Si-Mq
	for mharc-myserver-commit@gnu.org; Tue, 29 Sep 2009 17:27:55 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MskEj-0007QE-I7
	for myserver-commit@gnu.org; Tue, 29 Sep 2009 17:27:53 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MskEh-0007Ml-6c
	for myserver-commit@gnu.org; Tue, 29 Sep 2009 17:27:52 -0400
Received: from [199.232.76.173] (port=53008 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MskEg-0007MX-Tc
	for myserver-commit@gnu.org; Tue, 29 Sep 2009 17:27:51 -0400
Received: from savannah.gnu.org ([199.232.41.3]:48325 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MskEf-0007uP-Sd
	for myserver-commit@gnu.org; Tue, 29 Sep 2009 17:27:50 -0400
Received: from [10.0.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MskEf-0000Qc-Dx
	for myserver-commit@gnu.org; Tue, 29 Sep 2009 21:27:49 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MskEZ-0000Pe-26
	for myserver-commit@gnu.org; Tue, 29 Sep 2009 21:27:49 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: b96d1c45627f35ff04385d5a7b5f8c5735947767
X-Git-Newrev: 457efd5092d04f2bf79010fd98f3bde3ae44495a
Message-Id: <E1MskEZ-0000Pe-26@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 29 Sep 2009 21:27:47 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 457efd5092d04f2bf79010fd98f3bde3ae44495a
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 29 Sep 2009 21:27:54 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  457efd5092d04f2bf79010fd98f3bde3ae44495a (commit)
       via  71efb52308209edc2e10c0f098b99445fb6582ee (commit)
       via  e2384d1de2a637500956b0676477b8d01da840c3 (commit)
       via  a77d3a8e5c37806253dcd582f9043229752e5647 (commit)
       via  b1421c10711c1452f3d4e868e13eea41195479f6 (commit)
       via  bd33850e68efef748d30e7e5012fd76258d1b559 (commit)
       via  5e54aa000139364bef420bcca875ac3b1b604f95 (commit)
       via  3574c14dc0924a1f0cb14176370c26356917171e (commit)
       via  999eb4c28da000f75405c8d59a155e394a216ffd (commit)
      from  b96d1c45627f35ff04385d5a7b5f8c5735947767 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 457efd5092d04f2bf79010fd98f3bde3ae44495a
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Sep 29 23:27:35 2009 +0200

    Data read from the XML file is not copied on an internal buffer before.

diff --git a/myserver/include/base/xml/xml_parser.h b/myserver/include/base/xml/xml_parser.h
index b3936ff..f2ab251 100644
--- a/myserver/include/base/xml/xml_parser.h
+++ b/myserver/include/base/xml/xml_parser.h
@@ -1,7 +1,7 @@
 /* -*- mode: c++ -*- */
 /*
 MyServer
-Copyright (C) 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 2002, 2003, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 3 of the License, or
@@ -101,7 +101,6 @@ private:
   xmlXPathContextPtr xpathCtx;
   bool useXpath;
   xmlDocPtr doc;
-  string buffer;
   xmlNodePtr cur;
   xmlNodePtr prevCur;
   xmlNodePtr lastNode;
diff --git a/myserver/src/base/xml/xml_parser.cpp b/myserver/src/base/xml/xml_parser.cpp
index cd12803..94b0463 100644
--- a/myserver/src/base/xml/xml_parser.cpp
+++ b/myserver/src/base/xml/xml_parser.cpp
@@ -31,9 +31,9 @@ extern "C"
  * \param len Length
  * \return Returns the length
  */
-static int MemBufWriteCallback(void * context, const char * buffer, int len)
+static int MemBufWriteCallback (void * context, const char * buffer, int len)
 {
-  ((MemBuf *)context)->addBuffer((const void *)buffer, len);
+  ((MemBuf *)context)->addBuffer ((const void *)buffer, len);
   return len;
 }
 
@@ -43,7 +43,7 @@ static int MemBufWriteCallback(void * context, const char * buffer, int len)
  * \param context Context
  * \return Returns 0
  */
-static int MemBufCloseCallback(void * context)
+static int MemBufCloseCallback (void *context)
 {
   return 0;
 }
@@ -54,9 +54,9 @@ static int MemBufCloseCallback(void * context)
  * Calls xmlInitParser()
  * @return Returns true
  */
-bool XmlParser::startXML()
+bool XmlParser::startXML ()
 {
-  xmlInitParser();
+  xmlInitParser ();
   return 1;
 }
 
@@ -65,9 +65,9 @@ bool XmlParser::startXML()
  * Cleans up the libxml2 library.
  * @return Returns true
  */
-bool XmlParser::cleanXML()
+bool XmlParser::cleanXML ()
 {
-  xmlCleanupParser();
+  xmlCleanupParser ();
   return 1;
 }
 
@@ -78,48 +78,46 @@ bool XmlParser::cleanXML()
  * \param useXpath Specify if XPath is enabled.
  * \return Returns 0 on success, non zero values on failure
  */
-int XmlParser::open(const char* filename, bool useXpath)
+int XmlParser::open (const char* filename, bool useXpath)
 {
   cur = NULL;
   this->useXpath = useXpath;
 
-  if(!FilesUtility::fileExists(filename))
+  if (!FilesUtility::fileExists (filename))
     return -1;
 
-  if(doc!= NULL)
+  if (doc!= NULL)
     close();
 
-  doc = xmlParseFile(filename);
+  doc = xmlParseFile (filename);
 
-  if(doc == NULL)
+  if (doc == NULL)
     return -1;
 
-  cur = xmlDocGetRootElement(doc);
-
-  if(!cur)
+  cur = xmlDocGetRootElement (doc);
+  if (!cur)
   {
-    close();
+    close ();
     return -1;
   }
 
-  mtime = FilesUtility::getLastModTime(filename);
+  mtime = FilesUtility::getLastModTime (filename);
 
-  if(mtime == static_cast<time_t>(-1))
+  if (mtime == static_cast<time_t>(-1))
   {
-    close();
+    close ();
     return -1;
   }
 
-  if(useXpath)
+  if (useXpath)
   {
-    xpathCtx = xmlXPathNewContext(doc);
-    if(xpathCtx == NULL)
+    xpathCtx = xmlXPathNewContext (doc);
+    if (xpathCtx == NULL)
     {
-      close();
+      close ();
       return -1;
     }
   }
-
   return 0;
 }
 
@@ -128,7 +126,7 @@ int XmlParser::open(const char* filename, bool useXpath)
  * Gets the last modification time of the file
  * @return Returns last modification time
  */
-time_t XmlParser::getLastModTime()
+time_t XmlParser::getLastModTime ()
 {
   return mtime;
 }
@@ -139,51 +137,50 @@ time_t XmlParser::getLastModTime()
  * \param useXpath Specify if XPath is enabled.
  * \return Returns 0 on succes, non 0 on failure
  */
-int XmlParser::openMemBuf(MemBuf & memory, bool useXpath)
+int XmlParser::openMemBuf (MemBuf & memory, bool useXpath)
 {
   mtime = 0;
   cur = NULL;
   this->useXpath = useXpath;
 
-  if(memory.getLength() == 0)
+  if (memory.getLength () == 0)
     return -1;
 
-  if(!doc)
-  {
-    doc = xmlParseMemory((const char * )memory.getBuffer(),
-                         memory.getLength());
-  }
+  if (!doc)
+    {
+      doc = xmlParseMemory ((const char * )memory.getBuffer (),
+                            memory.getLength ());
+    }
   else
-    close();
+    close ();
 
-  if(!doc)
+  if (!doc)
     return -1;
 
-  cur = xmlDocGetRootElement(doc);
-
-  if(!cur)
-  {
-    close();
-    return -1;
-  }
+  cur = xmlDocGetRootElement (doc);
 
-  if(useXpath)
-  {
-    xpathCtx = xmlXPathNewContext(doc);
-    if(xpathCtx == NULL)
+  if (!cur)
     {
-      close();
+      close ();
       return -1;
     }
-  }
 
+  if (useXpath)
+    {
+      xpathCtx = xmlXPathNewContext (doc);
+    if (xpathCtx == NULL)
+      {
+      close ();
+      return -1;
+      }
+    }
   return 0;
 }
 
 /**
  * Constructor of the XmlParser class
  */
-XmlParser::XmlParser()
+XmlParser::XmlParser ()
 {
   doc = NULL;
   cur = NULL;
@@ -198,16 +195,16 @@ XmlParser::XmlParser()
  * Destructor of the XmlParser class
  * Destroys the XmlParser object
  */
-XmlParser::~XmlParser()
+XmlParser::~XmlParser ()
 {
-  close();
+  close ();
 }
 
 /**
  * Returns the XML document
  * @return Returns XML document
  */
-xmlDocPtr XmlParser::getDoc()
+xmlDocPtr XmlParser::getDoc ()
 {
   return doc;
 }
@@ -217,44 +214,23 @@ xmlDocPtr XmlParser::getDoc()
  * \param vName vName of the root child elment
  * \return Returns the value of the vName
  */
-char *XmlParser::getValue(const char* vName)
+char *XmlParser::getValue (const char* vName)
 {
   char *ret = NULL;
   xmlNodePtr lcur;
-  cur = xmlDocGetRootElement(doc);
+  cur = xmlDocGetRootElement (doc);
 
-  if(!cur)
+  if (!cur)
     return 0;
 
   lcur = cur->xmlChildrenNode;
-  buffer.assign("");
 
-  while(lcur)
+  while (lcur)
   {
-    if(!xmlStrcmp(lcur->name, (const xmlChar *)vName))
+    if (!xmlStrcmp (lcur->name, (const xmlChar *)vName))
     {
       lastNode = lcur;
-
-      if(lcur->children->content)
-      {
-        int inlen = strlen((const char*)lcur->children->content);
-        int outlen = inlen * 2;
-        char* tmpBuff = new char[outlen];
-        if(UTF8Toisolat1((unsigned char*)tmpBuff, &outlen,
-                              (unsigned char*)lcur->children->content, &inlen) >= 0)
-        {
-          tmpBuff[outlen] = '\0';
-          buffer.assign(tmpBuff);
-        }
-        else
-          buffer.assign((char*)lcur->children->content);
-
-        delete [] tmpBuff;
-
-        ret = (char*)buffer.c_str();
-      }
-
-      break;
+      return (char*)lcur->children->content;
     }
 
     lcur = lcur->next;
@@ -270,24 +246,22 @@ char *XmlParser::getValue(const char* vName)
  * \param value
  * \return Returns 0 on success, non zero on failures
  */
-int XmlParser::setValue(const char* vName, const char *value)
+int XmlParser::setValue (const char* vName, const char *value)
 {
   xmlNodePtr lcur = cur->xmlChildrenNode;
-  buffer.assign("");
-
-  while(lcur)
+  while (lcur)
   {
-    if(!xmlStrcmp(lcur->name, (const xmlChar *)vName))
+    if (!xmlStrcmp (lcur->name, (const xmlChar *)vName))
     {
       lastNode = lcur;
 
-      if(lcur->children->content)
-        strcpy((char*)lcur->children->content, value);
+      if (lcur->children->content)
+        strcpy ((char*)lcur->children->content, value);
 
       return 0;
     }
 
-    lcur=lcur->next;
+    lcur = lcur->next;
   }
 
   return 1;
@@ -300,21 +274,20 @@ int XmlParser::setValue(const char* vName, const char *value)
  * \param attr Attribute
  * \return
  */
-char *XmlParser::getAttr(const char* field, const char *attr)
+char *XmlParser::getAttr (const char* field, const char *attr)
 {
   xmlNodePtr lcur = cur->xmlChildrenNode;
-  buffer.assign("");
 
-  while(lcur)
+  while (lcur)
   {
-    if(!xmlStrcmp(lcur->name, (const xmlChar *)field))
+    if (!xmlStrcmp (lcur->name, (const xmlChar *)field))
     {
       lastNode = lcur;
       xmlAttr *attrs =  lcur->properties;
 
-      while(attrs)
+      while (attrs)
       {
-        if(!xmlStrcmp(attrs->name, (const xmlChar *)attr))
+        if (!xmlStrcmp (attrs->name, (const xmlChar *)attr))
         {
           return (char*)attrs->children->content;
         }
@@ -335,26 +308,26 @@ char *XmlParser::getAttr(const char* field, const char *attr)
  *\return NULL on errors.
  *\return The XmlXPathResult containing the result.
  */
-XmlXPathResult* XmlParser::evaluateXpath(const char* expr)
+XmlXPathResult* XmlParser::evaluateXpath (const char* expr)
 {
   xmlXPathObjectPtr xpathObj;
 
-  if(!useXpath)
+  if (!useXpath)
     return NULL;
 
-  xpathObj = xmlXPathEvalExpression((const xmlChar*)expr, xpathCtx);
+  xpathObj = xmlXPathEvalExpression ((const xmlChar*)expr, xpathCtx);
 
-  if(xpathObj == NULL)
+  if (xpathObj == NULL)
     return NULL;
 
-  return new XmlXPathResult(xpathObj);
+  return new XmlXPathResult (xpathObj);
 }
 
 
 /**
  * Frees the memory, use by the XmlParser class
  */
-int XmlParser::close()
+int XmlParser::close ()
 {
   int ret = 1;
 
@@ -364,10 +337,8 @@ int XmlParser::close()
       ret = 0;
     }
 
-  if(useXpath && xpathCtx)
-    {
-      xmlXPathFreeContext(xpathCtx);
-    }
+  if (useXpath && xpathCtx)
+    xmlXPathFreeContext(xpathCtx);
 
   doc = NULL;
   cur = NULL;
@@ -387,9 +358,9 @@ int XmlParser::close()
  */
 int XmlParser::save(const char *filename,int *nbytes)
 {
-  int err = xmlSaveFile(filename,doc);
+  int err = xmlSaveFile (filename,doc);
 
-  if(nbytes)
+  if (nbytes)
     *nbytes = err;
 
   return err;
@@ -404,22 +375,22 @@ int XmlParser::save(const char *filename,int *nbytes)
  * \param nbytes Amount of bytes
  * \return Returns 0 on success, non 0 on failures
  */
-int XmlParser::saveMemBuf(MemBuf & memory,int *nbytes)
+int XmlParser::saveMemBuf (MemBuf & memory,int *nbytes)
 {
   /*! Initialize the callback struct. */
   xmlOutputBufferPtr callback;
-  callback = xmlOutputBufferCreateIO(MemBufWriteCallback,
-                                       MemBufCloseCallback,
-                                       (void *)&memory,
-                                       NULL);
+  callback = xmlOutputBufferCreateIO (MemBufWriteCallback,
+                                      MemBufCloseCallback,
+                                      (void *)&memory,
+                                      NULL);
 
   /*! Clear the buffer */
-  memory.free();
+  memory.free ();
 
   /*! Let libxml2 fill the MemBuf class with our interal callbacks. */
-  int err = xmlSaveFileTo(callback, doc, NULL);
+  int err = xmlSaveFileTo (callback, doc, NULL);
 
-  if(nbytes)
+  if (nbytes)
     *nbytes = err;
 
   return err;
@@ -430,18 +401,18 @@ int XmlParser::saveMemBuf(MemBuf & memory,int *nbytes)
  * Starts a new XML tree for a new file
  * \param root roote elment entry
  */
-void XmlParser::newfile(const char * root)
+void XmlParser::newfile (const char * root)
 {
-  if(doc != NULL)
+  if (doc != NULL)
     close();
 
-  doc = xmlNewDoc((const xmlChar*)"1.0");
-  cur = xmlNewDocNode(doc, NULL, (const xmlChar*)root, NULL);
+  doc = xmlNewDoc ((const xmlChar*)"1.0");
+  cur = xmlNewDocNode (doc, NULL, (const xmlChar*)root, NULL);
 
-  xmlDocSetRootElement(doc, cur);
+  xmlDocSetRootElement (doc, cur);
 
-  addLineFeed();
-  addLineFeed();
+  addLineFeed ();
+  addLineFeed ();
 }
 
 
@@ -450,12 +421,12 @@ void XmlParser::newfile(const char * root)
  * \param name Child name
  * \param value Value of the child
  */
-void XmlParser::addChild(const char * name, const char * value)
+void XmlParser::addChild (const char * name, const char * value)
 {
-  lastNode = xmlNewTextChild(cur, NULL, (const xmlChar*)name,
-                               (const xmlChar*)value);
+  lastNode = xmlNewTextChild (cur, NULL, (const xmlChar*)name,
+                              (const xmlChar*)value);
 
-  addLineFeed();
+  addLineFeed ();
 }
 
 
@@ -464,16 +435,15 @@ void XmlParser::addChild(const char * name, const char * value)
  * Only one level for now
  * \param name Name of the sub group
  */
-void XmlParser::addGroup(const char * name)
+void XmlParser::addGroup (const char * name)
 {
-  if(prevCur == NULL)
-  {
-    prevCur = cur;
-    cur = xmlNewTextChild(cur, NULL, (const xmlChar*)name, NULL);
-    lastNode = cur;
-
-    addLineFeed();
-  }
+  if (prevCur == NULL)
+    {
+      prevCur = cur;
+      cur = xmlNewTextChild (cur, NULL, (const xmlChar*)name, NULL);
+      lastNode = cur;
+      addLineFeed ();
+    }
 }
 
 
@@ -481,15 +451,14 @@ void XmlParser::addGroup(const char * name)
  * Ends the sub group, if any
  * Only one level for now
  */
-void XmlParser::endGroup()
+void XmlParser::endGroup ()
 {
-  if(prevCur != NULL)
+  if (prevCur != NULL)
   {
     cur = prevCur;
     prevCur = NULL;
-
-    addLineFeed();
-    addLineFeed();
+    addLineFeed ();
+    addLineFeed ();
   }
 }
 
@@ -499,25 +468,25 @@ void XmlParser::endGroup()
  * \param name Name
  * \param value Value
  */
-void XmlParser::setAttr(const char * name, const char * value)
+void XmlParser::setAttr (const char * name, const char * value)
 {
-  if(lastNode == NULL)
+  if (lastNode == NULL)
     return;
 
-  xmlSetProp(lastNode, (const xmlChar*)name, (const xmlChar*)value);
+  xmlSetProp (lastNode, (const xmlChar*)name, (const xmlChar*)value);
 }
 
 
 /**
  * Adds a line feed to the XML data
  */
-void XmlParser::addLineFeed()
+void XmlParser::addLineFeed ()
 {
 #ifdef WIN32
-    xmlNodePtr endline = xmlNewDocText(doc, (const xmlChar *)"\r\n");
+    xmlNodePtr endline = xmlNewDocText (doc, (const xmlChar *)"\r\n");
 #else
-    xmlNodePtr endline = xmlNewDocText(doc, (const xmlChar *)"\n");
+    xmlNodePtr endline = xmlNewDocText (doc, (const xmlChar *)"\n");
 #endif
 
-  xmlAddChild(cur, endline);
+  xmlAddChild (cur, endline);
 }



commit 71efb52308209edc2e10c0f098b99445fb6582ee
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Sep 29 23:16:10 2009 +0200

    Clear the buffer every time a command is sent.

diff --git a/misc/el_control_client/myserver-control.el b/misc/el_control_client/myserver-control.el
index bc5da99..7812922 100644
--- a/misc/el_control_client/myserver-control.el
+++ b/misc/el_control_client/myserver-control.el
@@ -30,7 +30,6 @@
 
 (defun myserver-control-init (server port)
   "Initialize a connection to the specified SERVER using the PORT."
-  (when (get-buffer "myserver") (kill-buffer "myserver"))
   (let ((proc (starttls-open-stream "myserver" 
                                        (get-buffer-create "myserver")
                                        server
@@ -43,8 +42,8 @@
   "Send the message MSG to the specified PROC and
    return the response header lines."
   (process-send-string proc msg)
-      
   (with-current-buffer "myserver"
+    (erase-buffer)
     (let ((i 3)
           (np 0)
           (start 0)



commit e2384d1de2a637500956b0676477b8d01da840c3
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Sep 29 23:15:24 2009 +0200

    Access to the global configuration is done trough the `MainConfiguration' interface.  Realize this new interface in the `XmlMainConfiguration' class that accesses a XML stored configuration.

diff --git a/myserver/configure.ac b/myserver/configure.ac
index 5a8ceef..a3c7f6b 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -403,6 +403,7 @@ AC_CONFIG_FILES([ po/Makefile.in
     include/log/Makefile
     include/log/stream/Makefile
     include/conf/Makefile
+    include/conf/main/Makefile
     include/conf/mime/Makefile
     include/conf/security/Makefile
     include/conf/vhost/Makefile
@@ -457,6 +458,7 @@ AC_CONFIG_FILES([ po/Makefile.in
     src/log/Makefile
     src/log/stream/Makefile
     src/conf/Makefile
+    src/conf/main/Makefile
     src/conf/mime/Makefile
     src/conf/security/Makefile
     src/conf/vhost/Makefile
diff --git a/myserver/include/conf/Makefile.am b/myserver/include/conf/Makefile.am
index 69c7d29..a51b361 100644
--- a/myserver/include/conf/Makefile.am
+++ b/myserver/include/conf/Makefile.am
@@ -1,3 +1,3 @@
 confincludedir=$(includedir)/myserver/include/conf
 confinclude_HEADERS = nodetree.h xml_conf.h
-SUBDIRS = mime security vhost
+SUBDIRS = main mime security vhost
diff --git a/myserver/include/conf/main/Makefile.am b/myserver/include/conf/main/Makefile.am
new file mode 100644
index 0000000..65dc283
--- /dev/null
+++ b/myserver/include/conf/main/Makefile.am
@@ -0,0 +1,3 @@
+mainincludedir=$(includedir)/myserver/include/conf/main
+maininclude_HEADERS = main_configuration.h xml_main_configuration.h
+SUBDIRS =
diff --git a/myserver/include/conf/main/main_configuration.h b/myserver/include/conf/main/main_configuration.h
new file mode 100644
index 0000000..6dbbc0e
--- /dev/null
+++ b/myserver/include/conf/main/main_configuration.h
@@ -0,0 +1,42 @@
+/* -*- mode: c++ -*- */
+/*
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef MAIN_CONFIGURATION_H
+# define MAIN_CONFIGURATION_H
+
+# include "stdafx.h"
+#include <string>
+using namespace std;
+
+/*! Define the interface to read from the main configuration file.  */
+class MainConfiguration
+{
+public:
+  MainConfiguration ();
+  ~MainConfiguration ();
+  virtual char *getValue (const char* field) = 0;
+  virtual char *getValue (string const &field);
+  virtual int close ()
+  {
+    return 0;
+  }
+private:
+
+};
+
+#endif
diff --git a/myserver/include/conf/main/xml_main_configuration.h b/myserver/include/conf/main/xml_main_configuration.h
new file mode 100644
index 0000000..ec82f82
--- /dev/null
+++ b/myserver/include/conf/main/xml_main_configuration.h
@@ -0,0 +1,64 @@
+/* -*- mode: c++ -*- */
+/*
+MyServer
+Copyright (C) 2009 Free Software Foundation, Inc.
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef XML_MAIN_CONFIGURATION_H
+# define XML_MAIN_CONFIGURATION_H
+
+# include "stdafx.h"
+# include <include/conf/main/main_configuration.h>
+# include <include/base/xml/xml_parser.h>
+
+
+class XmlMainConfiguration : public MainConfiguration
+{
+public:
+  virtual int open (const char* filename)
+  {
+    return xmlParser.open (filename);
+  }
+
+  virtual int open (string const &filename)
+  {
+    return open (filename.c_str());
+  };
+
+  virtual char *getValue (const char* field)
+  {
+    return xmlParser.getValue (field);
+  }
+
+  virtual char *getValue (string const &field)
+  {
+    return getValue (field.c_str());
+  };
+
+  virtual int close ()
+  {
+    return xmlParser.close ();
+  }
+
+  virtual xmlDocPtr getDoc ()
+  {
+    return xmlParser.getDoc ();
+  }
+
+private:
+  XmlParser xmlParser;
+};
+
+#endif
diff --git a/myserver/include/server/server.h b/myserver/include/server/server.h
index ae85ab6..347117c 100644
--- a/myserver/include/server/server.h
+++ b/myserver/include/server/server.h
@@ -47,6 +47,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 # include <include/conf/security/security_manager.h>
 # include <include/conf/security/auth_method_factory.h>
 # include <include/conf/security/validator_factory.h>
+# include <include/conf/main/main_configuration.h>
 
 # include <include/base/slab/slab.h>
 
@@ -163,12 +164,12 @@ public:
 
   LogManager *getLogManager () { return logManager; }
 
-  XmlParser *getXmlConfiguration ();
+  MainConfiguration *getConfiguration ();
 private:
   friend class ClientsThread;
   XmlValidator *xmlValidator;
 
-  XmlParser configurationFileManager;
+  MainConfiguration *configurationFileManager;
 
 # ifdef WIN32
   friend int __stdcall control_handler(u_long control_type);
diff --git a/myserver/src/base/xml/xml_parser.cpp b/myserver/src/base/xml/xml_parser.cpp
index 770a3c8..cd12803 100644
--- a/myserver/src/base/xml/xml_parser.cpp
+++ b/myserver/src/base/xml/xml_parser.cpp
@@ -356,22 +356,25 @@ XmlXPathResult* XmlParser::evaluateXpath(const char* expr)
  */
 int XmlParser::close()
 {
-  if(doc)
-  {
-    xmlFreeDoc(doc);
-  }
+  int ret = 1;
+
+  if (doc)
+    {
+      xmlFreeDoc (doc);
+      ret = 0;
+    }
 
   if(useXpath && xpathCtx)
-  {
-    xmlXPathFreeContext(xpathCtx);
-  }
+    {
+      xmlXPathFreeContext(xpathCtx);
+    }
 
   doc = NULL;
   cur = NULL;
   prevCur = NULL;
   lastNode = NULL;
 
-  return 0;
+  return ret;
 }
 
 /**
diff --git a/myserver/src/conf/Makefile.am b/myserver/src/conf/Makefile.am
index 00cd655..8cd6693 100644
--- a/myserver/src/conf/Makefile.am
+++ b/myserver/src/conf/Makefile.am
@@ -1,6 +1,6 @@
 lib_LIBRARIES = libconf.a
 libconf_a_SOURCES = nodetree.cpp xml_conf.cpp
-SUBDIRS = mime security vhost
+SUBDIRS = main mime security vhost
 AM_CPPFLAGS = $(all_includes)
 
 install:
diff --git a/myserver/src/conf/main/Makefile.am b/myserver/src/conf/main/Makefile.am
new file mode 100644
index 0000000..440c502
--- /dev/null
+++ b/myserver/src/conf/main/Makefile.am
@@ -0,0 +1,4 @@
+lib_LIBRARIES = libmain.a
+libmain_a_SOURCES = main_configuration.cpp xml_main_configuration.cpp
+SUBDIRS =
+AM_CPPFLAGS = $(all_includes)
diff --git a/myserver/src/conf/main/main_configuration.cpp b/myserver/src/conf/main/main_configuration.cpp
new file mode 100644
index 0000000..98dc366
--- /dev/null
+++ b/myserver/src/conf/main/main_configuration.cpp
@@ -0,0 +1,35 @@
+/*
+  MyServer
+  Copyright (C) 2009 Free Software Foundation, Inc.
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <include/conf/main/main_configuration.h>
+
+
+MainConfiguration::MainConfiguration ()
+{
+
+}
+
+MainConfiguration::~MainConfiguration ()
+{
+
+}
+
+char *MainConfiguration::getValue (string const &field)
+{
+  return getValue (field.c_str());
+};
+
diff --git a/myserver/src/conf/main/xml_main_configuration.cpp b/myserver/src/conf/main/xml_main_configuration.cpp
new file mode 100644
index 0000000..637ab4f
--- /dev/null
+++ b/myserver/src/conf/main/xml_main_configuration.cpp
@@ -0,0 +1,18 @@
+/*
+  MyServer
+  Copyright (C) 2009 Free Software Foundation, Inc.
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <include/conf/main/xml_main_configuration.h>
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index c9d0848..fc8396b 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -32,6 +32,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/base/socket/ssl_socket.h>
 
 #include <include/conf/xml_conf.h>
+#include <include/conf/main/xml_main_configuration.h>
 
 #include <cstdarg>
 
@@ -89,6 +90,7 @@ Server::Server () : connectionsScheduler (this),
   xmlValidator = new XmlValidator ();
   initLogManager ();
   connectionsPoolLock.init ();
+  configurationFileManager = NULL;
 }
 
 void
@@ -159,6 +161,9 @@ Server::~Server ()
   if (logManager)
     delete logManager;
 
+  if (configurationFileManager)
+    delete configurationFileManager;
+
   connectionsPoolLock.destroy ();
 }
 
@@ -317,7 +322,9 @@ int Server::postLoad ()
     }
 
 
-  configurationFileManager.close ();
+  configurationFileManager->close ();
+  delete configurationFileManager;
+  configurationFileManager = NULL;
 
   return 0;
 }
@@ -746,17 +753,15 @@ int Server::terminate ()
   return 0;
 }
 
-
 /*!
  * Get a pointer to the configuration file.  It is
  * valid only at startup!
  */
-XmlParser *Server::getXmlConfiguration ()
+MainConfiguration *Server::getConfiguration ()
 {
-  return &configurationFileManager;
+  return configurationFileManager;
 }
 
-
 /*!
  * Here is loaded the configuration of the server.
  * The configuration file is a XML file.
@@ -765,12 +770,12 @@ XmlParser *Server::getXmlConfiguration ()
 int Server::initialize ()
 {
   const char *data;
+  XmlMainConfiguration *xmlMainConf;
 
 #ifdef WIN32
   envString = GetEnvironmentStrings ();
 #endif
   connectionsMutex = new Mutex ();
-
   threadsMutex = new Mutex ();
 
   /* Store the default values.  */
@@ -785,10 +790,17 @@ int Server::initialize ()
   maxConnections = 0;
   maxConnectionsToAccept = 0;
 
-  if (configurationFileManager.open (mainConfigurationFile.c_str ()))
-    return -1;
 
-  readHashedData (xmlDocGetRootElement (configurationFileManager.getDoc ())->xmlChildrenNode);
+  xmlMainConf = new XmlMainConfiguration ();
+  if (xmlMainConf->open (mainConfigurationFile.c_str ()))
+    {
+      delete xmlMainConf;
+      return -1;
+    }
+
+  configurationFileManager = xmlMainConf;
+
+  readHashedData (xmlDocGetRootElement (xmlMainConf->getDoc ())->xmlChildrenNode);
 
   /*
    * Process console colors information.
diff --git a/myserver/tests/Makefile.am b/myserver/tests/Makefile.am
index 83007d8..2aa10d9 100644
--- a/myserver/tests/Makefile.am
+++ b/myserver/tests/Makefile.am
@@ -10,7 +10,8 @@ test_log_manager.cpp test_log_stream_factory.cpp test_md5.cpp test_mem_buff.cpp
 test_multicast.cpp test_mutex.cpp test_pipe.cpp test_plugin_info.cpp test_recursive_mutex.cpp test_regex.cpp test_safetime.cpp \
 test_security_cache.cpp test_security_domain.cpp test_security_manager.cpp test_security_token.cpp test_semaphore.cpp test_slab.cpp \
 test_socket.cpp test_socket_pair.cpp test_socket_stream_creator.cpp test_ssl_socket.cpp test_thread.cpp test_unix_socket.cpp \
-test_url.cpp test_utility.cpp test_validator.cpp test_validator_factory.cpp test_xml.cpp test_xml_validator.cpp test_nodetree.cpp
+test_url.cpp test_utility.cpp test_validator.cpp test_validator_factory.cpp test_xml.cpp test_xml_main_configuration.cpp \
+test_xml_validator.cpp test_nodetree.cpp
 
 tests_suite_LDADD = ../src/libmyserver.a $(CPPUNIT_LDFLAGS) $(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(EVENT_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) $(XML_LIBS) $(LDFLAGS)
 
diff --git a/myserver/tests/test_xml_main_configuration.cpp b/myserver/tests/test_xml_main_configuration.cpp
new file mode 100644
index 0000000..91cd8b9
--- /dev/null
+++ b/myserver/tests/test_xml_main_configuration.cpp
@@ -0,0 +1,56 @@
+/*
+ MyServer
+ Copyright (C) 2009 Free Software Foundation, Inc.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <include/conf/main/xml_main_configuration.h>
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+class TestXmlMainConfiguration : public CppUnit::TestFixture
+{
+  /* FIXME: Actually these tests don't really check if things work, simply they
+     check that they don't work when they shouldn't.  */
+	CPPUNIT_TEST_SUITE (TestXmlMainConfiguration);
+	CPPUNIT_TEST (testOpen);
+	CPPUNIT_TEST (testGetDoc);
+	CPPUNIT_TEST (testClose);
+	CPPUNIT_TEST_SUITE_END ();
+
+public:
+	void setUp () {}
+	void tearDown () {}
+	void testOpen ()
+	{
+    XmlMainConfiguration xmlConf;
+		CPPUNIT_ASSERT (xmlConf.open ("bla/bla/bla"));
+	}
+
+	void testGetDoc ()
+	{
+    XmlMainConfiguration xmlConf;
+		CPPUNIT_ASSERT_EQUAL (xmlConf.getDoc (), (xmlDocPtr)NULL);
+	}
+
+	void testClose ()
+	{
+    XmlMainConfiguration xmlConf;
+		CPPUNIT_ASSERT (xmlConf.close ());
+	}
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION (TestXmlMainConfiguration);
diff --git a/plugins/src/http_checker/http_checker.cpp b/plugins/src/http_checker/http_checker.cpp
index 3bc77f2..2019bea 100644
--- a/plugins/src/http_checker/http_checker.cpp
+++ b/plugins/src/http_checker/http_checker.cpp
@@ -20,6 +20,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/base/multicast/multicast.h>
 #include <include/protocol/http/http.h>
 #include <include/plugin/plugin.h>
+#include <include/conf/main/xml_main_configuration.h>
 #include <Python.h>
 
 #ifdef WIN32
@@ -234,7 +235,7 @@ EXPORTABLE(int) load(void* server,void* parser)
   string msg("new-http-request");
   string pythonName("python");
   Plugin* python;
-  XmlParser* configuration;
+  MainConfiguration* configuration;
   xmlDocPtr xmlDoc;
 
   if(!staticData)
@@ -262,8 +263,10 @@ EXPORTABLE(int) load(void* server,void* parser)
       return -1;
     }
 
-  configuration = serverInstance->getXmlConfiguration ();
-  xmlDoc = configuration->getDoc ();
+  configuration = serverInstance->getConfiguration ();
+
+  /* FIXME: DON'T DO THIS.  */
+  xmlDoc = ((XmlMainConfiguration*)configuration)->getDoc ();
 
   for(xmlNodePtr ptr = xmlDoc->children->next->children; ptr; ptr = ptr->next)
     {
diff --git a/plugins/src/python_http_handler/python_http_handler.cpp b/plugins/src/python_http_handler/python_http_handler.cpp
index 377e4d7..508e824 100644
--- a/plugins/src/python_http_handler/python_http_handler.cpp
+++ b/plugins/src/python_http_handler/python_http_handler.cpp
@@ -21,6 +21,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/base/multicast/multicast.h>
 #include <include/protocol/http/http.h>
 #include <include/plugin/plugin.h>
+#include <include/conf/main/xml_main_configuration.h>
 #include <Python.h>
 
 
@@ -406,8 +407,9 @@ EXPORTABLE(int) load (void* server)
 	string msg("new-http-request");
 	string pythonName("python");
 	Plugin* python;
-	XmlParser* configuration;
+  MainConfiguration* configuration;
 	xmlDocPtr xmlDoc;
+
 	if(!staticData)
     {
       serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("PythonHttpHandler: Invalid HTTP static data"));
@@ -431,8 +433,11 @@ EXPORTABLE(int) load (void* server)
       serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("PythonHttpHandler: Cannot find method initModule in executors::python"));
       return -1;
     }
-	configuration = serverInstance->getXmlConfiguration();
-	xmlDoc = configuration->getDoc();
+
+  configuration = serverInstance->getConfiguration ();
+
+  /* FIXME: DON'T DO THIS.  */
+  xmlDoc = ((XmlMainConfiguration*)configuration)->getDoc ();
 
 	for(xmlNodePtr ptr = xmlDoc->children->next->children; ptr; ptr = ptr->next)
 	  {
diff --git a/plugins/src/rules_checker/rules_checker.cpp b/plugins/src/rules_checker/rules_checker.cpp
index 954d78b..682f29d 100644
--- a/plugins/src/rules_checker/rules_checker.cpp
+++ b/plugins/src/rules_checker/rules_checker.cpp
@@ -19,6 +19,7 @@
 #include <string.h>
 #include <include/server/server.h>
 #include <include/protocol/http/http.h>
+#include <include/conf/main/xml_main_configuration.h>
 #include "heading.h"
 
 #ifdef WIN32
@@ -98,7 +99,7 @@ EXPORTABLE(int) load (void* server)
   Server* serverInstance = (Server*)server;
   HttpStaticData* staticData =(HttpStaticData*) serverInstance->getGlobalData("http-static");
   string msg("new-http-request");
-  XmlParser* configuration;
+  MainConfiguration* configuration;
   xmlDocPtr xmlDoc;
   if(!staticData)
     {
@@ -109,8 +110,10 @@ EXPORTABLE(int) load (void* server)
 
   staticData->addMulticast(msg, &observer);
 
-  configuration = serverInstance->getXmlConfiguration();
-  xmlDoc = configuration->getDoc();
+  configuration = serverInstance->getConfiguration ();
+
+  /* FIXME: DON'T DO THIS.  */
+  xmlDoc = ((XmlMainConfiguration*)configuration)->getDoc ();
 
   for(xmlNodePtr ptr = xmlDoc->children->next->children; ptr; ptr = ptr->next)
     {



commit a77d3a8e5c37806253dcd582f9043229752e5647
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Sep 29 21:46:55 2009 +0200

    Get the `server.max_files_cache' value by `Server::getData ()'.

diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index fd8d5b2..c9d0848 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -851,7 +851,7 @@ int Server::initialize ()
   if (data)
     maxLogFileSize=(u_long)atol(data);
 
-  data = configurationFileManager.getValue ("server.max_files_cache");
+  data = getData ("server.max_files_cache");
   if (data)
     {
       u_long maxSize = (u_long)atol(data);



commit b1421c10711c1452f3d4e868e13eea41195479f6
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Sep 29 21:26:48 2009 +0200

    Remove `if' statement having the same two source branches.

diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index c7acd0b..4170385 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -620,7 +620,6 @@ void  __stdcall myServerMainNT (u_long, LPTSTR*)
   try
     {
       Server::createInstance ();
-
     }
   catch(...)
     {
@@ -678,12 +677,8 @@ void __stdcall myServerCtrlHandler(u_long fdwControl)
 
     case SERVICE_CONTROL_CONTINUE:
       break;
-    default:
-      if (fdwControl >= 128 && fdwControl <= 255)
-        break;
-      else
-        break;
     }
+
   SetServiceStatus (MyServiceStatusHandle, &MyServiceStatus);
 }
 #endif



commit bd33850e68efef748d30e7e5012fd76258d1b559
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Sep 29 21:14:29 2009 +0200

    Make `make check' again recursive.

diff --git a/myserver/Makefile.am b/myserver/Makefile.am
index 3891b2a..8b80a2e 100644
--- a/myserver/Makefile.am
+++ b/myserver/Makefile.am
@@ -19,6 +19,3 @@ localedir.h: Makefile
 
 all: localedir.h
 # Generate the localedir.h file before any other rule.
-
-check-recursive:
-	(cd tests; $(MAKE) check)



commit 5e54aa000139364bef420bcca875ac3b1b604f95
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Sep 29 21:12:09 2009 +0200

    Use string's instead of pointers to string's to store configuration files name.

diff --git a/myserver/include/server/server.h b/myserver/include/server/server.h
index a671ccf..ae85ab6 100644
--- a/myserver/include/server/server.h
+++ b/myserver/include/server/server.h
@@ -229,7 +229,6 @@ private:
   string *ipAddresses;
   char serverName[HOST_NAME_MAX + 1];
   string* path;
-  string* externalPath;
   int initialize();
   int addThread(bool staticThread = false);
   ConnectionPtr addConnectionToList(Socket* s, MYSERVER_SOCKADDRIN *asock_in,
@@ -255,9 +254,12 @@ private:
 
   int purgeThreads();
   int reboot();
-  string* mainConfigurationFile;
-  string* vhostConfigurationFile;
-  string* mimeConfigurationFile;
+
+  string mainConfigurationFile;
+  string vhostConfigurationFile;
+  string mimeConfigurationFile;
+  string externalPath;
+
   PluginsManager pluginsManager;
   ProcessServerManager processServerManager;
   ConnectionsScheduler connectionsScheduler;
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 36f5f06..fd8d5b2 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -80,10 +80,6 @@ Server::Server () : connectionsScheduler (this),
   serverReady = false;
   throttlingRate = 0;
   mimeManager = 0;
-  mimeConfigurationFile = 0;
-  mainConfigurationFile = 0;
-  vhostConfigurationFile = 0;
-  externalPath = 0;
   path = 0;
   ipAddresses = 0;
   vhostList = 0;
@@ -115,26 +111,10 @@ Server::initLogManager ()
 bool Server::resetConfigurationPaths (string &mainConf, string &mimeConf,
 				     string &vhostConf, string &externPath)
 {
-  if (!mainConfigurationFile)
-    mainConfigurationFile = new string (mainConf);
-  else
-    mainConfigurationFile->assign (mainConf);
-
-  if (!mimeConfigurationFile)
-    mimeConfigurationFile = new string (mimeConf);
-  else
-    mimeConfigurationFile->assign (mimeConf);
-
-  if (!vhostConfigurationFile)
-    vhostConfigurationFile = new string (vhostConf);
-  else
-    vhostConfigurationFile->assign (vhostConf);
-
-  if (!externalPath)
-    externalPath = new string (externPath);
-  else
-    externalPath->assign (externPath);
-
+  mainConfigurationFile = mainConf;
+  mimeConfigurationFile = mimeConf;
+  vhostConfigurationFile = vhostConf;
+  externalPath = externPath;
   return true;
 }
 
@@ -166,19 +146,6 @@ Server::~Server ()
   if (vhostList)
     delete vhostList;
 
-  delete vhostConfigurationFile;
-  vhostConfigurationFile = 0;
-
-  delete mainConfigurationFile;
-  mainConfigurationFile = 0;
-
-  delete mimeConfigurationFile;
-  mimeConfigurationFile = 0;
-
-  if (externalPath)
-    delete externalPath;
-  externalPath = 0;
-
   if (xmlValidator)
     delete xmlValidator;
 
@@ -301,7 +268,7 @@ int Server::postLoad ()
 
   mimeManager = new MimeManager ();
 
-  if (int nMIMEtypes = mimeManager->loadXML(mimeConfigurationFile->c_str ()))
+  if (int nMIMEtypes = mimeManager->loadXML(mimeConfigurationFile.c_str ()))
     log (MYSERVER_LOG_MSG_INFO, _("Using %i MIME types"), nMIMEtypes);
   else
     log (MYSERVER_LOG_MSG_ERROR, _("Error while loading MIME types"));
@@ -328,7 +295,7 @@ int Server::postLoad ()
   loadPlugins ();
 
   /* Load the virtual hosts configuration from the xml file.  */
-  vhostList->loadXMLConfigurationFile (vhostConfigurationFile->c_str ());
+  vhostList->loadXMLConfigurationFile (vhostConfigurationFile.c_str ());
 
   if (path == 0)
     path = new string ();
@@ -372,7 +339,7 @@ void Server::loadPlugins ()
                               new HttpsProtocol(),
                               new FtpProtocol(),
                               new ControlProtocol(),
-                              0};
+                              NULL};
 
   for (int j = 0; protocolsSet[j]; j++)
     {
@@ -383,7 +350,7 @@ void Server::loadPlugins ()
       getProtocolsManager ()->addProtocol (protocolName, protocol);
     }
 
-  getPluginsManager ()->preLoad (this, *externalPath);
+  getPluginsManager ()->preLoad (this, externalPath);
   getPluginsManager ()->load (this);
   getPluginsManager ()->postLoad (this);
 }
@@ -399,10 +366,9 @@ void Server::mainLoop()
 
   u_long purgeThreadsCounter = 0;
 
-  mainConfTime = FilesUtility::getLastModTime (mainConfigurationFile->c_str ());
-  hostsConfTime =
-    FilesUtility::getLastModTime (vhostConfigurationFile->c_str ());
-  mimeConfTime = FilesUtility::getLastModTime (mimeConfigurationFile->c_str ());
+  mainConfTime = FilesUtility::getLastModTime (mainConfigurationFile.c_str ());
+  hostsConfTime = FilesUtility::getLastModTime (vhostConfigurationFile.c_str ());
+  mimeConfTime = FilesUtility::getLastModTime (mimeConfigurationFile.c_str ());
 
   /*
    * Keep thread alive.
@@ -423,11 +389,11 @@ void Server::mainLoop()
       if (autoRebootEnabled)
         {
           time_t mainConfTimeNow =
-            FilesUtility::getLastModTime (mainConfigurationFile->c_str ());
+            FilesUtility::getLastModTime (mainConfigurationFile.c_str ());
           time_t hostsConfTimeNow =
-            FilesUtility::getLastModTime (vhostConfigurationFile->c_str ());
+            FilesUtility::getLastModTime (vhostConfigurationFile.c_str ());
           time_t mimeConfNow =
-            FilesUtility::getLastModTime (mimeConfigurationFile->c_str ());
+            FilesUtility::getLastModTime (mimeConfigurationFile.c_str ());
 
           /* If a configuration file was modified reboot the server. */
           if (((mainConfTimeNow != -1) && (hostsConfTimeNow != -1)  &&
@@ -501,7 +467,7 @@ void Server::mainLoop()
                   delete oldvhost;
 
                   /* Load the virtual hosts configuration from the xml file.  */
-                  if (vhostList->loadXMLConfigurationFile (vhostConfigurationFile->c_str ()))
+                  if (vhostList->loadXMLConfigurationFile (vhostConfigurationFile.c_str ()))
                     listenThreads.rollbackFastReboot ();
                   else
                     listenThreads.commitFastReboot ();
@@ -819,7 +785,7 @@ int Server::initialize ()
   maxConnections = 0;
   maxConnectionsToAccept = 0;
 
-  if (configurationFileManager.open (mainConfigurationFile->c_str ()))
+  if (configurationFileManager.open (mainConfigurationFile.c_str ()))
     return -1;
 
   readHashedData (xmlDocGetRootElement (configurationFileManager.getDoc ())->xmlChildrenNode);
@@ -1404,7 +1370,7 @@ Protocol* Server::getProtocol (const char *protocolName)
  */
 const char* Server::getExternalPath ()
 {
-  return externalPath ? externalPath->c_str () : "";
+  return externalPath.c_str ();
 }
 
 
@@ -1540,8 +1506,7 @@ CachedFileFactory* Server::getCachedFiles ()
  */
 const char *Server::getMainConfFile ()
 {
-  return mainConfigurationFile
-    ? mainConfigurationFile->c_str () : 0;
+  return mainConfigurationFile.c_str ();
 }
 
 /*!
@@ -1549,7 +1514,7 @@ const char *Server::getMainConfFile ()
  */
 const char *Server::getVhostConfFile ()
 {
-  return vhostConfigurationFile ? vhostConfigurationFile->c_str () : NULL;
+  return vhostConfigurationFile.c_str ();
 }
 
 /*!
@@ -1557,7 +1522,7 @@ const char *Server::getVhostConfFile ()
  */
 const char *Server::getMIMEConfFile ()
 {
-  return mimeConfigurationFile ? mimeConfigurationFile->c_str () : "";
+  return mimeConfigurationFile.c_str ();
 }
 
 /*!



commit 3574c14dc0924a1f0cb14176370c26356917171e
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Sep 29 20:47:34 2009 +0200

    Default configuration files are not copied automatically when a valid configuration files set is not found.

diff --git a/myserver/include/server/server.h b/myserver/include/server/server.h
index 4bead7b..a671ccf 100644
--- a/myserver/include/server/server.h
+++ b/myserver/include/server/server.h
@@ -241,9 +241,7 @@ private:
   int freeHashedData();
   u_long connectionTimeout;
   u_long maxLogFileSize;
-  int copyConfigurationFromDefault(const char *);
   void logWriteNTimes(string, unsigned);
-  int checkConfigurationPaths();
   bool resetConfigurationPaths(string &, string &, string &, string &);
   Mutex* connectionsMutex;
   u_long nStaticThreads;
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 383474e..36f5f06 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -139,86 +139,6 @@ bool Server::resetConfigurationPaths (string &mainConf, string &mimeConf,
 }
 
 /*!
-  *Check that the configuration paths are not empty, otherwise fall back to
- * the default ones.
- * Returns nonzero on error.
- */
-int Server::checkConfigurationPaths ()
-{
-  if (mainConfigurationFile->length() == 0)
-  {
-    mainConfigurationFile->assign ("myserver.xml");
-
-    if (copyConfigurationFromDefault ("myserver.xml"))
-    {
-      log (MYSERVER_LOG_MSG_ERROR, _("Error loading configuration file"));
-      return -1;
-    }
-  }
-
-  if (mimeConfigurationFile->length() == 0)
-  {
-    mimeConfigurationFile->assign ("MIMEtypes.xml");
-
-    if (copyConfigurationFromDefault ("MIMEtypes.xml"))
-    {
-      log (MYSERVER_LOG_MSG_ERROR, _("Error loading MIME configuration file"));
-      return -1;
-    }
-  }
-
-  if (vhostConfigurationFile->length() == 0)
-  {
-    vhostConfigurationFile->assign ("virtualhosts.xml");
-
-    if (copyConfigurationFromDefault ("virtualhosts.xml") != 0)
-    {
-      log (MYSERVER_LOG_MSG_ERROR, _("Error loading virtual hosts configuration file"));
-      return -1;
-    }
-  }
-
-  return 0;
-}
-
-/*!
- * Copy a configuration file from the default one.
- * Return nonzero on errors.
- */
-int Server::copyConfigurationFromDefault (const char *fileName)
-{
-  File inputF;
-  File outputF;
-  int ret;
-  string sSource (fileName);
-  sSource = sSource.substr (0, sSource.length () - 3);
-
-#ifdef WIN32
-  sSource.append ("default.windows.xml");
-#else
-  sSource.append ("default.xml");
-#endif
-
-  ret = inputF.openFile (sSource, File::READ
-                        | File::OPEN_IF_EXISTS);
-  if (ret)
-    return -1;
-
-  ret = outputF.openFile (fileName, File::WRITE
-                         | File::FILE_OPEN_ALWAYS);
-  if (ret)
-    return -1;
-
-  FilesUtility::copyFile (inputF, outputF);
-
-  inputF.close ();
-  outputF.close ();
-
-  return 0;
-}
-
-
-/*!
  * Load here all the libraries.
  */
 int Server::loadLibraries ()
@@ -299,10 +219,6 @@ void Server::start (string &mainConf, string &mimeConf, string &vhostConf,
     if (!resetConfigurationPaths (mainConf, mimeConf, vhostConf, externPath))
       return;
 
-    err = checkConfigurationPaths ();
-    if (err)
-      return;
-
     err = initialize ();
     if (err)
       return;



commit 999eb4c28da000f75405c8d59a155e394a216ffd
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Sep 29 19:55:32 2009 +0200

    Raise an error if the specified protocol is not loaded.

diff --git a/myserver/src/conf/vhost/vhost_manager.cpp b/myserver/src/conf/vhost/vhost_manager.cpp
index 10820be..4793e32 100644
--- a/myserver/src/conf/vhost/vhost_manager.cpp
+++ b/myserver/src/conf/vhost/vhost_manager.cpp
@@ -53,6 +53,12 @@ int VhostManager::addVHost(Vhost* vh)
                  _("Protocol not defined for vhost: %s, using HTTP by default"),
                                              vh->getName ());
         }
+      string protocol (vh->getProtocolName ());
+      if (Server::getInstance ()->getProtocolsManager()->getProtocol (protocol)
+          == NULL)
+        Server::getInstance()->log (MYSERVER_LOG_MSG_ERROR,
+                                _("The protocol \"%s\" is used but not loaded"),
+                                    protocol.c_str ());
 
       hostList.push_back (vh);
       mutex.unlock ();

-----------------------------------------------------------------------

Summary of changes:
 misc/el_control_client/myserver-control.el         |    3 +-
 myserver/Makefile.am                               |    3 -
 myserver/configure.ac                              |    2 +
 myserver/include/base/xml/xml_parser.h             |    3 +-
 myserver/include/conf/Makefile.am                  |    2 +-
 myserver/include/conf/main/Makefile.am             |    3 +
 .../url.h => conf/main/main_configuration.h}       |   39 ++--
 .../main/xml_main_configuration.h}                 |   64 +++---
 myserver/include/server/server.h                   |   17 +-
 myserver/src/base/xml/xml_parser.cpp               |  268 +++++++++-----------
 myserver/src/conf/Makefile.am                      |    2 +-
 myserver/src/conf/main/Makefile.am                 |    4 +
 .../main/main_configuration.cpp}                   |   21 ++-
 .../main/xml_main_configuration.cpp}               |    4 +-
 myserver/src/conf/vhost/vhost_manager.cpp          |    6 +
 myserver/src/myserver.cpp                          |    7 +-
 myserver/src/server/server.cpp                     |  189 +++-----------
 myserver/tests/Makefile.am                         |    3 +-
 ...est_ftp.cpp => test_xml_main_configuration.cpp} |   45 ++--
 plugins/src/http_checker/http_checker.cpp          |    9 +-
 .../python_http_handler/python_http_handler.cpp    |   11 +-
 plugins/src/rules_checker/rules_checker.cpp        |    9 +-
 22 files changed, 306 insertions(+), 408 deletions(-)
 create mode 100644 myserver/include/conf/main/Makefile.am
 copy myserver/include/{protocol/url.h => conf/main/main_configuration.h} (64%)
 copy myserver/include/{base/unix_socket/unix_socket.h => conf/main/xml_main_configuration.h} (51%)
 create mode 100644 myserver/src/conf/main/Makefile.am
 copy myserver/src/{log/stream/log_stream_creator.cpp => conf/main/main_configuration.cpp} (68%)
 copy myserver/src/{log/stream/log_stream_creator.cpp => conf/main/xml_main_configuration.cpp} (85%)
 copy myserver/tests/{test_ftp.cpp => test_xml_main_configuration.cpp} (52%)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Tue Sep 29 17:51:19 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1MskbO-0002nP-Rq
	for mharc-myserver-commit@gnu.org; Tue, 29 Sep 2009 17:51:18 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1MskbN-0002md-9F
	for myserver-commit@gnu.org; Tue, 29 Sep 2009 17:51:17 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1MskbM-0002mI-Nn
	for myserver-commit@gnu.org; Tue, 29 Sep 2009 17:51:16 -0400
Received: from [199.232.76.173] (port=54651 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1MskbM-0002mB-D6
	for myserver-commit@gnu.org; Tue, 29 Sep 2009 17:51:16 -0400
Received: from savannah.gnu.org ([199.232.41.3]:54000 helo=sv.gnu.org)
	by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.60) (envelope-from <gscrivano@gnu.org>) id 1MskbL-0002Y9-Uw
	for myserver-commit@gnu.org; Tue, 29 Sep 2009 17:51:16 -0400
Received: from [10.0.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1MskbK-0001mQ-Nk
	for myserver-commit@gnu.org; Tue, 29 Sep 2009 21:51:14 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1MskbJ-0001lu-Uw
	for myserver-commit@gnu.org; Tue, 29 Sep 2009 21:51:14 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 457efd5092d04f2bf79010fd98f3bde3ae44495a
X-Git-Newrev: 08f149e93fcb2d2bae81fb4712da05be889ca0ac
Message-Id: <E1MskbJ-0001lu-Uw@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 29 Sep 2009 21:51:14 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer branch, master,
	updated. 08f149e93fcb2d2bae81fb4712da05be889ca0ac
X-BeenThere: myserver-commit@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: myserver-commit.gnu.org
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/myserver-commit>
List-Post: <mailto:myserver-commit@gnu.org>
List-Help: <mailto:myserver-commit-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/myserver-commit>,
	<mailto:myserver-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 29 Sep 2009 21:51:17 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  08f149e93fcb2d2bae81fb4712da05be889ca0ac (commit)
       via  73c9d9f9a5410b280853123cfb7d563c3bf74be3 (commit)
      from  457efd5092d04f2bf79010fd98f3bde3ae44495a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 08f149e93fcb2d2bae81fb4712da05be889ca0ac
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Sep 29 23:51:12 2009 +0200

    Declare c'tor and d'tor for the `XmlMainConfiguration' class.

diff --git a/myserver/include/conf/main/xml_main_configuration.h b/myserver/include/conf/main/xml_main_configuration.h
index ec82f82..987ae56 100644
--- a/myserver/include/conf/main/xml_main_configuration.h
+++ b/myserver/include/conf/main/xml_main_configuration.h
@@ -27,6 +27,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 class XmlMainConfiguration : public MainConfiguration
 {
 public:
+  XmlMainConfiguration ();
+  virtual ~XmlMainConfiguration ();
+
   virtual int open (const char* filename)
   {
     return xmlParser.open (filename);
diff --git a/myserver/src/conf/main/xml_main_configuration.cpp b/myserver/src/conf/main/xml_main_configuration.cpp
index 637ab4f..0dba02f 100644
--- a/myserver/src/conf/main/xml_main_configuration.cpp
+++ b/myserver/src/conf/main/xml_main_configuration.cpp
@@ -16,3 +16,13 @@
 */
 
 #include <include/conf/main/xml_main_configuration.h>
+
+XmlMainConfiguration::XmlMainConfiguration ()
+{
+
+}
+
+XmlMainConfiguration::~XmlMainConfiguration ()
+{
+
+}



commit 73c9d9f9a5410b280853123cfb7d563c3bf74be3
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Sep 29 23:47:25 2009 +0200

    Make the `MainConfiguration' class d'tor virtual.

diff --git a/myserver/include/conf/main/main_configuration.h b/myserver/include/conf/main/main_configuration.h
index 6dbbc0e..553be84 100644
--- a/myserver/include/conf/main/main_configuration.h
+++ b/myserver/include/conf/main/main_configuration.h
@@ -28,7 +28,7 @@ class MainConfiguration
 {
 public:
   MainConfiguration ();
-  ~MainConfiguration ();
+  virtual ~MainConfiguration ();
   virtual char *getValue (const char* field) = 0;
   virtual char *getValue (string const &field);
   virtual int close ()

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/conf/main/main_configuration.h    |    2 +-
 .../include/conf/main/xml_main_configuration.h     |    3 +++
 myserver/src/conf/main/xml_main_configuration.cpp  |   10 ++++++++++
 3 files changed, 14 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU MyServer



