From MAILER-DAEMON Sun Nov 01 08:14:43 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N4aGZ-00079s-8N
	for mharc-myserver-commit@gnu.org; Sun, 01 Nov 2009 08:14:43 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N4aGX-00079Y-2T
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 08:14:41 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N4aGV-00079L-Qd
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 08:14:40 -0500
Received: from [199.232.76.173] (port=48872 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N4aGV-00079I-KC
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 08:14:39 -0500
Received: from savannah.gnu.org ([199.232.41.3]:40217 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 1N4aGU-0003hn-Uo
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 08:14:39 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N4aGU-0008T6-Bp
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 13:14:38 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N4aGS-0008SX-QK
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 13:14:38 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 733464f43301f5b9c1082b59fa8c344ae50f93f1
X-Git-Newrev: c16f5817bdcbc13144b54c571e44adee9fb62de3
Message-Id: <E1N4aGS-0008SX-QK@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 01 Nov 2009 13:14: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. c16f5817bdcbc13144b54c571e44adee9fb62de3
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, 01 Nov 2009 13:14: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  c16f5817bdcbc13144b54c571e44adee9fb62de3 (commit)
       via  3fd501fe025c79add982fe0686cc0700d238577d (commit)
       via  e08291fd84b1da1c177b71f4dc9cb82b6d039010 (commit)
      from  733464f43301f5b9c1082b59fa8c344ae50f93f1 (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 c16f5817bdcbc13144b54c571e44adee9fb62de3
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Nov 1 14:08:35 2009 +0100

    Link to the gnulib library and export program_name.

diff --git a/myserver/binaries/web/cgi-src/math_sum/Makefile.am b/myserver/binaries/web/cgi-src/math_sum/Makefile.am
index 7213004..c002fa7 100644
--- a/myserver/binaries/web/cgi-src/math_sum/Makefile.am
+++ b/myserver/binaries/web/cgi-src/math_sum/Makefile.am
@@ -9,7 +9,7 @@ libmath_sum.a :
 
 math_sum.mscgi : $(libmath_sum_a_OBJECTS) $(libmath_sum_a_DEPENDENCIES)
 	-rm -f math_sum.mscgi
-	$(CXX) $(libmath_sum_a_OBJECTS) ../../../../src/libmyserver.a $(libmath_sum_a_LIBADD)  $(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(EVENT_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) $(XML_LIBS) $(LDFLAGS) -o math_sum.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS)
+	$(CXX) $(libmath_sum_a_OBJECTS) ../../../../src/libmyserver.a  ../../../../lib/libgnu.a  $(libmath_sum_a_LIBADD)  $(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(EVENT_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) $(XML_LIBS) $(LDFLAGS) -o math_sum.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS)
 
 install : math_sum.mscgi
 	$(INSTALL) -D 'math_sum.mscgi' '$(DESTDIR)$(prefix)/var/web/cgi-bin/math_sum.mscgi'
diff --git a/myserver/binaries/web/cgi-src/math_sum/math_sum.cpp b/myserver/binaries/web/cgi-src/math_sum/math_sum.cpp
index 497b07b..2dfb49a 100644
--- a/myserver/binaries/web/cgi-src/math_sum/math_sum.cpp
+++ b/myserver/binaries/web/cgi-src/math_sum/math_sum.cpp
@@ -10,6 +10,10 @@ int isNumber(char* s)
   return 1;
 
 }
+
+
+const char *program_name;
+
 #ifdef WIN32
 extern "C" int EXPORTABLE myserver_main (char *cmd, MsCgiData* data)
 #else
@@ -17,6 +21,7 @@ extern "C" int myserver_main (char *cmd, MsCgiData* data)
 #endif
 {
 	MscgiManager cm(data);
+  program_name = cmd;
 
 	if(strlen (cmd) == 0)
 	{
diff --git a/myserver/binaries/web/cgi-src/post/Makefile.am b/myserver/binaries/web/cgi-src/post/Makefile.am
index 4529ae3..a397eed 100644
--- a/myserver/binaries/web/cgi-src/post/Makefile.am
+++ b/myserver/binaries/web/cgi-src/post/Makefile.am
@@ -10,7 +10,7 @@ libpost.a :
 
 post.mscgi : $(libpost_a_OBJECTS) $(libpost_a_DEPENDENCIES)
 	-rm -f post.mscgi
-	$(CXX) $(libpost_a_OBJECTS) ../../../../src/libmyserver.a $(libpost_a_LIBADD)  $(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(EVENT_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) $(XML_LIBS) $(LDFLAGS) -o post.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS)
+	$(CXX) $(libpost_a_OBJECTS) ../../../../src/libmyserver.a ../../../../lib/libgnu.a $(libpost_a_LIBADD)  $(PTHREAD_LIB) $(IDN_LIB) $(XNET_LIB) $(EVENT_LIB) $(DL_LIB) $(SSL_LIB) $(ZLIB_LIB) $(XML_LIBS) $(LDFLAGS) -o post.mscgi -shared $(CXXFLAGS) $(XML_CFLAGS)
 
 install : post.mscgi
 	$(INSTALL) -D 'post.mscgi' '$(DESTDIR)$(prefix)/var/web/cgi-bin/post.mscgi'
diff --git a/myserver/binaries/web/cgi-src/post/post.cpp b/myserver/binaries/web/cgi-src/post/post.cpp
index 844a3e4..75ba383 100644
--- a/myserver/binaries/web/cgi-src/post/post.cpp
+++ b/myserver/binaries/web/cgi-src/post/post.cpp
@@ -1,15 +1,19 @@
 #include <include/http_handler/mscgi/mscgi_manager.h>
 
+
+const char *program_name;
+
 #ifdef WIN32
 extern "C" int EXPORTABLE myserver_main (char *cmd,MsCgiData* data)
 #else
-  extern "C" int myserver_main (char *cmd,MsCgiData* data)
+extern "C" int myserver_main (char *cmd,MsCgiData* data)
 #endif
 {
   MscgiManager cm(data);
 
   char *post = cm.postParam("T1");
 
+  program_name = cmd;
   if(post == NULL)
     {
       cm.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"\r\n\
diff --git a/myserver/src/base/base64/mime_utils.cpp b/myserver/src/base/base64/mime_utils.cpp
index d10977c..f4a2b60 100644
--- a/myserver/src/base/base64/mime_utils.cpp
+++ b/myserver/src/base/base64/mime_utils.cpp
@@ -17,21 +17,22 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #include "stdafx.h"
 #include <include/base/base64/mime_utils.h>
-#include <include/base/string/stringutils.h>
-#include <include/base/string/securestr.h>
 
 extern "C"
 {
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 #ifndef WIN32
 # include <ctype.h>
 #endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 }
 
-#define strupos(x, y) (strustr (x, y) != NULL ? strustr (x, y) - x : -1) //char version
+#include <include/base/string/stringutils.h>
+#include <include/base/string/securestr.h>
+
+#define strupos(x, y) (strustr (x, y) != NULL ? strustr (x, y) - x : -1)
 
 static char* strustr (char *source, char *s)
 {
diff --git a/myserver/stdafx.h b/myserver/stdafx.h
index 8f60ac7..512a1e7 100644
--- a/myserver/stdafx.h
+++ b/myserver/stdafx.h
@@ -25,6 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
 #ifdef HAVE_CONFIG_H
 # include <cstdlib>
+# include "time.h"
 # include <config.h>
 #endif
 
@@ -47,7 +48,7 @@ extern "C"
 #include <stdio.h>
 #include <fcntl.h>
 #include <math.h>
-#include <time.h>
+#include "time.h"
 #include <ctype.h>
 
 
diff --git a/myserver/tests/Makefile.am b/myserver/tests/Makefile.am
index e95f1ae..96e049e 100644
--- a/myserver/tests/Makefile.am
+++ b/myserver/tests/Makefile.am
@@ -22,9 +22,9 @@ tests_suite_SOURCES = main.cpp test_auth_domain.cpp test_base64.cpp \
 	test_utility.cpp test_validator.cpp test_validator_factory.cpp \
 	test_xml.cpp test_xml_main_configuration.cpp test_xml_validator.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)  ../lib/libgnu.a
+tests_suite_LDADD = ../src/libmyserver.a  ../lib/libgnu.a $(CPPUNIT_LDFLAGS) \
+	$(PTHREAD_LIB) 	$(IDN_LIB) $(XNET_LIB) $(EVENT_LIB) $(DL_LIB) $(SSL_LIB) \
+	$(ZLIB_LIB) $(XML_LIBS) $(LDFLAGS)
 
 install:
 



commit 3fd501fe025c79add982fe0686cc0700d238577d
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Nov 1 14:07:31 2009 +0100

    Ensure stdafx.h is included in any test source file.

diff --git a/myserver/tests/main.cpp b/myserver/tests/main.cpp
index 0119e97..1c020f7 100644
--- a/myserver/tests/main.cpp
+++ b/myserver/tests/main.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
@@ -15,6 +15,11 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
+
+#undef open
+#undef close
+
 #include <cppunit/TextOutputter.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/XmlOutputter.h>
@@ -27,12 +32,16 @@
 
 using namespace std;
 
+const char *program_name = NULL;
+
 int main (int argc, char* argv[])
 {
   bool xml = argc > 1 && !strcmp (argv[1], "xml");
   bool compiler = argc > 1 && !strcmp (argv[1], "compiler");
   char *filename = argc > 2 ? argv[2] : NULL;
 
+  program_name = argv[0];
+
 
   std::ostream *str = &(std::cerr);
 
diff --git a/myserver/tests/test_auth_domain.cpp b/myserver/tests/test_auth_domain.cpp
index cb0b93a..374f531 100644
--- a/myserver/tests/test_auth_domain.cpp
+++ b/myserver/tests/test_auth_domain.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_base64.cpp b/myserver/tests/test_base64.cpp
index 07b4e87..ceab1a9 100644
--- a/myserver/tests/test_base64.cpp
+++ b/myserver/tests/test_base64.cpp
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_bitvec.cpp b/myserver/tests/test_bitvec.cpp
index d34dcda..2ce7b5e 100644
--- a/myserver/tests/test_bitvec.cpp
+++ b/myserver/tests/test_bitvec.cpp
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
diff --git a/myserver/tests/test_cached_file.cpp b/myserver/tests/test_cached_file.cpp
index 59498d7..daa0577 100644
--- a/myserver/tests/test_cached_file.cpp
+++ b/myserver/tests/test_cached_file.cpp
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/ui/text/TestRunner.h>
 #include <cppunit/extensions/HelperMacros.h>
diff --git a/myserver/tests/test_cached_file_buffer.cpp b/myserver/tests/test_cached_file_buffer.cpp
index f458db9..9adc1af 100644
--- a/myserver/tests/test_cached_file_buffer.cpp
+++ b/myserver/tests/test_cached_file_buffer.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/ui/text/TestRunner.h>
 #include <cppunit/extensions/HelperMacros.h>
diff --git a/myserver/tests/test_cached_file_factory.cpp b/myserver/tests/test_cached_file_factory.cpp
index ec0e98b..3528dd2 100644
--- a/myserver/tests/test_cached_file_factory.cpp
+++ b/myserver/tests/test_cached_file_factory.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
diff --git a/myserver/tests/test_connection.cpp b/myserver/tests/test_connection.cpp
index 9961433..935ac19 100644
--- a/myserver/tests/test_connection.cpp
+++ b/myserver/tests/test_connection.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_connections_scheduler.cpp b/myserver/tests/test_connections_scheduler.cpp
index d254c8b..dc8835f 100644
--- a/myserver/tests/test_connections_scheduler.cpp
+++ b/myserver/tests/test_connections_scheduler.cpp
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_crypt_algo_manager.cpp b/myserver/tests/test_crypt_algo_manager.cpp
index 575e169..897e0bd 100644
--- a/myserver/tests/test_crypt_algo_manager.cpp
+++ b/myserver/tests/test_crypt_algo_manager.cpp
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <include/base/crypt/crypt_algo_manager.h>
 #include <include/base/crypt/md5.h>
 
diff --git a/myserver/tests/test_file.cpp b/myserver/tests/test_file.cpp
index 5d6dbfb..03d86f5 100644
--- a/myserver/tests/test_file.cpp
+++ b/myserver/tests/test_file.cpp
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
diff --git a/myserver/tests/test_file_stream.cpp b/myserver/tests/test_file_stream.cpp
index efa1f31..394c84b 100644
--- a/myserver/tests/test_file_stream.cpp
+++ b/myserver/tests/test_file_stream.cpp
@@ -15,6 +15,7 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include <stdafx.h>
 #include <list>
 #include <string>
 
diff --git a/myserver/tests/test_file_stream_creator.cpp b/myserver/tests/test_file_stream_creator.cpp
index 28366ad..891843f 100644
--- a/myserver/tests/test_file_stream_creator.cpp
+++ b/myserver/tests/test_file_stream_creator.cpp
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <list>
 #include <string>
 
diff --git a/myserver/tests/test_files_utility.cpp b/myserver/tests/test_files_utility.cpp
index 0603f1b..f810cd3 100644
--- a/myserver/tests/test_files_utility.cpp
+++ b/myserver/tests/test_files_utility.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
diff --git a/myserver/tests/test_filter_chain.cpp b/myserver/tests/test_filter_chain.cpp
index 3572908..ad50510 100644
--- a/myserver/tests/test_filter_chain.cpp
+++ b/myserver/tests/test_filter_chain.cpp
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <include/filter/stream.h>
 #include <include/filter/gzip/gzip.h>
 #include <include/filter/gzip/gzip_decompress.h>
diff --git a/myserver/tests/test_fork_server.cpp b/myserver/tests/test_fork_server.cpp
index 3900fe7..fe9e368 100644
--- a/myserver/tests/test_fork_server.cpp
+++ b/myserver/tests/test_fork_server.cpp
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <include/base/process/fork_server.h>
 #include <include/base/process/process.h>
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_ftp.cpp b/myserver/tests/test_ftp.cpp
index fea5df8..c1d08c5 100644
--- a/myserver/tests/test_ftp.cpp
+++ b/myserver/tests/test_ftp.cpp
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <include/protocol/ftp/ftp.h>
 #include <include/base/mem_buff/mem_buff.h>
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_gzip.cpp b/myserver/tests/test_gzip.cpp
index 4702e48..d02dd8d 100644
--- a/myserver/tests/test_gzip.cpp
+++ b/myserver/tests/test_gzip.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <include/filter/gzip/gzip.h>
 #include <include/filter/gzip/gzip_decompress.h>
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_hashmap.cpp b/myserver/tests/test_hashmap.cpp
index 0eee155..96f3f73 100644
--- a/myserver/tests/test_hashmap.cpp
+++ b/myserver/tests/test_hashmap.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <include/base/hash_map/hash_map.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
diff --git a/myserver/tests/test_homedir.cpp b/myserver/tests/test_homedir.cpp
index b367420..09b041f 100644
--- a/myserver/tests/test_homedir.cpp
+++ b/myserver/tests/test_homedir.cpp
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <include/base/home_dir/home_dir.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
diff --git a/myserver/tests/test_http_req_security_domain.cpp b/myserver/tests/test_http_req_security_domain.cpp
index d05d995..3a2ed27 100644
--- a/myserver/tests/test_http_req_security_domain.cpp
+++ b/myserver/tests/test_http_req_security_domain.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <string.h>
diff --git a/myserver/tests/test_http_request.cpp b/myserver/tests/test_http_request.cpp
index 87d8522..55c9f89 100644
--- a/myserver/tests/test_http_request.cpp
+++ b/myserver/tests/test_http_request.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <string.h>
diff --git a/myserver/tests/test_http_response.cpp b/myserver/tests/test_http_response.cpp
index 8f02790..d0c02ff 100644
--- a/myserver/tests/test_http_response.cpp
+++ b/myserver/tests/test_http_response.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
@@ -15,6 +15,7 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <string.h>
diff --git a/myserver/tests/test_ip.cpp b/myserver/tests/test_ip.cpp
index a91b954..58e7bfa 100644
--- a/myserver/tests/test_ip.cpp
+++ b/myserver/tests/test_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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <include/conf/vhost/ip.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
diff --git a/myserver/tests/test_log_manager.cpp b/myserver/tests/test_log_manager.cpp
index 964cb0c..0705255 100644
--- a/myserver/tests/test_log_manager.cpp
+++ b/myserver/tests/test_log_manager.cpp
@@ -15,6 +15,7 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include <stdafx.h>
 #include <list>
 #include <string>
 
diff --git a/myserver/tests/test_log_stream_factory.cpp b/myserver/tests/test_log_stream_factory.cpp
index 582c9f4..d1093bd 100644
--- a/myserver/tests/test_log_stream_factory.cpp
+++ b/myserver/tests/test_log_stream_factory.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <list>
 #include <string>
 
diff --git a/myserver/tests/test_md5.cpp b/myserver/tests/test_md5.cpp
index 49795fe..ee65b14 100644
--- a/myserver/tests/test_md5.cpp
+++ b/myserver/tests/test_md5.cpp
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <include/base/crypt/md5.h>
 
 #include <ctype.h>
diff --git a/myserver/tests/test_mem_buff.cpp b/myserver/tests/test_mem_buff.cpp
index b19f40f..229ad9e 100644
--- a/myserver/tests/test_mem_buff.cpp
+++ b/myserver/tests/test_mem_buff.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_mem_stream.cpp b/myserver/tests/test_mem_stream.cpp
index 3db9e73..617230f 100644
--- a/myserver/tests/test_mem_stream.cpp
+++ b/myserver/tests/test_mem_stream.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <include/filter/memory_stream.h>
diff --git a/myserver/tests/test_mime_manager.cpp b/myserver/tests/test_mime_manager.cpp
index 5ad60c0..805a049 100644
--- a/myserver/tests/test_mime_manager.cpp
+++ b/myserver/tests/test_mime_manager.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_multicast.cpp b/myserver/tests/test_multicast.cpp
index 62a2699..8e39cac 100644
--- a/myserver/tests/test_multicast.cpp
+++ b/myserver/tests/test_multicast.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_mutex.cpp b/myserver/tests/test_mutex.cpp
index 506c18d..7df4ba0 100644
--- a/myserver/tests/test_mutex.cpp
+++ b/myserver/tests/test_mutex.cpp
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_nodetree.cpp b/myserver/tests/test_nodetree.cpp
index 67bc30b..683292e 100644
--- a/myserver/tests/test_nodetree.cpp
+++ b/myserver/tests/test_nodetree.cpp
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_pipe.cpp b/myserver/tests/test_pipe.cpp
index 57c047e..7232d8f 100644
--- a/myserver/tests/test_pipe.cpp
+++ b/myserver/tests/test_pipe.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_plugin_info.cpp b/myserver/tests/test_plugin_info.cpp
index 5295cb2..afe1a80 100644
--- a/myserver/tests/test_plugin_info.cpp
+++ b/myserver/tests/test_plugin_info.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_read_directory.cpp b/myserver/tests/test_read_directory.cpp
index 2531817..67ee81f 100644
--- a/myserver/tests/test_read_directory.cpp
+++ b/myserver/tests/test_read_directory.cpp
@@ -15,6 +15,7 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <include/base/read_directory/read_directory.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
diff --git a/myserver/tests/test_recursive_mutex.cpp b/myserver/tests/test_recursive_mutex.cpp
index 32ded01..4dd5018 100644
--- a/myserver/tests/test_recursive_mutex.cpp
+++ b/myserver/tests/test_recursive_mutex.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_regex.cpp b/myserver/tests/test_regex.cpp
index 56d7721..5d8c29a 100644
--- a/myserver/tests/test_regex.cpp
+++ b/myserver/tests/test_regex.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <include/base/regex/myserver_regex.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
diff --git a/myserver/tests/test_safetime.cpp b/myserver/tests/test_safetime.cpp
index 4b981b9..ea7633a 100644
--- a/myserver/tests/test_safetime.cpp
+++ b/myserver/tests/test_safetime.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_security_cache.cpp b/myserver/tests/test_security_cache.cpp
index 9123f2f..00b59e5 100644
--- a/myserver/tests/test_security_cache.cpp
+++ b/myserver/tests/test_security_cache.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_security_domain.cpp b/myserver/tests/test_security_domain.cpp
index d0c9e94..7ebfe01 100644
--- a/myserver/tests/test_security_domain.cpp
+++ b/myserver/tests/test_security_domain.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_security_manager.cpp b/myserver/tests/test_security_manager.cpp
index 3673087..8540a05 100644
--- a/myserver/tests/test_security_manager.cpp
+++ b/myserver/tests/test_security_manager.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_security_token.cpp b/myserver/tests/test_security_token.cpp
index 3e1b6c1..dfe3b3e 100644
--- a/myserver/tests/test_security_token.cpp
+++ b/myserver/tests/test_security_token.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_semaphore.cpp b/myserver/tests/test_semaphore.cpp
index 22c5e53..03bba15 100644
--- a/myserver/tests/test_semaphore.cpp
+++ b/myserver/tests/test_semaphore.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_sha1.cpp b/myserver/tests/test_sha1.cpp
index 044497d..a2ef398 100644
--- a/myserver/tests/test_sha1.cpp
+++ b/myserver/tests/test_sha1.cpp
@@ -14,6 +14,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <include/base/crypt/sha1.h>
 
 #include <ctype.h>
diff --git a/myserver/tests/test_slab.cpp b/myserver/tests/test_slab.cpp
index 8011acf..b3426b5 100644
--- a/myserver/tests/test_slab.cpp
+++ b/myserver/tests/test_slab.cpp
@@ -15,6 +15,8 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
+
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
diff --git a/myserver/tests/test_socket.cpp b/myserver/tests/test_socket.cpp
index e77b05e..7dfc79a 100644
--- a/myserver/tests/test_socket.cpp
+++ b/myserver/tests/test_socket.cpp
@@ -15,6 +15,8 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
+
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
diff --git a/myserver/tests/test_socket_pair.cpp b/myserver/tests/test_socket_pair.cpp
index 97f7245..ff0cd9b 100644
--- a/myserver/tests/test_socket_pair.cpp
+++ b/myserver/tests/test_socket_pair.cpp
@@ -15,6 +15,8 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
+
 #include <include/base/socket_pair/socket_pair.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
diff --git a/myserver/tests/test_socket_stream_creator.cpp b/myserver/tests/test_socket_stream_creator.cpp
index 4f8c57d..8e92950 100644
--- a/myserver/tests/test_socket_stream_creator.cpp
+++ b/myserver/tests/test_socket_stream_creator.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
@@ -15,6 +15,8 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include <stdafx.h>
+
 #include <list>
 #include <string>
 
diff --git a/myserver/tests/test_ssl_socket.cpp b/myserver/tests/test_ssl_socket.cpp
index 5a7cf13..394ef70 100644
--- a/myserver/tests/test_ssl_socket.cpp
+++ b/myserver/tests/test_ssl_socket.cpp
@@ -15,6 +15,8 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
+
 #define TESTSERVERPEM "server.pem"
 #define TESTSERVERKEY "server.key"
 
diff --git a/myserver/tests/test_thread.cpp b/myserver/tests/test_thread.cpp
index 193c04d..fd465de 100644
--- a/myserver/tests/test_thread.cpp
+++ b/myserver/tests/test_thread.cpp
@@ -15,6 +15,8 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
+
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_unix_socket.cpp b/myserver/tests/test_unix_socket.cpp
index 10f67dc..64200f8 100644
--- a/myserver/tests/test_unix_socket.cpp
+++ b/myserver/tests/test_unix_socket.cpp
@@ -15,6 +15,8 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
+
 #include <include/base/socket_pair/socket_pair.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
diff --git a/myserver/tests/test_url.cpp b/myserver/tests/test_url.cpp
index 8074f7a..776d5f5 100644
--- a/myserver/tests/test_url.cpp
+++ b/myserver/tests/test_url.cpp
@@ -15,6 +15,8 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
+
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
diff --git a/myserver/tests/test_utility.cpp b/myserver/tests/test_utility.cpp
index 7329551..5aadf24 100644
--- a/myserver/tests/test_utility.cpp
+++ b/myserver/tests/test_utility.cpp
@@ -15,6 +15,8 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
+
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_validator.cpp b/myserver/tests/test_validator.cpp
index 6fc4d38..7de8301 100644
--- a/myserver/tests/test_validator.cpp
+++ b/myserver/tests/test_validator.cpp
@@ -1,3 +1,22 @@
+/*
+ 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 <stdafx.h>
+
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_validator_factory.cpp b/myserver/tests/test_validator_factory.cpp
index 56aedf2..5e3f247 100644
--- a/myserver/tests/test_validator_factory.cpp
+++ b/myserver/tests/test_validator_factory.cpp
@@ -1,3 +1,22 @@
+/*
+ MyServer
+ 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
+ (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>
+
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_xml.cpp b/myserver/tests/test_xml.cpp
index 1ba2dbe..5113e38 100644
--- a/myserver/tests/test_xml.cpp
+++ b/myserver/tests/test_xml.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
@@ -15,6 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_xml_main_configuration.cpp b/myserver/tests/test_xml_main_configuration.cpp
index 91cd8b9..c9e89fc 100644
--- a/myserver/tests/test_xml_main_configuration.cpp
+++ b/myserver/tests/test_xml_main_configuration.cpp
@@ -15,6 +15,8 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <stdafx.h>
+
 #include <include/conf/main/xml_main_configuration.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
diff --git a/myserver/tests/test_xml_validator.cpp b/myserver/tests/test_xml_validator.cpp
index f9c8fe9..2249523 100644
--- a/myserver/tests/test_xml_validator.cpp
+++ b/myserver/tests/test_xml_validator.cpp
@@ -1,3 +1,22 @@
+/*
+ MyServer
+ 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
+ (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>
+
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>



commit e08291fd84b1da1c177b71f4dc9cb82b6d039010
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Nov 1 12:32:54 2009 +0100

    Ensure the final $ is considered in the regex.

diff --git a/myserver/src/Makefile.am b/myserver/src/Makefile.am
index c293f30..ffa999a 100644
--- a/myserver/src/Makefile.am
+++ b/myserver/src/Makefile.am
@@ -14,7 +14,7 @@ clean-libmyserver.a:
 	rm -f libmyserver.a
 
 libmyserver.a: clean-libmyserver.a
-	find . | grep .*\\.$(OBJEXT)$ | xargs $(AR) cru libmyserver.a
+	find . | grep .*\\.$(OBJEXT)$$ | xargs $(AR) cru libmyserver.a
 	$(RANLIB) libmyserver.a
 
 all-local: libmyserver.a myserver${EXEEXT}
@@ -22,4 +22,4 @@ all-local: libmyserver.a myserver${EXEEXT}
 
 clean-local:
 	rm -f libmyserver.a
-	find . | grep .*\\.$(OBJEXT)$ | xargs rm -f
+	find . | grep .*\\.$(OBJEXT)$$ | xargs rm -f

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

Summary of changes:
 myserver/binaries/web/cgi-src/math_sum/Makefile.am |    2 +-
 .../binaries/web/cgi-src/math_sum/math_sum.cpp     |    5 +++++
 myserver/binaries/web/cgi-src/post/Makefile.am     |    2 +-
 myserver/binaries/web/cgi-src/post/post.cpp        |    6 +++++-
 myserver/src/Makefile.am                           |    4 ++--
 myserver/src/base/base64/mime_utils.cpp            |   15 ++++++++-------
 myserver/stdafx.h                                  |    3 ++-
 myserver/tests/Makefile.am                         |    6 +++---
 myserver/tests/main.cpp                            |   11 ++++++++++-
 myserver/tests/test_auth_domain.cpp                |    3 ++-
 myserver/tests/test_base64.cpp                     |    1 +
 myserver/tests/test_bitvec.cpp                     |    1 +
 myserver/tests/test_cached_file.cpp                |    1 +
 myserver/tests/test_cached_file_buffer.cpp         |    3 ++-
 myserver/tests/test_cached_file_factory.cpp        |    3 ++-
 myserver/tests/test_connection.cpp                 |    3 ++-
 myserver/tests/test_connections_scheduler.cpp      |    1 +
 myserver/tests/test_crypt_algo_manager.cpp         |    1 +
 myserver/tests/test_file.cpp                       |    1 +
 myserver/tests/test_file_stream.cpp                |    1 +
 myserver/tests/test_file_stream_creator.cpp        |    1 +
 myserver/tests/test_files_utility.cpp              |    3 ++-
 myserver/tests/test_filter_chain.cpp               |    1 +
 myserver/tests/test_fork_server.cpp                |    1 +
 myserver/tests/test_ftp.cpp                        |    1 +
 myserver/tests/test_gzip.cpp                       |    3 ++-
 myserver/tests/test_hashmap.cpp                    |    3 ++-
 myserver/tests/test_homedir.cpp                    |    1 +
 myserver/tests/test_http_req_security_domain.cpp   |    3 ++-
 myserver/tests/test_http_request.cpp               |    3 ++-
 myserver/tests/test_http_response.cpp              |    3 ++-
 myserver/tests/test_ip.cpp                         |    3 ++-
 myserver/tests/test_log_manager.cpp                |    1 +
 myserver/tests/test_log_stream_factory.cpp         |    3 ++-
 myserver/tests/test_md5.cpp                        |    1 +
 myserver/tests/test_mem_buff.cpp                   |    3 ++-
 myserver/tests/test_mem_stream.cpp                 |    3 ++-
 myserver/tests/test_mime_manager.cpp               |    3 ++-
 myserver/tests/test_multicast.cpp                  |    3 ++-
 myserver/tests/test_mutex.cpp                      |    1 +
 myserver/tests/test_nodetree.cpp                   |    1 +
 myserver/tests/test_pipe.cpp                       |    3 ++-
 myserver/tests/test_plugin_info.cpp                |    3 ++-
 myserver/tests/test_read_directory.cpp             |    1 +
 myserver/tests/test_recursive_mutex.cpp            |    3 ++-
 myserver/tests/test_regex.cpp                      |    3 ++-
 myserver/tests/test_safetime.cpp                   |    3 ++-
 myserver/tests/test_security_cache.cpp             |    3 ++-
 myserver/tests/test_security_domain.cpp            |    3 ++-
 myserver/tests/test_security_manager.cpp           |    3 ++-
 myserver/tests/test_security_token.cpp             |    3 ++-
 myserver/tests/test_semaphore.cpp                  |    3 ++-
 myserver/tests/test_sha1.cpp                       |    1 +
 myserver/tests/test_slab.cpp                       |    2 ++
 myserver/tests/test_socket.cpp                     |    2 ++
 myserver/tests/test_socket_pair.cpp                |    2 ++
 myserver/tests/test_socket_stream_creator.cpp      |    4 +++-
 myserver/tests/test_ssl_socket.cpp                 |    2 ++
 myserver/tests/test_thread.cpp                     |    2 ++
 myserver/tests/test_unix_socket.cpp                |    2 ++
 myserver/tests/test_url.cpp                        |    2 ++
 myserver/tests/test_utility.cpp                    |    2 ++
 myserver/tests/test_validator.cpp                  |   19 +++++++++++++++++++
 myserver/tests/test_validator_factory.cpp          |   19 +++++++++++++++++++
 myserver/tests/test_xml.cpp                        |    3 ++-
 myserver/tests/test_xml_main_configuration.cpp     |    2 ++
 myserver/tests/test_xml_validator.cpp              |   19 +++++++++++++++++++
 67 files changed, 187 insertions(+), 45 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Nov 01 08:31:01 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N4aWK-00053D-OE
	for mharc-myserver-commit@gnu.org; Sun, 01 Nov 2009 08:31:00 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N4aWJ-00052s-H4
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 08:30:59 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N4aWI-000525-0W
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 08:30:58 -0500
Received: from [199.232.76.173] (port=57444 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N4aWH-00051y-Tn
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 08:30:57 -0500
Received: from savannah.gnu.org ([199.232.41.3]:58665 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 1N4aWH-0006D1-55
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 08:30:57 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N4aWA-0001aE-6j
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 13:30:52 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N4aW3-0001Yu-W8
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 13:30:49 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: c16f5817bdcbc13144b54c571e44adee9fb62de3
X-Git-Newrev: 557586ede10752cea13127767c93ac072d6f40ed
Message-Id: <E1N4aW3-0001Yu-W8@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 01 Nov 2009 13:30:46 +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. 557586ede10752cea13127767c93ac072d6f40ed
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, 01 Nov 2009 13:30: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  557586ede10752cea13127767c93ac072d6f40ed (commit)
      from  c16f5817bdcbc13144b54c571e44adee9fb62de3 (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 557586ede10752cea13127767c93ac072d6f40ed
Author: Domenico Chierico <spaghetty@gmail.com>
Date:   Thu Oct 29 22:46:06 2009 +0100

    Add support for gopher protocol

diff --git a/myserver/configure.ac b/myserver/configure.ac
index 1d5c6af..0e6c6d0 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -438,6 +438,7 @@ AC_CONFIG_FILES([ po/Makefile.in
     include/protocol/https/Makefile
     include/protocol/http/Makefile
     include/protocol/http/env/Makefile
+    include/protocol/gopher/Makefile
     include/filter/Makefile
     include/filter/gzip/Makefile
     include/plugin/Makefile
@@ -494,6 +495,7 @@ AC_CONFIG_FILES([ po/Makefile.in
     src/protocol/https/Makefile
     src/protocol/http/Makefile
     src/protocol/http/env/Makefile
+    src/protocol/gopher/Makefile
     src/filter/Makefile
     src/filter/gzip/Makefile
     src/plugin/Makefile
diff --git a/myserver/include/protocol/Makefile.am b/myserver/include/protocol/Makefile.am
index aa23116..60cb33f 100644
--- a/myserver/include/protocol/Makefile.am
+++ b/myserver/include/protocol/Makefile.am
@@ -1,3 +1,3 @@
 protocolincludedir=$(includedir)/myserver/include/protocol
 protocolinclude_HEADERS = protocol_buffer.h protocol.h protocols_manager.h url.h
-SUBDIRS = control ftp http https
+SUBDIRS = control ftp gopher http https
diff --git a/myserver/include/protocol/gopher/Makefile.am b/myserver/include/protocol/gopher/Makefile.am
new file mode 100644
index 0000000..1995ecf
--- /dev/null
+++ b/myserver/include/protocol/gopher/Makefile.am
@@ -0,0 +1,4 @@
+gopherincludedir=$(includedir)/myserver/include/protocol/gopher
+gopherinclude_HEADERS = gopher.h gopher_content.h engine.h
+
+
diff --git a/myserver/include/protocol/gopher/engine.h b/myserver/include/protocol/gopher/engine.h
new file mode 100644
index 0000000..5211078
--- /dev/null
+++ b/myserver/include/protocol/gopher/engine.h
@@ -0,0 +1,64 @@
+/* -*- mode: c++ -*- */
+/*
+MyServer
+Copyright (C) 2002-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 GOPHER_ENGINE_H
+#define GOPHER_ENGINE_H
+
+#include "stdafx.h"
+#include <include/base/hash_map/hash_map.h>
+#include <include/conf/vhost/vhost.h>
+#include <include/base/base64/mime_utils.h>
+
+using namespace std;
+
+class GopherEngine;
+
+typedef void (GopherEngine::* MyMethodPtr)(const string&, const string&, GopherMenu&);
+
+class GopherEngine
+{
+public:
+  GopherEngine ();
+  GopherContent &incoming (GopherRequest, Vhost *tmp);
+
+protected:
+  void dirManagement (const string &fname, const string &path, GopherMenu &tmp);
+  void fileManagement (const string &fname, const string &path ,GopherMenu &tmp);
+
+  void infoFile (const string &fname, const string &path, GopherMenu &tmp);
+  void textFile (const string &fname, const string &path, GopherMenu &tmp);
+  void csoFile (const string &fname, const string &path, GopherMenu &tmp);
+  void binhexFile (const string &fname, const string &path, GopherMenu &tmp);
+  void dosbinFile (const string &fname, const string &path, GopherMenu &tmp);
+  void UUencodeFile (const string &fname, const string &path, GopherMenu &tmp);
+  void telnetFile (const string &fname, const string &path, GopherMenu &tmp);
+  void binFile (const string &fname, const string &path, GopherMenu &tmp);
+  void imageFile (const string &fname, const string &path, GopherMenu &tmp);
+  void gifFile (const string &fname, const string &path, GopherMenu &tmp);
+
+  MimeRecord* getMIME (string &filename);
+
+  string abs_path;
+  string hostname;
+  string port;
+  Vhost *Host;
+  HashMap<string,MyMethodPtr> handlers;
+
+  // Class Const
+};
+#endif
diff --git a/myserver/include/protocol/gopher/gopher.h b/myserver/include/protocol/gopher/gopher.h
new file mode 100644
index 0000000..8327f67
--- /dev/null
+++ b/myserver/include/protocol/gopher/gopher.h
@@ -0,0 +1,102 @@
+/* -*- mode: c++ -*- */
+/*
+MyServer
+Copyright (C) 2002-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 GOPHER_H
+# define GOPHER_H
+# include "stdafx.h"
+# include <include/protocol/protocol.h>
+# include <sstream>
+# include <include/protocol/gopher/gopher_content.h>
+
+# include <string>
+# include <vector>
+# include <memory>
+
+class Gopher : public Protocol
+{
+public:
+  Gopher ();
+  virtual ~Gopher ();
+
+  virtual char* registerName (char* out,int len)
+  {
+    return registerNameImpl (out, len);
+  }
+
+  static char* registerNameImpl (char*, int len);
+
+  int controlConnection (ConnectionPtr a,
+                         char *b1,
+                         char *b2,
+                         int bs1,
+                         int bs2,
+                         u_long nbtr,
+                         u_long id);
+
+
+  static int loadProtocolStatic ();
+  static int unLoadProtocolStatic ();
+
+  void reply (ConnectionPtr a,
+              GopherContent &data);
+};
+
+
+/*!
+ *Adapter class to make Gopher reentrant.
+ */
+
+class GopherProtocol : public Protocol
+{
+public:
+  GopherProtocol ()
+  {
+    protocolOptions = 0;
+  }
+
+  virtual ~GopherProtocol ()
+  {}
+
+  virtual char* registerName (char* out, int len)
+  {
+    return Gopher::registerNameImpl (out, len);
+  }
+
+  virtual int controlConnection (ConnectionPtr a, char *b1, char *b2,
+                                 int bs1, int bs2, u_long nbtr, u_long id)
+  {
+    Gopher Gopher;
+    int ret = 0;
+
+    ret = Gopher.controlConnection (a, b1, b2, bs1, bs2, nbtr, id);
+
+    return ret;
+  }
+
+  virtual int loadProtocol ()
+  {
+    return Gopher::loadProtocolStatic ();
+  }
+
+  virtual int unLoadProtocol ()
+  {
+    return Gopher::unLoadProtocolStatic ();
+  }
+};
+
+#endif
diff --git a/myserver/include/protocol/gopher/gopher_content.h b/myserver/include/protocol/gopher/gopher_content.h
new file mode 100644
index 0000000..9802c95
--- /dev/null
+++ b/myserver/include/protocol/gopher/gopher_content.h
@@ -0,0 +1,266 @@
+/* -*- mode: c++ -*- */
+/*
+MyServer
+Copyright (C) 2002-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 GOPHER_CONTENT_H
+#define GOPHER_CONTENT_H
+
+#include "stdafx.h"
+#include <include/base/socket/socket.h>
+#include <include/base/mem_buff/mem_buff.h>
+#include <include/base/file/file.h>
+#include <include/connection/connection.h>
+#include <vector>
+#include <string>
+
+using namespace std;
+
+class GopherContent
+{
+public:
+  virtual void toProtocol (Socket *s) = 0;
+};
+
+class GopherRequest
+{
+public:
+  GopherRequest ();
+  GopherRequest (string s){ data = s; }
+  GopherRequest (string s, ConnectionPtr conn)
+  {
+    data = s;
+    baseReq = conn;
+  }
+  void setConnection (ConnectionPtr conn){ baseReq = conn; }
+  string getRequest (){ return data; }
+  ConnectionPtr getConnection (){ return baseReq; }
+protected:
+  string data;
+  ConnectionPtr baseReq;
+};
+
+class GopherItem: public GopherContent
+{
+ public:
+  GopherItem ();
+  GopherItem (char, const char[], const char[], const char[], const char[]);
+
+  ~GopherItem ();
+
+  void Type (char T){ type=T; }
+  char Type (){ return type; }
+  void Desc (string D){ desc=D; }
+  string Desc (){ return desc; }
+  void Rlocation (string R){ rlocation=R; }
+  string Rlocation (){ return rlocation; }
+  void Host (string H){ host = H; }
+  string Host (){ return host; }
+  void Port (string P){ port=P; }
+  string Port (){ return port; }
+
+  void toProtocol (Socket *s);
+
+ protected:
+  char type;
+  string desc;
+  string rlocation;
+  string host;
+  string port;
+
+  void init (char, const char[], const char[], const char[], const char[]);
+
+};
+
+class GopherMenu: public GopherContent
+{
+public:
+  void addIntro (string tmp, string host, string port);
+  void addItem (GopherItem data);
+
+  void toProtocol (Socket *s);
+
+private:
+  vector<GopherItem> Items;
+
+};
+
+
+class GopherInfo: public GopherItem
+{
+public:
+  GopherInfo ();
+  GopherInfo (const char[], const char[], const char[], const char[]);
+  ~GopherInfo ();
+
+  void Type (char T){ type='i'; }
+};
+
+class GopherFile: public GopherItem
+{
+public:
+  GopherFile ();
+  GopherFile (const char[], const char[], const char[], const char[]);
+  ~GopherFile ();
+
+  void Type (char T){ type='0'; }
+};
+
+class GopherDirectory: public GopherItem
+{
+public:
+  GopherDirectory ();
+  GopherDirectory (const char[], const char[], const char[], const char[]);
+  ~GopherDirectory ();
+
+  void Type (char T){ type='1'; }
+};
+
+class GopherCSO: public GopherItem
+{
+public:
+  GopherCSO ();
+  GopherCSO (const char[], const char[], const char[], const char[]);
+  ~GopherCSO ();
+
+  void Type (char T){ type='2'; }
+};
+class GopherError: public GopherItem
+{
+public:
+  GopherError ();
+  GopherError (const char[], const char[], const char[], const char[]);
+  ~GopherError ();
+
+  void Type (char T){ type='3'; }
+};
+
+class GopherMacBinHex: public GopherItem
+{
+public:
+  GopherMacBinHex ();
+  GopherMacBinHex (const char[], const char[], const char[], const char[]);
+  ~GopherMacBinHex ();
+
+  void Type (char T){ type='4'; }
+};
+
+class GopherDosBin: public GopherItem
+{
+public:
+  GopherDosBin ();
+  GopherDosBin (const char[], const char[], const char[], const char[]);
+  ~GopherDosBin ();
+
+  void Type (char T){ type='5'; }
+};
+
+class GopherUnixUUencode: public GopherItem
+{
+public:
+  GopherUnixUUencode ();
+  GopherUnixUUencode (const char[], const char[], const char[], const char[]);
+  ~GopherUnixUUencode ();
+
+  void Type (char T){ type='6'; }
+};
+
+class GopherSearchServer: public GopherItem
+{
+public:
+  GopherSearchServer ();
+  GopherSearchServer (const char[], const char[], const char[], const char[]);
+  ~GopherSearchServer ();
+
+  void Type (char T){ type='7'; }
+};
+
+class GopherTelnet: public GopherItem
+{
+public:
+  GopherTelnet ();
+  GopherTelnet (const char[], const char[], const char[], const char[]);
+  ~GopherTelnet ();
+
+  void Type (char T){ type='8'; }
+};
+
+class GopherBin: public GopherItem
+{
+public:
+  GopherBin ();
+  GopherBin (const char[], const char[], const char[], const char[]);
+  ~GopherBin ();
+
+  void Type (char T){ type='9'; }
+};
+
+class GopherRendundantServer: public GopherItem
+{
+public:
+  GopherRendundantServer ();
+  GopherRendundantServer (const char[], const char[], const char[], const char[]);
+  ~GopherRendundantServer ();
+
+  void Type (char T){ type='+'; }
+};
+
+class GopherGif: public GopherItem
+{
+public:
+  GopherGif ();
+  GopherGif (const char[], const char[], const char[], const char[]);
+  ~GopherGif ();
+
+  void Type (char T){ type='g'; }
+};
+
+class GopherImage: public GopherItem
+{
+public:
+  GopherImage ();
+  GopherImage (const char[], const char[], const char[], const char[]);
+  ~GopherImage ();
+
+  void Type (char T){ type='I'; }
+};
+
+class GopherData: public GopherContent
+{
+public:
+  GopherData (string);
+
+  void toProtocol (Socket *s);
+
+private:
+  string buff;
+};
+
+
+class GopherFileContent: public GopherContent
+{
+public:
+  GopherFileContent (string s);
+  ~GopherFileContent ();
+
+  void toProtocol (Socket *s);
+
+private:
+  File *sfile;
+  MemBuf buf;
+};
+
+#endif
diff --git a/myserver/src/protocol/Makefile.am b/myserver/src/protocol/Makefile.am
index 0917b3b..0f26c60 100644
--- a/myserver/src/protocol/Makefile.am
+++ b/myserver/src/protocol/Makefile.am
@@ -1,7 +1,7 @@
 lib_LIBRARIES = libprotocol.a
 libprotocol_a_SOURCES = protocol_buffer.cpp protocol.cpp protocols_manager.cpp \
 			url.cpp
-SUBDIRS = control ftp http https
+SUBDIRS = control ftp gopher http https
 AM_CPPFLAGS = $(all_includes)
 
 install:
diff --git a/myserver/src/protocol/gopher/Makefile.am b/myserver/src/protocol/gopher/Makefile.am
new file mode 100644
index 0000000..a952fe3
--- /dev/null
+++ b/myserver/src/protocol/gopher/Makefile.am
@@ -0,0 +1,3 @@
+lib_LIBRARIES = libgopher.a
+libgopher_a_SOURCES = gopher.cpp gopher_content.cpp engine.cpp
+AM_CPPFLAGS = $(all_includes)
diff --git a/myserver/src/protocol/gopher/engine.cpp b/myserver/src/protocol/gopher/engine.cpp
new file mode 100644
index 0000000..c7ac396
--- /dev/null
+++ b/myserver/src/protocol/gopher/engine.cpp
@@ -0,0 +1,290 @@
+/* -*- mode: c++ -*- */
+/*
+MyServer
+Copyright (C) 2002-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"
+
+#include <include/protocol/gopher/gopher_content.h>
+#include <include/protocol/gopher/engine.h>
+#include <include/conf/vhost/vhost.h>
+#include <include/server/server.h>
+#include <include/base/read_directory/read_directory.h>
+#include <include/base/file/files_utility.h>
+#include <include/base/file/file.h>
+#include <include/base/mem_buff/mem_buff.h>
+
+
+#include <iostream>
+#include <fstream>
+#include <sstream>
+
+GopherEngine::GopherEngine()
+{
+  string info = "info";
+  string cso = "cso";
+  string binhex = "binhex";
+  string dosbin = "dosbin";
+  string UUencode = "UUencode";
+  string telnet = "telnet";
+  string bin = "bin";
+  string image = "image";
+  string gif = "gif";
+  string text = "text";
+  handlers.put (info, &GopherEngine::infoFile);
+  handlers.put (text, &GopherEngine::textFile);
+  handlers.put (cso, &GopherEngine::csoFile);
+  handlers.put (binhex, &GopherEngine::binhexFile);
+  handlers.put (dosbin, &GopherEngine::dosbinFile);
+  handlers.put (UUencode, &GopherEngine::UUencodeFile);
+  handlers.put (telnet, &GopherEngine::telnetFile);
+  handlers.put (bin, &GopherEngine::binFile);
+  handlers.put (image, &GopherEngine::imageFile);
+  handlers.put (gif, &GopherEngine::gifFile);
+}
+
+GopherContent &GopherEngine::incoming(GopherRequest req, Vhost *host)
+{
+  ReadDirectory fd;
+  GopherContent *Gud;
+  GopherMenu *Gu;
+  stringstream Port;
+  Port << host->getPort ();
+  port = Port.str ();
+  hostname = req.getConnection ()->getLocalIpAddr ();
+  abs_path = host->getDocumentRoot ();
+  Host = host;
+
+  string path = abs_path;
+  path.append ("/");
+  path.append (req.getRequest ());
+  if(! fd.findfirst (path.c_str ()))
+    {
+      Gu = new GopherMenu;
+      if(FilesUtility::getPathRecursionLevel (path)>0)
+        {
+          do {
+            if(fd.name[0]!='.')
+              {
+                if (fd.attrib & FILE_ATTRIBUTE_DIRECTORY)
+                  dirManagement (fd.name, req.getRequest (), *Gu);
+                else
+                  fileManagement (fd.name, req.getRequest (),  *Gu);
+              }
+          }while(!fd.findnext ());
+        }
+      else
+        Gu->addIntro(string(_("Invalid requested Path\n")), hostname, port);
+      fd.findclose ();
+    }
+  else
+    {
+      Gud = (GopherContent*)new GopherFileContent (path);
+      return *Gud;
+    }
+  return *Gu;
+}
+
+void GopherEngine::dirManagement (const string &fname, const string &path, GopherMenu &tmp)
+{
+  string file_path = path;
+  file_path.append ("/");
+  file_path.append (fname);
+  tmp.addItem (GopherDirectory (fname.c_str (),
+        file_path.c_str (),
+        hostname.c_str (),
+        port.c_str ()));
+}
+
+void GopherEngine::fileManagement (const string &fname, const string &path,GopherMenu &tmp)
+{
+  string ext;
+  string f_path = path;
+  if (f_path != "")
+    f_path.append ("/");
+  f_path.append (fname);
+  string abs_name = abs_path;
+  if (abs_name != "")
+    abs_name.append ("/");
+  abs_name.append (f_path);
+
+  FilesUtility::getFileExt (ext,fname);
+  if (handlers.containsKey (ext.c_str ()))
+    (this->*handlers.get(ext.c_str ())) (fname, path, tmp);
+  else
+    {
+      MimeRecord *mime = getMIME (abs_name);
+      if (mime!=NULL)
+        {
+          string mymime = mime->mimeType;
+          mymime = mymime.substr (0,mymime.find ('/',0));
+          if (handlers.containsKey (mymime.c_str ()))
+            (this->*handlers.get (mymime.c_str ()))(fname, path, tmp);
+        }
+      else
+        tmp.addItem (GopherFile (fname.c_str (),
+                                 f_path.c_str (),
+                                 hostname.c_str () ,
+                                 port.c_str ()));
+    }
+}
+
+/*!
+ * Returns the MIME type passing its extension.
+ * Returns zero if the file is registered.
+ */
+MimeRecord* GopherEngine::getMIME (string &filename)
+{
+  const char *handler = NULL;
+
+  if (Host->isMIME ())
+    return Host->getMIME ()->getMIME (filename);
+
+  return Server::getInstance ()->getMimeManager ()->getMIME (filename, handler);
+}
+
+void GopherEngine::textFile(const string &fname, const string &path,GopherMenu &tmp)
+{
+  string f_path = path;
+  if (f_path != "")
+    f_path.append ("/");
+  f_path.append (fname);
+  tmp.addItem (GopherFile (fname.c_str (),
+                           f_path.c_str (),
+                           hostname.c_str () ,
+                           port.c_str ()));
+}
+void GopherEngine::csoFile(const string &fname, const string &path,GopherMenu &tmp)
+{
+  string f_path = path;
+  if (f_path != "")
+    f_path.append ("/");
+  f_path.append (fname);
+  tmp.addItem (GopherCSO (fname.c_str (),
+                          f_path.c_str (),
+                          hostname.c_str () ,
+                          port.c_str ()));
+}
+
+void GopherEngine::binhexFile (const string &fname, const string &path, GopherMenu &tmp)
+{
+  string f_path = path;
+  if (f_path != "")
+    f_path.append ("/");
+  f_path.append (fname);
+  tmp.addItem (GopherMacBinHex (fname.c_str (),
+                                f_path.c_str (),
+                                hostname.c_str () ,
+                                port.c_str ()));
+}
+
+void GopherEngine::dosbinFile (const string &fname, const string &path, GopherMenu &tmp)
+{
+  string f_path = path;
+  if (f_path != "")
+    f_path.append ("/");
+  f_path.append (fname);
+  tmp.addItem (GopherDosBin (fname.c_str (),
+                             f_path.c_str (),
+                             hostname.c_str () ,
+                             port.c_str ()));
+}
+
+void GopherEngine::UUencodeFile (const string &fname, const string &path, GopherMenu &tmp)
+{
+  string f_path = path;
+  if (f_path != "")
+    f_path.append ("/");
+  f_path.append (fname);
+  tmp.addItem (GopherUnixUUencode (fname.c_str (),
+                                   f_path.c_str (),
+                                   hostname.c_str () ,
+                                   port.c_str ()));
+}
+
+void GopherEngine::telnetFile (const string &fname, const string &path, GopherMenu &tmp)
+{
+  string f_path = path;
+  if (f_path != "")
+    f_path.append ("/");
+  f_path.append (fname);
+  tmp.addItem (GopherTelnet (fname.c_str (),
+                             f_path.c_str (),
+                             hostname.c_str () ,
+                             port.c_str ()));
+}
+void GopherEngine::binFile (const string &fname, const string &path, GopherMenu &tmp)
+{
+  string f_path = path;
+  if (f_path != "")
+    f_path.append ("/");
+  f_path.append (fname);
+  tmp.addItem (GopherBin (fname.c_str (),
+                          f_path.c_str (),
+                          hostname.c_str () ,
+                          port.c_str ()));
+}
+
+void GopherEngine::imageFile (const string &fname, const string &path, GopherMenu &tmp)
+{
+  string f_path = path;
+  if (f_path != "")
+    f_path.append ("/");
+  f_path.append (fname);
+  tmp.addItem (GopherImage (fname.c_str (),
+                            f_path.c_str (),
+                            hostname.c_str () ,
+                            port.c_str ()));
+}
+
+void GopherEngine::gifFile (const string &fname, const string &path, GopherMenu &tmp)
+{
+  string f_path = path;
+  if (f_path != "")
+    f_path.append ("/");
+  f_path.append (fname);
+  tmp.addItem (GopherGif (fname.c_str (),
+                          f_path.c_str (),
+                          hostname.c_str () ,
+                          port.c_str ()));
+}
+
+void GopherEngine::infoFile (const string &fname, const string &path,GopherMenu &tmp)
+{
+  string file_path;
+  file_path.append (abs_path);
+  file_path.append ("/");
+  file_path.append (path);
+  file_path.append ("/");
+  file_path.append (fname);
+
+  File f;
+  int state;
+  u_long fsize;
+  state = f.openFile (file_path.c_str (), File::READ);
+  if(!state)
+    {
+      MemBuf buff;
+      u_long real;
+      int sts;
+      fsize = f.getFileSize ();
+      buff.setLength (fsize);
+      f.read (buff.getBuffer (), fsize, &real);
+      if(real == fsize)
+        tmp.addIntro (buff.getBuffer (), hostname, port);
+      f.close ();
+    }
+}
diff --git a/myserver/src/protocol/gopher/gopher.cpp b/myserver/src/protocol/gopher/gopher.cpp
new file mode 100644
index 0000000..14e978c
--- /dev/null
+++ b/myserver/src/protocol/gopher/gopher.cpp
@@ -0,0 +1,109 @@
+/* -*- mode: c++ -*- */
+/*
+MyServer
+Copyright (C) 2002-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"
+
+#include <include/protocol/gopher/gopher.h>
+#include <include/protocol/gopher/gopher_content.h>
+#include <include/protocol/gopher/engine.h>
+#include <include/server/server.h>
+#include <include/server/clients_thread.h>
+#include <include/base/string/securestr.h>
+
+#include <iostream>
+
+/*!
+ * Constructor for the Gopher class
+ */
+
+Gopher::Gopher ()
+{}
+
+/*!
+ * Destructor for the Gopher class.
+ */
+Gopher::~Gopher ()
+{}
+
+/*!
+ * Service method
+ */
+
+char *Gopher::registerNameImpl (char* out, int len)
+{
+  if (out)
+    {
+      myserver_strlcpy (out, "GOPHER", len);
+    }
+  return (char*) "GOPHER";
+}
+
+/*!
+ * The loading unloading routine
+ */
+
+int Gopher::loadProtocolStatic ()
+{}
+
+int Gopher::unLoadProtocolStatic ()
+{
+  return 1;
+}
+
+/*!
+ * Main protocol implementation stuff
+ */
+
+int Gopher::controlConnection (ConnectionPtr pConnection,
+                               char *b1,
+                               char *b2,
+                               int bs1,
+                               int bs2,
+                               u_long nbtr,
+                               u_long id)
+{
+  char buffer[256];
+  u_long nbr;
+  GopherEngine g;
+
+  if (pConnection == NULL)
+    return ClientsThread::DELETE_CONNECTION;
+  Server *server = Server::getInstance ();
+  if (server == NULL)
+    return ClientsThread::DELETE_CONNECTION;
+  string command (b1);
+  string::size_type loc = command.find ('\n',0);
+  while( loc == string::npos ){
+    pConnection->socket->read (buffer, sizeof (buffer), &nbr);
+    command+=buffer;
+    loc = command.find ('\n',0);
+  }
+  GopherContent &Gu = g.incoming (GopherRequest (command.substr (0,
+                                                                 ((int)loc)-1),
+                                                 pConnection)
+                                  ,pConnection->host);
+  reply (pConnection,Gu);
+}
+
+void Gopher::reply (ConnectionPtr pConnection,
+                    GopherContent &data)
+{
+  data.toProtocol (pConnection->socket);
+  pConnection->socket->close ();
+}
diff --git a/myserver/src/protocol/gopher/gopher_content.cpp b/myserver/src/protocol/gopher/gopher_content.cpp
new file mode 100644
index 0000000..52730bb
--- /dev/null
+++ b/myserver/src/protocol/gopher/gopher_content.cpp
@@ -0,0 +1,365 @@
+/* -*- mode: c++ -*- */
+/*
+MyServer
+Copyright (C) 2002-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"
+
+#include <include/protocol/gopher/gopher_content.h>
+#include <include/base/string/stringutils.h>
+
+
+#include <iostream>
+#include <sstream>
+#include <string>
+
+
+void GopherMenu::addIntro (string freeText, string host, string port)
+{
+  size_t size = freeText.size ();
+  char myline[size];
+  vector<GopherItem> tmp;
+  istream *res;
+  istringstream str (freeText);
+  while (!str.getline (myline, size).eof ())
+    {
+      tmp.push_back (GopherInfo (myline,
+                                 "(None)",
+                                 host.c_str (),
+                                 port.c_str ()));
+    }
+  tmp.push_back (GopherInfo (myline,
+                             "(None)",
+                             host.c_str (),
+                             port.c_str ()));
+  Items.insert (Items.begin (),tmp.begin (), tmp.end ());
+}
+
+void GopherMenu::addItem (GopherItem i)
+{
+  Items.push_back (i);
+}
+
+void GopherMenu::toProtocol (Socket *s)
+{
+  for(int i = 0; i < Items.size (); i++)
+    Items.at (i).toProtocol (s);
+
+  s->send (".\n", 3, 0);
+}
+
+GopherItem::GopherItem (char t,
+      const char d[],
+      const char loc[],
+      const char h[],
+      const char p[])
+{
+  init (t, d, loc, h, p);
+}
+
+GopherItem::GopherItem ()
+{
+  init(0, "", "", "", "");
+}
+
+void GopherItem::init (char t,
+           const char d[],
+           const char loc[],
+           const char h[],
+           const char p[])
+{
+  Type (t);
+  Desc (d);
+  Rlocation (loc);
+  Host (h);
+  Port (p);
+}
+
+GopherItem::~GopherItem ()
+{}
+
+void GopherItem::toProtocol (Socket *s)
+{
+  string res;
+  res = "-";
+  res[0]=type;
+  res.append (desc);
+  res.append ("\t");
+  res.append (rlocation);
+  res.append ("\t");
+  res.append (host);
+  res.append ("\t");
+  res.append (port);
+  res.append ("\t\n");
+  s->send (res.c_str (), res.length (), 0);
+}
+
+GopherInfo::GopherInfo ()
+{
+  init ('i', "", "", "", "");
+}
+
+GopherInfo::GopherInfo (const char d[],
+      const char loc[],
+      const char h[],
+      const char p[])
+{
+  init ('i', d, loc, h, p);
+}
+
+GopherInfo::~GopherInfo (){}
+
+GopherFile::GopherFile ()
+{
+  init ('0', "", "", "", "");
+}
+
+GopherFile::GopherFile (const char d[],
+            const char loc[],
+      const char h[],
+      const char p[])
+{
+  init ('0', d, loc, h, p);
+}
+
+GopherFile::~GopherFile (){}
+
+
+
+GopherDirectory::GopherDirectory ()
+{
+  init ('1', "", "", "", "");
+}
+
+GopherDirectory::GopherDirectory (const char d[],
+          const char loc[],
+          const char h[],
+          const char p[])
+{
+  init ('1', d, loc, h, p);
+}
+
+GopherDirectory::~GopherDirectory ()
+{}
+
+GopherCSO::GopherCSO ()
+{
+  init ('2', "", "", "", "");
+}
+
+GopherCSO::~GopherCSO ()
+{}
+
+GopherCSO::GopherCSO (const char d[],
+                      const char loc[],
+                      const char h[],
+                      const char p[])
+{
+  init ('2', d, loc, h, p);
+}
+
+GopherError::GopherError ()
+{
+  init ('3', "", "", "", "");
+}
+
+GopherError::~GopherError ()
+{}
+
+GopherError::GopherError (const char d[],
+                          const char loc[],
+                          const char h[],
+                          const char p[])
+{
+  init ('3', d, loc, h, p);
+}
+
+GopherMacBinHex::GopherMacBinHex ()
+{
+  init ('4', "", "", "", "");
+}
+
+GopherMacBinHex::~GopherMacBinHex ()
+{}
+
+GopherMacBinHex::GopherMacBinHex (const char d[],
+                                  const char loc[],
+                                  const char h[],
+                                  const char p[])
+{
+  init ('4', d, loc, h, p);
+}
+
+GopherDosBin::GopherDosBin ()
+{
+  init('5', "", "", "", "");
+}
+
+GopherDosBin::~GopherDosBin ()
+{}
+
+GopherDosBin::GopherDosBin (const char d[],
+                            const char loc[],
+                            const char h[],
+                            const char p[])
+{
+  init ('5', d, loc, h, p);
+}
+
+GopherUnixUUencode::GopherUnixUUencode ()
+{
+  init ('6', "", "", "", "");
+}
+
+GopherUnixUUencode::~GopherUnixUUencode ()
+{}
+
+GopherUnixUUencode::GopherUnixUUencode (const char d[],
+                                        const char loc[],
+                                        const char h[],
+                                        const char p[])
+{
+  init ('6', d, loc, h, p);
+}
+
+GopherSearchServer::GopherSearchServer ()
+{
+  init ('7', "", "", "", "");
+}
+
+GopherSearchServer::~GopherSearchServer ()
+{}
+
+GopherSearchServer::GopherSearchServer (const char d[],
+                                        const char loc[],
+                                        const char h[],
+                                        const char p[])
+{
+  init ('7', d, loc, h, p);
+}
+
+GopherTelnet::GopherTelnet ()
+{
+  init ('8', "", "", "", "");
+}
+
+GopherTelnet::~GopherTelnet ()
+{}
+
+GopherTelnet::GopherTelnet (const char d[],
+                            const char loc[],
+                            const char h[],
+                            const char p[])
+{
+  init ('8', d, loc, h, p);
+}
+
+GopherBin::GopherBin ()
+{
+  init ('9', "", "", "", "");
+}
+
+GopherBin::~GopherBin ()
+{}
+
+GopherBin::GopherBin (const char d[],
+                      const char loc[],
+                      const char h[],
+                      const char p[])
+{
+  init ('9', d, loc, h, p);
+}
+
+GopherRendundantServer::GopherRendundantServer ()
+{
+  init (0, "", "", "", "");
+}
+
+GopherRendundantServer::~GopherRendundantServer ()
+{}
+
+GopherRendundantServer::GopherRendundantServer (const char d[],
+                                                const char loc[],
+                                                const char h[],
+                                                const char p[])
+{
+  init (0, d, loc, h, p);
+}
+
+GopherGif::GopherGif ()
+{
+  init ('g', "", "", "", "");
+}
+
+GopherGif::~GopherGif ()
+{}
+
+GopherGif::GopherGif (const char d[],
+                      const char loc[],
+                      const char h[],
+                      const char p[])
+{
+  init ('g', d, loc, h, p);
+}
+
+GopherImage::GopherImage ()
+{
+  init ('g', "", "", "", "");
+}
+
+GopherImage::~GopherImage ()
+{}
+
+GopherImage::GopherImage (const char d[],
+                          const char loc[],
+                          const char h[],
+                          const char p[])
+{
+  init ('I', d, loc, h, p);
+}
+
+
+GopherData::GopherData (string data)
+{
+  buff = data;
+}
+
+void GopherData::toProtocol (Socket *s)
+{
+  string res = buff;
+  res.append ("\r\n.\r\n");
+  s->send (res.c_str (), res.length (), 0);
+}
+
+
+GopherFileContent::GopherFileContent (string fnome)
+{
+  sfile = new File ();
+  sfile->openFile (fnome.c_str (), File::READ);
+  buf.setLength (4096);
+}
+
+GopherFileContent::~GopherFileContent ()
+{
+  sfile->close ();
+  delete sfile;
+}
+
+void GopherFileContent::toProtocol (Socket *s)
+{
+  u_long tmp;
+  sfile->fastCopyToSocket (s, 0, &buf, &tmp);
+}
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 3b0c29a..da88639 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -22,6 +22,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <include/protocol/http/http.h>
 #include <include/protocol/https/https.h>
 #include <include/protocol/control/control_protocol.h>
+#include <include/protocol/gopher/gopher.h>
 #include <include/protocol/ftp/ftp.h>
 #include <include/base/string/stringutils.h>
 #include <include/base/socket/socket.h>
@@ -360,6 +361,7 @@ void Server::loadPlugins ()
 
   Protocol *protocolsSet[] = {new HttpProtocol (),
                               new HttpsProtocol (),
+                              new GopherProtocol (),
                               new FtpProtocol (),
                               new ControlProtocol (),
                               NULL};

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

Summary of changes:
 myserver/configure.ac                             |    2 +
 myserver/include/protocol/Makefile.am             |    2 +-
 myserver/include/protocol/gopher/Makefile.am      |    4 +
 myserver/include/protocol/gopher/engine.h         |   64 ++++
 myserver/include/protocol/gopher/gopher.h         |  102 ++++++
 myserver/include/protocol/gopher/gopher_content.h |  266 +++++++++++++++
 myserver/src/protocol/Makefile.am                 |    2 +-
 myserver/src/protocol/gopher/Makefile.am          |    3 +
 myserver/src/protocol/gopher/engine.cpp           |  290 ++++++++++++++++
 myserver/src/protocol/gopher/gopher.cpp           |  109 ++++++
 myserver/src/protocol/gopher/gopher_content.cpp   |  365 +++++++++++++++++++++
 myserver/src/server/server.cpp                    |    2 +
 12 files changed, 1209 insertions(+), 2 deletions(-)
 create mode 100644 myserver/include/protocol/gopher/Makefile.am
 create mode 100644 myserver/include/protocol/gopher/engine.h
 create mode 100644 myserver/include/protocol/gopher/gopher.h
 create mode 100644 myserver/include/protocol/gopher/gopher_content.h
 create mode 100644 myserver/src/protocol/gopher/Makefile.am
 create mode 100644 myserver/src/protocol/gopher/engine.cpp
 create mode 100644 myserver/src/protocol/gopher/gopher.cpp
 create mode 100644 myserver/src/protocol/gopher/gopher_content.cpp


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Nov 01 08:43:19 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N4aiF-0002ie-KS
	for mharc-myserver-commit@gnu.org; Sun, 01 Nov 2009 08:43:19 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N4aiE-0002iZ-F9
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 08:43:18 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N4aiD-0002iF-W2
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 08:43:18 -0500
Received: from [199.232.76.173] (port=44003 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N4aiD-0002iC-Nd
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 08:43:17 -0500
Received: from savannah.gnu.org ([199.232.41.3]:60685 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 1N4aiD-0007qF-AD
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 08:43:17 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N4aiC-0002F0-HO
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 13:43:16 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N4aiB-0002EU-P2
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 13:43:16 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 557586ede10752cea13127767c93ac072d6f40ed
X-Git-Newrev: 7988b433085245768b52094ca966cca373805b64
Message-Id: <E1N4aiB-0002EU-P2@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 01 Nov 2009 13:43:16 +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. 7988b433085245768b52094ca966cca373805b64
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, 01 Nov 2009 13:43:19 -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  7988b433085245768b52094ca966cca373805b64 (commit)
       via  096cf8afb39c099d5d563b663634fe5af76117bc (commit)
      from  557586ede10752cea13127767c93ac072d6f40ed (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 7988b433085245768b52094ca966cca373805b64
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Nov 1 14:43:18 2009 +0100

    Some minor aesthetic changes

diff --git a/myserver/src/protocol/gopher/engine.cpp b/myserver/src/protocol/gopher/engine.cpp
index c7ac396..4cf62a1 100644
--- a/myserver/src/protocol/gopher/engine.cpp
+++ b/myserver/src/protocol/gopher/engine.cpp
@@ -127,7 +127,7 @@ void GopherEngine::fileManagement (const string &fname, const string &path,Gophe
   else
     {
       MimeRecord *mime = getMIME (abs_name);
-      if (mime!=NULL)
+      if (mime != NULL)
         {
           string mymime = mime->mimeType;
           mymime = mymime.substr (0,mymime.find ('/',0));
@@ -262,7 +262,7 @@ void GopherEngine::gifFile (const string &fname, const string &path, GopherMenu
                           port.c_str ()));
 }
 
-void GopherEngine::infoFile (const string &fname, const string &path,GopherMenu &tmp)
+void GopherEngine::infoFile (const string &fname, const string &path, GopherMenu &tmp)
 {
   string file_path;
   file_path.append (abs_path);
@@ -275,7 +275,7 @@ void GopherEngine::infoFile (const string &fname, const string &path,GopherMenu
   int state;
   u_long fsize;
   state = f.openFile (file_path.c_str (), File::READ);
-  if(!state)
+  if (!state)
     {
       MemBuf buff;
       u_long real;
diff --git a/myserver/src/protocol/gopher/gopher.cpp b/myserver/src/protocol/gopher/gopher.cpp
index 14e978c..c694368 100644
--- a/myserver/src/protocol/gopher/gopher.cpp
+++ b/myserver/src/protocol/gopher/gopher.cpp
@@ -33,13 +33,15 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 Gopher::Gopher ()
-{}
+{
+}
 
 /*!
  * Destructor for the Gopher class.
  */
 Gopher::~Gopher ()
-{}
+{
+}
 
 /*!
  * Service method
@@ -48,9 +50,8 @@ Gopher::~Gopher ()
 char *Gopher::registerNameImpl (char* out, int len)
 {
   if (out)
-    {
-      myserver_strlcpy (out, "GOPHER", len);
-    }
+    myserver_strlcpy (out, "GOPHER", len);
+
   return (char*) "GOPHER";
 }
 
@@ -59,7 +60,8 @@ char *Gopher::registerNameImpl (char* out, int len)
  */
 
 int Gopher::loadProtocolStatic ()
-{}
+{
+}
 
 int Gopher::unLoadProtocolStatic ()
 {
@@ -84,20 +86,22 @@ int Gopher::controlConnection (ConnectionPtr pConnection,
 
   if (pConnection == NULL)
     return ClientsThread::DELETE_CONNECTION;
+
   Server *server = Server::getInstance ();
   if (server == NULL)
     return ClientsThread::DELETE_CONNECTION;
+
   string command (b1);
-  string::size_type loc = command.find ('\n',0);
-  while( loc == string::npos ){
-    pConnection->socket->read (buffer, sizeof (buffer), &nbr);
-    command+=buffer;
-    loc = command.find ('\n',0);
-  }
-  GopherContent &Gu = g.incoming (GopherRequest (command.substr (0,
-                                                                 ((int)loc)-1),
-                                                 pConnection)
-                                  ,pConnection->host);
+  string::size_type loc = command.find ('\n', 0);
+  while( loc == string::npos )
+    {
+      pConnection->socket->read (buffer, sizeof (buffer), &nbr);
+      command += buffer;
+      loc = command.find ('\n', 0);
+    }
+
+  GopherContent &Gu = g.incoming (GopherRequest (command.substr (0, loc - 1),
+                                            pConnection), pConnection->host);
   reply (pConnection,Gu);
 }
 



commit 096cf8afb39c099d5d563b663634fe5af76117bc
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Nov 1 14:37:07 2009 +0100

    Update AUTHORS.

diff --git a/myserver/AUTHORS b/myserver/AUTHORS
index bfe4ab4..92ebf99 100644
--- a/myserver/AUTHORS
+++ b/myserver/AUTHORS
@@ -8,6 +8,9 @@ Russ Bohnhoff <rustypaint@gmail.com>
 Original port to POSIX.
 Developed the first GUI control program.
 
+Domenico Chierico <spaghetty@gmail.com>
+Implemented the Gopher protocol.
+
 Alexandru Iancu <alexandru.iancu@gmail.com>
 Implemented the IPv6 protocol.
 Implemented the FTP protocol.

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

Summary of changes:
 myserver/AUTHORS                        |    3 ++
 myserver/src/protocol/gopher/engine.cpp |    6 ++--
 myserver/src/protocol/gopher/gopher.cpp |   36 +++++++++++++++++-------------
 3 files changed, 26 insertions(+), 19 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Nov 01 12:09:18 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N4dva-0004So-SI
	for mharc-myserver-commit@gnu.org; Sun, 01 Nov 2009 12:09:18 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N4dvZ-0004RB-BA
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 12:09:17 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N4dvY-0004PA-0p
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 12:09:16 -0500
Received: from [199.232.76.173] (port=37219 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N4dvX-0004P2-Pr
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 12:09:15 -0500
Received: from savannah.gnu.org ([199.232.41.3]:37223 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 1N4dvX-0004kW-48
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 12:09:15 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N4dvW-0007Sd-9D
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 17:09:14 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N4dvV-0007SA-0Z
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 17:09:13 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 7988b433085245768b52094ca966cca373805b64
X-Git-Newrev: a69b53898bcdab9811c26ee17fdcd5bf48f92140
Message-Id: <E1N4dvV-0007SA-0Z@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 01 Nov 2009 17:09:13 +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. a69b53898bcdab9811c26ee17fdcd5bf48f92140
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, 01 Nov 2009 17:09: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  a69b53898bcdab9811c26ee17fdcd5bf48f92140 (commit)
      from  7988b433085245768b52094ca966cca373805b64 (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 a69b53898bcdab9811c26ee17fdcd5bf48f92140
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Nov 1 18:09:18 2009 +0100

    MemBuf class refactoring: remove m_ prefix from class members and remove not used code.

diff --git a/myserver/include/base/mem_buff/mem_buff.h b/myserver/include/base/mem_buff/mem_buff.h
index 1c2a427..21e42ce 100644
--- a/myserver/include/base/mem_buff/mem_buff.h
+++ b/myserver/include/base/mem_buff/mem_buff.h
@@ -29,21 +29,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 # include <string>
 using namespace std;
 
-# define USE_NEW
-
-
-# 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'
 
 class MemBuf
@@ -82,7 +67,7 @@ public:
 	int isValid ();
 
 	char* getBuffer ();
-	operator const void*() ;
+	operator const void* ();
 	MemBuf operator+ (MemBuf& src);
 	MemBuf operator+ (const char* src);
 	const MemBuf& operator+= (MemBuf& add);
@@ -98,24 +83,27 @@ public:
 	MemBuf& operator<< (unsigned char c) ;
 	MemBuf& operator<< (const MemBuf &src) ;
 	MemBuf& operator<< (const string &src) ;
-	MemBuf& operator=(const MemBuf& src) ;
-	MemBuf& operator=(const char* src);
+	MemBuf& operator= (const MemBuf& src) ;
+	MemBuf& operator= (const char* src);
+
+  /* The maximun size that the buffer can reached ; 0 if none.  */
+	u_int nSizeLimit;
 
-	u_int m_nSizeLimit; // The maximun size that the buffer can reached ; 0 if none
-	u_int m_nBlockLength; // Minimun size of new allocated blocks during addings
-						 // We assume that m_nBlockLength < m_nSizeLimit
+  /* Minimun size of new allocated blocks during addings.
+   * We assume that nBlockLength < nSizeLimit.  */
+	u_int nBlockLength; 
 
 	void hashMD5(const void* pAdr, u_int nSize);
 	void hashCRC (const void* pAdr, u_int nSize);
 	void hex (const void* pAdr, u_int nSize);
 	void uintToStr (u_int i);
-	void intToStr ( int i);
+	void intToStr (int i);
 	u_int strToUint (const char* pAdr);
 	unsigned char hexCharToNumber (unsigned char c);
 	MemBuf hexToData (const void* pAdr, u_int nSize);
 	int strToInt (const char* pAdr);
 	void hex (MemBuf& membuf) ;
-	void hashMD5(MemBuf& membuf);
+	void hashMD5 (MemBuf& membuf);
 	void hashCRC (MemBuf& membuf);
 	void uintToStr (u_int i, char* pBufToUse, u_int nBufSize) ;
 	void xIntToStr (u_int i, int bNegative, char* pBufToUse, u_int nBufSize);
@@ -124,10 +112,10 @@ public:
 protected:
 	void xIntToStr (u_int i, int bNegative);
 	void allocBuffer (u_int size);
-	char* m_buffer; // Using of char* instead of void* because the C++ Compilator doesn't know the size of a void* !!!!!
-	u_int m_nSize;
-	u_int m_nRealSize;
-	int m_bCanDelete;
+	char *buffer;
+	u_int nSize;
+	u_int nRealSize;
+	int bCanDelete;
 	static u_int crc32Table[256];
 };
 
diff --git a/myserver/src/base/mem_buff/mem_buff.cpp b/myserver/src/base/mem_buff/mem_buff.cpp
index 30714dc..ef95324 100644
--- a/myserver/src/base/mem_buff/mem_buff.cpp
+++ b/myserver/src/base/mem_buff/mem_buff.cpp
@@ -16,413 +16,376 @@ 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"
 #include <include/base/mem_buff/mem_buff.h>
 #include <include/base/crypt/md5.h>
 
 #include <string.h>
 
-#ifndef DONT_MATCH_LENGTH
-# include <math.h> // for the log10 function
-#endif
-
-// Used by the CRC algorithm
-
-u_int  MemBuf::crc32Table[256] =
-{
-  0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
-  0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
-  0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
-  0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
-  0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
-  0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
-  0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,
-  0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
-  0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
-  0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
-  0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,
-  0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
-  0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,
-  0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
-  0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
-  0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
-
-  0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,
-  0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
-  0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,
-  0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
-  0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
-  0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
-  0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,
-  0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
-  0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
-  0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
-  0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
-  0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
-  0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,
-  0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
-  0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,
-  0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
-
-  0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
-  0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
-  0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
-  0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
-  0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,
-  0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
-  0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
-  0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
-  0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,
-  0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
-  0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,
-  0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
-  0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
-  0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
-  0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,
-  0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
-
-  0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,
-  0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
-  0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
-  0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
-  0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,
-  0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
-  0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
-  0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
-  0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
-  0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
-  0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,
-  0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
-  0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,
-  0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
-  0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
-  0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
-};
-
-/*! Default constructor */
+#define mealloc(size) (new char[size])
+#define mefree(pAdr) (delete [] pAdr)
+
+u_int MemBuf::crc32Table[256] =
+  {
+    0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
+    0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
+    0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
+    0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
+    0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
+    0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
+    0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,
+    0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
+    0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
+    0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
+    0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,
+    0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
+    0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,
+    0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
+    0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
+    0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
+
+    0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,
+    0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
+    0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,
+    0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
+    0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
+    0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
+    0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,
+    0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
+    0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
+    0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
+    0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
+    0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
+    0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,
+    0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
+    0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,
+    0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
+
+    0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
+    0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
+    0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
+    0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
+    0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,
+    0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
+    0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
+    0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
+    0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,
+    0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
+    0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,
+    0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
+    0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
+    0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
+    0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,
+    0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
+
+    0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,
+    0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
+    0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
+    0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
+    0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,
+    0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
+    0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
+    0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
+    0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
+    0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
+    0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,
+    0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
+    0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,
+    0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
+    0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
+    0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
+  };
+
+/*! Default constructor.  */
 MemBuf::MemBuf ()
 {
-  m_buffer = NULL;
-  m_nSize = 0;
-  m_nRealSize = 0;
-  m_nSizeLimit = 0;
-  m_nBlockLength = 1024;
-  m_bCanDelete = 1;
+  buffer = NULL;
+  nSize = 0;
+  nRealSize = 0;
+  nSizeLimit = 0;
+  nBlockLength = 1024;
+  bCanDelete = 1;
 }
 
 /*!
-Copy constructor
-pAdr : pointer to the buffer to copy
-size : size of pAdr
-*/
+ * Copy constructor
+ * pAdr : pointer to the buffer to copy
+ * size : size of pAdr
+ */
 MemBuf::MemBuf (const void* pAdr, u_int size)
 {
-  m_buffer = NULL;
-  m_nSize = 0;
-  m_nRealSize = 0;
-  m_nSizeLimit = 0;
-  m_nBlockLength = 1024;
+  buffer = NULL;
+  nSize = 0;
+  nRealSize = 0;
+  nSizeLimit = 0;
+  nBlockLength = 1024;
   setBuffer (pAdr, size);
-  m_bCanDelete = 1;
+  bCanDelete = 1;
 }
 
-/*! Direct copy constructor (should only be used by the operators to avoid reallocations) */
+/*!
+ * Direct copy constructor (should only be used by the operators to
+ * avoid reallocations).
+ */
 MemBuf::MemBuf (const MemBuf& srcBuf)
 {
-  m_buffer = srcBuf.m_buffer;
-  m_nSize = srcBuf.m_nSize;
-  m_nRealSize = srcBuf.m_nRealSize;
-  m_nSizeLimit = 0;
-  m_nBlockLength = srcBuf.m_nBlockLength;
-  m_bCanDelete = 0;
+  buffer = srcBuf.buffer;
+  nSize = srcBuf.nSize;
+  nRealSize = srcBuf.nRealSize;
+  nSizeLimit = 0;
+  nBlockLength = srcBuf.nBlockLength;
+  bCanDelete = 0;
 }
 
-/*! Copy constructor */
+/*! Copy constructor. */
 MemBuf::MemBuf (MemBuf &srcBuf, int)
 {
-  m_buffer = NULL;
-  m_nSize = 0;
-  m_nRealSize = 0;
-  m_nBlockLength = 1024;
-  m_nSizeLimit = 0;
-  setBuffer (srcBuf.m_buffer, srcBuf.m_nSize);
-  m_bCanDelete = 1;
+  buffer = NULL;
+  nSize = 0;
+  nRealSize = 0;
+  nBlockLength = 1024;
+  nSizeLimit = 0;
+  setBuffer (srcBuf.buffer, srcBuf.nSize);
+  bCanDelete = 1;
 }
 
-/*! find a specific character in the internal buffer from a specific location */
+/*!
+ * Find a specific character in the internal buffer from a specific
+ * location.
+ */
 u_int MemBuf::find (char c, u_int start)
 {
-#ifdef ASSERT
-  ASSERT (m_buffer != NULL);
-#endif
-  if (start >= m_nSize)
+  if (start >= nSize)
     return (u_int) -1;
-  void* pFound = memchr (m_buffer + start, c, m_nSize - start);
+  void* pFound = memchr (buffer + start, c, nSize - start);
 
-  return (pFound == NULL) ? (u_int) -1 : ((char*) pFound - m_buffer);
+  return (pFound == NULL) ? (u_int) -1 : ((char*) pFound - buffer);
 }
 
-/*! find a specific buffer in the internal buffer from a specific location */
+/*! Find a specific buffer in the internal buffer from a specific location. */
 u_int MemBuf::find (const void* pAdr, u_int size, u_int start)
 {
-  if (start >= m_nSize)
+  if (start >= nSize)
     return (u_int)-1;
 
   char first = *((const char*) pAdr);
   char* pLast;
-  const char* pPrev = m_buffer + start;
-  u_int size_buf = m_nSize - start;
-  const char* pEnd = m_buffer + m_nSize + 1;
+  const char* pPrev = buffer + start;
+  u_int size_buf = nSize - start;
+  const char* pEnd = buffer + nSize + 1;
   while ((pLast = (char*) memchr (pPrev, first, size_buf)) != NULL)
-  {
-    size_buf -= (u_int)(pLast - pPrev);
-    pPrev = pLast + 1;
+    {
+      size_buf -= (u_int)(pLast - pPrev);
+      pPrev = pLast + 1;
 
-    if (pLast + size >= pEnd)
-      return (u_int)-1;
-    if (memcmp (pLast, pAdr, size) == 0)
-      return (u_int)(pLast - m_buffer);
-  }
+      if (pLast + size >= pEnd)
+        return (u_int)-1;
+      if (memcmp (pLast, pAdr, size) == 0)
+        return (u_int)(pLast - buffer);
+    }
 
   return (u_int)-1;
 }
 
-/*! replace a character by another */
-
+/*! Replace a character by another.  */
 void MemBuf::replace (char what, char by)
 {
-  const char* pEnd = m_buffer + m_nSize;
-  char *buf_c = m_buffer;
+  const char* pEnd = buffer + nSize;
+  char *buf_c = buffer;
   for ( ; buf_c < pEnd; buf_c++)
-  {
-    if (*buf_c == what)
-      *buf_c = by;
-  }
+    {
+      if (*buf_c == what)
+        *buf_c = by;
+    }
 }
 
 /*!
-Add a buffer at the end of the internal buffer.
-If the internal buffer isn't large enough, a reallocation is done until m_nSizeLimit is reached
-If m_nSizeLimit is equal to 0, reallocation are always done.
-*/
+ * Add a buffer at the end of the internal buffer.
+ * If the internal buffer isn't large enough, a reallocation is done
+ * until nSizeLimit is reached.
+ * If nSizeLimit is equal to 0, reallocation are always done.
+ */
 void MemBuf::addBuffer (const void* pAdr, u_int size)
 {
   if (size == 0)
     return;
-#ifdef DONT_MATCH_LENGTH
-  u_int nNewSize = m_nSize + size;
-  if (nNewSize > m_nRealSize)
-  {
-    if (nNewSize - m_nRealSize < m_nBlockLength)
-      setLength (m_nRealSize + m_nBlockLength);
-    else
-      setLength (nNewSize);
-  }
-  const u_int nAllowedSize = m_nRealSize - m_nSize;
+
+  u_int nNewSize = nSize + size;
+  if (nNewSize > nRealSize)
+    {
+      if (nNewSize - nRealSize < nBlockLength)
+        setLength (nRealSize + nBlockLength);
+      else
+        setLength (nNewSize);
+    }
+
+  const u_int nAllowedSize = nRealSize - nSize;
   if (nAllowedSize == 0)
     return;
+
   if (size > nAllowedSize)
-  {
-    size = nAllowedSize;
-    memcpy (m_buffer + m_nSize, pAdr, size);
-    m_nSize = m_nRealSize;
-  }
+    {
+      size = nAllowedSize;
+      memcpy (buffer + nSize, pAdr, size);
+      nSize = nRealSize;
+    }
   else
-  {
-    memcpy (m_buffer + m_nSize, pAdr, size);
-    m_nSize = nNewSize;
-  }
-#else
-  u_int fs = m_nSize + size;
-  if (m_nSizeLimit != 0 && fs > m_nSizeLimit)
-  {
-    size = m_nSizeLimit - m_nSize;
-    fs = m_nSizeLimit;
-  }
-
-  char* temp = mem_alloc (fs);
-  memcpy (temp, m_buffer, m_nSize);
-  memcpy (temp + m_nRealSize, pAdr, size);
-  mem_free (m_buffer);
-  m_buffer = temp;
-  m_nRealSize = fs;
-#endif
+    {
+      memcpy (buffer + nSize, pAdr, size);
+      nSize = nNewSize;
+
+      /* There is room to append '\0', it is not considered
+       * as part of the buffer.  */
+      if (size < nAllowedSize)
+        buffer[nSize + size] = '\0';
+    }
   return;
 }
 
 int MemBuf::setBuffer (const void* pAdr, u_int size)
 {
-#ifdef DONT_MATCH_LENGTH
-  if (size <= m_nRealSize)
-  {
-    memcpy (m_buffer, pAdr, size);
-    m_nSize = size;
-  }
+  if (size <= nRealSize)
+    {
+      memcpy (buffer, pAdr, size);
+      nSize = size;
+    }
   else
-  {
-    if (m_nSizeLimit != 0 && size > m_nSizeLimit)
-      size = m_nSizeLimit;
-    allocBuffer (size);
-    memcpy (m_buffer, pAdr, size);
-    m_nSize = m_nRealSize = size;
-  }
-#else
-  ASSERT (size != 0);
-  allocBuffer (size);
-  memcpy (m_buffer, pAdr, size);
-#endif
+    {
+      if (nSizeLimit != 0 && size > nSizeLimit)
+        size = nSizeLimit;
+      allocBuffer (size);
+      memcpy (buffer, pAdr, size);
+      nSize = nRealSize = size;
+    }
   return 1;
 }
 
 /*!
-Set an external buffer as the internal buffer.
-No memory copy are done.
-This can be useful to use variables from the stack.
-Ex.:
-unsigned char stackBuffer[10];
-MemBuf buffer;
-buffer.setExternalBuffer (stackBuffer, 10); // here, you'll use the memory from stackBuffer
-*/
+ * Set an external buffer as the internal buffer.
+ * No memory copy are done.
+ * This can be useful to use variables from the stack.
+ * Ex.:
+ * unsigned char stackBuffer[10];
+ * MemBuf buffer;
+ * buffer.setExternalBuffer (stackBuffer, 10); // here, you'll use
+ *                                             // the memory from stackBuffer.
+ */
 void MemBuf::setExternalBuffer (const void* pAdr, u_int size)
 {
   free ();
-  m_bCanDelete = false;
-  m_buffer = (char*) pAdr;
-  m_nRealSize = size;
-  m_nSize = 0;
+  bCanDelete = false;
+  buffer = (char*) pAdr;
+  nRealSize = size;
+  nSize = 0;
 }
 
-/*! Return the internal buffer by setting previously a specific length */
+/*! Return the internal buffer by setting previously a specific length. */
 char* MemBuf::getBuffersetLength (u_int newSize)
 {
   setLength (newSize);
-  return (char*)m_buffer;
+  return (char*)buffer;
 }
 
 /*!
-Copy a part of the internal buffer in "result".
-Here, "result" is completly removed and replaced by this part.
-*/
+ * Copy a part of the internal buffer in "result".
+ * Here, "result" is completly removed and replaced by this part.
+ */
 int MemBuf::getPart (u_int nStart, u_int nEnd, MemBuf& result)
 {
-  if (nEnd > m_nSize)
-    nEnd = m_nSize;
+  if (nEnd > nSize)
+    nEnd = nSize;
 
   if (nStart == nEnd)
-  {
-#ifdef DONT_MATCH_LENGTH
-    result.m_nSize = 0;
-#else
-    result.free ();
-#endif
-    return 1;
-  }
-
-  result.setBuffer (m_buffer + nStart, nEnd - nStart);
+    {
+      result.nSize = 0;
+      return 1;
+    }
+
+  result.setBuffer (buffer + nStart, nEnd - nStart);
   return 1;
 }
 
 /*!
-Copy a part of the internal buffer in "result".
-Here, "result" is completly removed and replaced by this part.
-*/
+ * Copy a part of the internal buffer in "result".
+ * Here, "result" is completly removed and replaced by this part.
+ */
 int MemBuf::getPartAsString (u_int nStart, u_int nEnd, MemBuf& result)
 {
-  if (nEnd > m_nRealSize)
-    nEnd = m_nRealSize;
+  if (nEnd > nRealSize)
+    nEnd = nRealSize;
 
   if (nStart == nEnd)
-  {
-#ifdef DONT_MATCH_LENGTH
-    result.m_nSize = 0;
-    result[0] = '\0';
-#else
-    result.free ();
-#endif
-    return 1;
-  }
+    {
+      result.nSize = 0;
+      result[0] = '\0';
+      return 1;
+    }
 
   const u_int lg = nEnd - nStart;
   char* buf = (char*) result.getBuffersetLength (lg + 1);
-  memcpy (buf, m_buffer + nStart,  lg);
+  memcpy (buf, buffer + nStart,  lg);
   buf[lg] = '\0';
 
   return 1;
 }
 
 /*!
-Set the length of the internal buffer.
-If the length is smallest than the existing one, no reallocation is done.
-if it's biggest, a reallocation is done until m_nSizeLimit is reached.
-*/
+ * Set the length of the internal buffer.
+ * If the length is smallest than the existing one, no reallocation is done.
+ * if it's biggest, a reallocation is done until nSizeLimit is reached.
+ */
 void MemBuf::setLength (u_int newSize)
 {
-#ifndef DONT_MATCH_LENGTH
-  if (newSize == 0)
-    return;
-#endif
-
-  if (newSize == m_nRealSize)
+  if (newSize == nRealSize)
     return;
 
-  if (newSize < m_nRealSize)
-  {
-#ifdef DONT_MATCH_LENGTH
-    m_nSize = newSize;
-#else
-    ASSERT (m_buffer != NULL);
-    char* temp = mem_alloc (newSize);
-    memcpy (temp, m_buffer, newSize);
-    if (m_bCanDelete)
-      mem_free (m_buffer);
-    m_buffer = temp;
-    m_nRealSize = m_nSize = newSize;
-#endif
-    return;
-  }
-
-  if (newSize > m_nRealSize)
-  {
-    if (m_nSizeLimit != 0 && newSize > m_nSizeLimit)
+  if (newSize < nRealSize)
     {
-      newSize = m_nSizeLimit;
-      if (newSize == m_nRealSize)
-        return;
+      nSize = newSize;
+      return;
     }
 
-    if (m_buffer == NULL || m_nRealSize == 0)
+  if (newSize > nRealSize)
     {
-      allocBuffer (newSize);
+      if (nSizeLimit != 0 && newSize > nSizeLimit)
+        {
+          newSize = nSizeLimit;
+          if (newSize == nRealSize)
+            return;
+        }
+
+      if (buffer == NULL || nRealSize == 0)
+        {
+          allocBuffer (newSize);
+          return;
+        }
+
+      char* temp = mealloc (newSize);
+      memcpy (temp, buffer, nRealSize);
+      if (bCanDelete)
+        mefree (buffer);
+      buffer = temp;
+      nRealSize = newSize;
       return;
     }
 
-    char* temp = mem_alloc (newSize);
-    memcpy (temp, m_buffer, m_nRealSize);
-    if (m_bCanDelete)
-      mem_free (m_buffer);
-    m_buffer = temp;
-    m_nRealSize = newSize;
-#ifndef DONT_MATCH_LENGTH
-    m_nSize = newSize;
-#endif
-    return;
-  }
 }
 
-// hex <-> Data conversion functions
 
-/*! Write to the MemBuf the hex representation of pAdr */
+/*! Write to the MemBuf the hex representation of pAdr.  */
+
 void MemBuf::hex (const void* pAdr, u_int nSize)
 {
   const u_int nFinalSize = nSize * 2;
   setLength (nFinalSize + 1);
   const char* hex_chars = "0123456789abcdef";
   for (u_int i = 0; i < nSize; i++)
-  {
-    const unsigned char c = *((unsigned char*) pAdr + i);
-    *this << hex_chars[c >> 4] << hex_chars[c & 15];
-  }
+    {
+      const unsigned char c = *((unsigned char*) pAdr + i);
+      *this << hex_chars[c >> 4] << hex_chars[c & 15];
+    }
   *this << '\0';
-  m_nSize = nFinalSize;
+  nSize = nFinalSize;
 }
 
 /*! Return the decimal number of an hexadecimal character */
@@ -437,22 +400,23 @@ unsigned char MemBuf::hexCharToNumber (unsigned char c)
   return 0;
 }
 
-/*! Return a MemBuf with the decoded hexadicmal string pointed at pAdr */
+/*! Return a MemBuf with the decoded hexadicmal string pointed at pAdr.  */
 MemBuf MemBuf::hexToData (const void* pAdr, u_int nSize)
 {
   if ((nSize & 1) == 1) // nSize impair
     return MemBuf ("", 1);
   MemBuf memFinal;
-  memFinal.m_bCanDelete = false;
+  memFinal.bCanDelete = false;
   memFinal.setLength (nSize >> 1);
   const char* pTmp = (const char*) pAdr;
   const char* pEnd = pTmp + nSize;
   for ( ; pTmp < pEnd; pTmp += 2)
-    memFinal << (unsigned char) ((hexCharToNumber (*pTmp) << 4) + hexCharToNumber (*(pTmp + 1)));
+    memFinal << (unsigned char) ((hexCharToNumber (*pTmp) << 4)
+                                 + hexCharToNumber (*(pTmp + 1)));
   return memFinal;
 }
 
-/*! MD5 hashing function */
+/*! MD5 hashing function.  */
 void MemBuf::hashMD5(const void* pAdr, u_int nSize)
 {
   Md5 md5;
@@ -461,123 +425,116 @@ void MemBuf::hashMD5(const void* pAdr, u_int nSize)
   md5.init ();
   md5.update ((char*) pAdr, nSize);
   md5.end ((char*) getBuffer ());
-  m_nSize = 16;
+  nSize = 16;
 }
 
-/*! CRC hashing function */
+/*! CRC hashing function.  */
 void MemBuf::hashCRC (const void* pAdr, u_int nSize)
 {
   setLength (4);
   u_int* nCrc32 = (u_int*) getBuffer ();
   *nCrc32 = 0xFFFFFFFF;
   for (u_int i = 0; i < nSize; i++)
-  {
-    const unsigned char byte = *((unsigned char*) pAdr + i);
-    *nCrc32 = ((*nCrc32) >> 8) ^ crc32Table[(byte) ^ ((*nCrc32) & 0x000000FF)];
-  }
+    {
+      const unsigned char byte = *((unsigned char*) pAdr + i);
+      *nCrc32 = ((*nCrc32) >> 8) ^ crc32Table[(byte) ^ ((*nCrc32) & 0x000000FF)];
+    }
   *nCrc32 = ~(*nCrc32);
-  m_nSize = 4;
+  nSize = 4;
 }
 
-// Int <-> Str conversion functions
 
-/*! Return a MemBuf with the string representation of "i" */
+/*! Return a MemBuf with the string representation of "i".  */
 void MemBuf::xIntToStr (u_int i, int bNegative)
 {
-  if (i == 0) // log10(0) won't work !!
-  {
-    setBuffer ("0", 2);
-    m_nSize = 1;
-    return;
-  }
-#ifdef DONT_MATCH_LENGTH
+  if (i == 0)
+    {
+      setBuffer ("0", 2);
+      nSize = 1;
+      return;
+    }
   setLength (12);
-#else
-  setLength ((u_int) log10(i) + 3);
-#endif
   do
-  {
-    *this << (char) ('0' + i % 10);
-    i /= 10;
-  }
+    {
+      *this << (char) ('0' + i % 10);
+      i /= 10;
+    }
   while (i > 0);
   if (bNegative)
     *this << '-';
-  // Here, we got the string but in reverse order.
-  // So, we reverse it :)
 
-  char *pFirst = m_buffer;
-  char *pLast = m_buffer + m_nSize - 1;
+  char *pFirst = buffer;
+  char *pLast = buffer + nSize - 1;
   char temp;
   do
-  {
-    temp = *pLast;
-    *pLast = *pFirst;
-    *pFirst = temp;
-    pFirst++;
-    pLast--;
-  }
+    {
+      temp = *pLast;
+      *pLast = *pFirst;
+      *pFirst = temp;
+      pFirst++;
+      pLast--;
+    }
   while (pFirst < pLast);
   *this << end_str;
-  m_nSize--;
+  nSize--;
 }
 
 /*! Return a MemBuf with the string representation of "i" using an external buffer. */
 void MemBuf::xIntToStr (u_int i, int bNegative, char* pBufToUse, u_int nBufSize)
 {
-  m_nSizeLimit = nBufSize;
+  nSizeLimit = nBufSize;
   setExternalBuffer (pBufToUse, nBufSize);
   if (i == 0) // log10(0) won't work !!
-  {
-    setBuffer ("0", 2);
-    m_nSize = 1;
-    return;
-  }
+    {
+      setBuffer ("0", 2);
+      nSize = 1;
+      return;
+    }
 
   do
-  {
-    *this << (char) ('0' + i % 10);
-    i /= 10;
-  }
+    {
+      *this << (char) ('0' + i % 10);
+      i /= 10;
+    }
   while (i > 0);
   if (bNegative)
     *this << '-';
-  // Here, we got the string but in reverse order.
-  // So, we reverse it :)
 
   char *pFirst = pBufToUse;
-  char *pLast = pBufToUse + m_nSize - 1;
+  char *pLast = pBufToUse + nSize - 1;
   char temp;
   do
-  {
-    temp = *pLast;
-    *pLast = *pFirst;
-    *pFirst = temp;
-    pFirst++;
-    pLast--;
-  }
+    {
+      temp = *pLast;
+      *pLast = *pFirst;
+      *pFirst = temp;
+      pFirst++;
+      pLast--;
+    }
   while (pFirst < pLast);
   *this << end_str;
-  m_nSize--;
+  nSize--;
 }
 
-/* Convert a string into an unsigned number */
+/* Convert a string into an unsigned number.  */
 u_int MemBuf::strToUint (const char* pAdr)
 {
   int nSize = (int)strlen (pAdr);
-  if (nSize > 10) // a (signed/unsigned) 32-bit number as a maximun of 10 digit
+  /* a (signed/unsigned) 32-bit number as a maximum of 10 digit */
+  if (nSize > 10)
     nSize = 10;
   u_int nRes = 0;
-  u_int pow10[] = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000};
+  u_int pow10[] = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000,
+                   100000000, 1000000000};
   while (nSize-- > 0)
-  {
-    nRes += (u_int) ((*pAdr - '0')) * pow10[nSize];
-    pAdr++;
-  }
+    {
+      nRes += (u_int) ((*pAdr - '0')) * pow10[nSize];
+      pAdr++;
+    }
   return nRes;
 }
 
-/* Convert a string into a signed number */
+/* Convert a string into a signed number.  */
 int MemBuf::strToInt (const char* pAdr)
 {
   if (*pAdr == '-')
@@ -585,49 +542,45 @@ int MemBuf::strToInt (const char* pAdr)
   return (int) strToUint (pAdr);
 }
 
-/*! Destructor */
+/*! Destructor.  */
 MemBuf::~MemBuf ()
 {
-  if (m_buffer != NULL && m_bCanDelete)
-    mem_free (m_buffer);
+  if (buffer != NULL && bCanDelete)
+    mefree (buffer);
 }
 
 void MemBuf::addBuffer (MemBuf *nmb)
 {
-  addBuffer (nmb->m_buffer, nmb->m_nSize);
+  addBuffer (nmb->buffer, nmb->nSize);
 }
 
-/*! free used memory */
+/*! Free used memory. */
 int MemBuf::free ()
 {
-  if (m_buffer != NULL && m_bCanDelete)
-  {
-    mem_free (m_buffer);
-    m_buffer = NULL;
-    m_nSize = m_nRealSize = 0;
-    return 0;
-  }
+  if (buffer != NULL && bCanDelete)
+    {
+      mefree (buffer);
+      buffer = NULL;
+      nSize = nRealSize = 0;
+      return 0;
+    }
   return 1;
 }
 /*!
-*Get the real allocated size.
-*/
+ * Get the real allocated size.
+ */
 u_int MemBuf::getRealLength ()
 {
-  return m_nRealSize;
+  return nRealSize;
 }
 
 u_int MemBuf::find (MemBuf *smb, u_int start)
 {
-  return find (smb->m_buffer, smb->m_nSize, start);
+  return find (smb->buffer, smb->nSize, start);
 }
 char& MemBuf::getAt (u_int nIndex)
 {
-#ifdef ASSERT
-  ASSERT (m_buffer != NULL);
-  ASSERT (nIndex <= m_nSize);
-#endif
-  return *(m_buffer + nIndex);
+  return *(buffer + nIndex);
 }
 char& MemBuf::operator[](u_int nIndex)
 {
@@ -636,22 +589,22 @@ char& MemBuf::operator[](u_int nIndex)
 
 u_int MemBuf::getLength ()
 {
-  return m_nSize;
+  return nSize;
 }
 
 int MemBuf::isValid ()
 {
-  return ((m_nSize != 0) || (m_buffer != NULL))?1:0;
+  return ((nSize != 0) || (buffer != NULL))?1:0;
 }
 
 char* MemBuf::getBuffer ()
 {
-  return ( char*) m_buffer;
+  return ( char*) buffer;
 }
 
 MemBuf::operator const void*()
 {
-  return (const void*) m_buffer;
+  return (const void*) buffer;
 }
 MemBuf MemBuf::operator+ (MemBuf& src)
 {
@@ -717,7 +670,7 @@ MemBuf& MemBuf::operator<< (unsigned char c)
 }
 MemBuf& MemBuf::operator<< (const  MemBuf &src)
 {
-  addBuffer (src.m_buffer, src.m_nSize);
+  addBuffer (src.buffer, src.nSize);
   return *this;
 }
 MemBuf& MemBuf::operator<< (const string &src)
@@ -727,7 +680,7 @@ MemBuf& MemBuf::operator<< (const string &src)
 }
 MemBuf& MemBuf::operator=(const MemBuf& src)
 {
-  setBuffer (src.m_buffer, src.m_nRealSize);
+  setBuffer (src.buffer, src.nRealSize);
   return *this;
 }
 MemBuf& MemBuf::operator=(const char* src)
@@ -764,23 +717,23 @@ void MemBuf::intToStr (int i, char* pBufToUse, u_int nBufSize)
 
 void MemBuf::hex (MemBuf& membuf)
 {
-  hex (membuf.m_buffer, membuf.m_nSize);
+  hex (membuf.buffer, membuf.nSize);
 }
 void MemBuf::hashMD5(MemBuf& membuf)
 {
-  hashMD5(membuf.m_buffer, membuf.m_nSize);
+  hashMD5(membuf.buffer, membuf.nSize);
 }
 void MemBuf::hashCRC (MemBuf& membuf)
 {
-  hashCRC (membuf.m_buffer, membuf.m_nSize);
+  hashCRC (membuf.buffer, membuf.nSize);
 }
 
 void MemBuf::allocBuffer (u_int size)
 {
-  if (size > m_nRealSize || m_buffer == NULL)
-  {
-    free ();
-    m_buffer = mem_alloc (size);
-    m_nRealSize = size;
-  }
+  if (size > nRealSize || buffer == NULL)
+    {
+      free ();
+      buffer = mealloc (size);
+      nRealSize = size;
+    }
 }
diff --git a/myserver/src/server/clients_thread.cpp b/myserver/src/server/clients_thread.cpp
index 7cf0405..36d28ef 100644
--- a/myserver/src/server/clients_thread.cpp
+++ b/myserver/src/server/clients_thread.cpp
@@ -123,9 +123,9 @@ DEFINE_THREAD (clients_thread, pParam)
   ct->bufferSize = ct->server->getBuffersize ();
 
   ct->buffer.setLength (ct->bufferSize);
-  ct->buffer.m_nSizeLimit = ct->bufferSize;
+  ct->buffer.nSizeLimit = ct->bufferSize;
   ct->secondaryBuffer.setLength (ct->bufferSize);
-  ct->secondaryBuffer.m_nSizeLimit = ct->bufferSize;
+  ct->secondaryBuffer.nSizeLimit = ct->bufferSize;
 
   /* Built-in protocols will be initialized at the first use.  */
   ct->initialized = true;

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

Summary of changes:
 myserver/include/base/mem_buff/mem_buff.h |   42 +-
 myserver/src/base/mem_buff/mem_buff.cpp   |  739 ++++++++++++++---------------
 myserver/src/server/clients_thread.cpp    |    4 +-
 3 files changed, 363 insertions(+), 422 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Nov 01 15:13:49 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N4go9-0000RL-8T
	for mharc-myserver-commit@gnu.org; Sun, 01 Nov 2009 15:13:49 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N4go7-0000Q7-CG
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 15:13:47 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N4go5-0000PL-6i
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 15:13:46 -0500
Received: from [199.232.76.173] (port=54103 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N4go5-0000PI-1L
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 15:13:45 -0500
Received: from savannah.gnu.org ([199.232.41.3]:44043 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 1N4go4-0000ra-JC
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 15:13:44 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N4go3-0002wB-N2
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 20:13:43 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N4go3-0002vj-4B
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 20:13:43 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: a69b53898bcdab9811c26ee17fdcd5bf48f92140
X-Git-Newrev: ad630c409e343aee0151da846d9344855106a42e
Message-Id: <E1N4go3-0002vj-4B@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 01 Nov 2009 20:13:43 +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. ad630c409e343aee0151da846d9344855106a42e
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, 01 Nov 2009 20:13:47 -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  ad630c409e343aee0151da846d9344855106a42e (commit)
      from  a69b53898bcdab9811c26ee17fdcd5bf48f92140 (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 ad630c409e343aee0151da846d9344855106a42e
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Nov 1 21:13:51 2009 +0100

    Mass update: include "stdafx.h" not <stdafx.h>.

diff --git a/myserver/tests/main.cpp b/myserver/tests/main.cpp
index 1c020f7..c2eef43 100644
--- a/myserver/tests/main.cpp
+++ b/myserver/tests/main.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 
 #undef open
 #undef close
diff --git a/myserver/tests/test_auth_domain.cpp b/myserver/tests/test_auth_domain.cpp
index 374f531..a6dc7a8 100644
--- a/myserver/tests/test_auth_domain.cpp
+++ b/myserver/tests/test_auth_domain.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_base64.cpp b/myserver/tests/test_base64.cpp
index ceab1a9..e603d7c 100644
--- a/myserver/tests/test_base64.cpp
+++ b/myserver/tests/test_base64.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_bitvec.cpp b/myserver/tests/test_bitvec.cpp
index 2ce7b5e..35e818a 100644
--- a/myserver/tests/test_bitvec.cpp
+++ b/myserver/tests/test_bitvec.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
diff --git a/myserver/tests/test_cached_file.cpp b/myserver/tests/test_cached_file.cpp
index daa0577..05459d2 100644
--- a/myserver/tests/test_cached_file.cpp
+++ b/myserver/tests/test_cached_file.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/ui/text/TestRunner.h>
 #include <cppunit/extensions/HelperMacros.h>
diff --git a/myserver/tests/test_cached_file_buffer.cpp b/myserver/tests/test_cached_file_buffer.cpp
index 9adc1af..ccf9ee8 100644
--- a/myserver/tests/test_cached_file_buffer.cpp
+++ b/myserver/tests/test_cached_file_buffer.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/ui/text/TestRunner.h>
 #include <cppunit/extensions/HelperMacros.h>
diff --git a/myserver/tests/test_cached_file_factory.cpp b/myserver/tests/test_cached_file_factory.cpp
index 3528dd2..f8c3488 100644
--- a/myserver/tests/test_cached_file_factory.cpp
+++ b/myserver/tests/test_cached_file_factory.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
diff --git a/myserver/tests/test_connection.cpp b/myserver/tests/test_connection.cpp
index 935ac19..45217fc 100644
--- a/myserver/tests/test_connection.cpp
+++ b/myserver/tests/test_connection.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_connections_scheduler.cpp b/myserver/tests/test_connections_scheduler.cpp
index dc8835f..d7653c6 100644
--- a/myserver/tests/test_connections_scheduler.cpp
+++ b/myserver/tests/test_connections_scheduler.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_crypt_algo_manager.cpp b/myserver/tests/test_crypt_algo_manager.cpp
index 897e0bd..6c8dc47 100644
--- a/myserver/tests/test_crypt_algo_manager.cpp
+++ b/myserver/tests/test_crypt_algo_manager.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <include/base/crypt/crypt_algo_manager.h>
 #include <include/base/crypt/md5.h>
 
diff --git a/myserver/tests/test_file.cpp b/myserver/tests/test_file.cpp
index 03d86f5..716191c 100644
--- a/myserver/tests/test_file.cpp
+++ b/myserver/tests/test_file.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
diff --git a/myserver/tests/test_file_stream.cpp b/myserver/tests/test_file_stream.cpp
index 394c84b..64a2947 100644
--- a/myserver/tests/test_file_stream.cpp
+++ b/myserver/tests/test_file_stream.cpp
@@ -15,7 +15,7 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <list>
 #include <string>
 
diff --git a/myserver/tests/test_file_stream_creator.cpp b/myserver/tests/test_file_stream_creator.cpp
index 891843f..25a644b 100644
--- a/myserver/tests/test_file_stream_creator.cpp
+++ b/myserver/tests/test_file_stream_creator.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <list>
 #include <string>
 
diff --git a/myserver/tests/test_files_utility.cpp b/myserver/tests/test_files_utility.cpp
index f810cd3..9137827 100644
--- a/myserver/tests/test_files_utility.cpp
+++ b/myserver/tests/test_files_utility.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
diff --git a/myserver/tests/test_filter_chain.cpp b/myserver/tests/test_filter_chain.cpp
index ad50510..6d039f6 100644
--- a/myserver/tests/test_filter_chain.cpp
+++ b/myserver/tests/test_filter_chain.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <include/filter/stream.h>
 #include <include/filter/gzip/gzip.h>
 #include <include/filter/gzip/gzip_decompress.h>
diff --git a/myserver/tests/test_fork_server.cpp b/myserver/tests/test_fork_server.cpp
index fe9e368..65f469e 100644
--- a/myserver/tests/test_fork_server.cpp
+++ b/myserver/tests/test_fork_server.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <include/base/process/fork_server.h>
 #include <include/base/process/process.h>
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_ftp.cpp b/myserver/tests/test_ftp.cpp
index c1d08c5..3146dc0 100644
--- a/myserver/tests/test_ftp.cpp
+++ b/myserver/tests/test_ftp.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <include/protocol/ftp/ftp.h>
 #include <include/base/mem_buff/mem_buff.h>
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_gzip.cpp b/myserver/tests/test_gzip.cpp
index d02dd8d..6013954 100644
--- a/myserver/tests/test_gzip.cpp
+++ b/myserver/tests/test_gzip.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <include/filter/gzip/gzip.h>
 #include <include/filter/gzip/gzip_decompress.h>
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_hashmap.cpp b/myserver/tests/test_hashmap.cpp
index 96f3f73..3c2f1b0 100644
--- a/myserver/tests/test_hashmap.cpp
+++ b/myserver/tests/test_hashmap.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <include/base/hash_map/hash_map.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
diff --git a/myserver/tests/test_homedir.cpp b/myserver/tests/test_homedir.cpp
index 09b041f..90b1760 100644
--- a/myserver/tests/test_homedir.cpp
+++ b/myserver/tests/test_homedir.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <include/base/home_dir/home_dir.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
diff --git a/myserver/tests/test_http_req_security_domain.cpp b/myserver/tests/test_http_req_security_domain.cpp
index 3a2ed27..67bb38d 100644
--- a/myserver/tests/test_http_req_security_domain.cpp
+++ b/myserver/tests/test_http_req_security_domain.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <string.h>
diff --git a/myserver/tests/test_http_request.cpp b/myserver/tests/test_http_request.cpp
index 55c9f89..5c70416 100644
--- a/myserver/tests/test_http_request.cpp
+++ b/myserver/tests/test_http_request.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <string.h>
diff --git a/myserver/tests/test_http_response.cpp b/myserver/tests/test_http_response.cpp
index d0c02ff..62fe6a9 100644
--- a/myserver/tests/test_http_response.cpp
+++ b/myserver/tests/test_http_response.cpp
@@ -15,7 +15,7 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <string.h>
diff --git a/myserver/tests/test_ip.cpp b/myserver/tests/test_ip.cpp
index 58e7bfa..c3240e9 100644
--- a/myserver/tests/test_ip.cpp
+++ b/myserver/tests/test_ip.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <include/conf/vhost/ip.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
diff --git a/myserver/tests/test_log_manager.cpp b/myserver/tests/test_log_manager.cpp
index 0705255..fd08f38 100644
--- a/myserver/tests/test_log_manager.cpp
+++ b/myserver/tests/test_log_manager.cpp
@@ -15,7 +15,7 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <list>
 #include <string>
 
diff --git a/myserver/tests/test_log_stream_factory.cpp b/myserver/tests/test_log_stream_factory.cpp
index d1093bd..22fd6f2 100644
--- a/myserver/tests/test_log_stream_factory.cpp
+++ b/myserver/tests/test_log_stream_factory.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <list>
 #include <string>
 
diff --git a/myserver/tests/test_md5.cpp b/myserver/tests/test_md5.cpp
index ee65b14..6de4e59 100644
--- a/myserver/tests/test_md5.cpp
+++ b/myserver/tests/test_md5.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <include/base/crypt/md5.h>
 
 #include <ctype.h>
diff --git a/myserver/tests/test_mem_buff.cpp b/myserver/tests/test_mem_buff.cpp
index 229ad9e..5d72d63 100644
--- a/myserver/tests/test_mem_buff.cpp
+++ b/myserver/tests/test_mem_buff.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_mem_stream.cpp b/myserver/tests/test_mem_stream.cpp
index 617230f..77601bb 100644
--- a/myserver/tests/test_mem_stream.cpp
+++ b/myserver/tests/test_mem_stream.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <include/filter/memory_stream.h>
diff --git a/myserver/tests/test_mime_manager.cpp b/myserver/tests/test_mime_manager.cpp
index 805a049..31b06a2 100644
--- a/myserver/tests/test_mime_manager.cpp
+++ b/myserver/tests/test_mime_manager.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_multicast.cpp b/myserver/tests/test_multicast.cpp
index 8e39cac..f9dcec0 100644
--- a/myserver/tests/test_multicast.cpp
+++ b/myserver/tests/test_multicast.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_mutex.cpp b/myserver/tests/test_mutex.cpp
index 7df4ba0..07fcbbf 100644
--- a/myserver/tests/test_mutex.cpp
+++ b/myserver/tests/test_mutex.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_nodetree.cpp b/myserver/tests/test_nodetree.cpp
index 683292e..57cbe3b 100644
--- a/myserver/tests/test_nodetree.cpp
+++ b/myserver/tests/test_nodetree.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_pipe.cpp b/myserver/tests/test_pipe.cpp
index 7232d8f..bd8a4b2 100644
--- a/myserver/tests/test_pipe.cpp
+++ b/myserver/tests/test_pipe.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_plugin_info.cpp b/myserver/tests/test_plugin_info.cpp
index afe1a80..d2cc1ce 100644
--- a/myserver/tests/test_plugin_info.cpp
+++ b/myserver/tests/test_plugin_info.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_read_directory.cpp b/myserver/tests/test_read_directory.cpp
index 67ee81f..ec1209d 100644
--- a/myserver/tests/test_read_directory.cpp
+++ b/myserver/tests/test_read_directory.cpp
@@ -15,7 +15,7 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <include/base/read_directory/read_directory.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
diff --git a/myserver/tests/test_recursive_mutex.cpp b/myserver/tests/test_recursive_mutex.cpp
index 4dd5018..f8f4c83 100644
--- a/myserver/tests/test_recursive_mutex.cpp
+++ b/myserver/tests/test_recursive_mutex.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_regex.cpp b/myserver/tests/test_regex.cpp
index 5d8c29a..61ae3b9 100644
--- a/myserver/tests/test_regex.cpp
+++ b/myserver/tests/test_regex.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <include/base/regex/myserver_regex.h>
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
diff --git a/myserver/tests/test_safetime.cpp b/myserver/tests/test_safetime.cpp
index ea7633a..2615b8e 100644
--- a/myserver/tests/test_safetime.cpp
+++ b/myserver/tests/test_safetime.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_security_cache.cpp b/myserver/tests/test_security_cache.cpp
index 00b59e5..d60fc18 100644
--- a/myserver/tests/test_security_cache.cpp
+++ b/myserver/tests/test_security_cache.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_security_domain.cpp b/myserver/tests/test_security_domain.cpp
index 7ebfe01..78995b7 100644
--- a/myserver/tests/test_security_domain.cpp
+++ b/myserver/tests/test_security_domain.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_security_manager.cpp b/myserver/tests/test_security_manager.cpp
index 8540a05..6574958 100644
--- a/myserver/tests/test_security_manager.cpp
+++ b/myserver/tests/test_security_manager.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_security_token.cpp b/myserver/tests/test_security_token.cpp
index dfe3b3e..f41931a 100644
--- a/myserver/tests/test_security_token.cpp
+++ b/myserver/tests/test_security_token.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_semaphore.cpp b/myserver/tests/test_semaphore.cpp
index 03bba15..4103c0f 100644
--- a/myserver/tests/test_semaphore.cpp
+++ b/myserver/tests/test_semaphore.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_sha1.cpp b/myserver/tests/test_sha1.cpp
index a2ef398..1cb0e7e 100644
--- a/myserver/tests/test_sha1.cpp
+++ b/myserver/tests/test_sha1.cpp
@@ -14,7 +14,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <include/base/crypt/sha1.h>
 
 #include <ctype.h>
diff --git a/myserver/tests/test_slab.cpp b/myserver/tests/test_slab.cpp
index b3426b5..6c76a13 100644
--- a/myserver/tests/test_slab.cpp
+++ b/myserver/tests/test_slab.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
diff --git a/myserver/tests/test_socket.cpp b/myserver/tests/test_socket.cpp
index 7dfc79a..9a685bd 100644
--- a/myserver/tests/test_socket.cpp
+++ b/myserver/tests/test_socket.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
diff --git a/myserver/tests/test_socket_pair.cpp b/myserver/tests/test_socket_pair.cpp
index ff0cd9b..fbde66b 100644
--- a/myserver/tests/test_socket_pair.cpp
+++ b/myserver/tests/test_socket_pair.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 
 #include <include/base/socket_pair/socket_pair.h>
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_socket_stream_creator.cpp b/myserver/tests/test_socket_stream_creator.cpp
index 8e92950..3b037b4 100644
--- a/myserver/tests/test_socket_stream_creator.cpp
+++ b/myserver/tests/test_socket_stream_creator.cpp
@@ -15,7 +15,7 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <stdafx.h>
+#include "stdafx.h"
 
 #include <list>
 #include <string>
diff --git a/myserver/tests/test_ssl_socket.cpp b/myserver/tests/test_ssl_socket.cpp
index 394ef70..755a89b 100644
--- a/myserver/tests/test_ssl_socket.cpp
+++ b/myserver/tests/test_ssl_socket.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 
 #define TESTSERVERPEM "server.pem"
 #define TESTSERVERKEY "server.key"
diff --git a/myserver/tests/test_thread.cpp b/myserver/tests/test_thread.cpp
index fd465de..49ef47a 100644
--- a/myserver/tests/test_thread.cpp
+++ b/myserver/tests/test_thread.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 
 #include <ctype.h>
 
diff --git a/myserver/tests/test_unix_socket.cpp b/myserver/tests/test_unix_socket.cpp
index 64200f8..f8d9572 100644
--- a/myserver/tests/test_unix_socket.cpp
+++ b/myserver/tests/test_unix_socket.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 
 #include <include/base/socket_pair/socket_pair.h>
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_url.cpp b/myserver/tests/test_url.cpp
index 776d5f5..de3d740 100644
--- a/myserver/tests/test_url.cpp
+++ b/myserver/tests/test_url.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 
 #include <cppunit/CompilerOutputter.h>
 #include <cppunit/extensions/TestFactoryRegistry.h>
diff --git a/myserver/tests/test_utility.cpp b/myserver/tests/test_utility.cpp
index 5aadf24..26003ed 100644
--- a/myserver/tests/test_utility.cpp
+++ b/myserver/tests/test_utility.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 
 #include <ctype.h>
 
diff --git a/myserver/tests/test_validator.cpp b/myserver/tests/test_validator.cpp
index 7de8301..9f8cdec 100644
--- a/myserver/tests/test_validator.cpp
+++ b/myserver/tests/test_validator.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 
 #include <ctype.h>
 
diff --git a/myserver/tests/test_validator_factory.cpp b/myserver/tests/test_validator_factory.cpp
index 5e3f247..ab124ac 100644
--- a/myserver/tests/test_validator_factory.cpp
+++ b/myserver/tests/test_validator_factory.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 
 #include <ctype.h>
 
diff --git a/myserver/tests/test_xml.cpp b/myserver/tests/test_xml.cpp
index 5113e38..6265790 100644
--- a/myserver/tests/test_xml.cpp
+++ b/myserver/tests/test_xml.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include <ctype.h>
 
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_xml_main_configuration.cpp b/myserver/tests/test_xml_main_configuration.cpp
index c9e89fc..7322de1 100644
--- a/myserver/tests/test_xml_main_configuration.cpp
+++ b/myserver/tests/test_xml_main_configuration.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 
 #include <include/conf/main/xml_main_configuration.h>
 #include <cppunit/CompilerOutputter.h>
diff --git a/myserver/tests/test_xml_validator.cpp b/myserver/tests/test_xml_validator.cpp
index 2249523..0162e91 100644
--- a/myserver/tests/test_xml_validator.cpp
+++ b/myserver/tests/test_xml_validator.cpp
@@ -15,7 +15,7 @@
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 
 #include <ctype.h>
 

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

Summary of changes:
 myserver/tests/main.cpp                          |    2 +-
 myserver/tests/test_auth_domain.cpp              |    2 +-
 myserver/tests/test_base64.cpp                   |    2 +-
 myserver/tests/test_bitvec.cpp                   |    2 +-
 myserver/tests/test_cached_file.cpp              |    2 +-
 myserver/tests/test_cached_file_buffer.cpp       |    2 +-
 myserver/tests/test_cached_file_factory.cpp      |    2 +-
 myserver/tests/test_connection.cpp               |    2 +-
 myserver/tests/test_connections_scheduler.cpp    |    2 +-
 myserver/tests/test_crypt_algo_manager.cpp       |    2 +-
 myserver/tests/test_file.cpp                     |    2 +-
 myserver/tests/test_file_stream.cpp              |    2 +-
 myserver/tests/test_file_stream_creator.cpp      |    2 +-
 myserver/tests/test_files_utility.cpp            |    2 +-
 myserver/tests/test_filter_chain.cpp             |    2 +-
 myserver/tests/test_fork_server.cpp              |    2 +-
 myserver/tests/test_ftp.cpp                      |    2 +-
 myserver/tests/test_gzip.cpp                     |    2 +-
 myserver/tests/test_hashmap.cpp                  |    2 +-
 myserver/tests/test_homedir.cpp                  |    2 +-
 myserver/tests/test_http_req_security_domain.cpp |    2 +-
 myserver/tests/test_http_request.cpp             |    2 +-
 myserver/tests/test_http_response.cpp            |    2 +-
 myserver/tests/test_ip.cpp                       |    2 +-
 myserver/tests/test_log_manager.cpp              |    2 +-
 myserver/tests/test_log_stream_factory.cpp       |    2 +-
 myserver/tests/test_md5.cpp                      |    2 +-
 myserver/tests/test_mem_buff.cpp                 |    2 +-
 myserver/tests/test_mem_stream.cpp               |    2 +-
 myserver/tests/test_mime_manager.cpp             |    2 +-
 myserver/tests/test_multicast.cpp                |    2 +-
 myserver/tests/test_mutex.cpp                    |    2 +-
 myserver/tests/test_nodetree.cpp                 |    2 +-
 myserver/tests/test_pipe.cpp                     |    2 +-
 myserver/tests/test_plugin_info.cpp              |    2 +-
 myserver/tests/test_read_directory.cpp           |    2 +-
 myserver/tests/test_recursive_mutex.cpp          |    2 +-
 myserver/tests/test_regex.cpp                    |    2 +-
 myserver/tests/test_safetime.cpp                 |    2 +-
 myserver/tests/test_security_cache.cpp           |    2 +-
 myserver/tests/test_security_domain.cpp          |    2 +-
 myserver/tests/test_security_manager.cpp         |    2 +-
 myserver/tests/test_security_token.cpp           |    2 +-
 myserver/tests/test_semaphore.cpp                |    2 +-
 myserver/tests/test_sha1.cpp                     |    2 +-
 myserver/tests/test_slab.cpp                     |    2 +-
 myserver/tests/test_socket.cpp                   |    2 +-
 myserver/tests/test_socket_pair.cpp              |    2 +-
 myserver/tests/test_socket_stream_creator.cpp    |    2 +-
 myserver/tests/test_ssl_socket.cpp               |    2 +-
 myserver/tests/test_thread.cpp                   |    2 +-
 myserver/tests/test_unix_socket.cpp              |    2 +-
 myserver/tests/test_url.cpp                      |    2 +-
 myserver/tests/test_utility.cpp                  |    2 +-
 myserver/tests/test_validator.cpp                |    2 +-
 myserver/tests/test_validator_factory.cpp        |    2 +-
 myserver/tests/test_xml.cpp                      |    2 +-
 myserver/tests/test_xml_main_configuration.cpp   |    2 +-
 myserver/tests/test_xml_validator.cpp            |    2 +-
 59 files changed, 59 insertions(+), 59 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Nov 01 17:57:10 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N4jME-0008Ip-CW
	for mharc-myserver-commit@gnu.org; Sun, 01 Nov 2009 17:57:10 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N4jMC-0008Ic-EU
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 17:57:08 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N4jMA-0008I9-QJ
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 17:57:07 -0500
Received: from [199.232.76.173] (port=59734 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N4jMA-0008I6-Jo
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 17:57:06 -0500
Received: from savannah.gnu.org ([199.232.41.3]:50223 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 1N4jM9-0005TN-Gc
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 17:57:06 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N4jM8-00071s-Qd
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 22:57:04 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N4jM8-00071M-3K
	for myserver-commit@gnu.org; Sun, 01 Nov 2009 22:57:04 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: ad630c409e343aee0151da846d9344855106a42e
X-Git-Newrev: 472fe8b1e3a604809b300221d89b83a6297d6808
Message-Id: <E1N4jM8-00071M-3K@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 01 Nov 2009 22:57:04 +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. 472fe8b1e3a604809b300221d89b83a6297d6808
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, 01 Nov 2009 22:57:09 -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  472fe8b1e3a604809b300221d89b83a6297d6808 (commit)
       via  08dafe5f1568ad282ad8a5bc67706701d5842112 (commit)
      from  ad630c409e343aee0151da846d9344855106a42e (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 472fe8b1e3a604809b300221d89b83a6297d6808
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Nov 1 23:55:17 2009 +0100

    Protocol::controlConnection uses u_long as buffer length, not int.

diff --git a/myserver/include/connection/connection.h b/myserver/include/connection/connection.h
index 9cdda51..317c36b 100644
--- a/myserver/include/connection/connection.h
+++ b/myserver/include/connection/connection.h
@@ -42,8 +42,9 @@ class Connection;
 
 typedef  Connection* ConnectionPtr;
 
-typedef int (*continuationPROC)(ConnectionPtr a, char *b1, char *b2,
-                                int bs1, int bs2, u_long nbtr, u_long id);
+typedef int (*continuationPROC)(ConnectionPtr con, char *request, char *auxBuf,
+                                u_long reqBufLen, u_long auxBufLen,
+                                u_long reqLen, u_long tid);
 
 
 class Connection
diff --git a/myserver/include/protocol/control/control_protocol.h b/myserver/include/protocol/control/control_protocol.h
index 4e305a1..d1f6e83 100644
--- a/myserver/include/protocol/control/control_protocol.h
+++ b/myserver/include/protocol/control/control_protocol.h
@@ -34,8 +34,8 @@ public:
 
   int sendResponse (char*, int, ConnectionPtr, int, ControlHeader& header, File* = 0);
   virtual int loadProtocol ();
-	int controlConnection (ConnectionPtr a, char *b1, char *b2, int bs1,
-                        int bs2, u_long nbtr, u_long id);
+	int controlConnection (ConnectionPtr a, char *b1, char *b2, u_long bs1,
+                         u_long bs2, u_long nbtr, u_long id);
 	virtual char* registerName (char*,int len);
 	ControlProtocol ();
 	virtual ~ControlProtocol ();
diff --git a/myserver/include/protocol/ftp/ftp.h b/myserver/include/protocol/ftp/ftp.h
index 2f7680c..80576b0 100644
--- a/myserver/include/protocol/ftp/ftp.h
+++ b/myserver/include/protocol/ftp/ftp.h
@@ -103,9 +103,10 @@ class Ftp:public Protocol
 public:
   Ftp ();
   virtual ~ Ftp ();
-  virtual int controlConnection (ConnectionPtr pConnection, char *b1,
-				 char *b2, int bs1, int bs2, u_long nbtr,
-				 u_long id);
+	virtual int controlConnection (ConnectionPtr con, char *request, char *auxBuf,
+                             u_long reqBufLen, u_long auxBufLen, u_long reqLen,
+                                 u_long tid);
+
   static int loadProtocolstatic ();
   static int unLoadProtocolstatic ();
 
diff --git a/myserver/include/protocol/gopher/gopher.h b/myserver/include/protocol/gopher/gopher.h
index 8327f67..4fa566a 100644
--- a/myserver/include/protocol/gopher/gopher.h
+++ b/myserver/include/protocol/gopher/gopher.h
@@ -43,8 +43,8 @@ public:
   int controlConnection (ConnectionPtr a,
                          char *b1,
                          char *b2,
-                         int bs1,
-                         int bs2,
+                         u_long bs1,
+                         u_long bs2,
                          u_long nbtr,
                          u_long id);
 
@@ -78,7 +78,7 @@ public:
   }
 
   virtual int controlConnection (ConnectionPtr a, char *b1, char *b2,
-                                 int bs1, int bs2, u_long nbtr, u_long id)
+                                 u_long bs1, u_long bs2, u_long nbtr, u_long id)
   {
     Gopher Gopher;
     int ret = 0;
diff --git a/myserver/include/protocol/http/http.h b/myserver/include/protocol/http/http.h
index 972adaf..6b25d57 100644
--- a/myserver/include/protocol/http/http.h
+++ b/myserver/include/protocol/http/http.h
@@ -165,13 +165,9 @@ public:
   virtual char* registerName (char* out,int len){return registerNameImpl (out, len);}
 
   static char* registerNameImpl (char*, int len);
-  int controlConnection (ConnectionPtr a,
-                        char *b1,
-                        char *b2,
-                        int bs1,
-                        int bs2,
-                        u_long nbtr,
-                        u_long id);
+	int controlConnection (ConnectionPtr con, char *request, char *auxBuf,
+                         u_long reqBufLen, u_long auxBufLen, u_long reqLen,
+                         u_long tid);
 
   static int loadProtocolStatic ();
   static int unLoadProtocolStatic ();
@@ -220,13 +216,16 @@ public:
     return Http::registerNameImpl (out, len);
   }
 
-	virtual int controlConnection (ConnectionPtr a, char *b1, char *b2,
-                                int bs1, int bs2, u_long nbtr, u_long id)
+	virtual int controlConnection (ConnectionPtr con, char *request,
+                                 char *auxBuf, u_long reqBufLen,
+                                 u_long auxBufLen, u_long reqLen,
+                                 u_long tid)
   {
     Http http;
     int ret = 0;
 
-    ret = http.controlConnection (a, b1, b2, bs1, bs2, nbtr, id);
+    ret = http.controlConnection (con, request, auxBuf, reqBufLen, auxBufLen,
+                                  reqLen, tid);
 
     return ret;
   }
diff --git a/myserver/include/protocol/https/https.h b/myserver/include/protocol/https/https.h
index e6e0cc3..9fcc5ab 100644
--- a/myserver/include/protocol/https/https.h
+++ b/myserver/include/protocol/https/https.h
@@ -63,7 +63,7 @@ public:
   }
 
 	virtual int controlConnection (ConnectionPtr a, char *b1, char *b2,
-                                int bs1, int bs2, u_long nbtr, u_long id)
+                                u_long bs1, u_long bs2, u_long nbtr, u_long id)
   {
     int ret = 0;
     Https https;
diff --git a/myserver/include/protocol/protocol.h b/myserver/include/protocol/protocol.h
index 2d55654..6f2cceb 100644
--- a/myserver/include/protocol/protocol.h
+++ b/myserver/include/protocol/protocol.h
@@ -35,8 +35,12 @@ public:
 	Protocol ();
   virtual ~Protocol ();
 	virtual char* registerName (char*,int len);
-	virtual int controlConnection (ConnectionPtr a, char *b1, char *b2,
-                                 int bs1, int bs2, u_long nbtr, u_long id);
+
+	virtual int controlConnection (ConnectionPtr con, char *request,
+                                 char *auxBuf, u_long reqBufLen,
+                                 u_long auxBufLen, u_long reqLen,
+                                 u_long tid);
+
 	virtual int loadProtocol ();
 	virtual int unLoadProtocol ();
 
diff --git a/myserver/src/protocol/control/control_protocol.cpp b/myserver/src/protocol/control/control_protocol.cpp
index a103c22..3df69c8 100644
--- a/myserver/src/protocol/control/control_protocol.cpp
+++ b/myserver/src/protocol/control/control_protocol.cpp
@@ -191,8 +191,9 @@ int ControlProtocol::checkAuth (ControlHeader& header)
 /*!
  *Control the connection.
  */
-int ControlProtocol::controlConnection (ConnectionPtr a, char *buffer, char *b2,
-                                        int, int, u_long nbtr, u_long id)
+int ControlProtocol::controlConnection (ConnectionPtr a, char *request,
+                                        char *auxBuffer, u_long, u_long,
+                                        u_long nbtr, u_long id)
 {
   int ret;
   int realHeaderLength;
@@ -223,14 +224,14 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *buffer, char *b2,
     {
       /* Remove the connection from the list. */
     case Connection::REMOVE_OVERLOAD:
-      sendResponse (b2, bufferSize, a, CONTROL_SERVER_BUSY, header, 0);
+      sendResponse (auxBuffer, bufferSize, a, CONTROL_SERVER_BUSY, header, 0);
       return 0;
     default:
       return 0;
     }
   }
 
-  ret = header.parse_header (buffer, nbtr, &realHeaderLength);
+  ret = header.parse_header (request, nbtr, &realHeaderLength);
 
   /*
    *On errors remove the connection from the connections list.
@@ -245,7 +246,7 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *buffer, char *b2,
     {
       return 2;
     }
-    sendResponse (b2, bufferSize, a, ret, header, 0);
+    sendResponse (auxBuffer, bufferSize, a, ret, header, 0);
     return 0;
   }
   specifiedLength = header.getLength ();
@@ -266,7 +267,7 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *buffer, char *b2,
     if (ret)
       {
         a->host->warningsLogWrite (_("Control: internal error"));
-        sendResponse (b2, bufferSize, a, CONTROL_INTERNAL, header, 0);
+        sendResponse (auxBuffer, bufferSize, a, CONTROL_INTERNAL, header, 0);
         inFile->close ();
         FilesUtility::deleteFile (inFilePath.str ().c_str ());
         delete inFile;
@@ -274,14 +275,15 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *buffer, char *b2,
       }
     if (nbtr - realHeaderLength)
       {
-        ret = inFile->writeToFile (buffer + realHeaderLength,
+        ret = inFile->writeToFile (request + realHeaderLength,
                                    nbtr - realHeaderLength,
                                    &nbw);
         dataWritten += nbw;
         if (ret)
           {
             a->host->warningsLogWrite (_("Control: internal error"));
-            sendResponse (b2, bufferSize, a, CONTROL_INTERNAL, header, 0);
+            sendResponse (auxBuffer, bufferSize, a, CONTROL_INTERNAL, header,
+                          0);
             inFile->close ();
             FilesUtility::deleteFile (inFilePath.str ().c_str ());
             delete inFile;
@@ -300,23 +302,25 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *buffer, char *b2,
         {
           if (a->socket->bytesToRead ())
             {
-              ret = a->socket->recv (b2, bufferSize, 0);
+              ret = a->socket->recv (auxBuffer, bufferSize, 0);
               if (ret == -1)
                 {
                   a->host->warningsLogWrite (_("Control: internal error"));
-                  sendResponse (b2, bufferSize, a, CONTROL_INTERNAL, header, 0);
+                  sendResponse (auxBuffer, bufferSize, a, CONTROL_INTERNAL, header,
+                                0);
                   inFile->close ();
                   FilesUtility::deleteFile (inFilePath.str ().c_str ());
                   delete inFile;
                   inFile=0;
                   return -1;
                 }
-              ret = inFile->writeToFile (b2, ret, &nbw);
+              ret = inFile->writeToFile (auxBuffer, ret, &nbw);
               dataWritten += nbw;
               if (ret)
                 {
                   a->host->warningsLogWrite (_("Control: internal error"));
-                  sendResponse (b2, bufferSize, a, CONTROL_INTERNAL, header, 0);
+                  sendResponse (auxBuffer, bufferSize, a, CONTROL_INTERNAL,
+                                header, 0);
                   inFile->close ();
                   FilesUtility::deleteFile (inFilePath.str ().c_str ());
                   delete inFile;
@@ -329,7 +333,8 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *buffer, char *b2,
             }
           else if (getTicks () - timeout > MYSERVER_SEC (5))
             {
-              sendResponse (b2, bufferSize, a, CONTROL_BAD_LEN, header, 0);
+              sendResponse (auxBuffer, bufferSize, a, CONTROL_BAD_LEN, header,
+                            0);
               inFile->close ();
               FilesUtility::deleteFile (inFilePath.str ().c_str ());
               delete inFile;
@@ -358,7 +363,7 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *buffer, char *b2,
           delete inFile;
           inFile = 0;
         }
-      sendResponse (b2, bufferSize, a, CONTROL_BAD_VERSION, header, 0);
+      sendResponse (auxBuffer, bufferSize, a, CONTROL_BAD_VERSION, header, 0);
       return 0;
     }
 
@@ -376,7 +381,7 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *buffer, char *b2,
           delete inFile;
           inFile=0;
         }
-      sendResponse (b2, bufferSize, a, CONTROL_AUTH, header, 0);
+      sendResponse (auxBuffer, bufferSize, a, CONTROL_AUTH, header, 0);
       return 0;
     }
   /*
@@ -392,7 +397,7 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *buffer, char *b2,
           delete inFile;
           inFile = 0;
         }
-      sendResponse (b2, bufferSize, a, CONTROL_BAD_LEN, header, 0);
+      sendResponse (auxBuffer, bufferSize, a, CONTROL_BAD_LEN, header, 0);
       return 0;
     }
 
@@ -412,7 +417,7 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *buffer, char *b2,
   if (ret)
     {
       a->host->warningsLogWrite (_("Control: internal error"));
-      sendResponse (b2, bufferSize, a, CONTROL_INTERNAL, header, 0);
+      sendResponse (auxBuffer, bufferSize, a, CONTROL_INTERNAL, header, 0);
       delete outFile;
       inFile->close ();
       delete inFile;
@@ -427,7 +432,7 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *buffer, char *b2,
   if (!strcmp (command, "SHOWCONNECTIONS"))
     {
       knownCommand = 1;
-      ret = showConnections (a, outFile, buffer, bufferSize, header);
+      ret = showConnections (a, outFile, request, bufferSize, header);
     }
   else if (!strcmp (command, "KILLCONNECTION"))
     {
@@ -437,7 +442,7 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *buffer, char *b2,
       strncpy (buff, header.getOptions (), 10 );
       buff[10] = '\0';
       id = header.getOptions () ? atol (buff) : 0;
-      ret = killConnection (a, id, outFile, buffer, bufferSize, header);
+      ret = killConnection (a, id, outFile, request, bufferSize, header);
     }
   else if (!strcmp (command, "REBOOT"))
     {
@@ -448,12 +453,14 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *buffer, char *b2,
   else if (!strcmp (command, "GETFILE"))
     {
       knownCommand = 1;
-      ret = getFile (a,header.getOptions (), inFile, outFile, buffer, bufferSize, header);
+      ret = getFile (a, header.getOptions (), inFile, outFile, request,
+                     bufferSize, header);
     }
   else if (!strcmp (command, "PUTFILE"))
     {
       knownCommand = 1;
-      ret = putFile (a,header.getOptions (), inFile, outFile, buffer, bufferSize, header);
+      ret = putFile (a,header.getOptions (), inFile, outFile, request,
+                     bufferSize, header);
     }
   else if (!strcmp (command, "DISABLEREBOOT"))
     {
@@ -470,7 +477,7 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *buffer, char *b2,
   else if (!strcmp (command, "VERSION"))
     {
       knownCommand = 1;
-      ret = getVersion (a, outFile, buffer, bufferSize, header);
+      ret = getVersion (a, outFile, request, bufferSize, header);
     }
 
   if (knownCommand)
@@ -479,10 +486,10 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *buffer, char *b2,
       outFile->seek (0);
       if (ret)
         {
-          sendResponse (b2, bufferSize, a, CONTROL_INTERNAL, header, 0);
+          sendResponse (auxBuffer, bufferSize, a, CONTROL_INTERNAL, header, 0);
         }
       else
-        sendResponse (b2, bufferSize, a, CONTROL_OK, header, outFile);
+        sendResponse (auxBuffer, bufferSize, a, CONTROL_OK, header, outFile);
       if (inFile)
         {
           inFile->close ();
@@ -509,7 +516,7 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *buffer, char *b2,
     }
   else
     {
-      sendResponse (b2, bufferSize, a, CONTROL_CMD_NOT_FOUND, header, 0);
+      sendResponse (auxBuffer, bufferSize, a, CONTROL_CMD_NOT_FOUND, header, 0);
 
       if (inFile)
         {
diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index 167f813..476ddde 100644
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -303,8 +303,9 @@ Ftp::~Ftp ()
 {
 }
 
-int Ftp::controlConnection (ConnectionPtr pConnection, char *b1, char *b2,
-                            int, int, u_long nbtr, u_long id)
+int Ftp::controlConnection (ConnectionPtr pConnection, char *request,
+                            char *auxBuf, u_long reqBufLen, u_long auxBufLen,
+                            u_long reqLen, u_long tid)
 {
   if (pConnection == NULL)
     return ClientsThread::DELETE_CONNECTION;
@@ -349,7 +350,7 @@ int Ftp::controlConnection (ConnectionPtr pConnection, char *b1, char *b2,
   td.buffer = pConnection->getActiveThread ()->getBuffer ();
   td.secondaryBuffer = pConnection->getActiveThread ()->getSecondaryBuffer ();
   td.buffersize = pConnection->getActiveThread ()->getBufferSize ();
-  td.nBytesToRead = nbtr;
+  td.nBytesToRead = reqLen;
   td.pProtocolInterpreter = this;
   td.m_nParseLength = 0;
 
diff --git a/myserver/src/protocol/gopher/gopher.cpp b/myserver/src/protocol/gopher/gopher.cpp
index c694368..ee4ded4 100644
--- a/myserver/src/protocol/gopher/gopher.cpp
+++ b/myserver/src/protocol/gopher/gopher.cpp
@@ -75,8 +75,8 @@ int Gopher::unLoadProtocolStatic ()
 int Gopher::controlConnection (ConnectionPtr pConnection,
                                char *b1,
                                char *b2,
-                               int bs1,
-                               int bs2,
+                               u_long bs1,
+                               u_long bs2,
                                u_long nbtr,
                                u_long id)
 {
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 10149bd..551240a 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -759,7 +759,7 @@ int Http::logHTTPaccess ()
 /*!
  * This is the HTTP protocol main procedure to parse a request over HTTP.
  */
-int Http::controlConnection (ConnectionPtr a, char*, char*, int, int,
+int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
                              u_long nbtr, u_long id)
 {
   int retvalue = -1;
diff --git a/myserver/src/protocol/protocol.cpp b/myserver/src/protocol/protocol.cpp
index f73095d..d74829e 100644
--- a/myserver/src/protocol/protocol.cpp
+++ b/myserver/src/protocol/protocol.cpp
@@ -34,11 +34,23 @@ int Protocol::unLoadProtocol ()
 }
 
 /*!
- * Control the connection.
+ * Entry point to check new data available from a client.
+ *
+ * \param con Connection structure with all data relative to the connection.
+ * \param request Request body ready from the client (it may be incomplete and
+ * it is protocol responsibility to check if it is complete or not.  This buffer
+ * can be used for other purposes too by the protocol, it is not required to be
+ * unchanged.
+ * \param auxBuf Auxiliary buffer available to the current thread.
+ * \param reqBufLen Length in bytes of the buffer containing the request.
+ * \param auxBufLen Length in bytes of the auxiliary buffer.
+ * \param reqLen Number of bytes read from the client in REQUEST.
+ * \param tid current thread id.
  */
-int Protocol::controlConnection (ConnectionPtr /*a*/,char* /*b1*/,
-                                 char* /*b2*/,int /*bs1*/,int /*bs2*/,
-                                 u_long /*nbtr*/,u_long /*id*/)
+int Protocol::controlConnection (ConnectionPtr con, char *request,
+                                 char *auxBuf, u_long reqBufLen,
+                                 u_long auxBufLen, u_long reqLen,
+                                 u_long tid)
 {
   return 0;
 }



commit 08dafe5f1568ad282ad8a5bc67706701d5842112
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Nov 1 23:05:57 2009 +0100

    Refactor the Ftp class.

diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index 787f295..167f813 100644
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -1,19 +1,19 @@
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2005, 2006, 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 2 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, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2005, 2006, 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 2 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, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
 
 #include "stdafx.h"
@@ -34,9 +34,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
 #ifndef WIN32
 # include <netinet/in.h>
-# ifdef SENDFILE
-#  include <sys/sendfile.h>
-# endif
 # include <sys/socket.h>
 # include <arpa/inet.h>
 #endif
@@ -47,8 +44,6 @@ static DEFINE_THREAD (SendImageFile, pParam);
 static DEFINE_THREAD (ReceiveAsciiFile, pParam);
 static DEFINE_THREAD (ReceiveImageFile, pParam);
 
-//////////////////////////////////////////////////////////////////////////////
-// FtpHost class
 void setFtpHost (FtpHost & out, const FtpHost & in)
 {
   out.h1 = in.h1;
@@ -105,8 +100,6 @@ std::string getHost (const FtpHost & host)
   return s.str ().c_str ();
 }
 
-//////////////////////////////////////////////////////////////////////////////
-// FtpuserData class
 FtpuserData::FtpuserData ()
 {
   reset ();
@@ -117,7 +110,7 @@ bool FtpuserData::allowdelete (bool wait)
 {
   if (wait)
     {
-      //wait for data connection to finish
+      /* Wait for data connection to finish.  */
       m_DataConnBusy.lock ();
       m_DataConnBusy.unlock ();
 
@@ -179,8 +172,6 @@ int FtpuserData::closeDataConnection ()
   return 1;
 }
 
-//////////////////////////////////////////////////////////////////////////////
-// FtpuserData class
 DataConnectionWorkerThreadData::DataConnectionWorkerThreadData ()
 {
   m_pConnection = NULL;
@@ -191,8 +182,6 @@ DataConnectionWorkerThreadData::~DataConnectionWorkerThreadData ()
 {
 }
 
-//////////////////////////////////////////////////////////////////////////////
-// FtpThreadContext helper structure
 FtpThreadContext::FtpThreadContext ()
 {
   pConnection = NULL;
@@ -203,12 +192,10 @@ FtpThreadContext::FtpThreadContext ()
   pProtocolInterpreter = NULL;
 }
 
-//////////////////////////////////////////////////////////////////////////////
-// Ftp helper structure
 struct reply
 {
   int nCode;
-    std::string sText;
+  std::string sText;
 };
 
 static struct reply reply_table[] = {
@@ -253,7 +240,7 @@ int getFtpReply (int nReplyCode, std::string & sReply)
   for (int i = 0; reply_table[i].nCode != 0; i++)
     {
       if (reply_table[i].nCode != nReplyCode)
-	continue;
+        continue;
       sReply = reply_table[i].sText;
       return 1;
     }
@@ -261,7 +248,7 @@ int getFtpReply (int nReplyCode, std::string & sReply)
 }
 
 void ftpReply (ConnectionPtr pConnection, int nReplyCode,
-	   const std::string & sCustomText /* = "" */ )
+               const std::string & sCustomText /* = "" */ )
 {
   if (pConnection == NULL || pConnection->socket == NULL)
     return;
@@ -293,12 +280,9 @@ void ftpReply (ConnectionPtr pConnection, int nReplyCode,
     }
 
   pConnection->socket->send (buffer.str ().c_str (),
-			     strlen (buffer.str ().c_str ()), 0);
+                             strlen (buffer.str ().c_str ()), 0);
 }
 
-//////////////////////////////////////////////////////////////////////////////
-// Ftp class
-
 bool Ftp::m_ballowAnonymous = false;
 bool Ftp::m_bAnonymousNeedPass = true;
 bool Ftp::m_ballowAsynchronousCmds = true;
@@ -335,11 +319,11 @@ int Ftp::controlConnection (ConnectionPtr pConnection, char *b1, char *b2,
   if (pFtpuserData == NULL)
     return ClientsThread::DELETE_CONNECTION;
 
-  // check if ftp is busy (return 120) or unavailable (return 421)
+  /* Check if ftp is busy (return 120) or unavailable (return 421).  */
   if (pConnection->getToRemove () == Connection::REMOVE_OVERLOAD)
     {
       pFtpuserData->m_nFtpstate = FtpuserData::BUISY;
-      // TODO: really compute busy time interval
+      /* TODO: compute busy time interval.  */
       std::string sTempText;
       getFtpReply (120, sTempText);
       std::string::size_type n = sTempText.find ("%s");
@@ -355,14 +339,12 @@ int Ftp::controlConnection (ConnectionPtr pConnection, char *b1, char *b2,
       return 0;
     }
 
-  // init default local ports
   m_nLocalControlport = pConnection->getLocalPort ();
   pFtpuserData->m_nLocalDataport = m_nLocalControlport - 1;
 
   if (pFtpuserData->m_cwd.empty () && pConnection->host != NULL)
     pFtpuserData->m_cwd = "";
 
-  //switch context
   td.pConnection = pConnection;
   td.buffer = pConnection->getActiveThread ()->getBuffer ();
   td.secondaryBuffer = pConnection->getActiveThread ()->getSecondaryBuffer ();
@@ -392,30 +374,24 @@ char * Ftp::registerNameImpl (char *out, int len)
 
 int Ftp::loadProtocolstatic ()
 {
-  // load custom messages from cfg here
   Server *server = Server::getInstance ();
 
-  // allow anonymous access
   const char *pData = server->getData ("ftp.allow_anonymous");
   if (pData != NULL)
     m_ballowAnonymous = strcmpi ("Yes", pData) == 0 ? true : false;
 
-  // request password for anonymous
   pData = server->getData ("ftp.anonymous_need_pass");
   if (pData != NULL)
     m_bAnonymousNeedPass = strcmpi ("Yes", pData) == 0 ? true : false;
 
-  // enable asyncronous cmds
   pData = server->getData ("ftp.allow_asynchronous_cmds");
   if (pData != NULL)
     m_ballowAsynchronousCmds = strcmpi ("Yes", pData) == 0 ? true : false;
 
-  // enable pipelining
   pData = server->getData ("ftp.allow_pipelining");
   if (pData != NULL)
     m_bEnablePipelining = strcmpi ("Yes", pData) == 0 ? true : false;
 
-  // enable write commands
   pData = server->getData ("ftp.allow_store");
   if (pData != NULL)
     m_bEnablestoreCmds = strcmpi ("Yes", pData) == 0 ? true : false;
@@ -440,7 +416,6 @@ void Ftp::ftpReply (int nReplyCode, const std::string & sCustomText /*= ""*/ )
 
 void Ftp::logAccess (int nReplyCode, const std::string & sCustomText)
 {
-  /* Log the reply.  */
   string time;
   char msgCode[12];
   sprintf (msgCode, "%i", nReplyCode);
@@ -448,8 +423,8 @@ void Ftp::logAccess (int nReplyCode, const std::string & sCustomText)
 
   td.secondaryBuffer->setLength (0);
   *td.secondaryBuffer << time
-    << " " << td.pConnection->getIpAddr ()
-    << " " << msgCode << " " << sCustomText << end_str;
+                      << " " << td.pConnection->getIpAddr ()
+                      << " " << msgCode << " " << sCustomText << end_str;
 
   if (td.pConnection->host)
     td.pConnection->host->accessesLogWrite ("%s", td.secondaryBuffer->getBuffer ());
@@ -538,7 +513,8 @@ void Ftp::pasv ()
   pFtpuserData->m_bPassiveSrv = true;
   if (OpenDataConnection () == 0)
     {
-      ftpReply (425);		//RFC959 command replay exception
+      /* RFC959 command replay exception.  */
+      ftpReply (425);
       return;
     }
 
@@ -549,11 +525,10 @@ void Ftp::pasv ()
 #ifdef WIN32
     sTempText.replace (n, 2, getHost (pFtpuserData->m_cdh));
 #else
-    sTempText.replace (n, 2, getHost (pFtpuserData->m_cdh));
-#endif //WIN32
+  sTempText.replace (n, 2, getHost (pFtpuserData->m_cdh));
+#endif
   ftpReply (227, sTempText);
 
-  // wait for incoming connection
   int timeoutvalue = 3;
 #ifdef __linux__
   timeoutvalue = 1;
@@ -597,9 +572,9 @@ void Ftp::retrstor (bool bretr, bool bappend, const std::string & sPath)
 
   /* The security file doesn't exist in any case.  */
   const char *secName = td.st.getData ("security.filename",
-                                             MYSERVER_VHOST_CONF |
-                                             MYSERVER_SERVER_CONF,
-                                             ".security.xml");
+                                       MYSERVER_VHOST_CONF |
+                                       MYSERVER_SERVER_CONF,
+                                       ".security.xml");
   if (!strcmpi (sLocalFileName.c_str (), secName))
     {
       ftpReply (550);
@@ -646,11 +621,11 @@ void Ftp::retrstor (bool bretr, bool bappend, const std::string & sPath)
     {
     case FtpuserData::REPR_ASCII:
       Thread::create (&pFtpuserData->m_dataThreadId,
-		      bretr ? SendAsciiFile : ReceiveAsciiFile, pData);
+                      bretr ? SendAsciiFile : ReceiveAsciiFile, pData);
       break;
     case FtpuserData::REPR_IMAGE:
       Thread::create (&pFtpuserData->m_dataThreadId,
-		      bretr ? SendImageFile : ReceiveImageFile, pData);
+                      bretr ? SendImageFile : ReceiveImageFile, pData);
       break;
     }
 }
@@ -714,17 +689,17 @@ DEFINE_THREAD (SendAsciiFile, pParam)
     {
       ftpReply (pConnection, 150);
       if (pWt->m_pFtp->OpenDataConnection () == 0)
-	{
-	  ftpReply (pConnection, 425);
-	  pFtpuserData->closeDataConnection ();
-	  pFtpuserData->m_DataConnBusy.unlock ();
-	  delete pWt;
+        {
+          ftpReply (pConnection, 425);
+          pFtpuserData->closeDataConnection ();
+          pFtpuserData->m_DataConnBusy.unlock ();
+          delete pWt;
 #ifdef WIN32
-	  return 0;
+          return 0;
 #elif HAVE_PTHREAD
-	  return (void *) 0;
+          return (void *) 0;
 #endif
-	}
+        }
     }
 
   if (pFtpuserData->m_pDataConnection == NULL ||
@@ -740,140 +715,139 @@ DEFINE_THREAD (SendAsciiFile, pParam)
       return (void *) 0;
 #endif
     }
-
-  File *file = NULL;		//new File ();
+  File *file = NULL;
   try
-  {
-    file =
-      Server::getInstance ()->getCachedFiles ()->open (pWt->m_sFilePath.
-						       c_str ());
-    if (file == NULL)
-      {
-	ftpReply (pConnection, 451);
-	pFtpuserData->closeDataConnection ();
-	pFtpuserData->m_DataConnBusy.unlock ();
-	delete pWt;
+    {
+      file =
+        Server::getInstance ()->getCachedFiles ()->open (pWt->m_sFilePath.
+                                                         c_str ());
+      if (file == NULL)
+        {
+          ftpReply (pConnection, 451);
+          pFtpuserData->closeDataConnection ();
+          pFtpuserData->m_DataConnBusy.unlock ();
+          delete pWt;
 #ifdef WIN32
-	return 0;
+          return 0;
 #elif HAVE_PTHREAD
-	return (void *) 0;
+          return (void *) 0;
 #endif
-      }
-    u_long filesize = file->getFileSize ();
-    if (pFtpuserData->m_nrestartOffset > 0)
-      pFtpuserData->m_nrestartOffset = 0;	// don't implement restart for ASCII
-
-    pFtpuserData->m_sCurrentFileName = pWt->m_sFilePath;
-    pFtpuserData->m_nFileSize = filesize;
-
-    u_long nbr, nBufferSize = 0;
-    char *pLine = NULL;
-    int nLineLength = 0;
-    std::string sLine;
-    MemBuf buffer, secondaryBuffer;
-    buffer.setLength (1024);
-    while (filesize != 0)
-      {
-	memset (buffer.getBuffer (), 0, buffer.getRealLength ());
-	nBufferSize =
-	  std::min (static_cast < u_long > (filesize),
-		    static_cast < u_long > (buffer.getRealLength () / 2));
-	if (file->read (buffer.getBuffer (), nBufferSize, &nbr))
-	  {
-	    ftpReply (pConnection, 451);
-	    file->close ();
-	    delete file;
-	    pFtpuserData->closeDataConnection ();
-	    pFtpuserData->m_DataConnBusy.unlock ();
-	    delete pWt;
+        }
+      u_long filesize = file->getFileSize ();
+
+      /* don't implement restart for ASCII.  */
+      if (pFtpuserData->m_nrestartOffset > 0)
+        pFtpuserData->m_nrestartOffset = 0;
+      pFtpuserData->m_sCurrentFileName = pWt->m_sFilePath;
+      pFtpuserData->m_nFileSize = filesize;
+
+      u_long nbr, nBufferSize = 0;
+      char *pLine = NULL;
+      int nLineLength = 0;
+      std::string sLine;
+      MemBuf buffer, secondaryBuffer;
+      buffer.setLength (1024);
+      while (filesize != 0)
+        {
+          memset (buffer.getBuffer (), 0, buffer.getRealLength ());
+          nBufferSize =
+            std::min (static_cast < u_long > (filesize),
+                      static_cast < u_long > (buffer.getRealLength () / 2));
+          if (file->read (buffer.getBuffer (), nBufferSize, &nbr))
+            {
+              ftpReply (pConnection, 451);
+              file->close ();
+              delete file;
+              pFtpuserData->closeDataConnection ();
+              pFtpuserData->m_DataConnBusy.unlock ();
+              delete pWt;
 #ifdef WIN32
-	    return 0;
+              return 0;
 #elif HAVE_PTHREAD
-	    return (void *) 0;
+              return (void *) 0;
 #endif
-	  }
-	filesize -= nbr;
-	pFtpuserData->m_nBytesSent += nbr;
-
-	secondaryBuffer.setLength (0);
-	pLine = buffer.getBuffer ();
-	if (pLine == NULL)
-	  {
-	    ftpReply (pConnection, 451);
-	    file->close ();
-	    delete file;
-	    pFtpuserData->closeDataConnection ();
-	    pFtpuserData->m_DataConnBusy.unlock ();
-	    delete pWt;
+            }
+          filesize -= nbr;
+          pFtpuserData->m_nBytesSent += nbr;
+
+          secondaryBuffer.setLength (0);
+          pLine = buffer.getBuffer ();
+          if (pLine == NULL)
+            {
+              ftpReply (pConnection, 451);
+              file->close ();
+              delete file;
+              pFtpuserData->closeDataConnection ();
+              pFtpuserData->m_DataConnBusy.unlock ();
+              delete pWt;
 #ifdef WIN32
-	    return 0;
+              return 0;
 #elif HAVE_PTHREAD
-	    return (void *) 0;
+              return (void *) 0;
 #endif
-	  }
-	while (*pLine != 0)
-	  {
-	    nLineLength = getEndLine (pLine, 0);
-	    if (nLineLength < 0)	//last line
-	      {
-		sLine.assign (pLine, strlen (pLine));
-		if (!sLine.empty ())
-		  secondaryBuffer << sLine;
-		pLine += strlen (pLine);
-	      }
-	    else
-	      {
-		sLine.assign (pLine, nLineLength);
-		secondaryBuffer << sLine << "\r\n";
-		if (*(pLine + nLineLength) == '\r')
-		  nLineLength++;
-		if (*(pLine + nLineLength) == '\n')
-		  nLineLength++;
-		pLine += nLineLength;
-	      }
-	  }
-	if (pFtpuserData->m_pDataConnection->socket->
-	    send (secondaryBuffer.getBuffer (),
-		  (u_long) secondaryBuffer.getLength (), 0) == SOCKET_ERROR)
-	  {
-	    ftpReply (pConnection, 451);
-	    file->close ();
-	    file->close ();
-	    delete file;
-	    pFtpuserData->closeDataConnection ();
-	    pFtpuserData->m_DataConnBusy.unlock ();
-	    delete pWt;
+            }
+          while (*pLine != 0)
+            {
+              nLineLength = getEndLine (pLine, 0);
+              if (nLineLength < 0)
+                {
+                  sLine.assign (pLine, strlen (pLine));
+                  if (!sLine.empty ())
+                    secondaryBuffer << sLine;
+                  pLine += strlen (pLine);
+                }
+              else
+                {
+                  sLine.assign (pLine, nLineLength);
+                  secondaryBuffer << sLine << "\r\n";
+                  if (*(pLine + nLineLength) == '\r')
+                    nLineLength++;
+                  if (*(pLine + nLineLength) == '\n')
+                    nLineLength++;
+                  pLine += nLineLength;
+                }
+            }
+          if (pFtpuserData->m_pDataConnection->socket->
+              send (secondaryBuffer.getBuffer (),
+                    (u_long) secondaryBuffer.getLength (), 0) == SOCKET_ERROR)
+            {
+              ftpReply (pConnection, 451);
+              file->close ();
+              file->close ();
+              delete file;
+              pFtpuserData->closeDataConnection ();
+              pFtpuserData->m_DataConnBusy.unlock ();
+              delete pWt;
 #ifdef WIN32
-	    return 0;
+              return 0;
 #elif HAVE_PTHREAD
-	    return (void *) 0;
+              return (void *) 0;
 #endif
-	  }
-	if (pFtpuserData->m_bBreakDataConnection)
-	  {
-	    pFtpuserData->m_bBreakDataConnection = false;
-	    file->close ();
-	    delete file;
-	    pFtpuserData->closeDataConnection ();
-	    pFtpuserData->m_DataConnBusy.unlock ();
-	    delete pWt;
+            }
+          if (pFtpuserData->m_bBreakDataConnection)
+            {
+              pFtpuserData->m_bBreakDataConnection = false;
+              file->close ();
+              delete file;
+              pFtpuserData->closeDataConnection ();
+              pFtpuserData->m_DataConnBusy.unlock ();
+              delete pWt;
 #ifdef WIN32
-	    return 1;
+              return 1;
 #elif HAVE_PTHREAD
-	    return (void *) 1;
+              return (void *) 1;
 #endif
-	  }
-      }
-    file->close ();
-    delete file;
-  }
-  catch (bad_alloc & ba)
-  {
-    if (file != NULL)
+            }
+        }
       file->close ();
-    delete file;
-    //report error
-  }
+      delete file;
+    }
+  catch (bad_alloc & ba)
+    {
+      if (file != NULL)
+        file->close ();
+      delete file;
+    }
 
   pFtpuserData->m_sCurrentFileName = "";
   pFtpuserData->m_nFileSize = 0;
@@ -951,17 +925,17 @@ DEFINE_THREAD (SendImageFile, pParam)
     {
       ftpReply (pConnection, 150);
       if (pWt->m_pFtp->OpenDataConnection () == 0)
-	{
-	  ftpReply (pConnection, 425);
-	  pFtpuserData->closeDataConnection ();
-	  pFtpuserData->m_DataConnBusy.unlock ();
-	  delete pWt;
+        {
+          ftpReply (pConnection, 425);
+          pFtpuserData->closeDataConnection ();
+          pFtpuserData->m_DataConnBusy.unlock ();
+          delete pWt;
 #ifdef WIN32
-	  return 0;
+          return 0;
 #elif HAVE_PTHREAD
-	  return (void *) 0;
+          return (void *) 0;
 #endif
-	}
+        }
     }
 
   if (pFtpuserData->m_pDataConnection == NULL ||
@@ -980,86 +954,86 @@ DEFINE_THREAD (SendImageFile, pParam)
 
   File *file = NULL;
   try
-  {
-    file =
-      Server::getInstance ()->getCachedFiles ()->open (pWt->m_sFilePath.
-						       c_str ());
-    if (file == NULL)
-      {
-        ftpReply (pConnection, 451);
-        pFtpuserData->closeDataConnection ();
-        pFtpuserData->m_DataConnBusy.unlock ();
-        delete pWt;
+    {
+      file =
+        Server::getInstance ()->getCachedFiles ()->open (pWt->m_sFilePath.
+                                                         c_str ());
+      if (file == NULL)
+        {
+          ftpReply (pConnection, 451);
+          pFtpuserData->closeDataConnection ();
+          pFtpuserData->m_DataConnBusy.unlock ();
+          delete pWt;
 #ifdef WIN32
-        return 0;
+          return 0;
 #elif HAVE_PTHREAD
-        return (void *) 0;
+          return (void *) 0;
 #endif
-      }
-    u_long filesize = file->getFileSize ();
-    u_long nbr, nBufferSize = 0;
-    if (pWt->m_bappend && pFtpuserData->m_nrestartOffset < filesize)
-      {
-        file->seek (pFtpuserData->m_nrestartOffset);
-        filesize -= pFtpuserData->m_nrestartOffset;
-      }
-
-    pFtpuserData->m_sCurrentFileName = pWt->m_sFilePath;
-    pFtpuserData->m_nFileSize = filesize;
-
-    MemBuf secondaryBuffer;
-    secondaryBuffer.setLength (1024);
-    while (filesize != 0)
-      {
-        nBufferSize =
-          std::min (static_cast < u_long > (filesize),
-                    static_cast < u_long >
-                    (secondaryBuffer.getRealLength () / 2));
-
-        if (file->read (secondaryBuffer.getBuffer (), nBufferSize, &nbr)
-            || pFtpuserData->m_pDataConnection->socket->send (secondaryBuffer.getBuffer (),
-                                                              (u_long)nBufferSize, 0)
-            == SOCKET_ERROR)
-          {
-            ftpReply (pConnection, 451);
-            file->close ();
-            delete file;
-            pFtpuserData->closeDataConnection ();
-            pFtpuserData->m_DataConnBusy.unlock ();
-            delete pWt;
+        }
+      u_long filesize = file->getFileSize ();
+      u_long nbr, nBufferSize = 0;
+      if (pWt->m_bappend && pFtpuserData->m_nrestartOffset < filesize)
+        {
+          file->seek (pFtpuserData->m_nrestartOffset);
+          filesize -= pFtpuserData->m_nrestartOffset;
+        }
+
+      pFtpuserData->m_sCurrentFileName = pWt->m_sFilePath;
+      pFtpuserData->m_nFileSize = filesize;
+
+      MemBuf secondaryBuffer;
+      secondaryBuffer.setLength (1024);
+      while (filesize != 0)
+        {
+          nBufferSize =
+            std::min (static_cast < u_long > (filesize),
+                      static_cast < u_long >
+                      (secondaryBuffer.getRealLength () / 2));
+
+          if (file->read (secondaryBuffer.getBuffer (), nBufferSize, &nbr)
+              || pFtpuserData->m_pDataConnection->socket->send (secondaryBuffer.getBuffer (),
+                                                                (u_long)nBufferSize, 0)
+              == SOCKET_ERROR)
+            {
+              ftpReply (pConnection, 451);
+              file->close ();
+              delete file;
+              pFtpuserData->closeDataConnection ();
+              pFtpuserData->m_DataConnBusy.unlock ();
+              delete pWt;
 #ifdef WIN32
-            return 0;
+              return 0;
 #elif HAVE_PTHREAD
-            return (void *) 0;
+              return (void *) 0;
 #endif
-          }
-        filesize -= nbr;
-        pFtpuserData->m_nBytesSent += nbr;
-        pFtpuserData->m_nrestartOffset += nbr;
-        if (pFtpuserData->m_bBreakDataConnection)
-          {
-            pFtpuserData->m_bBreakDataConnection = false;
-            file->close ();
-            delete file;
-            pFtpuserData->closeDataConnection ();
-            pFtpuserData->m_DataConnBusy.unlock ();
-            delete pWt;
+            }
+          filesize -= nbr;
+          pFtpuserData->m_nBytesSent += nbr;
+          pFtpuserData->m_nrestartOffset += nbr;
+          if (pFtpuserData->m_bBreakDataConnection)
+            {
+              pFtpuserData->m_bBreakDataConnection = false;
+              file->close ();
+              delete file;
+              pFtpuserData->closeDataConnection ();
+              pFtpuserData->m_DataConnBusy.unlock ();
+              delete pWt;
 #ifdef WIN32
-            return 1;
+              return 1;
 #elif HAVE_PTHREAD
-            return (void *) 1;
+              return (void *) 1;
 #endif
-          }
-      }
-    file->close ();
-    delete file;
-  }
-  catch (bad_alloc & ba)
-  {
-    if (file != NULL)
+            }
+        }
       file->close ();
-    delete file;
-  }
+      delete file;
+    }
+  catch (bad_alloc & ba)
+    {
+      if (file != NULL)
+        file->close ();
+      delete file;
+    }
 
   pFtpuserData->m_sCurrentFileName = "";
   pFtpuserData->m_nFileSize = 0;
@@ -1192,8 +1166,8 @@ DEFINE_THREAD (ReceiveAsciiFile, pParam)
       std::string sLine;
       u_long nbr;
       while (pFtpuserData->m_pDataConnection->socket->read (buffer.getBuffer (),
-                                (u_long) buffer.getRealLength () - 1, &nbr)
-            != SOCKET_ERROR && nbr != 0)
+                                                            (u_long) buffer.getRealLength () - 1, &nbr)
+             != SOCKET_ERROR && nbr != 0)
         {
           memset (secondaryBuffer.getBuffer (), 0,
                   secondaryBuffer.getRealLength ());
@@ -1212,49 +1186,49 @@ DEFINE_THREAD (ReceiveAsciiFile, pParam)
               return (void *) 0;
 #endif
             }
-        while (*pLine != 0)
-          {
-            nLineLength = getEndLine (pLine, 0);
-            if (nLineLength < 0)	//last line
-              {
-                sLine.assign (pLine, strlen (pLine));
-                if (!sLine.empty ())
-                  secondaryBuffer << sLine;
-                pLine += strlen (pLine);
-              }
-            else
-              {
-                sLine.assign (pLine, nLineLength);
+          while (*pLine != 0)
+            {
+              nLineLength = getEndLine (pLine, 0);
+              if (nLineLength < 0)
+                {
+                  sLine.assign (pLine, strlen (pLine));
+                  if (!sLine.empty ())
+                    secondaryBuffer << sLine;
+                  pLine += strlen (pLine);
+                }
+              else
+                {
+                  sLine.assign (pLine, nLineLength);
 #ifdef WIN32
-                secondaryBuffer << sLine << "\r\n";
+                  secondaryBuffer << sLine << "\r\n";
 #else
-                secondaryBuffer << sLine << "\n";
+                  secondaryBuffer << sLine << "\n";
 #endif
-                if (*(pLine + nLineLength) == '\r')
-                  nLineLength++;
-                if (*(pLine + nLineLength) == '\n')
-                  nLineLength++;
-                pLine += nLineLength;
-              }
-          }
-        file.write (secondaryBuffer.getBuffer (),
-                    (u_long) secondaryBuffer.getLength (), &nbr);
-
-        if (pFtpuserData->m_bBreakDataConnection)
-          {
-            pFtpuserData->m_bBreakDataConnection = false;
-            file.close ();
-            pFtpuserData->closeDataConnection ();
-            pFtpuserData->m_DataConnBusy.unlock ();
-            delete pWt;
+                  if (*(pLine + nLineLength) == '\r')
+                    nLineLength++;
+                  if (*(pLine + nLineLength) == '\n')
+                    nLineLength++;
+                  pLine += nLineLength;
+                }
+            }
+          file.write (secondaryBuffer.getBuffer (),
+                      (u_long) secondaryBuffer.getLength (), &nbr);
+
+          if (pFtpuserData->m_bBreakDataConnection)
+            {
+              pFtpuserData->m_bBreakDataConnection = false;
+              file.close ();
+              pFtpuserData->closeDataConnection ();
+              pFtpuserData->m_DataConnBusy.unlock ();
+              delete pWt;
 #ifdef WIN32
-            return 1;
+              return 1;
 #elif HAVE_PTHREAD
-            return (void *) 1;
+              return (void *) 1;
 #endif
-          }
-        memset (buffer.getBuffer (), 0, buffer.getRealLength ());
-      }
+            }
+          memset (buffer.getBuffer (), 0, buffer.getRealLength ());
+        }
       file.close ();
     }
   catch (bad_alloc & ba)
@@ -1460,7 +1434,7 @@ Ftp::buildLocalPath (const std::string & sPathIn, std::string & sOutPath)
   if (sPathIn[0] != '/')
     sOutPath.append (pFtpuserData->m_cwd);
 
-  if (sPathIn[0] != '-')	// ls params not handled
+  if (sPathIn[0] != '-')
     sOutPath.append (sPathIn);
 
   FilesUtility::completePath (sOutPath);
@@ -1473,7 +1447,6 @@ Ftp::buildLocalPath (const std::string & sPathIn, std::string & sOutPath)
       ftpReply (550);
       return false;
     }
-  ///////////////////////////////////////
   if (FilesUtility::isDirectory (sOutPath) &&
       (sOutPath[sOutPath.length () - 1] != '/'
        && sOutPath[sOutPath.length () - 1] != '\\'))
@@ -1508,7 +1481,6 @@ Ftp::quit ()
   FtpuserData *pFtpuserData =
     static_cast < FtpuserData * >(td.pConnection->protocolBuffer);
 
-  //wait to finish data transfer
   if (!m_ballowAsynchronousCmds)
     waitDataConnection ();
 
@@ -1520,7 +1492,6 @@ void
 Ftp::help (const std::string & sCmd /* = "" */ )
 {
   waitDataConnection ();
-  // treat SITE the same as HELP
   if (sCmd.empty () || stringcmpi (sCmd, "SITE") == 0)
     ftpReply (214);
   else
@@ -1543,7 +1514,7 @@ Ftp::OpenDataConnection ()
     return 1;
 
   int nRet = pFtpuserData->m_bPassiveSrv ? openDataPassive ()
-                                         : openDataActive ();
+    : openDataActive ();
   if (nRet != 0)
     pFtpuserData->m_nFtpstate = FtpuserData::DATA_CONNECTION_UP;
   return nRet;
@@ -1573,7 +1544,7 @@ Ftp::openDataPassive ()
   ((sockaddr_in *) (&storage))->sin_addr.s_addr = inet_addr (szIpAddr);
 #else
   inet_aton (szIpAddr, &((sockaddr_in *) (&storage))->sin_addr);
-#endif // WIN32
+#endif
   ((sockaddr_in *) (&storage))->sin_port =
     htons (getPortNo (pFtpuserData->m_cdh));
   if (pSocket->setsockopt (SOL_SOCKET, SO_REUSEADDR, (const char *) &nReuseAddr,
@@ -1734,7 +1705,7 @@ Ftp::list (const std::string & sParam /*= ""*/ )
   if (FilesUtility::isDirectory (sPath))
     {
       ReadDirectory fd;
-      //dir MUST ends with '/'
+
       if (fd.findfirst (sPath))
         {
           ftpReply (450);
@@ -1743,9 +1714,9 @@ Ftp::list (const std::string & sParam /*= ""*/ )
         }
 
       const char *secName = td.st.getData ("security.filename",
-                                                 MYSERVER_VHOST_CONF |
-                                                 MYSERVER_SERVER_CONF,
-                                                 ".security.xml");
+                                           MYSERVER_VHOST_CONF |
+                                           MYSERVER_SERVER_CONF,
+                                           ".security.xml");
       do
         {
           if (fd.name[0] == '.' || !strcmpi (fd.name.c_str (), secName))
@@ -1758,12 +1729,10 @@ Ftp::list (const std::string & sParam /*= ""*/ )
           int guestMask = checkRights ("Guest", "", completeFileName, -1);
           int pMask = checkRights (username, password, completeFileName, -1);
 
-          //Owner and group permissions are the same.
           perm[1] = perm[4] = pMask & MYSERVER_PERMISSION_READ ? 'r' : '-';
           perm[2] = perm[5] = pMask & MYSERVER_PERMISSION_WRITE ? 'w' : '-';
           perm[3] = perm[6] = pMask & MYSERVER_PERMISSION_EXECUTE ? 'x' : '-';
 
-          //Permission for All are the permission for Guest
           perm[7] = guestMask & MYSERVER_PERMISSION_READ ? 'r' : '-';
           perm[8] = guestMask & MYSERVER_PERMISSION_WRITE ? 'w' : '-';
           perm[9] = guestMask & MYSERVER_PERMISSION_EXECUTE ? 'x' : '-';
@@ -1780,20 +1749,17 @@ Ftp::list (const std::string & sParam /*= ""*/ )
 
           int offset = datePtr[6] == ' ' ? 0 : 1;
 
-          //Day
           dateFtpFormat[4] = datePtr[5];
           dateFtpFormat[5] = datePtr[6];
 
-          //Month
           dateFtpFormat[0] = datePtr[7 + offset];
           dateFtpFormat[1] = datePtr[8 + offset];
           dateFtpFormat[2] = datePtr[9 + offset];
 
-          //If the file was modified in the last 6 months
-          //show the hour instead of the year
+          /* If the file was modified in the last 6 months
+           * show the hour instead of the year.  */
           if (now - fd.time_write < 60 * 60 * 183 && now > fd.time_write)
             {
-              //Hour
               dateFtpFormat[7] = datePtr[16 + offset];
               dateFtpFormat[8] = datePtr[17 + offset];
               dateFtpFormat[9] = ':';
@@ -1802,7 +1768,6 @@ Ftp::list (const std::string & sParam /*= ""*/ )
             }
           else
             {
-              //Year
               dateFtpFormat[8] = datePtr[11 + offset];
               dateFtpFormat[9] = datePtr[12 + offset];
               dateFtpFormat[10] = datePtr[13 + offset];
@@ -1831,7 +1796,7 @@ Ftp::list (const std::string & sParam /*= ""*/ )
     }
   else if (!FilesUtility::isLink (sPath))
     {
-      // TODO: implement * selection
+      /* TODO: implement * selection.  */
       std::string sDir, sFileName;
       FilesUtility::splitPath (sLocalPath, sDir, sFileName);
       ReadDirectory fd;
@@ -1854,12 +1819,11 @@ Ftp::list (const std::string & sParam /*= ""*/ )
 
           int guestMask = checkRights ("guest", "", completeFileName, -1);
           int pMask = checkRights (username, password, completeFileName, -1);
-          //Owner and group permissions are the same.
+
           perm[1] = perm[4] = pMask & MYSERVER_PERMISSION_READ ? 'r' : '-';
           perm[2] = perm[5] = pMask & MYSERVER_PERMISSION_WRITE ? 'w' : '-';
           perm[3] = perm[6] = pMask & MYSERVER_PERMISSION_EXECUTE ? 'x' : '-';
 
-          //Permission for All are the permission for Guest
           perm[7] = guestMask & MYSERVER_PERMISSION_READ ? 'r' : '-';
           perm[8] = guestMask & MYSERVER_PERMISSION_WRITE ? 'w' : '-';
           perm[9] = guestMask & MYSERVER_PERMISSION_EXECUTE ? 'x' : '-';
@@ -1876,20 +1840,17 @@ Ftp::list (const std::string & sParam /*= ""*/ )
 
           int offset = datePtr[6] == ' ' ? 0 : 1;
 
-          //Day
           dateFtpFormat[4] = datePtr[5];
           dateFtpFormat[5] = datePtr[6];
 
-          //Month
           dateFtpFormat[0] = datePtr[7 + offset];
           dateFtpFormat[1] = datePtr[8 + offset];
           dateFtpFormat[2] = datePtr[9 + offset];
 
-          //If the file was modified in the last 6 months
-          //show the hour instead of the year
+          /* If the file was modified in the last 6 months
+           * show the hour instead of the year.  */
           if (now - fd.time_write < 60 * 60 * 183 && now > fd.time_write)
             {
-              //Hour
               dateFtpFormat[7] = datePtr[16 + offset];
               dateFtpFormat[8] = datePtr[17 + offset];
               dateFtpFormat[9] = ':';
@@ -1898,7 +1859,6 @@ Ftp::list (const std::string & sParam /*= ""*/ )
             }
           else
             {
-              //Year
               dateFtpFormat[8] = datePtr[11 + offset];
               dateFtpFormat[9] = datePtr[12 + offset];
               dateFtpFormat[10] = datePtr[13 + offset];
@@ -1953,10 +1913,10 @@ Ftp::nlst (const std::string & sParam /* = "" */ )
     {
       ftpReply (150);
       if (OpenDataConnection () == 0)
-	{
-	  ftpReply (425);
-	  return;
-	}
+        {
+          ftpReply (425);
+          return;
+        }
     }
 
   std::string sPath (sLocalPath);
@@ -1981,9 +1941,9 @@ Ftp::nlst (const std::string & sParam /* = "" */ )
   secondaryBuffer.setLength (0);
 
   const char *secName = td.st.getData ("security.filename",
-					     MYSERVER_VHOST_CONF |
-					     MYSERVER_SERVER_CONF,
-					     ".security.xml");
+                                       MYSERVER_VHOST_CONF |
+                                       MYSERVER_SERVER_CONF,
+                                       ".security.xml");
   do
     {
       if (fd.name[0] == '.' || !strcmpi (fd.name.c_str (), secName))
@@ -2037,16 +1997,16 @@ Ftp::escapeTelnet (MemBuf & In, MemBuf & Out)
             break;
           switch (*pIn)
             {
-            case '\375':	//DO
-            case '\376':	//DONT
+            case '\375':
+            case '\376':
               szReply[1] = '\374';
-            pIn++;
-            break;
-            case '\373':	//WILL
-            case '\374':	//WONT
+              pIn++;
+              break;
+            case '\373':
+            case '\374':
               szReply[1] = '\376';
-            pIn++;
-            break;
+              pIn++;
+              break;
             case '\377':
               szReply[1] = '\0';
               Out << *pIn;
@@ -2089,14 +2049,13 @@ void Ftp::abor ()
   FtpuserData *pFtpuserData =
     static_cast < FtpuserData * >(td.pConnection->protocolBuffer);
 
-  //wait to finish data transfer
   if (!m_ballowAsynchronousCmds)
     waitDataConnection ();
 
   if (pFtpuserData->m_nFtpstate == FtpuserData::DATA_CONNECTION_UP)
     {
       pFtpuserData->m_bBreakDataConnection = true;
-      Thread::join (pFtpuserData->m_dataThreadId);	// wait for data connection to end
+      Thread::join (pFtpuserData->m_dataThreadId);
       ftpReply (426);
     }
   else
@@ -2142,7 +2101,7 @@ void Ftp::cwd (const std::string & sPath)
     {
       size_t ind = pFtpuserData->m_cwd.find_last_of ('/');
       if (ind != string::npos)
-	pFtpuserData->m_cwd.erase (ind + 1);
+        pFtpuserData->m_cwd.erase (ind + 1);
     }
   else if (sPath.size () != 1 || sPath[0] != '.')
     {
@@ -2180,7 +2139,7 @@ void Ftp::syst ()
     sTempText.replace (n, 2, "WIN32");
 #else
   sTempText.replace (n, 2, "UNIX type: L8");
-#endif //WIN32
+#endif
   ftpReply (215, sTempText);
 }
 
@@ -2192,7 +2151,6 @@ void Ftp::statCmd (const std::string & sParam /* = "" */ )
   FtpuserData *pFtpuserData =
     static_cast < FtpuserData * >(td.pConnection->protocolBuffer);
 
-  //wait to finish data transfer
   if (!m_ballowAsynchronousCmds)
     waitDataConnection ();
 
@@ -2207,7 +2165,7 @@ void Ftp::statCmd (const std::string & sParam /* = "" */ )
     }
   else
     {
-      //TODO: will be implemented later
+      /* TODO.  */
       ftpReply (502);
     }
 }
@@ -2268,9 +2226,9 @@ void Ftp::dele (const std::string & sPath)
 
   /* The security file doesn't exist in any case.  */
   const char *secName = td.st.getData ("security.filename",
-                                             MYSERVER_VHOST_CONF |
-                                             MYSERVER_SERVER_CONF,
-                                             ".security.xml");
+                                       MYSERVER_VHOST_CONF |
+                                       MYSERVER_SERVER_CONF,
+                                       ".security.xml");
   if (!strcmpi (sLocalFileName.c_str (), secName))
     {
       ftpReply (550);
@@ -2328,12 +2286,12 @@ void Ftp::mkd (const std::string & sPath)
   FtpuserData *pFtpuserData =
     static_cast < FtpuserData * >(td.pConnection->protocolBuffer);
 
-  std::string sLocalPath;	// = pFtpuserData->m_cwd + "/" + sPath;
+  std::string sLocalPath;
   if (!buildLocalPath (sPath, sLocalPath))
     return;
 
   if (checkRights (pFtpuserData->m_suserName, pFtpuserData->m_sPass,
-		   sLocalPath, MYSERVER_PERMISSION_WRITE) == 0)
+                   sLocalPath, MYSERVER_PERMISSION_WRITE) == 0)
     {
       ftpReply (550);
       return;
@@ -2369,7 +2327,7 @@ Ftp::rmd (const std::string & sPath)
     return;
 
   if (checkRights (pFtpuserData->m_suserName, pFtpuserData->m_sPass,
-		   sLocalPath, MYSERVER_PERMISSION_WRITE) == 0)
+                   sLocalPath, MYSERVER_PERMISSION_WRITE) == 0)
     {
       ftpReply (550);
       return;
@@ -2398,8 +2356,8 @@ void Ftp::rnfr (const std::string & sPath)
   FilesUtility::splitPath (sLocalPath, sLocalDir, sLocalFileName);
 
   const char *secName = td.st.getData ("security.filename",
-					     MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF,
-					     ".security.xml");
+                                       MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF,
+                                       ".security.xml");
 
   /* The security file doesn't exist in any case.  */
   if (!strcmpi (sLocalFileName.c_str (), secName))
@@ -2434,17 +2392,17 @@ void Ftp::Rnto (const std::string & sPath)
     static_cast < FtpuserData * >(td.pConnection->protocolBuffer);
 
   if (checkRights (pFtpuserData->m_suserName, pFtpuserData->m_sPass,
-		   pFtpuserData->m_sRenameFrom,
-		   MYSERVER_PERMISSION_WRITE) == 0)
+                   pFtpuserData->m_sRenameFrom,
+                   MYSERVER_PERMISSION_WRITE) == 0)
     {
       ftpReply (550);
       return;
     }
 
   const char *secName = td.st.getData ("security.filename",
-					     MYSERVER_VHOST_CONF |
-					     MYSERVER_SERVER_CONF,
-					     ".security.xml");
+                                       MYSERVER_VHOST_CONF |
+                                       MYSERVER_SERVER_CONF,
+                                       ".security.xml");
 
   /* The security file doesn't exist in any case.  */
   if (!strcmpi (sLocalFileName.c_str (), secName))
@@ -2492,9 +2450,9 @@ int Ftp::checkRights (const std::string & suser, const std::string & sPass,
 
   AuthDomain auth (&td.st);
   string validator (td.st.getData ("sec.validator", MYSERVER_VHOST_CONF
-                                         | MYSERVER_SERVER_CONF, "xml"));
+                                   | MYSERVER_SERVER_CONF, "xml"));
   string authMethod (td.st.getData ("sec.auth_method", MYSERVER_VHOST_CONF
-                                          | MYSERVER_SERVER_CONF, "xml"));
+                                    | MYSERVER_SERVER_CONF, "xml"));
 
   SecurityDomain *domains[] = { &auth, NULL };
 
@@ -2519,9 +2477,9 @@ void Ftp::size (const std::string & sPath)
 
   /* The security file doesn't exist in any case.  */
   const char *secName = td.st.getData ("security.filename",
-                                             MYSERVER_VHOST_CONF |
-                                             MYSERVER_SERVER_CONF,
-                                             ".security.xml");
+                                       MYSERVER_VHOST_CONF |
+                                       MYSERVER_SERVER_CONF,
+                                       ".security.xml");
 
   if (!strcmpi (sLocalFileName.c_str (), secName))
     {
@@ -2558,7 +2516,7 @@ void Ftp::size (const std::string & sPath)
 
 void Ftp::allo (int nSize, int nRecordSize /* = -1 */ )
 {
-  //TODO: implement
+  /* TODO.  */
   noop ();
 }
 

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

Summary of changes:
 myserver/include/connection/connection.h           |    5 +-
 .../include/protocol/control/control_protocol.h    |    4 +-
 myserver/include/protocol/ftp/ftp.h                |    7 +-
 myserver/include/protocol/gopher/gopher.h          |    6 +-
 myserver/include/protocol/http/http.h              |   19 +-
 myserver/include/protocol/https/https.h            |    2 +-
 myserver/include/protocol/protocol.h               |    8 +-
 myserver/src/protocol/control/control_protocol.cpp |   57 +-
 myserver/src/protocol/ftp/ftp.cpp                  |  699 +++++++++-----------
 myserver/src/protocol/gopher/gopher.cpp            |    4 +-
 myserver/src/protocol/http/http.cpp                |    2 +-
 myserver/src/protocol/protocol.cpp                 |   20 +-
 12 files changed, 408 insertions(+), 425 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Mon Nov 02 18:39:21 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N56Ub-0006Wh-FQ
	for mharc-myserver-commit@gnu.org; Mon, 02 Nov 2009 18:39:21 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N56Ua-0006Vo-DR
	for myserver-commit@gnu.org; Mon, 02 Nov 2009 18:39:20 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N56UZ-0006VW-T5
	for myserver-commit@gnu.org; Mon, 02 Nov 2009 18:39:20 -0500
Received: from [199.232.76.173] (port=39369 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N56UZ-0006VS-Pg
	for myserver-commit@gnu.org; Mon, 02 Nov 2009 18:39:19 -0500
Received: from savannah.gnu.org ([199.232.41.3]:60145 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 1N56UZ-00046l-GU
	for myserver-commit@gnu.org; Mon, 02 Nov 2009 18:39:19 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N56UZ-000445-2B
	for myserver-commit@gnu.org; Mon, 02 Nov 2009 23:39:19 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N56UY-00043c-Ly
	for myserver-commit@gnu.org; Mon, 02 Nov 2009 23:39:19 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 472fe8b1e3a604809b300221d89b83a6297d6808
X-Git-Newrev: 5d3669daa38db26da58efca14c62e308df8f5bdc
Message-Id: <E1N56UY-00043c-Ly@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Mon, 02 Nov 2009 23:39: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. 5d3669daa38db26da58efca14c62e308df8f5bdc
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, 02 Nov 2009 23:39:20 -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  5d3669daa38db26da58efca14c62e308df8f5bdc (commit)
      from  472fe8b1e3a604809b300221d89b83a6297d6808 (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 5d3669daa38db26da58efca14c62e308df8f5bdc
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Nov 2 23:41:03 2009 +0100

    Raise an error if Protocol::controlConnection is used.

diff --git a/myserver/include/protocol/ftp/ftp.h b/myserver/include/protocol/ftp/ftp.h
index 80576b0..73c94fc 100644
--- a/myserver/include/protocol/ftp/ftp.h
+++ b/myserver/include/protocol/ftp/ftp.h
@@ -227,11 +227,16 @@ public:
     return Ftp::registerNameImpl (out, len);
   }
 
-  virtual int controlConnection (ConnectionPtr a, char *b1, char *b2,
-				 int bs1, int bs2, u_long nbtr, u_long id)
+	virtual int controlConnection (ConnectionPtr con, char *request,
+                                 char *auxBuf, u_long reqBufLen,
+                                 u_long auxBufLen, u_long reqLen,
+                                 u_long tid)
   {
     Ftp ftp;
-    return ftp.controlConnection (a, b1, b2, bs1, bs2, nbtr, id);
+    int ret = 0;
+
+    return ftp.controlConnection (con, request, auxBuf, reqBufLen, auxBufLen,
+                                  reqLen, tid);
   }
 
   virtual int loadProtocol ()
diff --git a/myserver/include/protocol/http/http.h b/myserver/include/protocol/http/http.h
index 6b25d57..b320edc 100644
--- a/myserver/include/protocol/http/http.h
+++ b/myserver/include/protocol/http/http.h
@@ -222,12 +222,8 @@ public:
                                  u_long tid)
   {
     Http http;
-    int ret = 0;
-
-    ret = http.controlConnection (con, request, auxBuf, reqBufLen, auxBufLen,
-                                  reqLen, tid);
-
-    return ret;
+    return http.controlConnection (con, request, auxBuf, reqBufLen, auxBufLen,
+                                   reqLen, tid);
   }
 
 	virtual int loadProtocol ()
diff --git a/myserver/src/protocol/protocol.cpp b/myserver/src/protocol/protocol.cpp
index d74829e..c211c4d 100644
--- a/myserver/src/protocol/protocol.cpp
+++ b/myserver/src/protocol/protocol.cpp
@@ -15,7 +15,10 @@ 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"
 #include <include/protocol/protocol.h>
+#include <include/server/clients_thread.h>
+#include <include/server/server.h>
 
 /*!
  * Load the protocol. Called once at runtime.
@@ -52,7 +55,9 @@ int Protocol::controlConnection (ConnectionPtr con, char *request,
                                  u_long auxBufLen, u_long reqLen,
                                  u_long tid)
 {
-  return 0;
+  Server::getInstance ()->log (MYSERVER_LOG_MSG_ERROR,
+                               _("Using Protocol::controlConnection"));
+  return ClientsThread::DELETE_CONNECTION;
 }
 
 /*!
diff --git a/myserver/src/server/clients_thread.cpp b/myserver/src/server/clients_thread.cpp
index 36d28ef..d1827fb 100644
--- a/myserver/src/server/clients_thread.cpp
+++ b/myserver/src/server/clients_thread.cpp
@@ -312,7 +312,7 @@ int ClientsThread::controlConnections ()
                                            secondaryBuffer.getRealLength (),
                                            nBytesToRead, id);
         else
-          retcode = DELETE_CONNECTION;
+          retcode = ClientsThread::DELETE_CONNECTION;
       }
   }
   catch (...)

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

Summary of changes:
 myserver/include/protocol/ftp/ftp.h    |   11 ++++++++---
 myserver/include/protocol/http/http.h  |    8 ++------
 myserver/src/protocol/protocol.cpp     |    7 ++++++-
 myserver/src/server/clients_thread.cpp |    2 +-
 4 files changed, 17 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Tue Nov 03 09:07:06 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N5K2K-0003NT-DH
	for mharc-myserver-commit@gnu.org; Tue, 03 Nov 2009 09:07:04 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N5K2H-0003MN-97
	for myserver-commit@gnu.org; Tue, 03 Nov 2009 09:07:01 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N5K2E-0003LO-6J
	for myserver-commit@gnu.org; Tue, 03 Nov 2009 09:07:00 -0500
Received: from [199.232.76.173] (port=54817 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N5K2B-0003Kl-Bo
	for myserver-commit@gnu.org; Tue, 03 Nov 2009 09:06:56 -0500
Received: from savannah.gnu.org ([199.232.41.3]:55888 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 1N5K2A-0005AM-Rc
	for myserver-commit@gnu.org; Tue, 03 Nov 2009 09:06:54 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N5K2A-0005Fa-Cn
	for myserver-commit@gnu.org; Tue, 03 Nov 2009 14:06:54 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N5K29-0005F4-By
	for myserver-commit@gnu.org; Tue, 03 Nov 2009 14:06:54 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 5d3669daa38db26da58efca14c62e308df8f5bdc
X-Git-Newrev: 0ba7d30d08f068588c079035a8e1794ec5a77317
Message-Id: <E1N5K29-0005F4-By@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 03 Nov 2009 14:06:53 +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. 0ba7d30d08f068588c079035a8e1794ec5a77317
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, 03 Nov 2009 14:07: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  0ba7d30d08f068588c079035a8e1794ec5a77317 (commit)
       via  0057f78085390012f7fd5153babfd3bc7cc8eb79 (commit)
      from  5d3669daa38db26da58efca14c62e308df8f5bdc (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 0ba7d30d08f068588c079035a8e1794ec5a77317
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Nov 3 15:06:27 2009 +0100

    Revert a change in MemBuf introduced recently and remove some casts.

diff --git a/myserver/src/base/mem_buff/mem_buff.cpp b/myserver/src/base/mem_buff/mem_buff.cpp
index ef95324..e6367dc 100644
--- a/myserver/src/base/mem_buff/mem_buff.cpp
+++ b/myserver/src/base/mem_buff/mem_buff.cpp
@@ -233,11 +233,6 @@ void MemBuf::addBuffer (const void* pAdr, u_int size)
     {
       memcpy (buffer + nSize, pAdr, size);
       nSize = nNewSize;
-
-      /* There is room to append '\0', it is not considered
-       * as part of the buffer.  */
-      if (size < nAllowedSize)
-        buffer[nSize + size] = '\0';
     }
   return;
 }
@@ -615,7 +610,7 @@ MemBuf MemBuf::operator+ (MemBuf& src)
 MemBuf MemBuf::operator+ (const char* src)
 {
   MemBuf temp (*this);
-  temp.addBuffer ((const void*) src, (u_int)strlen (src));
+  temp.addBuffer ((const void*) src, strlen (src));
   return temp;
 }
 const MemBuf& MemBuf::operator+= (MemBuf& add)
@@ -625,7 +620,7 @@ const MemBuf& MemBuf::operator+= (MemBuf& add)
 }
 const MemBuf& MemBuf::operator+= (const char* pStr)
 {
-  addBuffer (pStr, (u_int)strlen (pStr));
+  addBuffer (pStr, strlen (pStr));
   return *this;
 }
 const MemBuf& MemBuf::operator+= (char c)
@@ -635,7 +630,7 @@ const MemBuf& MemBuf::operator+= (char c)
 }
 MemBuf& MemBuf::operator<< (const char* pSrc)
 {
-  addBuffer (pSrc, (u_int)strlen (pSrc));
+  addBuffer (pSrc, strlen (pSrc));
   return *this;
 }
 MemBuf& MemBuf::operator<< (int i)
@@ -685,7 +680,7 @@ MemBuf& MemBuf::operator=(const MemBuf& src)
 }
 MemBuf& MemBuf::operator=(const char* src)
 {
-  setBuffer ((const void*) src, (u_int)strlen (src) + 1);
+  setBuffer ((const void*) src, strlen (src) + 1);
   return* this;
 }
 



commit 0057f78085390012f7fd5153babfd3bc7cc8eb79
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Nov 3 15:05:45 2009 +0100

    Fix indentation.

diff --git a/myserver/include/protocol/ftp/ftp.h b/myserver/include/protocol/ftp/ftp.h
index 73c94fc..fcc1b26 100644
--- a/myserver/include/protocol/ftp/ftp.h
+++ b/myserver/include/protocol/ftp/ftp.h
@@ -42,46 +42,46 @@ public:
   virtual bool allowdelete (bool);
 
   enum Ftpstate
-  {
-    NO_CONTROL_CONNECTION,
-    BUISY,
-    UNAVAILABLE,
-    CONTROL_CONNECTION_UP,
-    USER_LOGGED_IN,
-    DATA_CONNECTION_UP
-  } m_nFtpstate;
-
-    std::string m_suserName, m_sPass;
+    {
+      NO_CONTROL_CONNECTION,
+      BUISY,
+      UNAVAILABLE,
+      CONTROL_CONNECTION_UP,
+      USER_LOGGED_IN,
+      DATA_CONNECTION_UP
+    } m_nFtpstate;
+
+  std::string m_suserName, m_sPass;
   enum FtpRepresentation
-  {
-    REPR_ASCII,
-    REPR_IMAGE
-  } m_nFtpRepresentation;
+    {
+      REPR_ASCII,
+      REPR_IMAGE
+    } m_nFtpRepresentation;
   enum FtpFormatControl
-  {
-    NON_PRINT
-  } m_nFtpFormatControl;
+    {
+      NON_PRINT
+    } m_nFtpFormatControl;
   enum FtpFilestructure
-  {
-    STRU_FILE
-  } m_nFtpFilestructure;
+    {
+      STRU_FILE
+    } m_nFtpFilestructure;
   enum FtpTransfermode
-  {
-    MODE_STREAM
-  } m_nTransfermode;
+    {
+      MODE_STREAM
+    } m_nTransfermode;
   ConnectionPtr m_pDataConnection;
   Mutex m_DataConnBusy;
   FtpHost m_cdh;
-    std::string m_cwd;
+  std::string m_cwd;
   int m_nLocalDataport;
   bool m_bBreakDataConnection;
   ThreadID m_dataThreadId;
   bool m_bPassiveSrv;
   u_long m_nrestartOffset;
-    std::string m_sRenameFrom;
+  std::string m_sRenameFrom;
 
   // STAT data
-    std::string m_sCurrentFileName;
+  std::string m_sCurrentFileName;
   u_long m_nFileSize, m_nBytesSent;
 };
 
@@ -103,8 +103,8 @@ class Ftp:public Protocol
 public:
   Ftp ();
   virtual ~ Ftp ();
-	virtual int controlConnection (ConnectionPtr con, char *request, char *auxBuf,
-                             u_long reqBufLen, u_long auxBufLen, u_long reqLen,
+  virtual int controlConnection (ConnectionPtr con, char *request, char *auxBuf,
+                                 u_long reqBufLen, u_long auxBufLen, u_long reqLen,
                                  u_long tid);
 
   static int loadProtocolstatic ();
@@ -194,14 +194,14 @@ public:
   DataConnectionWorkerThreadData ();
   ~DataConnectionWorkerThreadData ();
   ConnectionPtr m_pConnection;
-    std::string m_sFilePath;
+  std::string m_sFilePath;
   bool m_bappend;
   Ftp *m_pFtp;
 };
 
 int getFtpReply (int nReplyCode, std::string & sReply);
 void ftpReply (ConnectionPtr pConnection, int nReplyCode,
-		const std::string & sCustomText = "");
+               const std::string & sCustomText = "");
 void yyerror (YYLTYPE * pLoc, Ftp * pContext, const char *msg);
 
 
@@ -227,7 +227,7 @@ public:
     return Ftp::registerNameImpl (out, len);
   }
 
-	virtual int controlConnection (ConnectionPtr con, char *request,
+  virtual int controlConnection (ConnectionPtr con, char *request,
                                  char *auxBuf, u_long reqBufLen,
                                  u_long auxBufLen, u_long reqLen,
                                  u_long tid)
@@ -258,4 +258,4 @@ public:
 };
 
 
-#endif // FTP_H
+#endif

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

Summary of changes:
 myserver/include/protocol/ftp/ftp.h     |   64 +++++++++++++++---------------
 myserver/src/base/mem_buff/mem_buff.cpp |   13 ++----
 2 files changed, 36 insertions(+), 41 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Tue Nov 03 11:38:52 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N5MPE-0003f3-1O
	for mharc-myserver-commit@gnu.org; Tue, 03 Nov 2009 11:38:52 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N5MPC-0003eo-2z
	for myserver-commit@gnu.org; Tue, 03 Nov 2009 11:38:50 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N5MP8-0003eI-ES
	for myserver-commit@gnu.org; Tue, 03 Nov 2009 11:38:48 -0500
Received: from [199.232.76.173] (port=35563 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N5MP8-0003eF-7y
	for myserver-commit@gnu.org; Tue, 03 Nov 2009 11:38:46 -0500
Received: from savannah.gnu.org ([199.232.41.3]:57237 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 1N5MP7-0006h0-Qa
	for myserver-commit@gnu.org; Tue, 03 Nov 2009 11:38:46 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N5MP7-0003Go-BU
	for myserver-commit@gnu.org; Tue, 03 Nov 2009 16:38:45 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N5MP6-0003GJ-9O
	for myserver-commit@gnu.org; Tue, 03 Nov 2009 16:38:45 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 0ba7d30d08f068588c079035a8e1794ec5a77317
X-Git-Newrev: cfd1b4f4a992238b6f7596def6cb9f8b293b618c
Message-Id: <E1N5MP6-0003GJ-9O@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 03 Nov 2009 16:38:44 +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. cfd1b4f4a992238b6f7596def6cb9f8b293b618c
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, 03 Nov 2009 16:38:50 -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  cfd1b4f4a992238b6f7596def6cb9f8b293b618c (commit)
      from  0ba7d30d08f068588c079035a8e1794ec5a77317 (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 cfd1b4f4a992238b6f7596def6cb9f8b293b618c
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Nov 3 17:38:31 2009 +0100

    Move the reallocation logic from `MemBuf::setLength' to a new method `MemBuf::setRealLength'.

diff --git a/myserver/include/base/mem_buff/mem_buff.h b/myserver/include/base/mem_buff/mem_buff.h
index 21e42ce..7e4f008 100644
--- a/myserver/include/base/mem_buff/mem_buff.h
+++ b/myserver/include/base/mem_buff/mem_buff.h
@@ -1,20 +1,20 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2009 Free Software Foundation, Inc.
-Copyright (C) 2004, Guinet Adrien (grainailleur)
-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) 2002, 2003, 2004, 2009 Free Software Foundation, Inc.
+  Copyright (C) 2004, Guinet Adrien (grainailleur)
+  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 MEMBUF_H
@@ -34,89 +34,95 @@ using namespace std;
 class MemBuf
 {
 public:
-	MemBuf ();
-	MemBuf (const void* pAdr, u_int size);
-	MemBuf (const MemBuf& srcBuf);
-	MemBuf (MemBuf& srcBuf, int bCopy);
-	~MemBuf ();
-
-	void setExternalBuffer (const void* pAdr, u_int size);
-	int setBuffer (const void* pAdr, u_int size);
-	void setLength (u_int newSize);
-
-	void addBuffer (const void* pAdr, u_int size);
-	void addBuffer (MemBuf *nmb);
-
-	int free ();
-
-	u_int find (char c, u_int start = 0);
-	u_int find (MemBuf *smb, u_int start = 0);
-	u_int find (const void* pAdr, u_int size, u_int start = 0);
-	void replace (char what, char by);
-	char& getAt (u_int nIndex);
-	char& operator[](u_int nIndex);
-
-	int getPart (u_int nStart, u_int nEnd, MemBuf& result);
-	int getPartAsString (u_int nStart, u_int nEnd, MemBuf& result);
-
-	char* getBuffersetLength (u_int newSize);
-
-	u_int getLength ();
-	u_int getRealLength ();
-
-	int isValid ();
-
-	char* getBuffer ();
-	operator const void* ();
-	MemBuf operator+ (MemBuf& src);
-	MemBuf operator+ (const char* src);
-	const MemBuf& operator+= (MemBuf& add);
-	const MemBuf& operator+= (const char* pStr);
-	const MemBuf& operator+= (char c) ;
-
-	MemBuf& operator<< (const char* pSrc) ;
-	MemBuf& operator<< (int i) ;
-	MemBuf& operator<< (unsigned int i) ;
-	MemBuf& operator<< (long i) ;
-	MemBuf& operator<< (unsigned long i);
-	MemBuf& operator<< (char c) ;
-	MemBuf& operator<< (unsigned char c) ;
-	MemBuf& operator<< (const MemBuf &src) ;
-	MemBuf& operator<< (const string &src) ;
-	MemBuf& operator= (const MemBuf& src) ;
-	MemBuf& operator= (const char* src);
+  MemBuf ();
+  MemBuf (const void* pAdr, u_int size);
+  MemBuf (const MemBuf& srcBuf);
+  MemBuf (MemBuf& srcBuf, int bCopy);
+  ~MemBuf ();
+
+  void setExternalBuffer (const void* pAdr, u_int size);
+  int setBuffer (const void* pAdr, u_int size);
+  void setLength (u_int newSize);
+  void setRealLength (u_int newSize);
+
+  void addBuffer (const void* pAdr, u_int size);
+  void addBuffer (MemBuf *nmb);
+
+  int free ();
+
+  u_int find (char c, u_int start = 0);
+  u_int find (MemBuf *smb, u_int start = 0);
+  u_int find (const void* pAdr, u_int size, u_int start = 0);
+  void replace (char what, char by);
+  char& getAt (u_int nIndex);
+  char& operator[](u_int nIndex);
+
+  int getPart (u_int nStart, u_int nEnd, MemBuf& result);
+  int getPartAsString (u_int nStart, u_int nEnd, MemBuf& result);
+
+  char* getBuffersetLength (u_int newSize);
+
+  u_int getLength ();
+  u_int getRealLength ();
+
+  int isValid ();
+
+  char* getBuffer ();
+  operator const void* ();
+  MemBuf operator+ (MemBuf& src);
+  MemBuf operator+ (const char* src);
+  const MemBuf& operator+= (MemBuf& add);
+  const MemBuf& operator+= (const char* pStr);
+  const MemBuf& operator+= (char c) ;
+
+  MemBuf& operator<< (const char* pSrc) ;
+  MemBuf& operator<< (int i) ;
+  MemBuf& operator<< (unsigned int i) ;
+  MemBuf& operator<< (long i) ;
+  MemBuf& operator<< (unsigned long i);
+  MemBuf& operator<< (char c) ;
+  MemBuf& operator<< (unsigned char c) ;
+  MemBuf& operator<< (const MemBuf &src) ;
+  MemBuf& operator<< (const string &src) ;
+  MemBuf& operator= (const MemBuf& src) ;
+  MemBuf& operator= (const char* src);
+
+  void hashMD5(const void* pAdr, u_int nSize);
+  void hashCRC (const void* pAdr, u_int nSize);
+  void hex (const void* pAdr, u_int nSize);
+  void uintToStr (u_int i);
+  void intToStr (int i);
+  u_int strToUint (const char* pAdr);
+  unsigned char hexCharToNumber (unsigned char c);
+  MemBuf hexToData (const void* pAdr, u_int nSize);
+  int strToInt (const char* pAdr);
+  void hex (MemBuf& membuf) ;
+  void hashMD5 (MemBuf& membuf);
+  void hashCRC (MemBuf& membuf);
+  void uintToStr (u_int i, char* pBufToUse, u_int nBufSize) ;
+  void xIntToStr (u_int i, int bNegative, char* pBufToUse, u_int nBufSize);
+  void intToStr (int i, char* pBufToUse, u_int nBufSize);
+
+  u_int getSizeLimit () {return nSizeLimit;}
+  void setSizeLimit (u_int newSize) {nSizeLimit = newSize;}
+
+protected:
+
 
   /* The maximun size that the buffer can reached ; 0 if none.  */
-	u_int nSizeLimit;
+  u_int nSizeLimit;
 
-  /* Minimun size of new allocated blocks during addings.
+  /* Minimum size of new allocated blocks during addings.
    * We assume that nBlockLength < nSizeLimit.  */
-	u_int nBlockLength; 
-
-	void hashMD5(const void* pAdr, u_int nSize);
-	void hashCRC (const void* pAdr, u_int nSize);
-	void hex (const void* pAdr, u_int nSize);
-	void uintToStr (u_int i);
-	void intToStr (int i);
-	u_int strToUint (const char* pAdr);
-	unsigned char hexCharToNumber (unsigned char c);
-	MemBuf hexToData (const void* pAdr, u_int nSize);
-	int strToInt (const char* pAdr);
-	void hex (MemBuf& membuf) ;
-	void hashMD5 (MemBuf& membuf);
-	void hashCRC (MemBuf& membuf);
-	void uintToStr (u_int i, char* pBufToUse, u_int nBufSize) ;
-	void xIntToStr (u_int i, int bNegative, char* pBufToUse, u_int nBufSize);
-	void intToStr (int i, char* pBufToUse, u_int nBufSize);
-
-protected:
-	void xIntToStr (u_int i, int bNegative);
-	void allocBuffer (u_int size);
-	char *buffer;
-	u_int nSize;
-	u_int nRealSize;
-	int bCanDelete;
-	static u_int crc32Table[256];
+  u_int nBlockLength;
+
+  void xIntToStr (u_int i, int bNegative);
+  void allocBuffer (u_int size);
+  char *buffer;
+  u_int nSize;
+  u_int nRealSize;
+  int bCanDelete;
+  static u_int crc32Table[256];
 };
 
 #endif
diff --git a/myserver/src/base/mem_buff/mem_buff.cpp b/myserver/src/base/mem_buff/mem_buff.cpp
index e6367dc..3b8b4c3 100644
--- a/myserver/src/base/mem_buff/mem_buff.cpp
+++ b/myserver/src/base/mem_buff/mem_buff.cpp
@@ -214,9 +214,9 @@ void MemBuf::addBuffer (const void* pAdr, u_int size)
   if (nNewSize > nRealSize)
     {
       if (nNewSize - nRealSize < nBlockLength)
-        setLength (nRealSize + nBlockLength);
+        setRealLength (nRealSize + nBlockLength);
       else
-        setLength (nNewSize);
+        setRealLength (nNewSize);
     }
 
   const u_int nAllowedSize = nRealSize - nSize;
@@ -325,45 +325,52 @@ int MemBuf::getPartAsString (u_int nStart, u_int nEnd, MemBuf& result)
 }
 
 /*!
- * Set the length of the internal buffer.
+ * Set the real length of the internal buffer.  Ensure the buffer is
+ * at least newSize bytes, if this value is bigger than nSizeLimit
+ * then the latter is used.
+ *
  * If the length is smallest than the existing one, no reallocation is done.
  * if it's biggest, a reallocation is done until nSizeLimit is reached.
  */
-void MemBuf::setLength (u_int newSize)
+void MemBuf::setRealLength (u_int newSize)
 {
-  if (newSize == nRealSize)
+  if (newSize <= nRealSize)
     return;
 
-  if (newSize < nRealSize)
+  if (nSizeLimit != 0 && newSize > nSizeLimit)
     {
-      nSize = newSize;
-      return;
+      newSize = nSizeLimit;
+      if (newSize == nRealSize)
+        return;
     }
 
-  if (newSize > nRealSize)
+  if (buffer == NULL || nRealSize == 0)
     {
-      if (nSizeLimit != 0 && newSize > nSizeLimit)
-        {
-          newSize = nSizeLimit;
-          if (newSize == nRealSize)
-            return;
-        }
-
-      if (buffer == NULL || nRealSize == 0)
-        {
-          allocBuffer (newSize);
-          return;
-        }
-
-      char* temp = mealloc (newSize);
-      memcpy (temp, buffer, nRealSize);
-      if (bCanDelete)
-        mefree (buffer);
-      buffer = temp;
-      nRealSize = newSize;
+      allocBuffer (newSize);
       return;
     }
 
+  char* temp = mealloc (newSize);
+  memcpy (temp, buffer, nRealSize);
+  if (bCanDelete)
+    mefree (buffer);
+  buffer = temp;
+  nRealSize = newSize;
+}
+
+/*!
+ * Set the cursor in the internal buffer.
+ * If the specified position is bigger than the buffer size then a reallocation
+ * is done.
+ */
+void MemBuf::setLength (u_int newSize)
+{
+  setRealLength (newSize);
+
+  if (newSize < nRealSize)
+    nSize = newSize;
+  else
+    nSize = nRealSize;
 }
 
 
@@ -372,7 +379,7 @@ void MemBuf::setLength (u_int newSize)
 void MemBuf::hex (const void* pAdr, u_int nSize)
 {
   const u_int nFinalSize = nSize * 2;
-  setLength (nFinalSize + 1);
+  setRealLength (nFinalSize + 1);
   const char* hex_chars = "0123456789abcdef";
   for (u_int i = 0; i < nSize; i++)
     {
@@ -402,7 +409,7 @@ MemBuf MemBuf::hexToData (const void* pAdr, u_int nSize)
     return MemBuf ("", 1);
   MemBuf memFinal;
   memFinal.bCanDelete = false;
-  memFinal.setLength (nSize >> 1);
+  memFinal.setRealLength (nSize >> 1);
   const char* pTmp = (const char*) pAdr;
   const char* pEnd = pTmp + nSize;
   for ( ; pTmp < pEnd; pTmp += 2)
@@ -415,7 +422,7 @@ MemBuf MemBuf::hexToData (const void* pAdr, u_int nSize)
 void MemBuf::hashMD5(const void* pAdr, u_int nSize)
 {
   Md5 md5;
-  setLength (16);
+  setRealLength (16);
 
   md5.init ();
   md5.update ((char*) pAdr, nSize);
@@ -426,7 +433,7 @@ void MemBuf::hashMD5(const void* pAdr, u_int nSize)
 /*! CRC hashing function.  */
 void MemBuf::hashCRC (const void* pAdr, u_int nSize)
 {
-  setLength (4);
+  setRealLength (4);
   u_int* nCrc32 = (u_int*) getBuffer ();
   *nCrc32 = 0xFFFFFFFF;
   for (u_int i = 0; i < nSize; i++)
@@ -448,7 +455,7 @@ void MemBuf::xIntToStr (u_int i, int bNegative)
       nSize = 1;
       return;
     }
-  setLength (12);
+  setRealLength (12);
   do
     {
       *this << (char) ('0' + i % 10);
diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index 476ddde..c094ad4 100644
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -747,7 +747,7 @@ DEFINE_THREAD (SendAsciiFile, pParam)
       int nLineLength = 0;
       std::string sLine;
       MemBuf buffer, secondaryBuffer;
-      buffer.setLength (1024);
+      buffer.setRealLength (1024);
       while (filesize != 0)
         {
           memset (buffer.getBuffer (), 0, buffer.getRealLength ());
@@ -983,7 +983,7 @@ DEFINE_THREAD (SendImageFile, pParam)
       pFtpuserData->m_nFileSize = filesize;
 
       MemBuf secondaryBuffer;
-      secondaryBuffer.setLength (1024);
+      secondaryBuffer.setRealLength (1024);
       while (filesize != 0)
         {
           nBufferSize =
@@ -1160,7 +1160,7 @@ DEFINE_THREAD (ReceiveAsciiFile, pParam)
         }
 
       MemBuf buffer, secondaryBuffer;
-      buffer.setLength (1024);
+      buffer.setRealLength (1024);
       memset (buffer.getBuffer (), 0, buffer.getRealLength ());
       char *pLine = NULL;
       int nLineLength = 0;
@@ -1357,7 +1357,7 @@ DEFINE_THREAD (ReceiveImageFile, pParam)
         }
       u_long nbr;
       MemBuf buffer;
-      buffer.setLength (1024);
+      buffer.setRealLength (1024);
       memset (buffer.getBuffer (), 0, buffer.getRealLength ());
       while (pFtpuserData->m_pDataConnection->socket->read (buffer.getBuffer (),
                                                             (u_long) buffer.
diff --git a/myserver/src/server/clients_thread.cpp b/myserver/src/server/clients_thread.cpp
index d1827fb..0ba0b08 100644
--- a/myserver/src/server/clients_thread.cpp
+++ b/myserver/src/server/clients_thread.cpp
@@ -122,10 +122,11 @@ DEFINE_THREAD (clients_thread, pParam)
   ct->threadIsStopped = false;
   ct->bufferSize = ct->server->getBuffersize ();
 
-  ct->buffer.setLength (ct->bufferSize);
-  ct->buffer.nSizeLimit = ct->bufferSize;
-  ct->secondaryBuffer.setLength (ct->bufferSize);
-  ct->secondaryBuffer.nSizeLimit = ct->bufferSize;
+  ct->buffer.setRealLength (ct->bufferSize);
+  ct->buffer.setSizeLimit (ct->bufferSize);
+
+  ct->secondaryBuffer.setRealLength (ct->bufferSize);
+  ct->secondaryBuffer.setSizeLimit (ct->bufferSize);
 
   /* Built-in protocols will be initialized at the first use.  */
   ct->initialized = true;
@@ -269,7 +270,7 @@ int ClientsThread::controlConnections ()
   if (err == -1 && !server->deleteConnection (c))
     return 0;
 
-  buffer.setLength (dataRead + err);
+  buffer.setRealLength (dataRead + err);
   c->setForceControl (0);
 
   /* Refresh with the right value.  */
diff --git a/myserver/tests/test_ftp.cpp b/myserver/tests/test_ftp.cpp
index 3146dc0..9fad1a5 100644
--- a/myserver/tests/test_ftp.cpp
+++ b/myserver/tests/test_ftp.cpp
@@ -25,28 +25,28 @@
 
 class TestFtp : public CppUnit::TestFixture
 {
-	CPPUNIT_TEST_SUITE (TestFtp);
-	CPPUNIT_TEST (testEscapeTelnet);
-	CPPUNIT_TEST_SUITE_END ();
+  CPPUNIT_TEST_SUITE (TestFtp);
+  CPPUNIT_TEST (testEscapeTelnet);
+  CPPUNIT_TEST_SUITE_END ();
 
 public:
-	void setUp () {}
-	void tearDown () {}
-	void testEscapeTelnet ()
-	{
-		MemBuf inBuf, outBuf;
-		inBuf << "\377\366RE\377\374TTR abc\377\377def\015\377\376\012\012";
-
-		Ftp ftp;
-		ftp.escapeTelnet (inBuf, outBuf);
-		char szOut[128], szExpected[128];
-		memset (szOut, 0, 128);
-		strncpy (szOut, outBuf.getBuffer (), outBuf.getLength ());
-		memset (szExpected, 0, 128);
-		strcpy (szExpected, "RETR abc\377def\015\012");
-
-		CPPUNIT_ASSERT (strcmp (szOut, szExpected) == 0);
-	}
+  void setUp () {}
+  void tearDown () {}
+  void testEscapeTelnet ()
+  {
+    MemBuf inBuf, outBuf;
+    inBuf << "\377\366RE\377\374TTR abc\377\377def\015\377\376\012\012";
+
+    Ftp ftp;
+    ftp.escapeTelnet (inBuf, outBuf);
+    char szOut[128], szExpected[128];
+    memset (szOut, 0, 128);
+    strncpy (szOut, outBuf.getBuffer (), outBuf.getLength ());
+    memset (szExpected, 0, 128);
+    strcpy (szExpected, "RETR abc\377def\015\012");
+
+    CPPUNIT_ASSERT (strcmp (szOut, szExpected) == 0);
+  }
 };
 
 CPPUNIT_TEST_SUITE_REGISTRATION (TestFtp);
diff --git a/myserver/tests/test_mem_buff.cpp b/myserver/tests/test_mem_buff.cpp
index 5d72d63..5547097 100644
--- a/myserver/tests/test_mem_buff.cpp
+++ b/myserver/tests/test_mem_buff.cpp
@@ -54,18 +54,20 @@ public:
     delete memBuff;
   }
 
-
   void testLength ()
   {
     u_int len = 10;
-    memBuff->setLength (len);
-    CPPUNIT_ASSERT_EQUAL (memBuff->getRealLength (), len);
-
+    memBuff->setRealLength (len);
     CPPUNIT_ASSERT_EQUAL (memBuff->getLength (), 0u);
+    CPPUNIT_ASSERT_EQUAL (memBuff->getRealLength (), len);
 
     *memBuff << (const char*)"1234567890";
 
     CPPUNIT_ASSERT_EQUAL (memBuff->getLength (), 10u);
+
+    memBuff->setLength (len / 2);
+    CPPUNIT_ASSERT_EQUAL (memBuff->getRealLength (), len);
+    CPPUNIT_ASSERT_EQUAL (memBuff->getLength (), len / 2);
   }
 
   void testFind ()

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

Summary of changes:
 myserver/include/base/mem_buff/mem_buff.h |  194 +++++++++++++++--------------
 myserver/src/base/mem_buff/mem_buff.cpp   |   73 ++++++-----
 myserver/src/protocol/ftp/ftp.cpp         |    8 +-
 myserver/src/server/clients_thread.cpp    |   11 +-
 myserver/tests/test_ftp.cpp               |   40 +++---
 myserver/tests/test_mem_buff.cpp          |   10 +-
 6 files changed, 176 insertions(+), 160 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Nov 04 03:42:35 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N5bRq-0003vA-St
	for mharc-myserver-commit@gnu.org; Wed, 04 Nov 2009 03:42:34 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N5bRp-0003uo-Dc
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 03:42:33 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N5bRo-0003uc-Di
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 03:42:33 -0500
Received: from [199.232.76.173] (port=56143 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N5bRo-0003uZ-A8
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 03:42:32 -0500
Received: from savannah.gnu.org ([199.232.41.3]:53328 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 1N5bRo-0007D4-0W
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 03:42:32 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N5bRn-0007vG-CB
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 08:42:31 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N5bRl-0007um-T7
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 08:42:31 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: cfd1b4f4a992238b6f7596def6cb9f8b293b618c
X-Git-Newrev: c3daecc9bd693534a5bd851988a8924e6c61c324
Message-Id: <E1N5bRl-0007um-T7@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Wed, 04 Nov 2009 08:42: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. c3daecc9bd693534a5bd851988a8924e6c61c324
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, 04 Nov 2009 08:42:33 -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  c3daecc9bd693534a5bd851988a8924e6c61c324 (commit)
      from  cfd1b4f4a992238b6f7596def6cb9f8b293b618c (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 c3daecc9bd693534a5bd851988a8924e6c61c324
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Nov 4 09:42:22 2009 +0100

    Update to the latest gnulib `nproc' module.

diff --git a/myserver/src/base/utility.cpp b/myserver/src/base/utility.cpp
index 782741f..aca0d5a 100644
--- a/myserver/src/base/utility.cpp
+++ b/myserver/src/base/utility.cpp
@@ -55,7 +55,7 @@ static size_t currentPathLen;
  */
 u_long getCPUCount ()
 {
-  return num_processors ();
+  return num_processors (NPROC_CURRENT);
 }
 
 /*!

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

Summary of changes:
 myserver/src/base/utility.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Nov 04 06:23:01 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N5dx7-0006ys-2M
	for mharc-myserver-commit@gnu.org; Wed, 04 Nov 2009 06:23:01 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N5dx5-0006yE-5I
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 06:22:59 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N5dx4-0006xx-2q
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 06:22:58 -0500
Received: from [199.232.76.173] (port=42117 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N5dx3-0006xu-Ok
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 06:22:57 -0500
Received: from savannah.gnu.org ([199.232.41.3]:44656 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 1N5dx3-0006ms-GA
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 06:22:57 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N5dx3-0002ut-5j
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 11:22:57 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N5dx2-0002uR-Iz
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 11:22:57 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: c3daecc9bd693534a5bd851988a8924e6c61c324
X-Git-Newrev: ffcd007ec5d92f956a8fca0a1ab7a95a16ac5a4b
Message-Id: <E1N5dx2-0002uR-Iz@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Wed, 04 Nov 2009 11:22: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. ffcd007ec5d92f956a8fca0a1ab7a95a16ac5a4b
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, 04 Nov 2009 11:22: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  ffcd007ec5d92f956a8fca0a1ab7a95a16ac5a4b (commit)
      from  c3daecc9bd693534a5bd851988a8924e6c61c324 (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 ffcd007ec5d92f956a8fca0a1ab7a95a16ac5a4b
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Nov 4 12:22:45 2009 +0100

    Use AM_SILENT_RULES only when it is defined.

diff --git a/myserver/configure.ac b/myserver/configure.ac
index 0e6c6d0..f060fe1 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -26,7 +26,8 @@ LDFLAGS="${LDFLAGS=}"
 AC_CANONICAL_HOST
 AC_CANONICAL_TARGET
 AM_INIT_AUTOMAKE([gnu])
-AM_SILENT_RULES([yes])
+
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 AC_CONFIG_MACRO_DIR([m4])
 

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

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


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Nov 04 09:50:31 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N5hBv-0000so-3d
	for mharc-myserver-commit@gnu.org; Wed, 04 Nov 2009 09:50:31 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N5hBt-0000rJ-W0
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 09:50:30 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N5hBs-0000od-Al
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 09:50:29 -0500
Received: from [199.232.76.173] (port=33720 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N5hBs-0000oS-66
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 09:50:28 -0500
Received: from savannah.gnu.org ([199.232.41.3]:43458 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 1N5hBr-0002tQ-C6
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 09:50:27 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N5hBq-00039N-Ot
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 14:50:26 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N5hBo-00038k-KK
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 14:50:26 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: ffcd007ec5d92f956a8fca0a1ab7a95a16ac5a4b
X-Git-Newrev: 27a3b5c2698d4346f24471f96d48fe526af603e0
Message-Id: <E1N5hBo-00038k-KK@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Wed, 04 Nov 2009 14:50:25 +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. 27a3b5c2698d4346f24471f96d48fe526af603e0
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, 04 Nov 2009 14:50:30 -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  27a3b5c2698d4346f24471f96d48fe526af603e0 (commit)
      from  ffcd007ec5d92f956a8fca0a1ab7a95a16ac5a4b (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 27a3b5c2698d4346f24471f96d48fe526af603e0
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Nov 4 15:50:17 2009 +0100

    The directory listing handler allows to specify an ignore pattern.

diff --git a/myserver/documentation/directory_listing.texi b/myserver/documentation/directory_listing.texi
index a57c6a4..de09614 100644
--- a/myserver/documentation/directory_listing.texi
+++ b/myserver/documentation/directory_listing.texi
@@ -64,7 +64,6 @@ by its size, while @code{%f%t} displays the file name and its last
 modified time.
 
 @subsection Directory listing layout
-
 You can change the layout of the directory browsing page. The line
 below, in @file{myserver.xml}, points to the CSS file used to
 configure the layout for the browsing directory pages:
@@ -72,3 +71,19 @@ configure the layout for the browsing directory pages:
 @example
   <DEFINE name="http.dir.css" value="/sys/css/browsestyle.css" />
 @end example
+
+@subsection Ignore entries
+It is possible to ignore some files to be listed from the final
+output.  It is done using the @code{http.dir.ignore} regular
+expression that can be specified at any level.
+
+Pay attention, this directive does not change the file visibility, so
+a direct request to the entries that are part of the mask will have
+the same effect as if this directive is not specified.
+
+In the following example, the file @file{hidden} is not included in
+the directory listing.
+
+@example
+  <DEFINE name="http.dir.ignore" value="hidden" />
+@end example
diff --git a/myserver/src/http_handler/http_dir/http_dir.cpp b/myserver/src/http_handler/http_dir/http_dir.cpp
index a94e903..21e3c1d 100644
--- a/myserver/src/http_handler/http_dir/http_dir.cpp
+++ b/myserver/src/http_handler/http_dir/http_dir.cpp
@@ -106,7 +106,7 @@ int HttpDir::unLoad ()
 }
 
 /*!
-  *Get a formatted dobule representation of BYTES right shifted by POWER.
+ *Get a formatted dobule representation of BYTES right shifted by POWER.
  * \param bytes Number of bytes.
  * \param power Power of 2.
  * \return the double representation for BYTES>>POWER.
@@ -176,38 +176,38 @@ void HttpDir::generateHeader (MemBuf &out, char sortType, bool sortReverse,
   out << "<tr>\r\n";
 
   for (;;)
-  {
-    while (*cur && ((*cur == '%' ) || (*cur == ' ' )))
-      cur++;
-
-    if (!(*cur))
-      break;
-
-    switch (*cur)
     {
-    case 'f':
-      if (sortType == 'f' && !sortReverse)
-        out << "<th><a href=\"?sort=fI\">File</a></th>\r\n";
-      else
-        out << "<th><a href=\"?sort=f\">File</a></th>\r\n";
-      break;
+      while (*cur && ((*cur == '%' ) || (*cur == ' ' )))
+        cur++;
 
-    case 't':
-      if (sortType == 't' && !sortReverse)
-        out << "<th><a href=\"?sort=tI\">Last Modified</a></th>\r\n";
-      else
-        out << "<th><a href=\"?sort=t\">Last Modified</a></th>\r\n";
-      break;
+      if (!(*cur))
+        break;
 
-    case 's':
-    if (sortType == 's' && !sortReverse)
-      out << "<th><a href=\"?sort=sI\">Size</a></th>\r\n";
-    else
-      out << "<th><a href=\"?sort=s\">Size</a></th>\r\n";
-    break;
+      switch (*cur)
+        {
+        case 'f':
+          if (sortType == 'f' && !sortReverse)
+            out << "<th><a href=\"?sort=fI\">File</a></th>\r\n";
+          else
+            out << "<th><a href=\"?sort=f\">File</a></th>\r\n";
+          break;
+
+        case 't':
+          if (sortType == 't' && !sortReverse)
+            out << "<th><a href=\"?sort=tI\">Last Modified</a></th>\r\n";
+          else
+            out << "<th><a href=\"?sort=t\">Last Modified</a></th>\r\n";
+          break;
+
+        case 's':
+          if (sortType == 's' && !sortReverse)
+            out << "<th><a href=\"?sort=sI\">Size</a></th>\r\n";
+          else
+            out << "<th><a href=\"?sort=s\">Size</a></th>\r\n";
+          break;
+        }
+      cur++;
     }
-    cur++;
-  }
 
   out << "</tr>\r\n";
 }
@@ -299,17 +299,20 @@ int HttpDir::send (HttpThreadContext* td,
   bool useChunks = false;
   u_long sentData = 0;
   char* bufferloop;
-  const char* browseDirCSSpath;
+  const char* cssFile;
   bool keepalive = false;
   vector<HttpDir::FileStruct> files;
   size_t sortIndex;
   char sortType = 0;
   bool sortReverse = false;
   string linkPrefix;
+  Regex ignRegex;
+  const char *ignPattern;
   const char *formatString = td->securityToken.getData ("http.dir.format",
-                                                              MYSERVER_SECURITY_CONF |
-                                                              MYSERVER_VHOST_CONF |
-                                                              MYSERVER_SERVER_CONF, "%f%t%s");
+                                                        MYSERVER_SECURITY_CONF
+                                                        | MYSERVER_VHOST_CONF
+                                                        | MYSERVER_SERVER_CONF,
+                                                        "%f%t%s");
 
 
   HttpRequestHeader::Entry *host = td->request.other.get ("Host");
@@ -322,14 +325,16 @@ int HttpDir::send (HttpThreadContext* td,
   if ( !(td->permissions & MYSERVER_PERMISSION_BROWSE))
     return td->http->sendAuth ();
 
-  if (td->mime && Server::getInstance ()->getFiltersFactory ()->chain (&chain,
-                                                        td->mime->filters,
-                                             td->connection->socket, &nbw, 1))
-  {
-    td->connection->host->warningsLogWrite (_("HttpDir: internal error"));
-    chain.clearAllFilters ();
-    return td->http->raiseHTTPError (500);
-  }
+  if (td->mime
+      && Server::getInstance ()->getFiltersFactory ()->chain (&chain,
+                                                    td->mime->filters,
+                                                td->connection->socket,
+                                                              &nbw, 1))
+    {
+      td->connection->host->warningsLogWrite (_("HttpDir: internal error"));
+      chain.clearAllFilters ();
+      return td->http->raiseHTTPError (500);
+    }
 
   lastSlash = td->request.uri.rfind ('/') + 1;
 
@@ -337,55 +342,64 @@ int HttpDir::send (HttpThreadContext* td,
 
   td->response.setValue ("Content-type", "text/html");
 
-  if (!td->appendOutputs)
-  {
+  ignPattern = td->securityToken.getData ("http.dir.ignore",
+                                          MYSERVER_SECURITY_CONF
+                                          | MYSERVER_VHOST_CONF
+                                          | MYSERVER_SERVER_CONF, NULL);
+  if (ignPattern)
+    {
+      int ret = ignRegex.compile (ignPattern, REG_EXTENDED);
+      if (ret)
+        {
+          td->connection->host->warningsLogWrite (_("HttpDir: pattern `%s' "
+                                                  "is not valid"), ignPattern);
 
-    HttpHeaders::buildHTTPResponseHeader (td->buffer->getBuffer (),
-                                         &(td->response));
+          fd.findclose ();
+          td->outputData.close ();
+          chain.clearAllFilters ();
+          return td->http->raiseHTTPError (500);
+        }
+    }
 
-    if (td->connection->socket->send (td->buffer->getBuffer (),
-                       (u_long)strlen (td->buffer->getBuffer ()), 0)
-       == SOCKET_ERROR)
+  if (!td->appendOutputs)
     {
-      /* Remove the connection.  */
-      return 0;
+
+      HttpHeaders::buildHTTPResponseHeader (td->buffer->getBuffer (),
+                                            &(td->response));
+
+      if (td->connection->socket->send (td->buffer->getBuffer (),
+                                   strlen (td->buffer->getBuffer ()), 0) < 0)
+        return 0;
     }
-  }
 
   if (onlyHeader)
     return 1;
 
-
   sortIndex = td->request.uriOpts.find ("sort=");
 
   if (sortIndex != string::npos && sortIndex + 5 < td->request.uriOpts.length ())
-  {
     sortType = td->request.uriOpts.at (sortIndex + 5);
-  }
 
   if (sortIndex != string::npos && sortIndex + 6 < td->request.uriOpts.length ())
-  {
-     sortReverse = td->request.uriOpts.at (sortIndex + 6) == 'I';
-  }
+    sortReverse = td->request.uriOpts.at (sortIndex + 6) == 'I';
 
   /* Make sortType always lowercase.  */
   switch (sortType)
-  {
+    {
     case 's':
     case 'S':
       sortType = 's';
       break;
+
     case 't':
     case 'T':
       sortType = 't';
       break;
-    default:
-      sort (files.begin (), files.end (), compareFileStructByName);
-  }
+    }
 
-  browseDirCSSpath = td->securityToken.getData ("http.dir.css",
-                                                      MYSERVER_SECURITY_CONF | MYSERVER_VHOST_CONF |
-                                                      MYSERVER_SERVER_CONF, NULL);
+  cssFile = td->securityToken.getData ("http.dir.css", MYSERVER_SECURITY_CONF
+                                       | MYSERVER_VHOST_CONF
+                                       | MYSERVER_SERVER_CONF, NULL);
 
   td->secondaryBuffer->setLength (0);
   *td->secondaryBuffer << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"
@@ -397,29 +411,29 @@ int HttpDir::send (HttpThreadContext* td,
   *td->secondaryBuffer << "</title>\r\n";
 
   /*
-   *If it is defined a CSS file for the graphic layout of
-   *the browse directory insert it in the page.
+   * If it is defined a CSS file for the graphic layout of
+   * the browse directory insert it in the page.
    */
-  if (browseDirCSSpath)
-  {
-    *td->secondaryBuffer << "<link rel=\"stylesheet\" href=\""
-                 << browseDirCSSpath
-                 << "\" type=\"text/css\" media=\"all\"/>\r\n";
-  }
+  if (cssFile)
+    {
+      *td->secondaryBuffer << "<link rel=\"stylesheet\" href=\""
+                           << cssFile
+                           << "\" type=\"text/css\" media=\"all\"/>\r\n";
+    }
 
   *td->secondaryBuffer << "</head>\r\n";
 
   ret = appendDataToHTTPChannel (td, td->secondaryBuffer->getBuffer (),
-                                td->secondaryBuffer->getLength (),
-                                &(td->outputData), &chain,
-                                td->appendOutputs, useChunks);
+                                 td->secondaryBuffer->getLength (),
+                                 &(td->outputData), &chain,
+                                 td->appendOutputs, useChunks);
   if (ret)
-  {
-    /* Return an internal server error. */
-    td->outputData.close ();
-    chain.clearAllFilters ();
-    return td->http->raiseHTTPError (500);
-  }
+    {
+      /* Return an internal server error. */
+      td->outputData.close ();
+      chain.clearAllFilters ();
+      return td->http->raiseHTTPError (500);
+    }
 
   sentData = td->secondaryBuffer->getLength ();
 
@@ -430,25 +444,25 @@ int HttpDir::send (HttpThreadContext* td,
   *td->secondaryBuffer << "</h1>\r\n<hr />\r\n";
 
   ret = appendDataToHTTPChannel (td, td->secondaryBuffer->getBuffer (),
-                                td->secondaryBuffer->getLength (),
-                                &(td->outputData), &chain,
-                                td->appendOutputs, useChunks);
+                                 td->secondaryBuffer->getLength (),
+                                 &(td->outputData), &chain,
+                                 td->appendOutputs, useChunks);
 
   if (ret)
-  {
-    td->outputData.close ();
-    /* Return an internal server error.  */
-    return td->http->raiseHTTPError (500);
-  }
+    {
+      td->outputData.close ();
+      /* Return an internal server error.  */
+      return td->http->raiseHTTPError (500);
+    }
   sentData += td->secondaryBuffer->getLength ();
 
   ret = fd.findfirst (filename.c_str ());
 
   if (ret == -1)
-  {
-    chain.clearAllFilters ();
-    return td->http->raiseHTTPError (404);
-  }
+    {
+      chain.clearAllFilters ();
+      return td->http->raiseHTTPError (404);
+    }
 
   /*
    * With the current code we build the HTML TABLE to indicize the
@@ -460,87 +474,94 @@ int HttpDir::send (HttpThreadContext* td,
   generateHeader (*td->secondaryBuffer, sortType, sortReverse, formatString);
 
   ret = appendDataToHTTPChannel (td, td->secondaryBuffer->getBuffer (),
-                                td->secondaryBuffer->getLength (),
-                                &(td->outputData), &chain,
-                                td->appendOutputs, useChunks);
+                                 td->secondaryBuffer->getLength (),
+                                 &(td->outputData), &chain,
+                                 td->appendOutputs, useChunks);
 
   if (ret)
-  {
-    td->outputData.close ();
-    chain.clearAllFilters ();
-    /* Return an internal server error.  */
-    return td->http->raiseHTTPError (500);
-  }
+    {
+      td->outputData.close ();
+      chain.clearAllFilters ();
+      /* Return an internal server error.  */
+      return td->http->raiseHTTPError (500);
+    }
 
   sentData += td->secondaryBuffer->getLength ();
 
   td->secondaryBuffer->setLength (0);
 
   if (FilesUtility::getPathRecursionLevel (td->request.uri) >= 1)
-  {
-    const char* cur = formatString;
-    string file;
-    file.assign (td->request.uri);
-    file.append ("/../");
+    {
+      const char* cur = formatString;
+      string file;
+      file.assign (td->request.uri);
+      file.append ("/../");
 
-    *td->secondaryBuffer << "<tr>\r\n";
+      *td->secondaryBuffer << "<tr>\r\n";
 
-    for (;;)
-    {
-      while (*cur && ((*cur == '%' ) || (*cur == ' ' )))
-        cur++;
+      for (;;)
+        {
+          while (*cur && ((*cur == '%' ) || (*cur == ' ' )))
+            cur++;
 
-      if (!(*cur))
-        break;
+          if (!(*cur))
+            break;
 
-      if (*cur == 'f')
-        *td->secondaryBuffer << "<td>\n"
-                             << "<a href=\""
-                             << (td->request.uriEndsWithSlash ? ".." : ".")
-                             << "\">[ .. ]</a></td>\n";
-      else
-        *td->secondaryBuffer << "<td></td>\n";
+          if (*cur == 'f')
+            *td->secondaryBuffer << "<td>\n"
+                                 << "<a href=\""
+                                 << (td->request.uriEndsWithSlash ? ".." : ".")
+                                 << "\">[ .. ]</a></td>\n";
+          else
+            *td->secondaryBuffer << "<td></td>\n";
 
-      cur++;
-    }
+          cur++;
+        }
 
-    *td->secondaryBuffer << "</tr>\r\n";
+      *td->secondaryBuffer << "</tr>\r\n";
 
-    ret = appendDataToHTTPChannel (td, td->secondaryBuffer->getBuffer (),
-                                  td->secondaryBuffer->getLength (),
-                                  &(td->outputData), &chain,
-                                  td->appendOutputs, useChunks);
-    if (ret)
-    {
-      fd.findclose ();
-      td->outputData.close ();
-      chain.clearAllFilters ();
-      /* Return an internal server error.  */
-      return td->http->raiseHTTPError (500);
+      ret = appendDataToHTTPChannel (td, td->secondaryBuffer->getBuffer (),
+                                     td->secondaryBuffer->getLength (),
+                                     &(td->outputData), &chain,
+                                     td->appendOutputs, useChunks);
+      if (ret)
+        {
+          fd.findclose ();
+          td->outputData.close ();
+          chain.clearAllFilters ();
+          /* Return an internal server error.  */
+          return td->http->raiseHTTPError (500);
+        }
+      sentData += td->secondaryBuffer->getLength ();
     }
-    sentData += td->secondaryBuffer->getLength ();
-  }
 
   /* Put all files in a vector.  */
   do
-  {
-    if (fd.name[0] == '.')
-      continue;
-
-    FileStruct file;
-    file.name = fd.name;
-    file.time_write = fd.time_write;
-    file.attrib = fd.attrib;
-    file.size = fd.size;
-    files.push_back (file);
-  }
+    {
+      if (fd.name[0] == '.')
+        continue;
+
+      if (ignPattern)
+        {
+          regmatch_t pm[1];
+          if (! ignRegex.exec (fd.name, 1, pm, 0))
+            continue;
+        }
+
+      FileStruct file;
+      file.name = fd.name;
+      file.time_write = fd.time_write;
+      file.attrib = fd.attrib;
+      file.size = fd.size;
+      files.push_back (file);
+    }
   while (!fd.findnext ());
 
   fd.findclose ();
 
   /* Sort the vector.  */
   switch (sortType)
-  {
+    {
     case 's':
       sort (files.begin (), files.end (), compareFileStructBySize);
       break;
@@ -549,76 +570,76 @@ int HttpDir::send (HttpThreadContext* td,
       break;
     case 'f':
       sort (files.begin (), files.end (), compareFileStructByName);
-  }
+    }
 
   if (sortReverse)
     reverse (files.begin (), files.end ());
 
   if (!td->request.uriEndsWithSlash)
-  {
-    linkPrefix.assign (&td->request.uri[lastSlash]);
-    linkPrefix.append ("/");
-  }
+    {
+      linkPrefix.assign (&td->request.uri[lastSlash]);
+      linkPrefix.append ("/");
+    }
   else
     linkPrefix.assign ("");
 
 
   /* Build the files table and send it.  */
   for (vector<FileStruct>::iterator it = files.begin ();
-      it != files.end (); it++)
-  {
-    FileStruct& file = *it;
+       it != files.end (); it++)
+    {
+      FileStruct& file = *it;
 
-    td->secondaryBuffer->setLength (0);
+      td->secondaryBuffer->setLength (0);
 
-    generateElement (*td->secondaryBuffer, file, linkPrefix, formatString);
+      generateElement (*td->secondaryBuffer, file, linkPrefix, formatString);
 
-    ret = appendDataToHTTPChannel (td, td->secondaryBuffer->getBuffer (),
-                                  td->secondaryBuffer->getLength (),
-                                  &(td->outputData), &chain,
-                                  td->appendOutputs, useChunks);
-    if (ret)
-    {
-      td->outputData.close ();
-      chain.clearAllFilters ();
-      /* Return an internal server error.  */
-      return td->http->raiseHTTPError (500);
-    }
+      ret = appendDataToHTTPChannel (td, td->secondaryBuffer->getBuffer (),
+                                     td->secondaryBuffer->getLength (),
+                                     &(td->outputData), &chain,
+                                     td->appendOutputs, useChunks);
+      if (ret)
+        {
+          td->outputData.close ();
+          chain.clearAllFilters ();
+          /* Return an internal server error.  */
+          return td->http->raiseHTTPError (500);
+        }
 
-    sentData += td->secondaryBuffer->getLength ();
+      sentData += td->secondaryBuffer->getLength ();
 
-  }
+    }
 
   td->secondaryBuffer->setLength (0);
   *td->secondaryBuffer << "</table>\r\n<hr />\r\n<address>"
-               << MYSERVER_VERSION;
+                       << MYSERVER_VERSION;
 
   if (host && host->value->length ())
-  {
-    ostringstream portBuff;
-    size_t portSeparator = host->value->find (':');
-    *td->secondaryBuffer << " on ";
-    if (portSeparator != string::npos)
-      *td->secondaryBuffer << host->value->substr (0, portSeparator).c_str () ;
-    else
-      *td->secondaryBuffer << host->value->c_str () ;
-
-    *td->secondaryBuffer << " Port ";
-    portBuff << td->connection->getLocalPort ();
-    *td->secondaryBuffer << portBuff.str ();
-  }
+    {
+      ostringstream portBuff;
+      size_t portSeparator = host->value->find (':');
+      *td->secondaryBuffer << " on ";
+      if (portSeparator != string::npos)
+        *td->secondaryBuffer << host->value->substr (0, portSeparator).c_str () ;
+      else
+        *td->secondaryBuffer << host->value->c_str () ;
+
+      *td->secondaryBuffer << " Port ";
+      portBuff << td->connection->getLocalPort ();
+      *td->secondaryBuffer << portBuff.str ();
+    }
   *td->secondaryBuffer << "</address>\r\n</body>\r\n</html>\r\n";
   ret = appendDataToHTTPChannel (td, td->secondaryBuffer->getBuffer (),
-                                td->secondaryBuffer->getLength (),
-                                &(td->outputData), &chain,
-                                td->appendOutputs, useChunks);
+                                 td->secondaryBuffer->getLength (),
+                                 &(td->outputData), &chain,
+                                 td->appendOutputs, useChunks);
 
   if (ret)
-  {
-    td->outputData.close ();
-    /* Return an internal server error.  */
-    return td->http->raiseHTTPError (500);
-  }
+    {
+      td->outputData.close ();
+      /* Return an internal server error.  */
+      return td->http->raiseHTTPError (500);
+    }
   sentData += td->secondaryBuffer->getLength ();
 
   *td->secondaryBuffer << end_str;
@@ -628,11 +649,9 @@ int HttpDir::send (HttpThreadContext* td,
     if (*bufferloop == '\\')
       *bufferloop = '/';
 
-  if (!td->appendOutputs && useChunks)
-  {
-    if (chain.getStream ()->write ("0\r\n\r\n", 5, &nbw))
-      return 1;
-  }
+  if (!td->appendOutputs && useChunks
+      && chain.getStream ()->write ("0\r\n\r\n", 5, &nbw))
+    return 1;
 
   /* For logging activity.  */
   td->sentData += sentData;
@@ -656,20 +675,20 @@ void HttpDir::formatHtml (string& in, string& out)
    * with "&#CODE;".
    */
   for (pos = 0; out[pos] != '\0'; pos++)
-  {
-    if (((u_char)out[pos] >= 32 &&
-        (u_char)out[pos] <= 65)   ||
-       ((u_char)out[pos] >= 91 &&
-        (u_char)out[pos] <= 96)   ||
-       ((u_char)out[pos] >= 123 &&
-        (u_char)out[pos] <= 126) ||
-       ((u_char)out[pos] >= 160 &&
-        (u_char)out[pos] < 255))
     {
-      ostringstream os;
-      os << "&#" << (int)((unsigned char)out[pos]) << ";";
-      out.replace (pos, 1, os.str ());
-      pos += os.str ().length () - 1;
+      if (((u_char)out[pos] >= 32 &&
+           (u_char)out[pos] <= 65)   ||
+          ((u_char)out[pos] >= 91 &&
+           (u_char)out[pos] <= 96)   ||
+          ((u_char)out[pos] >= 123 &&
+           (u_char)out[pos] <= 126) ||
+          ((u_char)out[pos] >= 160 &&
+           (u_char)out[pos] < 255))
+        {
+          ostringstream os;
+          os << "&#" << (int)((unsigned char)out[pos]) << ";";
+          out.replace (pos, 1, os.str ());
+          pos += os.str ().length () - 1;
+        }
     }
-  }
 }

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

Summary of changes:
 myserver/documentation/directory_listing.texi   |   17 +-
 myserver/src/http_handler/http_dir/http_dir.cpp |  445 ++++++++++++-----------
 2 files changed, 248 insertions(+), 214 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Nov 04 19:55:42 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N5qda-0005b1-1k
	for mharc-myserver-commit@gnu.org; Wed, 04 Nov 2009 19:55:42 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N5qdX-0005aJ-9z
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 19:55:39 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N5qdW-0005a6-Aw
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 19:55:38 -0500
Received: from [199.232.76.173] (port=56182 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N5qdW-0005a3-6g
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 19:55:38 -0500
Received: from savannah.gnu.org ([199.232.41.3]:57900 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 1N5qdV-0005TQ-Qz
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 19:55:37 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N5qdU-000865-VZ
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 00:55:37 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N5qdU-00085b-Ob
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 00:55:36 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/tags/0_9
X-Git-Reftype: annotated tag
X-Git-Oldrev: 0000000000000000000000000000000000000000
X-Git-Newrev: aeed7ee10306b0a2f699dcd8c50cef59a572f099
Message-Id: <E1N5qdU-00085b-Ob@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Thu, 05 Nov 2009 00:55:36 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer annotated tag, 0_9,
	created. 0_9
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: Thu, 05 Nov 2009 00:55:39 -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 annotated tag, 0_9 has been created
        at  aeed7ee10306b0a2f699dcd8c50cef59a572f099 (tag)
   tagging  60e8616f339d31bfffc23698b0233efc55556119 (commit)
  replaces  0_9_rc2
 tagged by  Giuseppe Scrivano
        on  Mon Aug 10 19:21:25 2009 +0200

- Log -----------------------------------------------------------------
0.9
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEABECAAYFAkqAVxoACgkQB5GvjMAzY/Rz2wCgmP8U1tcSZ6VG+NIHROGnGq78
W4cAnRkHuxqiQhovCAdKYB8RdSMTTq69
=FvA1
-----END PGP SIGNATURE-----

Giuseppe Scrivano (41):
      Compile MSCGI examples under Windows.
      Merge branch 'master' of file:///home/gscrivano/myserver/myserver
      Merge branch 'master' of file:///home/gscrivano/myserver/myserver
      Socket::read returns immediately when the socket is non blocking.
      Report when the MSCGI library can't be opened correctly.
      By default allow anonymous access to the FTP server.
      Avoid to read from the socket when the POST data specified by Content-Length is already consumed.
      makeinfo generates index.html not index.htm.
      Create the empty plugins/ directory.
      Fix a problem when executed as NT service.
      The NT service doesn't hang when it is executed.
      Code refactoring: changed code formatting
      Code refactoring: code indentation.
      Code refactoring for the HttpFile class.
      Use socklen_t instead of int as parameter type to Socket::accept.
      Clean temporary file used by the test.
      Alloc dinamically the connection if there are not free slots in the slab.
      Free resources used by the thread.
      Code refactoring for the class Thread.
      Connection class refactoring: dinamically allocate members and hide them to be accessed directly from outside.
      Check that the returned index is less than the specified `capacity'.
      Slab class refactoring: use size_t for capacity, not int.  Add a check against the index returned by the bit mask.
      BitVec class refactoring: use size_t as `capacity' and `dataSize' type instead of int.
      Ensure xml document root is not null.
      The main server purge threads loop avoids to join a sleeping thread.
      Specify the Content-Length with keep-alive connections too when it is possible.
      Protect the access to the connections map.
      Do not access just freed memory.
      Use bool instead of int as type for booleans members.
      Rollback to read/write when sendfile fails.
      The HTTP Content-Range header is inclusive for the last specified byte.  Fix a bug specifying the payload 1-byte bigger than it really is.
      Refactoring, removed unused #include's and code cleaning.
      Fix an implicit cast to a signed type.
      Refactoring: removed comments that were interpreted as inline documentation by doxygen and code re-formatted
      Rename the `StrTrim' function to `trim'.
      Define HAVE_ZLIB when zlib is present instead of DO_NOT_USE_GZIP when it is not.
      MSCGI is used if (WIN32 | HAVE_DL), not when DO_NOT_USE_MSCGI is defined.
      The myserver-daemon script is an executable.
      Remove the downloads/ directory from the default installed web site.
      Add back links to default web pages.
      Bump version to 0.9.

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


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Nov 04 19:55:45 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N5qdd-0005d5-Ck
	for mharc-myserver-commit@gnu.org; Wed, 04 Nov 2009 19:55:45 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N5qdb-0005bn-Ac
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 19:55:43 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N5qdX-0005aS-Mg
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 19:55:39 -0500
Received: from [199.232.76.173] (port=56183 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N5qdX-0005aP-Hm
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 19:55:39 -0500
Received: from savannah.gnu.org ([199.232.41.3]:57912 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 1N5qdW-0005TU-I9
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 19:55:39 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N5qdV-00086v-Pw
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 00:55:37 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N5qdV-00086T-In
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 00:55:37 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/tags/0_9_rc2
X-Git-Reftype: annotated tag
X-Git-Oldrev: 0000000000000000000000000000000000000000
X-Git-Newrev: 0b33a81327df283d066c3a6fd04d84fa5904fa72
Message-Id: <E1N5qdV-00086T-In@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Thu, 05 Nov 2009 00:55:37 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer annotated tag, 0_9_rc2,
	created. 0_9_rc2
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: Thu, 05 Nov 2009 00:55:44 -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 annotated tag, 0_9_rc2 has been created
        at  0b33a81327df283d066c3a6fd04d84fa5904fa72 (tag)
   tagging  20fc8ae23b82d5d05b1bf79cea7511e9e04c57c6 (commit)
  replaces  0_9_rc1
 tagged by  Giuseppe Scrivano
        on  Thu Jul 30 20:00:32 2009 +0200

- Log -----------------------------------------------------------------
0.9.0-rc2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEABECAAYFAkpx38gACgkQB5GvjMAzY/QF0ACffPwU5eYRPRLOq+SFPQ5pysVf
f/gAoMQ1pHXl1nuyQT4wT0zVC/nHpAa+
=ix9M
-----END PGP SIGNATURE-----

Giuseppe Scrivano (2):
      The tests suite build can be disabled at configure time.
      Bump new version.

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


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Nov 04 19:55:46 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N5qde-0005db-Gz
	for mharc-myserver-commit@gnu.org; Wed, 04 Nov 2009 19:55:46 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N5qdb-0005cW-Ts
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 19:55:43 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N5qdY-0005ao-3O
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 19:55:43 -0500
Received: from [199.232.76.173] (port=56184 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N5qdX-0005aZ-O8
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 19:55:39 -0500
Received: from savannah.gnu.org ([199.232.41.3]:57908 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 1N5qdW-0005TS-39
	for myserver-commit@gnu.org; Wed, 04 Nov 2009 19:55:39 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N5qdV-00086X-IV
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 00:55:37 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N5qdU-00085z-Vj
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 00:55:37 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/tags/0_9_rc1
X-Git-Reftype: annotated tag
X-Git-Oldrev: 0000000000000000000000000000000000000000
X-Git-Newrev: 7b4c13610448bb400f9991c5753e6ae7f5173136
Message-Id: <E1N5qdU-00085z-Vj@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Thu, 05 Nov 2009 00:55:37 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer annotated tag, 0_9_rc1,
	created. 0_9_rc1
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: Thu, 05 Nov 2009 00:55:44 -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 annotated tag, 0_9_rc1 has been created
        at  7b4c13610448bb400f9991c5753e6ae7f5173136 (tag)
   tagging  e9c335399e11d7b0fe9006ae908bd3ad392cb20d (commit)
 tagged by  Giuseppe Scrivano
        on  Wed Jul 22 21:20:44 2009 +0200

- Log -----------------------------------------------------------------
0.9 rc1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEABECAAYFAkpnZpIACgkQB5GvjMAzY/Th9wCfXDGS2d2z2euWrgSziH4ur0/V
q3sAoLVajjfp8ch2/ZFOk6Gjet73P5tO
=MfP9
-----END PGP SIGNATURE-----

(no author) (1):
      New repository initialized by cvs2svn.

Daniele Perrone (4):
      Added more error messages on http protocol.
      Added more error messages on http protocol.
      Refactoring plugins management. Added stronger error management.
      Fixed bugs on plugins loading and dependeces checking.

Francesco Pipita (1):
      Little portability improvement.

Giuseppe Scrivano (111):
      Detect the mingw32 build target automatically.
      Do not use a special syntax to define values for log colours.
      The default connections timeout value is changed to 3 minutes.
      Unix domain sockets implementation wrapping the `Socket' functionalities and related test cases. The Unix domain sockets are implemented in the `UnixSocket' class.
      The `UnixSocket' class is able to migrate file descriptors.
      Removed readFd/writeFd helper functions from `ForkServer'.
      Now the `ForkServer' class uses an Unix domain socket for the communication with the MyServer main process. It is more fault tolerant than the previous single socket pair used to multiplex all requests.
      Code refactoring, some methods were renamed and file are copied by blocks of 4Kb.
      Solve compiling problems under WIN32 with sockets classes.
      The new SocketHandle type was added.
      The `ForkServer::startForkServer ()' function returns after the socket is created.
      Delegate the HTTP PUT/DELETE commands to the HTTP handlers instead of handling them in the manager.
      Added new tests for the `File', `Socket' and `SslSocket' classes. Thanks to Ivaylo Ilionov.
      Added the `Url' class. It separes a "Uniform Resource Locator" string in its tokens.
      The main configuration file can store structured data using a forest of trees.
      Default filenames for HTTP are stored using a DEFINE list.
      Added tests for `NodeTree'.
      All recent changes now compile under WIN32.
      Use `getpwnam' when it is available instead of parsing the `/etc/passwd' file.
      The definition of a thread entry-point is done trought the `DEFINE_THREAD' macro.
      Fixed a problem with GNUTLS usage in a multi-threaded environment.
      Complex data structures can be defined in the virtual hosts configuration file too.
      Default file names, that are used instead of a directory listing, can be defined differently for every virtual host.
      Removed unused .xsd files.
      Now a node can store attributes.
      Processes servers list are saved using a `NodeTree' structure inside the main configuration file.
      Simple ip-hashing based load balancing for SCGI/FastCGI servers, a set of equivalent servers is kept referred by the same name.
      Do not use XML data to store data but access it trought `NodeTree'.
      The main configuration file is closed after it is parsed.
      Changed name for some lists stored in the main configuration file.
      Do not fail if the OS version is not recognized.
      Check if headers are available before inclusion. It solves a compiling issue under Windows.
      Do not assume that `Socket::gethostname' returns "localhost".
      Properly initialize GNUTLS even in the case `GCRY_CONTROL' is not defined.
      Store the protocol prefix in the `Protocol' class.
      Code refactoring: `FilesUtility::copyFile (const char*, const char*, int)' calls internally `FilesUtility::copyFile (File&, File&)'.
      Added `File::getSeek ()' function.
      While copying a file, use the `posix_fallocate () system call if it is available.
      A maximum file size can be defined for security files.
      Refactoring: file open modes now have a shorter name.
      Added basic Proxy features.
      Code refactoring, `HttpFile::appendDataToHTTPChannel ()' was moved to the `HttpDataHandler' class.
      Keep minor contributors in the THANKS file.
      The HTTP Proxy is now HTTP/1.1 compliant.
      Code refactoring: removed some static variables.
      Removed references to the previous Subversion repository.
      Specify the `UnixSocket::shutdown ()' and `UnixSocket::close ()' methods return code.  It may cause the `TestUnixSocket::testBind ()' test failure.
      Fixed a compiler warning: do not use NULL in place of 0.
      Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/myserver
      Do not hardly-code the security file name inside the code.  It is configurable by the `security.filename' variable.
      FTP supports files with spaces in their name.
      Use relative file paths for FTP.
      Added `X-Forwarded-For' line to the HTTP request generated by the proxy handler.
      Removed localized documentation.  It is not maintained on the repository, at least now.
      Use a string to keep a uid/gid value.  Previously an int was used.
      The uid/gid can be specified using the name instead of the value.
      Scan a directory uses `fstatat' if it is present.
      Do not repeat variables already present in the HttpThreadContext structure to `HttpDataHandler::send'.  Use `bool' instead of `int' to specify boolean params.
      Removed not used #include's.
      Added two new classes, a slab allocator and a bits vector data structure, with their relative tests.
      Amend previous commit.
      Fixed a bug in the BitVec implementation and a new test case was added.
      Added a new `BitVec::find' function, a new test and some comments.
      Allow data reallocation.  It is a destructive operation.
      Use a connections cache in the server.
      Fixed compiling problems under Windows.
      Write warnings/errors to the warning log file, no to the accesses log file.
      Fixed compiling problems under Windows.
      FTP parser refactoring.
      Added basic logging features.
      Now FTP supports the SIZE command.
      Support libtre under Windows for regex matching.
      Fixed some tests failures under Windows. Some still remains.
      Now the tests suite is executed correctly under Windows too.
      File truncate supports the desired size now.  A test was added.
      Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/myserver
      File class refactoring: some parts rewritten to be more readable.
      Free the resources used by the TestFileStreamCreator::testCreation test.
      Use the interface signature for the send method.
      Throw an error if the base interface is used by mistake.
      Fixed a possible segfault when the server is lazily loaded.
      Fix the termination test for the hashing function.
      FilesUtility::deleteFile doesn't fail if the file is not found.
      Fixed BitVec problems on 64 bits systems.
      Specify the payload length in the header.
      Check if the input file is valid before use it.
      Don't segfault when the fork server is used.
      Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/myserver
      A value of 0 is valid for a handle.  Use -1 instead.
      Some variables were renamed and additional refactoring.
      Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/myserver
      Fix a compiling error introduced by the last changes.
      Fixed a problem with FTP when an user/password is provided.
      Add the `Server::getXmlConfiguration ()' method, new code should not use it but `Server::getNodeTree ()'.
      Fixed plugins compiling issues.
      Move Windows files in a separate directory.
      Specify the error when SSL cannot be initialized.
      Specifiy the host name in error messages.
      Removed duplicated files.
      Use `SYSROOT' instead of `SYSFOLDER'.
      Removed unused local variable.
      FTP class refactoring, some methods were renamed.
      Version bump.
      Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/myserver
      Fixed some possible memory leaks.
      Last things for 0.9-rc1.
      Do not handle the PIDFILE by the `start-stop-daemon' helper.
      Install the correct configuration files.
      Do not install the tests_suite program.
      Do not install static temporary libraries.
      Compile MSCGI examples under Windows.

andu (17):
      Update tests Makefile
      avoid linking to both: ms library and compilation units(obj files)
      add IP address range helper class and it's tests
      (forgot to) register Ip address range test :)
      add more features to IP address range + tests
      changed allowed IP address config from regexp to CIDR IP address ranges
      add Sudoku .NET sample(not added to default.html because needs more work)
      cleaned generated files
      clean generated files
      segfault caused by improper/malicious sequence of commands(e.g.PASS/LIST); affected commands: LIST, NLST, PASV
      wrong merge with old sources(e.g. files_utility.cpp, mime_manager.cpp, vhost_manager.cpp, http.cpp) - reverting to previous version
      allow ftp sockets to be nonblocking
      avoid double nulls at the end of strings(causing incorrect strings handling: e.g. append will do nothing)
      disallow to cd into files
      bug fix at directories browsing
      bug fix at directory browsing
      bug fixes:ftp directory handling and files rights, cleaned code: removed some warnings

andu77 (77):
      add IPv6 support
      add IPv6 support
      add IPv6 support
      add IPv6 support
      add IPv6 support
      add IPv6 support
      success messages were logged even on failure
      IPv4 listen only on loopback addr
      bug fix at counting listening threads
      Add Romanian documentation
      check SSL initialize return
      continue to build vhost list with available XML cfg
      Add messages in Romanian language(/binaries/languages/*.xml)
      moved outside while loop the local variable
      read configured default file names
      use libxml fnc instead of c runtime
      Merge FTP into trunk
      implement passive mode transfer
      notify users about 'expected delay' and 'service not available'
      add STOR cmd(needs debug)
      make data connection worker thread independent of ftp parser/client thread
      syncronize control/data connections: control waits for data conn. before close
      debug STOR cmd
      fixed mem leaks bugs
      reply 502 to commands not implemented
      add DELE cmd
      add APPE, MKD, RMD cmds
      debug, add deleteDirectory implementation(win32), add rfc 775 cmds
      debug cd ../rmdir sequence
      rmdir - handle relative and absolute paths, debug upload
      debug SITE command
      enable/disable features by cfg: anonymous access, asynchronous cmds, pipelining cmds, write cmds
      debug USER/PASS
      possible crash at client's thread
      debug append
      do more parsing with flex(instead of code)
      remove write for anonymous(added by mistake)
      add ALLO, STOU, RNFR, RNTO cmds, update help cmd
      debug configure GUI
      add GUI for FTP global cfgs(will be moved per host)
      update FTP documentation
      debug cfg reading problem
      debug reboot(not complete)
      debug reboot
      debug synchro cmds
      fix data/control connection synchronisation problem
      fix save/load ftp cfg bug
      fix save/load ftp cfg bug
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@2585 c4c922ea-a70d-0410-937d-ec1daf91936c
      disable anonymous_needs_pass check if allow_anonymous == false/debug anonymous login
      bugfix: disallow deleting connections while they are parsing
      update TODO
      fix ascii transfers
      fix no FTP cfg segfault/update default cfgs
      debug win32 version(not complete)/update TODO
      check for EOF, fix rights bug
      fix deadlock bug(at file transfer and server reboot)
      fix cancel transfer segfault
      update cfgs(set default values for FTP access/add FTP virtual host)
      fix prossible segfault
      fix wrong replies
      ensure replies end with newline char
      allocate passive port numbers only from predefined range
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@2604 c4c922ea-a70d-0410-937d-ec1daf91936c
      spell check documentation
      avoid allocate local var on heap
      update autotools files to build tests(cppunits)
      start adding FTP tests
      Ftp: handle telnet sequences
      Update Makefile
      fix invalid reply message
      changed FTP test condition
      fix MemBuf end of buffer bug, update tests Makefile, add MemBuf getBufferTest
      let new allocated buffer uninitialized to speed up usage
      ensure for buffer overflow
      add chains filter test
      add chains filter test

codingmaster (266):
      change in html code
      added new line at EOF (gcc)
      made code more secure against buffer overflow
      UPDATE: made code more secure against buffer overflow
      UPDATE: made code more secure against buffer overflow
      UPDATE: made code more secure against buffer overflow
      Added strlcpy, strlcat: more durability against buffer overflows
      bugfix
      strlcat instead of strncat
      update
      bugfix
      bugfix
      zlib1.dll update
      libssl32.dll update
      *** empty log message ***
      updated zlib1.dll (1.2.1.1429): binary mode
      Removed Old Documentation
      added NEW DOCUMENTATION
      NEW DOCUMENTATION RELEASED
      updated doc: virtualhosts
      updated docs
      updated docs -> images
      updated docs: Makefile.am
      updated default.html
      updated tableofcontents.htm
      XHTML 1.1 (99% finished)
      clean xhtml1.1 code
      valid xhtml1.1
      valid xhtml1.1
      valid xhtml1.1
      valid xhtml1.1
      valid xhtml1.1
      valid xhtml1.1
      update html directory structure
      removed unnecessary files
      added/updated some Makefile.am files
      added new error files
      added new error files
      Updated Makefile.am
      Added PHP Directory Listing Example
      Updated Makefile.am
      Added error codes
      added error icons
      updated error files
      http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
      update to: /sys/icons/
      updated php examples
      updated stylesheet
      MyServer
      fixed typo
      LZMA compression
      compile without debug information
      added goto.png
      removed subdir icons
      removed icons
      some changes
      fixed typo
      added &nbsp;
      typo
      typo
      static_cast<TYPE>
      MyServer 0.8.1
      MyServer 0.8.1 fix
      fixed typo
      updated version to 0.8.1
      MyServer 0.8.1 fix
      grammar
      Added phpinfo() example
      grammar
      fixed broken link --> frame: "maincontent"
      updated code
      updated *.dll
      html tags
      removed outdated files
      language
      Fixed Makefile.am
      Fixed Makefile.am problems
      new documentation structure
      fixed directory structure
      *** empty log message ***
      void setGzip(bool)
      changed int to bool / void setGzip(bool)
      int -> bool / useSSL
      fixed gcc error
      casting
      removed errors
      somes casts
      fixed displayed filesize(byte+kb), mb, gb, tb coming soon
      fixed Compiled on
      fixed upper dir
      some casts
      added TODO list
      new TODO
      updated INSTALL
      new TODO
      updated TODO
      updated TODO
      fixes
      OpenBSD: OpenSSL fix
      allow symlinks
      <USE_ERROR_FILES>
      <USE_ERROR_FILE>
      <FOLLOW_LINKS>
      updated string functions
      fixes
      fix: error 500
      change hard 500 error
      MyServer 0.8.2
      solid lzma compression
      MyServer 0.8.2-rc1
      fix
      multi-language support
      added licenses, etc, 0.8.2-rc1
      fixed bug, index.htm (Documentation) wasn't copied)
      added new logo
      new logo
      license.txt was missing
      update
      changed default directory index files
      updated license (ssl part)
      update
      update (openssl part)
      update
      fixed isapi.o compile error
      cast
      cast
      PHP6-dev compability
      PHP6-dev compability
      FLTK 1.1.7 compability: use fl_choice (fl_ask: deprecated)
      fixed Makefile (threads.cpp is thread.cpp now)
      secure string functions
      secure string functions
      Changed readme.txt
      MyServer 0.8.2-rc2
      MyServer 0.8.2-rc2
      MyServer 0.8.2-rc2 + fix: software overview entry
      Documentation --> documentation
      Checks whether needed tools are installed.
      fixed structure, added new logo
      new logo
      changed image size
      daemon script
      added deamon script
      Romanian Documentation
      Turkish Documentation
      Russian Documentation
      French Documentation
      Japanese Documentation
      preparing 0.8.3-rc1
      changed structure
      changed structure
      changed structure
      removed configure script output
      removed configure script output
      removed configure script output
      removed configure script output
      removed configure script output
      restored file
      fixed missing Makefile
      added missing myserver-daemon
      obsolete file removed
      obsolete wx removed
      removed double definition of char GZIP_HEADER[], also defined in gzip.cpp
      formattation
      fixed bug
      fixed spelling
      prepared for 0.8.3-rc1
      changed formatting
      fixed missing folderstyle.css
      changed directory name to myserver
      updated svn command in the documentation
      added svn command to checkout the documentation
      changed myserverweb to myserver
      added home directory browsing features
      Added version information for Windows
      updated for windows 0.8.3-rc1
      grammer correction
      added files_utility.cpp
      set 0.8.3-rc1 codename to "Back to Life"
      added files_utility.cpp cgi-lib/cgi_manager.cpp
      added cgi-lib/cgi_manager.cpp file.cpp files_utility.cpp stream.cpp
      added cgi-lib/cgi_manager.cpp file.cpp files_utility.cpp stream.cpp
      latest config.guess from savannah.gnu.org
      latest config.sub from savannah.gnu.org
      latest install-sh from savannah.gnu.org
      latest missing from savannah.gnu.org
      latest libxml.m4
      latest ltmain.sh for libtool1.5.23a
      added --with-root-prefix
      fixed xml configuration
      fixed libpng compilation settings
      fixed bug
      MyServer 0.8.3 "Storm" release
      MyServer 0.8.3 "Lightning" RELEASE!!! - codename is "Lightning"
      changed svn server location
      removed cvsversion.htm
      cleaned
      myserverweb ---> myserver, links updated, cleaned up
      set: MyServer 0.8.4, prepared files for 0.8.4-rc1
      do not output path
      fixed measure units
      fix
      updated tags for caching
      updated caching tags
      0.8.4-rc1 "Last of 2006"
      0.8.4-rc1 name: Last of 2006
      changes for 0.8.4-rc1
      Added versioning information for the nsis installer
      MyServer 0.8.4 Gathering Clouds
      MyServer 0.8.4 Gathering Clouds
      preparing for MyServer 0.8.5-rc1
      changed version to 0.8.5
      typo
      copyright 2007
      MyServer 0.8.5 Black Clouds
      Preparing MyServer 0.8.6-rc1
      MyServer 0.8.6
      MyServer 0.8.6 - Hail Storm
      added 0.8.7 release names
      prepared for MyServer 0.8.8 rc1
      MyServer version set to 0.8.8
      cleaned up the TODO
      libidn support under windows
      Windows firewall settings during installation, using NSIS script
      intial modules creation
      intial plugins creation
      documentation and new formatting
      type changed
      type changed, layout changed
      set version to MyServer 0.8.9 (rc1)
      first XML Schema for virtualhosts.xml
      addes IPv4 regex
      added namespaces and extended structure
      added first XML Schema for MIMEtypes.xml
      updated ACTION
      MyServer 0.8.9-rc1 "Einstein"
      MyServer 0.8.9 Zweistein rc2
      fixed multilanguage installer (catalan is not available anymore, therefore all other NSIS language files)
      MyServer 0.8.9 rc3
      Added missing libintl.h include
      updated dll files
      use libcgi-lib.a
      use libcgi-lib.a
      use libcgi-lib.a
      updated license to GPLv3
      changed output
      commented out crashing code on Windows
      update
      updated Makefiles
      enable/disable control gui and ipv6 support
      added version information
      added copyright
      fixed warning
      fixed versioning information
      fixed versioning information
      updated scripts
      increased version number
      updated copyright and version information
      Use NSIS Modern UI 2.0
      cleaned -pedantic issues
      cleaned -pedantic issues
      2008
      Changed package and MyServer version display behaviour.
      Use MyServer version instead of package version
      Added SCons Define() helper for SCons version lower than 0.98.x
      Fixed and updated version numbers.

deshuang (2):
      Changed strcmpi() to lstrcmpi()
      Change strcmpi to lstrcmpi in order to compile under Linux

dozz (5):
      SSL: included RSA headers for compatibility
      strupr - compartibility issues
      strupr - compatibility issues
      compatibility with cygwin
      Invalid assignment from unsigned int* to int*

dperrone (24):
      corrected include paths
      corrected include path
      refactoring copying files in server
      refactored configuration file loading methods
      Refactored plugins management, left only generic plugin, all different kind of plugins are been removed.
      Refactored plugins management, left only generic plugin, all different kind of plugins are been removed. (Step 2)
      Refactored plugin tree
      Fixed tar tree problem in the creation of plugin's packages
      Updated plugins with new logManager, and added version informations in xml descriptors
      added version and dependences control in plugin manager
      Fixed segmentation fault on myserver stop
      fixed segfault problem and pluginInfo tests
      refactoring and fixed dependences checking
      plugins build script refactoring: razionalization and architecture name added in plugin tar.gz file
      first step developing myserver-get: implemented simple skeleton and update command.
      myserver-get: refactoring and search command added.
      some plugin packages compiled on a 64bit architecture with GNU/linux os.
      myserver-get: added http and ftp protocols support. Removed binary files from svn.
      myserver-get: first implementation of install command.
      added command to package plugin sources.
      myserver-get:
      myserver-get: added remove command + removed svn protocol partial support.
      myserver-get: added xml config file and support, and license.
      Fixed mistakes in documentation on security files.

francesco_pipita (28):
      Build process now behaves according to GNU standards
      Build libmyserver.a after any change made to the library source tree
      Moved ftp parser generation rule to 'src/protocol/ftp/Makefile.am'
      Fixed indentation.
      Added the new LogManager.
      Toy file to remake the repository consistent.
      Replaced tabs by blanks in the LogManager related classes and added new tests for them.
      Added more tests for the LogManager class. Fixed a bug and removed an useless test for the FileStream class.
      Added a first document scratch about the new log management usage.
      Fixed a test that sometimes caused a block while running `tests_suite'.
      Replaced nonexistent class `FtpParser' with `FtpProtocol'.
      Use the new LogManager interface in its dependent classes.
      Added more tests for the LogManager.
      Added missing `protocols_manager.h' to `include/protocol/Makefile.am'.
      Fixed a problem with reboots.
      Use the portable `endl' STL modifier to add new lines in the `log' method of the `LogManager'. Renamed the `LoggingLevel' elements to avoid name conflicts under Windows.
      Fixed a linking problem on x86_64. Thanks to Giuseppe.
      Use more specific names for elements of the LogManager related enumerations.
      Added the possibility to colorize console logging messages depending on their logging level.
      By default, don't colorize the console background.
      Simplified the `virtualhosts.xml' file syntax about the log management options.
      Don't add a LogStream to the LogManager if a bad filter list was provided.
      Don't make the XML parser cry with dirty stderr messages. Thanks to Giuseppe.
      Added the possibility to allow shared LogStream objects within the LogManager.
      Print timestamps within error logs.
      Allow objects to share log targets with themselves. Before this patch, it was not possible
      Cleaned LogManager tests.
      Set up console colors through the `myserver.xml' configuration file.

grainailleur (25):
      Bad argument check
      Support signed number
      *** empty log message ***
      Memory managment class (beta)
      Memory managment class (beta)
      Memory managment class (beta)
      External buffers support
      Fixes for linux
      Win98 sharing problem
      New conversion functions and a bug in SetBuffer fixed
      Comments added for doxygen
      Comments added for doxygen
      Replace function
      win compilation
      bug fixed
      some fixes
      some fixes
      no idea :)
      Fix some bugs...
      Fix some bugs...
      Fix an overflow (of 1 byte) in MYSERVER_socket::send (under Win32)
      STL string support
      STL string support
      STL support
      *** empty log message ***

gscrivano (235):
      Added GNU Free Documentation License note
      Added note about the GNU project
      Updated some old references
      Updated dev document references
      Changed some `MyServer\' references to `GNU MyServer\'
      Copyright changed from `The MyServer Team' to the `Free Software Foundation, Inc.'
      Plugins are now located in `plugins' not in `external'
      Updated plugins copyrights to `The Free Software Foundation Inc.'
      Check for other libraries
      Method refactoring
      Method simplified
      Refactoring on the Cgi class, buildCGIEnvironmentString moved in the Env class
      Fixed bug with broken pipes
      File processes.h renamed to process.h
      Method refactoring
      Cgi::send method refactoring
      Changed project web page
      Fixed problem with filters
      Updated TODO list
      Changed Copyright to `Free Software Foundation Inc.'
      Added continuations mechanism for scheduled connections
      Added elements to the TODO list
      Added support for XPath
      Use XPath to look for the specified error file
      Fixed segfault with xpath results
      Code refactoring.  Security class methods now require a valid XmlParser instance trought the SecurityCache proxy class
      Code refactoring.  Extracted SecurityManager::checkActions from SecurityManager::getPermissionMask
      Code refactoring for SecurityManager::getPermissionMask.  Now it uses XPath.
      Http::sendHTTPResource refactorized
      Static size buffers were replaced with std::string and some memory leaks were fixed
      Renamed `MyServer' to `GNU MyServer' in the HTTP Server header
      Code refactoring: removed some global definitions
      Code refactoring.  `HttpDir::getFormattedSize' was rewritten
      Added mailing list address
      The Development document was improved with new sections
      Added missing label
      Added new notes in the `Task lists' section
      Improved development document
      Fixed windows compiling issue
      Changed tasks management policy
      Fixed typo
      The TODO file is not used actively anymore.  Tasks are handled on the Savannah tasks manager
      Fixed problem.  Don't call getPath twice
      Fixed grammar mistakes in the development model document.  Thanks to Michael Ploujnikov
      Changed default web site homepage
      Separed source code files in packages.  Still not working perfectly.
      Fixed tests/Makefile.am and windows .dev project regenerated
      Removed .deps files
      Fixed windows compiling problems
      Now make dist adds include files
      use include_HEADERS instead of EXTRA_DIST for include files
      Files refactoring.  Some files were moved in a different position.
      Pruned empty directories
      Added missing Makefile.am
      Added missing Makefile.am
      Pruned unused directories
      Removed include/find_data from SUBDIRS
      Basic support for cygwin cross-compiling
      Updated source file path
      Use . instead of .o
      Updated NSIS installer script to install files generated by cygwin
      Removed global variable versionOfSoftware.  It closes the task #8586
      Define `MYSERVER_VERSION' in the config.h file
      Cross-compile on cygwin linking against the bison library
      Fixed problem with system files mapping
      Don't reload HTTP static errors message if they were already loaded
      LogManager objects are allocated dinamically
      Define MyServer version in the `version' file.
      Fixed some problems under windows.  Now all tests are completed successfully.
      Changed code to detect the config files location.  Need additional refactoring.
      Removed mutex.  HashMap::get is reentrant.
      Fixed right shift problem in HttpDir::formatBytes.
      Updated Dev-C++ project generation script
      Code refactoring.  Extracted new methods from Server::start.
      Libraries loading code isolated into Server::loadLibraries.
      Removed pragma directives from the source code.
      Read AC_INIT version from the file `version'.  Dirty hack.
      Added tests for `src/base/files_cache/*.cpp'
      Removed dependencies from the Server singleton instance.
      Added getHandle to the Stream class.  Now the same getHandle method signature is shared between Socket and File.
      Added basic tests for the ConnectionsScheduler class.
      Specify Emacs c++-mode for .h files.
      Fixed Emacs mode file comment.
      Removed not used version.h file.
      Refactoring.  Now `File', `Pipe' and `Socket' use close inherited by `Stream'.
      Fixed configure.in warning.  `GNU MyServer' moved away from `version'.
      Fixed make install problem.  Now by default `$root_prefix' is `$(DESTDIR)'.
      Include the `how_create_certificates.txt' file in the distribution.
      The `temporaryFileName' function was moved from the class `Server' to the class `FilesUtility'.
      Support `find' without the -iregex switch.
      All tests are successful on `FreeBSD'.
      Now the parser for the `/etc/passwd' file works well with multiline comments.
      Added tests for the `MemoryStream' class.  Now `MemoryStream::read' uses `memcpy'.
      Initial texinfo documentation files.
      Added new texinfo nodes.
      Move the index in a separate node and use the right texinfo tag for file names.
      The general description node was integrated on the front page, added the concept index and fixed the structure.
      Move old english documentation from trunk/myserver/ to trunk/documentation/.
      Updated file paths after commit `2836'.
      Keep header files hierarchy with `make install'.
      Define configuration files in myserver.cpp and not in the Server class.  It closes the task #8587.  Thanks to Daniele Cocca <daniele.cocca@gmail.com>.
      Use `RTLD_DEEPBIND' in the `dlopen' flags when it is available.
      Fixed a problem with reboots.  Some dependencies to the `Server' singleton instance were removed.
      Fixed segfault in the `TestConnectionsScheduler' test class.
      Fixed a problem with the `DELETE_CONNECTION' return status in `ClientsThread'.
      Don't use the connection after it is scheduled.
      Fixed some warning messages.
      Fixed documentation directory location.
      New security implementation merged to trunk from the `myserver_sec_new' branch.
      Don't use the `MYSERVER_HEADERS' configure time variable.
      Fixed test case.
      Don't hardly code `xml' as security validator and auth method.
      HTTP TRACE command allowed using the new security APIs.
      Fixed problem with the Server autoreboot feature.
      Added getters for `authMethodFactory' and `validatorFactory'.
      Removed unused file.
      Fixed Server signature environment variable value.
      Fixed problem with `PATH_INFO' and `PATH_TRANSLATED' environment variables.
      Fixed server signature.
      Use `TextOutputter' by default.
      Make Regex constructor inline.
      Initial security file documentation.
      Fixed link
      Removed wrong @end directives.
      Send the HTTP payload only with a SUCCESSFUL status code.
      Removed polling.  It can be optimized more.
      Code optimizations.
      Changed recursive algorithm with an iterative version.
      Added end-user documentation for the security validation phase.
      Refactoring for `Cgi::send()'.  Added `Pipe::waitForData()', some parts of code was changed to use it.
      Code refactoring: changed some names and added log messages for CGI timeouts.
      Don't use a temporary file to cache the FastCGI server reply but forward directly to the client.  Removed polling from `Socket::recv' when a timeout is specified.
      Check if `makeinfo' is present before build the documentation.  Thanks to Domenico Chierico <spaghetty@gmail.com>.
      Added `FilesUtility::resetTmpPath()' and used at `Server' initialization.  Some compiler warnings silented.
      Code refactoring: `File::read()' used instead of `File::readFromFile()', `buffer2' renamed to `secondaryBuffer'.
      Added possibility to choose which columns show when a directory is browsed.
      Changed code to find `PATH_INFO'.
      Removed `HttpHeaderChecker' class.  It is obsoleted by the new security functionalities.
      Fixed problem introduced by the last commit.
      Changed structure for the MIME types configuration file.  This commit breaks the GUI control application support for MIME types.
      The control GUI application is moved to misc/.
      Refactoring for the `MimeManager' class.
      Added tests for the `MimeManager' class and updated documentation.
      Fixed typo.
      Added possibility to register a handler on a specific URI.  It misses documentation.
      Cleaned HTTP managers interface, (EXECUTE|RUN)METHOD simplified to METHOD and an additional attribute in the MIME definition.
      Removed binary file.
      Restored basic HTTP error messages.
      Reduced `HttpHeaders::buildHTTPRequestHeaderStruct' complexity extracting new methods.
      Reduced `Http::sendHTTPResource' function complexity.
      Added support for regex in the security file CONDITION.
      Code refactoring: added `File::fastCopyToSocket()' function.
      Changed Server header field in default response messages.
      Added the possibility to specify the MIME type using a regular expression on the file name.
      Fixed problem with internal redirect to error pages.
      Updated MIME types.
      GNU TLS preferred over OpenSSL.
      NSIS script copies all .dll files in the binaries directory.
      Fixed Windows build problems.
      Fixed file descriptors leak.  Don't re-initialize libevent if it was already.
      Code refactoring: extracted some new methods and `Process::execAndWait ()' became a wrapper of `Process::exec ()'.
      Fixed hang under x86_64.
      Better implementation for previous patch in r2943.
      Code refactoring for the `Process' class. The `Process::exec()' function doesn't support a timeout anymore, it wouldn't work with the `waitpid' syscall without dirty hacks.
      Fixed linker problem under x86_64.
      Added class `ForkServer'. it is used in `ProcessServerManager' to spawn new processes.
      Removed debugging message to stdout from a test.
      Updated virtual hosts documentation.
      Use a pipe to synchronize between fork server processes.  Specify the `int' length with fork server sockets operations.
      Possibility to define an output file for the tests suite results.
      Fixed problem under x86_64.
      Silent exception in `ForkServer::forkServerLoop'.
      Basic control protocol elisp implementation.
      Updated documentation license to GNU FDL 1.3 and other minor changes.
      Sudoku example moved to misc/.
      Added note about configuration files.
      Possibility to define a different gid/uid for spawned processes.
      `File::setFilePointer' renamed to `File::seek'.
      Use `SecurityToken::getHashedData'.
      Fixed messages.
      `startupSocketLib' moved inside `Socket'.
      Documentation for the `PROCESS_SERVER' directive.
      Fixed segfault in the tests suite.
      Added new `SocketPair' class.
      `ConnectionsScheduler' uses `SocketPair'.
      SocketPair can now transmit file descriptors.
      Now the ForkServer uses a SocketPair to communicate with the main process.
      Added possibility to specify a list of descriptors to close after the fork.
      When available use the ForkServer to execute CGI scripts.
      Support other control protocol commands.
      Fixed test failure.  Don't dup stderr file to the stdout descriptor.
      Allow possibiity to define values on a MIME type.
      Added possibility to define a different uid/gid for every CGI process.
      Added examples to the documentation.
      Added possibility to use different uid/gid for spawned server processes.
      Fixed problems when executed as a daemon.
      Fixed some doxygen tags that were causing warnings.
      Added documentation for the `LOCATION' element.
      Don't check twice if `manager' is NULL.
      Improved MIME types documentation.  `SEND' is used to specify static files.
      Added external dependencies list to the INSTALL file.
      Refactoring for the socket assignment operator.
      Added note in the manual about GNU TLS to create new certificates.
      Removed unused #define's
      Added new contents to the user manual
      Fixed compiling problem with older versions of gcc.
      Removed duplicated files and cleaned standard files.
      Fixed problems for MSCGI examples.
      Added directory listing and error pages documentation.
      Changed the format for definitions inside the `myserver.xml' file.
      Changed names for default configuration files.
      Possibility to disable a specific HTTP command.
      Added endianness test for big-endian architectures.
      Return non-zero if the file was not opened correctly.  Patch provided by Ivailo Ilionov <ivailo.ilionov@gmail.com>.
      Fixed a segfault when the server checks if a HTTP command is allowed in the current context.
      Added documentation about temporary files location.
      Default virtual hosts use local directories.
      Return -1 on `Socket::bind ()' error.  Patch provided by Ivaylo Ilionov.
      Use `ioctlsocket' to set non blocking operations only under Windows.
      Don't use blocking sockets in the connections scheduler.
      By default don't delete shared buffers.
      Use the found YACC and LEX programs to generate the FTP parser.
      Use the complete file path to a HTTP manager.
      `Socket::write' returns -1 on errors as `Socket::read' already does.  Patch provided by Ivaylo Ilionov.
      Don't use blocking sockets for protocols that don't wait for client data to begin the handshake.
      Under Windows `Socket::recv' keeps the same behaviour that it has under POSIX with non blocking sockets.
      Don't use uninitialised memory.
      Provide the right size to `Socket::accept'.
      The `NOT_WIN' macro is not used anymore.
      Code refactoring: the `base64Utils' global instance was removed and some methods were renamed.
      Added documentation about connections timeout.
      Copy the right default configuration files when they are missing.
      Fixed Windows compiling issues.
      Use the `Host' value used by the client for the `Via' header. Keep old `Via' values that may be present in the header.
      Fixed different bugs and added some optimizations.

harnas83 (5):
      Test for GZIP functionality.
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@2699 c4c922ea-a70d-0410-937d-ec1daf91936c
      Implemented Treeview widget with default file names, and also Add and Remove buttons.
      Another treeview, and select file dilogs.
      Updated MIME types tab

ignacy (12):
      python MIME types parsing
      Added MIME types in tree view
      Finishing MIME types selection. Design updates
      Added tabs on Host window
      Added Host/Protocol tab
      Refactoring methods creating widgets
      Moved things a bit
      Begining settings serialization
      Config serialization functionality
      Saving settings works. Need to add defult vlues
      Added default values and confirmation message
      Added XML def. and MyServer tag to output config

kgrubb (27):
      I have added the completed English Documents.  There is more to be as is obvious in the Table of Contents
      I have updated the Table of Contents to reflect HTTP.
      I have added the compiled help file as well as some new documents
      The help files are in the documentation folder
      The mime types files have been updated
      XML documents have been added in Spanish and Brazilian portuguese
      *** empty log message ***
      *** empty log message ***
      I am updating the documentation to reflect a new format.
      I am updating the documentation to reflect a new format.
      This document has corrected links
      CVS repository document.
      This document has corrected links
      This document has corrected links
      This document has corrected links
      This document has corrected links
      This document has corrected links
      This document has corrected links
      This document has corrected links
      The updated documents reflect corrected links, css and changes to the program.
      Updated documents and new documents
      New Frame Enabled Documents
      New Frame Enabled Documents
      Dead Links Removed from Table of Contents
      Corrected a link
      Browse folder page
      Updated links and Implementation of .css files

lesinfox (6):
      French documentation updated
      French documentation updated
      French documentation updated
      French documentation updated
      French documentation updated
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@2390 c4c922ea-a70d-0410-937d-ec1daf91936c

rnbastos (49):
      Added type="combined" option for accesslog
      no message
      no message
      Linux > GNU/Linux
      FastCGI + WinCGI (review pending)
      *Nix...
      fixes to FastCGI & WinCGI
      performace, basic server config & a fix in the css file...
      fixes to performance & basicServer
      menu updated
      typo fixed
      no message
      typo fixed
      no message
      no message
      cgi accepts any script language that pipes output...
      no message
      no message
      no message
      'regex' added
      new module "Documentation" added
      no message
      no message
      no message
      no message
      no message
      data throling addded
      no message
      no message
      MyServer Dosc 0.8.1
      MyServer 0.8.1 docs - new directory structure for English docs
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@1911 c4c922ea-a70d-0410-937d-ec1daf91936c
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@1912 c4c922ea-a70d-0410-937d-ec1daf91936c
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@1916 c4c922ea-a70d-0410-937d-ec1daf91936c
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@1917 c4c922ea-a70d-0410-937d-ec1daf91936c
      Update sent by the translator to me, today.
      fixing some stuff.. for the file I had just created offline,and when I come here,it already exists... ah, well.. ok... updating...
      SVN for portuguese docs :)
      minor fixes in the docs
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@1924 c4c922ea-a70d-0410-937d-ec1daf91936c
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@1925 c4c922ea-a70d-0410-937d-ec1daf91936c
      SVN docs for Spanish
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@1953 c4c922ea-a70d-0410-937d-ec1daf91936c
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@1954 c4c922ea-a70d-0410-937d-ec1daf91936c
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@1999 c4c922ea-a70d-0410-937d-ec1daf91936c
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@2000 c4c922ea-a70d-0410-937d-ec1daf91936c
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@2001 c4c922ea-a70d-0410-937d-ec1daf91936c
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@2002 c4c922ea-a70d-0410-937d-ec1daf91936c
      fixing brazilian docs

rocky_10_balboa (1972):
      *** empty log message ***
      *** empty log message ***
      *** empty log message ***
      *** empty log message ***
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      no message
      VC.NET compilation errors fixed
      VC.NET compilation errors fixed
      no message
      no message
      no message
      no message
      Support infinite default files list
      vhosts initial coding
      virtual hosts coding
      no message
      no message
      virtual hosts support
      virtual hosts support
      can set the number of threads
      can set the number of threads
      possibility to save virtual hosts configuration file
      various errors fixed
      ISAPI support modifications
      service loaded automatically
      service loaded automatically
      start to code WinCGI support
      WinCGI support
      WinCGI support
      various warnings fixes
      various warnings fixes
      various warnings fixes
      segfault fixed
      Dev-C++ errors fixed
      error with a big number of threads fixed
      problem with ISAPI and CTRL+C fixed
      problem with ISAPI and CTRL+C fixed
      HTTP header security bug fixed
      If-Modified-Since HTTP capability
      If-Modified-Since HTTP capability
      Some source code lines removed
      License changed to GPL
      CGI code modifications
      MSCGI lib new features
      MSCGI lib new features
      File and socket managers Objects Oriented
      File and socket managers Objects Oriented
      Initial FastCGI code
      Uses libxml2
      FastCGI coding
      FastCGI coding
      FastCGI coding
      HTTP more secure
      FastCGI coding
      FastCGI coding
      FastCGI coding
      FastCGI support
      HTTP Modified-Since error fixed
      GUI improvements
      Can load and save MIME types to xml
      Fixed problem with FastCGI
      Fixed problem with FastCGI
      Fixed problem with FastCGI
      FastCGI coding
      FastCGI coding
      Version number
      final debug
      Solved error with POSTs
      Solved FastCGI error under linux
      Solved FastCGI error under linux
      Minor bugs fixed
      Minor bugs fixed
      Directory traversing bug fixed
      Control Center error under linux fixed
      Various bugs fixed
      Various bugs fixed
      Possibility to run self FastCGI servers and ISAPI modules
      MSCGI bug fixed
      MSCGI bug fixed
      MSCGI bug fixed
      Control Center Application port to Dev-C++
      MSCGI port to Dev-C++
      MSCGI port to Dev-C++
      Problem with italian language fixed
      Changed absolute path to relative path for documentation files
      Added some comment lines
      Added some comment lines
      Virtual hosts configuration file uses xml
      Perl fastCGI
      Perl fastCGI
      Control of protocol used by the CGI
      Languages files mods
      Languages files mods
      HTTP POST problem solved
      Comment lines added
      Comment lines added
      Comment lines added
      Configure virtual hosts via GUI
      Configure virtual hosts via GUI
      Configure virtual hosts via GUI
      Configure virtual hosts via GUI
      PHP problems fixing
      PHP problems fixing
      PHP problems fixing
      PHP problems fixing
      WinCGI problem fixed
      Permissions engine
      Permissions engine
      Default security settings
      Default security settings
      DoS problem with /lpt1 fixed
      HTTP DELETE capability
      HTTP PUT capability
      Problem with FastCGI fixed
      Problem with FastCGI fixed
      Problem with FastCGI fixed
      Problem with FastCGI fixed
      Memory leaks fixing
      Logs file problems fixed
      Logs file problems fixed
      Logs file problems fixed
      Browse folder problem fixed
      Security bug fixed
      Security bug fixed
      Fixed security bug
      Fixed security bug
      Fixed MSCGI bug
      Fixed MSCGI bug
      Fixed MSCGI bug
      Various problems fixed
      Various problems fixed
      Fixed problem with MSCGI
      Fixed problem with log files
      Fixed problem with log files
      FastCGI server accept only LOOPBACK
      FastCGI server accept only LOOPBACK
      Control Center Application compilation problem fixed
      Security bug fixing
      Chm file not used
      Use path info as CGI command line
      Use path info as CGI command line
      Threads problem solved
      Threads problem solved
      Documentation improving
      Fixed remote DoS vulnerability
      Fixed remote MSCGI DoS vulnerability
      Documentation files use .css
      Better look of GUI under linux
      Changed version number
      Post 0.5 version mods
      Coding possibilty to use per site error pages
      Coded possibilty to use per site error pages
      Coded possibilty to use per site error pages
      base64 bug solved
      base64 bug solved
      base64 bug solved
      IP string len
      MD5 routines
      Possibility to get user password from security file
      Possibility to get user password from security file
      Coding HTTP chunked transfer
      Socket recv with timeout
      Fixed problem in MSCGI
      Read chunked coded
      Read chunked coded
      Read chunked coded
      Coding New performance model
      Coding New performance model
      Coding New performance model
      Coding New performance model
      Coding New performance model
      Coding New performance model
      Bad Server field response bug fixed
      Bad Server field response bug fixed
      Bug requesting files with spaces fixed
      Bug requesting files with spaces fixed
      Bug requesting files with spaces fixed
      Bug requesting files with spaces fixed
      Bug requesting files with spaces fixed
      Bug requesting files with spaces fixed
      Bug requesting files with spaces fixed
      Bug requesting files with spaces fixed
      Solved bug with HTTP redirect when a port is specified
      Solved DoS
      Solved DoS
      Solved some possibily vulnerabilities
      Start to code SSL support
      Start to code SSL support
      Start to code SSL support
      Start to code SSL support
      Start to code SSL support
      Start to code SSL support
      Start to code SSL support
      Start to code SSL support
      Start to code SSL support
      Start to code SSL support
      Start to code SSL support
      Start to code SSL support
      Start to code SSL support
      Start to code SSL support
      Start to code SSL support
      Start to code SSL support
      Start to code SSL support
      OpenSSL library used dynamically
      OpenSSL library used dynamically
      OpenSSL library used dynamically
      OpenSSL library used dynamically
      OpenSSL library used dynamically
      OpenSSL library used dynamically
      OpenSSL library used dynamically
      OpenSSL library used dynamically
      OpenSSL library used dynamically
      OpenSSL library used dynamically
      OpenSSL library used dynamically
      OpenSSL library used dynamically
      OpenSSL library used dynamically
      OpenSSL library used dynamically
      OpenSSL library used dynamically
      OpenSSL library used dynamically
      OpenSSL library used dynamically
      OpenSSL library used dynamically
      OpenSSL library used dynamically
      OpenSSL library used dynamically
      Modified permission engine
      Modified permission engine
      Changed version number
      changed version number
      Dynamic libraries
      Solved problem with closed connections
      Solved problem with linker
      Documentation modified
      December string problem fixed
      Added chunked definition
      Added chunked definition
      ISAPI supports chunked transfer encoding
      Solved problem with chunked transfer encoding
      Solved problem with chunked transfer encoding
      Solved problem with chunked transfer encoding
      Solved bug with MIME types and control center application
      Starting to code Common Log Format
      Starting to code Common Log Format
      Fixed problem with inconsistent logs
      Solced problem with log files size
      Used more efficient source code for the log files
      Reduced number of warnings
      Solved bug with twice used MIME extension
      Solved bug with POST multipart/form-data encode type
      Solved bug with POST multipart/form-data encode type
      First doxygen project
      First doxygen project
      Corrected problem in documentation
      Corrected problem in documentation
      Added some comments
      Modified the sample web files
      Corrected a comment error
      NSIS script doesn't remove web and xml files
      Italian translation for the MSCGI messages
      Corrected english.xml file
      Fixed Math example JavaScript problem
      Corrected brazilian translation
      Changed setContent_Type to setContentType
      Added getCgiData()
      Added some comments
      Added some comments
      Added some comments
      CWD for MSCGI plugins configured to be the path where the MSCGI file is
      Added some comments
      Added some comments
      Counter Dev-C++ output folder set to cgi-bin
      Added some comments
      If configuration files don't exist, default ones are copied
      Added make dist
      First gzip support implementation
      Fixed(not sure at 100%) problem with GZIP
      GZIP problems fixed
      Possibility to define GZIP_THRESHOLD
      GZIP code a bit less dirty
      Added reboot console routine
      Modified linux start documentation
      Updated some documentation images
      Italian documentation
      Possibility to define max connections number
      OO HTTP protocol
      HTTP code more OO
      HTTP code more OO
      HTTP code more OO
      OO HTTP protocol
      HTTP class derived from protocol one
      OO protocols
      OO HTTP protocol
      OO protocols
      OO protocols
      OO protocols
      HTTPS uses a different class
      HTTPS uses a different class
      First dynamic protocols lines
      Dynamic protocols engine
      Dynamic protocols engine
      HTTP pipelining
      Fixed problem with ECHO sample
      Solved some windows problems
      Added toRemove capability
      Changed Linux to GNU/Linux
      Forced shutdown
      Created some new files
      mutex code wrapped in existent routines
      Mutex code for windows
      fixed shutdown problem
      mutex OO
      updated
      mutex OO
      handled some possibly memory allocation problems
      control compilable
      Modified some GNU files
      Solved problem with lynx browser
      Fixed a possible problem with mutex
      Fixed some mutex problems
      Optimized some mutex code
      Optimized some mutex code
      Solved some windows problems
      Fixed some bugs with threads and GMT date
      Added MSVC samples projects
      Fixed some windows compilation problems
      Solved some mscgi problems
      Fixed some problems
      Fixed a file handle problem with HEAD
      Fixed a problem with connections
      Solved a problem with ticks count under linux
      Added SSL capability to dynamic protocols
      Fixed some problems
      Fixed some problems
      Fixed some SMP problems
      Fixed a bug in http browsing time stamp
      Added some files
      Added some files
      Added clean_copy
      Added clean_copy
      Added some files
      Added some files
      Fixed a problem with POST data
      Fixed some problems in compiling without SSL
      Fixed an overflow with math_sum sample
      Solved some problems with math_sum sample
      config.sub
      config.h.in
      Fixed definitions.def
      Fixed a buffer overflow
      First Digest authorization scheme implementation
      Fixed some problems with HTTP Digest
      Fixed a problem in GNU/Hurd compilation
      threads routines class
      Fixed some compilation problems
      Fixed a compilation problem
      Changed Copyright info
      FIxed a lynx incompatibility
      FIxed a lynx incompatibility
      Fixed some windows compilation problems
      Added securestr.h
      fixed linux problems
      fixed linux problems
      fixed linux problems
      fixed project files
      Fixed a warning
      Fixed a warning
      fixed some compilation issues
      Fixed some compilation problems
      Added support for reboot
      Added support for reboot
      Fixed a problem with reboot
      added GPL license to lfind
      fixed a problem with HTTP logs
      Fixed a problem with logs
      Fixed a problem with logs
      Fixed a problem with logs
      Fixed a problem with XML
      Fixed the Ctrl+C problem under windows
      First HTTP append output support(unstable)
      Fixed a bug in the CGI code
      Fixed a problem in MSCGI
      Fixed a problem in MSCGI
      Added HTTP Combined Log Format
      Fixed some possibly overflows vulnerabilities
      Fixed some windows compilation issues
      Added some lines in the Italian docs
      Fixed a bug in ISAPI logs
      First MemBuf class use implementation
      Fixed some problems
      Fixed some bugs
      Fixed some bugs
      Fixed a problem with HTTP/1.0 redirection
      Fixed a bug with logs
      Fixed some ISAPI problems
      Updated GPL
      Added autoreboot on config files change
      Added more errors control
      Fixed some compilation problems on FreeBSD
      Fixed a WinCGI compilation error
      Fixed some bugs
      Fixed some bugs
      Fixed a problem with HTTP Digest and IE
      Fixed problems with MSCGI
      Fixed some bugs
      changed some checks
      HTTP TRACE and OPTIONS support
      Fixed a problem in building Digest request
      Italian docs changed
      Fixed a bug in returning multiple headers in MSCGI errors
      Fixed some compilation problems under linux
      Fixed some things in docs files
      Added some files to Italian docs
      Changed some variables names
      Changed some variables names
      Changed some variables names
      Added more errors checks
      build cgi environment string uses new memory management class
      Changed some variables names
      Fixed some issues
      Updated few things
      Fixed a problem in the HTTP header parser
      Fixed some warnings
      Fixed some strange things in ISAPI
      Fixed OpenSSL libraries name
      Fixed a serious bug in HTTP headers handling
      Changed some code comments
      Changed some code comments
      Changed some code comments
      Fixed some warnings with g++ 3.3.4
      Changed some code comments
      Fixed a warning
      Fixed a bug in WinCGI
      Fixed clean_copy script
      Fixed a problem with long Accept requests
      Changed version #
      Changed version #
      Fixed some compilation problems under windows
      Fixed a problem
      Fixed a problem with sockets under GNU/Hurd
      Fixed a Segmentation fault with some requests
      Fixed a recursion level problem
      Fixed a recursion level problem
      Fixed an incompatibility with links
      Fixed a problem opening inexistent .xml
      Updated some docs files
      Modified some grammar things
      Fixed a problem with SMP machines
      Fixed a problem with SMP machines
      Changed version numbers
      First FHS implementation
      First FHS implementation#2
      Added default xml to run as system application under *nix
      Added default xml to run as system application under *nix
      First FHS implementation#2
      Implemented GNU argp parser on *nix
      cserver::initialize returns int
      Added error message on bad language file name
      Fixed a dubious problem with win32 and CPU usage
      FHS modifications
      Changed some comments
      First rx implementation
      First rx implementation
      First rx implementation
      First myserver_regex class implementation
      Added regex files to automake
      librx for windows
      Fixed some compilation errors under linux
      virtual hosts IP can use regex
      hostname can use regex
      Fixed a DoS
      Added new line
      WIN32 librx code uses ctype.h now
      Solved a control GUI linker problem
      Solved a control GUI linker problem
      Fixed some comments
      Solved a 100% CPU usage under windows
      Removed some files
      Changed windows version number
      Changed version number
      Changed version number
      Added librx to doxygen project
      Fixed some myserver_strlcpy calls
      tmp objects in source
      Fixed a compilation issue
      CGI doesn't use MAX_PATH. Still experimental!
      Added lastError in the HTTP context
      Adding support for long file names
      Long file names for getcwd
      Adding support for long file names
      Adding support for long file names
      Fixed windows compilation problem
      file class new costructor added
      Adding support for long file names
      Fixed a segfault, still experimental code!!
      Fixed a segfault, still experimental code!!
      Fixed a memory leak
      Fixed some compilation issues
      Fixed some return values
      cXMLParser::getValue() returns NULL when a value is not found
      Removed USE_LOGON_OPTIONS
      Fixed a problem under BSD
      Fixed some problems
      Solved some problems
      Fixed a memory leak
      Fixed some problems
      Solved some problems
      Solved some problems
      Solved some problems
      Fixed windows compilation problem
      Fixed windows compilation problem
      Fixed a bug under windows
      Long file names for configuration files
      Fixed a grammar error
      Fixed a problem with HTTPS and POST
      Use .png instead of .gif
      Use .png instead of .gif
      Use .png instead of .gif
      Fixed a problem with HTTPS and POST
      Fixed a problem with HTTPS and POST
      Return HTTP errors on some memory allocations
      Fixed several problems under windows
      Fixed windows compilation problem
      Fixed windows compilation problem
      Added Service registration routines under WIN32
      *** empty log message ***
      Removed old txt conf files
      *** empty log message ***
      *** empty log message ***
      *** empty log message ***
      Added some errors check
      Added some errors check
      *** empty log message ***
      Fixed some return values check
      Changed few lines
      Changed few lines
      SSL support added to the connect function
      Added some errors checks
      First CONTROL protocol implementation
      Fixed some problems with HTTP
      Added support for HEAD in dynamic pages
      Fixed a problem with wget
      Fixed a problem with wget
      Fixed a memory leak
      Fixed a memory leak
      SSL in the control protocol will be enabled after the implementation phase
      CONNECTION is now a C++ class(need a better implementation)
      Fixed a compilation problem
      Fixed a problem with CONNECTION class
      Added findConnectionByID
      Added KILLCONNECTION in control_protocol
      Changed a comment
      Solved a vulnerability
      Object oriented interface for CONNECTION
      control protocol supports incomplete headers
      control protocol supports incomplete headers
      Fixed a parsing error
      Changed some EOF lines
      control_protocol supports reboot
      protocol auth is now MD5(MD5(name):MD5(password))
      AUTH login:password
      Control protocol supports GETFILE and PUTFILE
      Fixed a problem with REBOOT
      Fixed a possible segfault
      Dev-C++ files updated
      SHOWDYNAMICPROTOCOLS support in the control protocol
      SHOWLANGUAGEFILES command for the control protocol
      Default site updated
      Fixed a possible segfault
      connection_buffer is a class now
      Removed sample external protocol.
      Fixed a segfault
      Solved a problem with Hurd
      Changed directory browsing
      *** empty log message ***
      Added VERSION command to control
      Fixed a problem in the parser
      Fixed some problems with the remote control protocol
      ENABLEREBOOT and DISABLEREBOOT commands added
      Fixed a problem with autoreboot
      Fixed a problem in HTTP logging
      Added logging capability to the control protocol
      Fixed a superflous control
      Fixed a problem with CTRL-C
      the control protocol uses SSL
      the control protocol reports errors on the log file
      Added italian translation
      Fixed a problem in the .xml
      doesn't load with bad SSL keys specified
      Verbosity level check for control
      *** empty log message ***
      Version updated
      Updated files for windows
      Updated files for windows
      Updated files for windows
      *** empty log message ***
      Added spanish translation
      fixed some stuff with utf-8
      added iconv.dll
      Fixed a problem with SERVER_SOFTWARE string
      Fixed a problem in log files
      Forked process uses a timeout
      Forked process is interrupted on timeout
      Changed some functions names and logged some errors
      Fixed a problem in CGI self running processes
      Fixed problem with CGI
      Fixed a memory leak
      Fixed a memory leak
      Added a comment
      Added a comment
      Updated for windows
      Updated for windows
      Uses zlib as a DLL under windows
      Fixed a problem with directory listing
      Error message hardly-coded
      Error message hardly-coded
      Add colours error messages under linux
      Fixed string routine
      Fixed some comments
      Fixed some comments
      Removed english files
      Documentation uses a new module
      Fixed a problem with HTTP redirections from CGI scripts
      Updated for windows
      Compressed files
      Fixed some comments
      Fixed documentation link
      Fixed a line in docs
      Fixed installer
      Initial interface for adding more threads while myserver is running
      Initial interface for adding more threads while myserver is running
      Initial interface for adding more threads while myserver is running
      Fields name for threads handling in .xml changed
      *** empty log message ***
      Initial interface for adding more threads while myserver is running
      New threads model first implementation
      Added the log manager class
      Added a routine to the log class
      Fixed a bug with long returning data CGI
      Code uses the log class
      Added a timestamp to logs different from console
      Fixed a bug with long returning data CGI
      Fixed a problem with CGI
      possibility to define a MIME file for vhost
      Fixed a problem with MIME types file
      UNIX daemon support
      Fixed a compilation problem with ISAPI
      Save PID to file
      Daemon problem fixed
      Fixed a log locking problem
      Ported some constants to be configurable
      Fixed a problem with fastCGI
      Fixed a bug
      Fixed windows problems
      Fixed a compilation problem
      Fixed a segfault
      Fixed some bugs
      KILL processes insted of TERMinating them
      FastCGI uses the CGI timeout
      Fixed a security problem
      Code cleaner
      Fixed a windows problem in sending big files
      Removed some clone files
      First security cache implementation
      Added getErrorFileName to the cache class
      Cleaned some code
      Cleaned some code
      Removed some "static"
      Fixed a problem in detecting IPs
      Changed some variables names
      Removed an unused variable
      Fixed a problem with the Host field
      Cleaned some variables
      Fixed some messages
      Fixed some messages
      Removed windows libraries files
      Updated windows files
      *** empty log message ***
      Fixed a memory leak
      Cleaner interface for HTTP dynamic data
      Fixed dev-c++ compilation
      Fixed a comment
      *** empty log message ***
      *** empty log message ***
      Warnings shutup
      Warnings shutup
      Fixed a compilation problem
      Some code was cleaned
      Some code was cleaned
      Warnings shutup
      progress.h divided in progress.h & progress.cpp
      Windows updated
      Warnings shutup
      Cleaner interface for HTTP dynamic data
      Updated italian files
      Fixed a problem with CGI process execution
      Improved HTTP range capability
      Fixed some bugs with HTTP ranges
      Do not use gzip with ranges
      Fixed compilation problem
      Fixed compilation problem
      Fixed mac os compilation problem
      Send a bad request with some HTTP ranges
      Fixed some compilation problems
      Added new classes
      Windows updated
      Added timeout configuration
      Check for routines return code
      Fixed a problem with incomplete HTTP headers
      Fixed a problem with incoming chunks
      Fixed italian message
      Windows updated
      Fixed a problem with ISAPI
      Fixed a warning message
      Use lfind.cpp under windows too
      Windows updated
      Fixed comment
      Added comment
      Changed variable name
      socklen_t test in configure.in
      Changed name for some macros
      Fixed a comment
      Fixed problem with HTTP ranges
      Fixed problem with self modules
      Fixed some code
      now ClientsTHREAD is ClientsThread
      now ClientsTHREAD is ClientsThread
      Now CONNECTION is Connection
      Now gzip is Gzip
      Now gzip is Gzip
      Changed some classes names
      Changed structure name
      Changed some classes names
      Changed structure name
      Changed structure name
      Changed structure name
      Windows updated
      Fixed a compilation problem
      Fixed a problem with log files
      MYSERVER_FILE is File
      Changed some classes names
      Changed some classes names
      Changed class name
      Changed class name
      Returns a non valid header error with spaces in URI requests
      Returns a non valid header error with spaces in URI requests
      Changed some methods names
      Changed some methods names
      Fixed a problem with HTTP 100 status code
      Fixed MD5 problems under 64 bits architecture
      Fixed a problem with listing
      Removed old file
      Removed unused file
      Updated doxygen
      Md5 object oriented
      Md5 object oriented
      Fixed doc
      Now GetBuffer returns char*
      START_PROC_INFO is now StartProcInfo
      Error pages send right code
      Error pages send right code
      Error pages send right code
      Fixed a problem with logging
      Added a comment
      Support for 505 error message
      File class global consts
      Windows updated
      Added error control
      Removed rx from doxygen
      Fixed a problem with ecurity files
      security_cache reloads file if modified
      Windows updated
      Fixed a bug with the response Connection field
      HTTP parsing now uses getEndLine when possible
      Fixed a comment
      Fixed a comment
      getConnectionToParse is getConnection
      Added some inline comments
      Added a comment
      Fixed a problem with security cache
      Check for return value
      Changed the header comment
      Removed some unused functoins
      Security functions are now a class
      Fixed a problem with secure strcpy
      Changed behaviour of default error files
      Changed behaviour for error files
      mime_record is MimeRecord
      Changed order of functions definition
      Added some comments line
      Removed unuseful variable
      Throttling interface for Socket class
      Throttling interface for Socket class
      Implemented SecurityToken
      Fixed bug that closes valid connections
      Ported everything in a SecurityToken structure
      Added some inline comments
      Throttling rate support
      Cleaned some code
      Cleaned some code
      Cleaned some code
      removed some strcpy
      fixed a compilation problem
      Fixed a problem
      Fixed paragraph title
      Fixed some words
      Fixed some words
      Updated italian docs
      Security parsing faster
      Changed a comment
      Ported some strncpy to myserver_strlcpy
      Fixed a comment
      Fixed a comment
      Fixed a comment
      Removed unused commented old function
      Fixed a line in the doc
      Added forgotten slashes
      Compile with gcc-4.0
      Removed a line
      Inverted line
      Removed manager limitation from GUI
      DynamicLibrary class added
      Added error message
      Changed a comment
      STL initial porting
      STL initial porting
      STL initial porting
      STL initial porting
      STL initial porting
      Windows updated
      Fixed a problem with URI parsing
      STL porting
      STL porting
      Added some const modifiers
      STL porting
      STL porting
      STL porting
      STL porting
      STL porting
      STL porting
      Fixed comment
      Fixed comment
      Log class supports string
      Log class supports string
      STL porting
      Fixed a problem with URI options parsing
      Added some comments
      Added some comments
      Porting code to STL
      Porting code to STL
      Porting code to STL
      STL porting
      Fixed overflow
      STL porting
      STL porting
      Fixed problem under windows
      Fixed problem under windows
      Fixed problem under windows
      Fixed problem under windows
      Fixed problem under windows
      Fixed problem under windows
      Fixed problem under windows
      Fixed problem under windows
      Windows updated
      Fixed a problem with MIME loading
      STL porting
      Fixed a problem with unitialized variable
      Inverted some lines
      Fixed some problems
      Updated script
      Silenced some warnings
      Changed system mapping
      Removed some files
      Changed some positions
      Updated file
      Scripts updated
      Fixed error
      Updated for codes
      Fixed system mapping
      Interface for external virtual hosts source
      Fixed comment
      moved declaration
      Fixed serious problem with linked list
      Fixed serious problem with linked list
      Fixed serious problem with linked list
      Fixed problem with created processes
      Fixed CGI env
      Fixed access to dummy memory
      Fixed problem with double slashes
      NSIS new version
      STL porting
      Fixed problem with sys subdirectories
      STL porting
      Possibility to define initial FastCGI servers port
      do not clear boot screen
      do not clear boot screen
      Keep external directory
      New interface for loading HTTP data handlers
      New interface for loading HTTP data handlers
      STL porting
      Faster shutdown
      STL porting
      STL porting
      STL porting
      STL porting
      STL porting
      STL porting
      STL porting
      Windows updated
      Updated Makefile.am
      Faster loop
      Fixed problem with FastCGI
      Process class
      Process class
      Process class
      wait included in the Thread class
      Modified a comment
      Changed some messages
      setuid & setgid support
      Added isProcessAlive routine
      STL porting
      FastCGI servers autoreboot
      Added possibility to deny MIME file for vhost
      Fixed problem with mutex
      Added some messages
      STL porting
      Changed message
      STL porting
      STL porting
      Fixed problem with setuid/setgid
      Changed output message
      setuid/setgid
      STL porting
      STL porting
      STL porting
      STL porting
      STL porting
      STL porting
      STL porting
      STL porting
      STL porting
      STL porting
      STL porting
      STL porting
      Fixed problem with big chunks of data
      STL porting
      Fixed problem with big chunks of data
      Fixed problem with 505 HTTP code
      Returns 414 for long URIs
      Fixed error
      Changed return codes
      Changed comment
      STL porting
      Added comment
      STL porting
      STL porting
      Fixed problem with self scripts
      STL porting
      Logs cycler
      cycle log files
      Windows updated
      Fixed lines
      GZIP cycled logs
      GZIP cycled logs
      GZIP cycled logs
      Uses DynamicLibrary class
      Uses DynamicLibrary class
      STL porting
      STL porting
      STL porting
      Exceptions checking
      Exceptions checking
      Windows updated
      Windows updated
      Windows updated
      Windows updated
      New windows icon
      Fixed log cycler under windows
      STL porting
      Fixed problem with waitpid
      Different version of  Process::isProcessAlive for UNIX
      Changed flag name
      Fixe problem with zombie processes
      Fixed cast
      Use cout instead of printf
      STL porting
      STL porting
      STL porting
      Changed some formattation
      Updated image
      STL porting
      Updated docs
      Changed formattation
      deleteConnection uses mutex in the function body
      STL porting
      Fixed Server::clearAllConnections
      Documentation updated
      STL porting
      Fixed segfault
      Fixed problem with Basic auth & Opera
      Fixed some problems with HTTP headers
      Fixed problem with cookies
      Updated images
      Updated documentation files
      Change Linux to GNU/Linux
      Removed file
      Return 500 error on security parsing errors
      Return 500 error on security parsing errors
      Fixed problem with cycling
      Common log format timestamp
      Common log format timestamp
      Common log format timestamp
      Common log format timestamp
      Fixed windows problem
      Fixed errors with logging
      Updated default file
      Updated default file
      Updated default file
      Documentation layout changed
      Typo
      Fixed formattation
      Added contents
      Documentation layout changed
      Fixed problem with languages directory name
      process launcher supports args on UNIX-like systems
      Added check
      Formatted line
      Fixed a problem when freeing memory
      Fixed formattation
      Print a warning if multiple hosts use the same log file
      fixed a compilation problem
      Fixed indentation
      Catch exceptions
      Changed return value
      Warnings shutdown
      Warnings shutdown
      Changed variable name
      Added compilation date
      Updated patch for new fluid
      Updated GUI files
      Added references counter for virtual hosts
      Mutex on virtual hosts
      Mutex on virtual hosts
      Warning shutup
      Fixed formattation
      Changed \r\n to \n on UNIX
      Added chown for log files
      Fixed some possible errors
      Fixed vulnerability with strtok
      Fixed a segfault
      Fixed secunia.com/advisories/15274/ vulnerability
      Service starts automatically
      Fixed problem with MSCGI
      Fixed a problem with digest auth scheme
      OpenBSD problems fixed
      STL porting
      Fixed some unitialized data
      Added a comment
      Fixed segfault
      Fixed problem with files transferring
      Fixed problem with files transferring
      Fixed problem with gzip files
      STL porting
      Fixed compilation problem
      Fixed MemBuf class interface
      Fixed error message
      Return 401 for symbolic links
      Fixed problem with HTTP ranges
      Fixed Content-Length with ranges
      Specify content-length
      Allow access only to 127.0.0.1
      Fixed compilation issue
      Fixed problem with content-length and keep alive connections
      Fixed problem with waitpid for terminated processes
      Fixed Content-Length env variable generation
      Fixed problem with SSL connections
      Changed default log files name
      Forced value
      Fixed stack overflow with multiple errors
      Check for return value
      Changed default setup
      Fixed empty logs directory
      New interface to handle MIMEs
      Initialize mime data
      Added Stream base class
      Added comment
      Added Filter class
      Added Filter class
      Changed return type
      Changed some names
      Fixed compilation
      Gzip filter
      STL map for MIME handling
      Added comment
      Removed unuseful variable
      Fixed linker error
      Ported vector.cpp to the control proj
      Hash Dictionary uses STL map
      Changed some variables name
      Removed stupid check
      Added DynHttpCommand class
      Added DynHttpCommandManager class
      Added DynHttpCommandManager class
      Fixed a problem with MAX_PATH under WIN32
      Fixed a problem with MAX_PATH under WIN32
      Added vector class
      Added default return value to some routines
      Added log message
      Fixed files list
      Changed comment lines
      Added dynamic HTTP commands support
      HTTP dynamic commands
      Added path
      Added arguments list parsing under windows
      Fixed a segmentation fault
      Fixed problem with standard files
      Fixed compilation problem under unix
      Added flush method
      Fixed some problems with stream inherited methods
      Added FiltersChain class
      Added clearAllFilters function
      Filters factory class
      HashDictionary uses templates now
      Added Filters factory class
      Added factory method
      MIME Manager uses hash dictionary
      Fixed error with stdin files
      Added FiltersFactory::chain routine
      Added  FiltersFactory::chain(list<string*> l)
      Changed variable name
      Bufferize before write to log
      Added timestamp to warnings file
      Send chunkes of data instead of a big one
      Send chunkes of data instead of a big one
      FastCGI servers are stored in a hash dictionary
      Added FiltersFactory to Server
      Added Copy constructor
      Added Copy constructor
      Fixed exception name
      Avoid cast
      Added some constructors
      Changed base index
      Avoid multiple clean
      Changed base index
      Fixed segfault
      Changed internal hashing algorithm
      Added Header and Footer data handling capability to filters
      Added some routines
      Added memory stream
      Ported to use streams<HIGHLY EXPERIMENTAL>
      Added some methods
      Cleaned some code<EXPERIMENTAL>
      Fixed problem with GZIP<EXPERIMENTAL>
      Fixed problem with GZIP<EXPERIMENTAL>
      Fixed a problem with streams
      Fixed problem with SSL connections cache data lookup
      Filters name capability
      Changed functions names
      #included ../stdafx.h
      Fixed problem with gzip stream
      Fixed problem with default MIME type
      Removed stupid message
      Removed cast
      Updated FSF address line in GPL
      s/free Software/Free Software/
      Warnings shutdown
      Removed unsane operation
      Added some routines
      Filters code<EXPERIMENTAL>
      Added filters to static files
      Dynamic filters support <EXPERIMENTAL>
      Dynamic filters support <EXPERIMENTAL>
      Dynamic filters support <EXPERIMENTAL>
      Added filters directory
      Removed unuseful error message
      Fixed problem with an error message
      Added filters loading message
      Updated windows project file
      Fixed problem with dynamic filters
      Fixed error with filters
      Added routine
      Added routine
      Changed some names
      Changed some names
      Changed some names
      Changed some names
      Added method
      Removed warning
      Added method
      Added routine
      Fixed problem with MIMEs
      Fixed compilation issue
      Fixed compilation issue
      Fixed windows problem
      Removed line
      Added check to Gzip filter
      Added protocol data
      Fixed compilation problems
      Changed lines order
      Use a hash dictionary for additional HTTP headers
      Moved some code from Server to Socket
      HttpHeaderChecker class first implementation<EXPERIMENTAL>
      Added some methods
      HTTP header control first implementation<EXPERIMENTAL>
      Fixed compilation problems
      Fixed problem under Hurd
      Added filters
      Added filters
      Added filters
      Cleared filters list on MimeRecord::clear
      Added filters
      Included Paul Ruizendaal patch for FastCGI
      Changed name
      Faster routine
      Fixed segmentation fault
      Fixed segmentation fault
      Use HOST_NAME_MAX
      Changed Copyright header lines
      Provide Bity, KB, MB for the show http_dir
      Fixed coding standard
      Added dynamic HTTP managers capability<EXPERIMENTAL>
      Added -rdynamic
      Fixed problem with default MIME cmd
      Fixed problem with default MIME cmd
      Added MB and GB cases
      Added support for .. in browsing
      Fixed problem with FastCGI
      Added error message
      Ported TODO list to a common format
      File updated
      Updated TODO list
      Updated files
      Updated TODO list
      Fixed problem under unix
      Fixed error with new processes under WIN32
      Fixed a bug with persistent connections
      Fixed a bug with persistent connections
      Updated windows files
      Fixed a problem under windows
      Updated files
      Fixed end line
      Changed names
      Changed names
      Fixed some problems under windows
      Fixed some problems under windows
      Fixed some errors with new processes arguments vector
      Fixed problem under unix
      Fixed some problems
      Virtual hosts management code uses STL<EXPERIMENTAL>
      Added possibility to define additional virtual host data
      Added method
      Possibility to define some options in the virtual host configuration file
      Added MAX_CONNECTIONS per vhost capability
      Faster CGI execution under windows
      Updated address line
      string* -> string
      string* -> string
      Rules for security files
      Possibility to allow/deny access to HTTP data handlers
      Fixed problem with GNU cgicc
      New logo by Nick
      New logo by Nick
      New logo by Nick
      Added new elements to the TODO list
      Fixed indentation
      Fixed problem when MAX_CONNECTIONS is zero
      Possiblity to save files with control protocol
      ACCESSESLOG is now ACCESSLOG
      Free zombies processes
      Fixed error with flushing
      Fixed error with access log files
      Updated documentation files (by Renato)
      Fixed a problem with big gzipped log files
      Fixed bug
      Added support for symbolic links
      Fixed bug when listing first vhost directory
      Added blank space
      Removed old files
      Changed application name
      Fixed a segfault if the Thread object is not allocated correctly
      Fixed a problem with symlinks
      Fixed a problem with some scripts
      Changed some routines names in the HashDictionary class
      New HashMap class first implementation [EXPERIMENTAL]
      Ported all the code to use new HashMap class
      Fixed warning
      Changed text
      Fixed problem with 'make install'
      Grammar
      Changed some file names
      Updated AUTHORS
      Fixed bug with filters chain
      Fixed typo
      Removed old file
      Cleaned some code
      Cleaned some code
      update Makefiles
      Fixed problem with SSL connections
      Cleaned Http class code
      Removed elements from TODO and fixed segfault
      Fixed segfault
      Server used as a singleton
      Fixed a security problem
      Fixed a security problem
      Changed interface
      Removed unuseful header field
      Ported some fields in the hash map
      Ported some fields in the hash map
      Removed unuseful http header field
      Ported some HTTP fields to the hash map
      Fixed compiling problems
      Fixed compiling problems
      Fixed compiling problems
      Fixed compiling problems
      Cleaned some code
      New file
      Fixed error
      Fixed CONTENT_TYPE bug
      Fixed segfault
      connectionstruct is now connection
      Updated TODO
      Updated TODO
      Changed interface
      Check for snprintf presence
      Check for snprintf presence
      Improved doxygen support
      Fixed comments
      Fixed comments
      filename is allocated dinamically
      Modified comments
      Use object dinamically
      Use object dinamically
      Use safer strncpy function
      Use object dinamically
      Use object dinamically
      Use object dinamically
      Use object dinamically
      Use object dinamically
      Changed some names
      removed dummy error
      removed dummy error
      fixed bug
      Doxygen comments
      Fixed bug
      renamed some directories
      renamed some directories
      removed unuseful files
      Applied rusty patch
      modified formattation
      fixed typo
      changed formattation
      Added doxygen comments
      fixed problem under windows
      changed doxygen out directory
      Added HomeDir class
      Added new files
      Added doxygen comments
      Added possibility to read additional fields from the security file
      Added doxygen comments
      Register additional security data in a hash map
      Corrected doxygen comment
      Added method to get data from the current http context hash map
      Changed type of Connection::host from void* to Vhost*
      First personal directories implementation (works only under UNIX yet)
      Use a HomeDir object to store personal directories information
      Cleaned td->connection->host code
      Changed CVS documentation to subversion
      Changed void* to stronger type
      Fixed typo
      Added personal directories under WIN32
      Added possibility to write directly on the buffer for HomeDir::getHomeDir
      Use new HomeDir function + bugfix
      Added previous files
      added directory
      Removed old file
      Possibility to choose home directory from host hashed data
      First pipe class implementation
      Added invert function
      First CGI implementation using pipes <does not work with windows yet>
      Initial Pipe support for windows
      Fixed problem with CGI
      CGI-LIB -> cgi-lib
      Added some blank spaces and fixed some formattation
      Changed some names
      Removed redondant control
      Fixed some formattation
      Fixed bug with sys directory
      Changed macro name
      Fixed formattation
      Added get(Header/Footer) size routine
      Make routines static
      Added possibility to decompress gzip streams
      Cleaned some code
      Cleaned code
      Cleaned code
      cleaned code
      Cleaned code
      Cleaned code
      Don't use a temporary file for directory listing
      Use CSS fixed position
      Fixed typo
      Fixed PIPE implementation under WIN32
      Fixed problems with pipes under unix
      Fixed problem with CGI
      Fixed problem with pipes
      Common way to store sent data information
      Check if pipe is present before use it
      Cleaned some code
      Cleaned code
      Fixed documentation error
      Discard initial " to check if it is a remote Fcgi location or not
      Fixed code formattation
      Added copyright year
      Added IPv6 local address
      Check for IPv6 with autoconf
      Added semaphore class
      Fixed problem when there is no data available
      Fixed segfault
      Added file to the windows project
      Changed password2 to neededPassword
      Fixed problem with fastcgi and keep-alive connections
      Fixed error with MSCGI
      Fixed problem under windows
      Added element to list
      Added Andu
      Changed some names
      Add default server signature when not specified
      Fixed problem with directory browsing of /
      Fixed error with CGI headers
      Fixed bug with CGI headers
      Keep consistent process data between forks
      Fixed formattation
      Fixed open file handle
      Fixed possible segfault
      Fixed bug with long Socket::accept queue
      Fail only if both listen sockets are not created
      Wait some time before check file time
      Don't wait when no data is available on the server socket
      Store Server instance for MSCGI
      Don't use global object
      Fixed segfault
      Allow longer HTTP URI
      Fixed problem with Basic HTTP auth
      Recursive security files
      Added inline comments and updated documentation
      Removed magic numbers
      Specify 'Connection: close' on redirections
      Changed .css layout for http_dir.cpp
      Updated svn location
      Added check
      Fixed compilation problem
      If not specified use HTTP as default protocol
      Reduced Server::createListenThreads() complexity from O(n^2) to O(n)
      Added directory
      Changed some names
      Changed some names
      Refactoring code, POST data in a separate subroutine
      Added ThreadID Thread::threadID()
      Fixed problem with getValue
      Fixed problem with double slashes names
      Fixed /sys mapping bug
      Windows updated
      Added USE_HOME_DIRECTORY
      Generate myserver.dev automatically
      Split File in File and FilesUtility
      Added FilesUtility
      Windows updated
      Windows updated
      Fixed compilation problem
      Windows update
      Changed some names
      Fixed problem listing files with & in the name
      Windows updated
      Show correctly HTML codes
      Removed double condition check
      Fixed segfault
      Moved global constants in File
      Dev-C++ fix
      Conflicts with windows macros solved
      Windows update
      Small modifications to the default web site
      Fixed a problem with the iterator
      Solved problem with iterator
      Fixed problem with files listing
      Don't generate profiling information
      Don't change path if the binary is in the cwd and it is accessed directly
      CachedFile documentation
      First implementation of a cache for static files
      Fixed segmentation fault
      Faster buffer copy
      Don't use cache for modified files
      Fixed bug with cache
      Possibility to define temporary files directory
      new event class
      Use the event class to notify new connections
      Removed IPv6 from TODO list
      Windows updated
      Added static files cache
      Don't hang at shutdown when there are active connections
      Don't check for mtime at every request
      Fixed an unresolved external symbol
      Fixed error
      Fixed error with measure units
      Fixed error with measure units, again
      Fix.  We will study math for next release
      Removed global variable
      Updated UML class diagram
      Fixed a bug with FastCGI
      Initialize variable
      Fixed mem leaks
      Windows updated
      Double the buffer instead of increment it by one
      Fixed problem when arguments are specified for a FastCGI server
      Added doxygen comments
      fixed problem with FastCGI executables path
      Unified plugins system - first implementation
      Plugins system documentation
      Unified plugins system - use common manager
      Added new files
      Support punycode host names trough the GNU IDN Library
      Updated TODO list
      Allow compilation without libidn
      Fixed bug with SETUID/SETGID
      Fixed bug with SETUID/SETGID
      Fixed possible SEGFAULT
      Safe localtime/gmtime wrap functions
      don't use global struct
      Attempt to make log messages clearer
      Corrected comment
      Fixed windows problem
      Use setgroups to clear list of supplementary group IDs
      Copy all htm files
      NPH CGI doesn't send any HTTP header
      Fixed 100% usage bug under windows when there are not active connections
      Corrected an error in the documentation
      Replace long lines in text files
      Force contentLength = 0 for methods that don't support a payload
      Separe SSL from vhosts.cpp and server.cpp
      Save QUERY_STRING and PATH_INFO on redirection
      Fixed possible memleaks
      Refactoring Socket class to Socket/SslSocket
      Fixed windows compilation problem and segfault
      The Connection object destroys the related Socket object
      Connection class refactoring
      Fixed several bugs and removed an old unused routine
      Removed version string from the daemon script
      Changed structure name
      ProcessServerManager class first implementation
      Added error messages
      Added methods for removing servers processes
      Possibility to start process server at load time
      First SCGI implementation
      Updated GUI for SCGI
      Added note for SCGI in the documentation
      Move appendDataToHTTPChannel helper function to HttpDataHandler
      Refactoring
      Use the sendfile syscall under linux
      Fixed problem with sendfile and cached files
      Don't use sendfile with HTTPS
      Don't duplicate port number in the page footer
      Cleaned some code from unuseful declarations
      Changed limit from 1kb to 4kb for HTTP_REQUEST_URI_OPTS_DIM
      Use a hash map to collect HTTP errors messages instead of a vector
      Use a hash map to collect HTTP errors messages instead of a vector
      Added URL Rewriting
      Faster POST data processing
      Fixed problem in the MSCGI code
      Removed global variables
      Removed librx from the repository
      Fixed compilation problem
      Updated windows version
      0.8.7 version
      Removed old Makefiles
      Changed type
      Added new classes to the plugins system
      Added new classes to the plugins system
      Added executors directory
      Added bogus file to allow compilation with new libpng
      Fixed a bug in the plugins managers code
      Possibility to define element type in plugins managers
      Fixed a segfaul
      Use the hinstLib object in the Plugin class
      Generate a template file that can be used lately by modules
      Added perl script to create a skeleton structure for a plugin
      Removed duplicated field (use Connection::login instead
      create_skeleton.pl updates the Makefile configuration part if the file is already present
      Added generic plugin type
      Added generic plugins to the documentation
      embedded php
      Updated create_skeleton.pl script
      Fixed compilation problem
      Fixed problem in Vhost::initializeSSL
      Store the number of all the connections to the server
      Fixed DoS when specified a long HTTP command
      Don't copy more than HTTP_REQUEST_CMD_DIM bytes
      Multithreaded implementation
      Fixed serious problem
      Check if server is going to stop
      Fixed GUI problem
      Fixed lazy-loading problems
      Don't have public class members
      Added preload phase in the plugins initialization
      Changed some methods names and added a new method
      Don't use a thread to initialize/deinitialize the php module
      Updated internal documentation files
      Removed deprecated methods
      Code to handle listen threads in a different class/file
      Added load/postLoad/unLoad methods to the script
      Open log files for the virtual host using the openLogFiles function
      Separate vhosts code in two files
      Fast reboot if it is changed the virtual hosts file <experimental>
      Fixed problem with HTTP redirection
      More efficient Location header check
      Updated SSL certificate creation note
      Fixed problem with SSL initialization
      Fixed a problem in the SSL socket when check if there is new data available for recv
      Handle HTTP redirections
      Added method to check if the server is rebooting and removed delay
      Don't reboot with PHP_NO_REBOOT is defined, reboot php modules can create problems with other libraries
      Fixed windows compilation problem
      Fixed possible segfault
      Fixed problem with filters on static files served by HTTP
      Changed functions names
      Added SCGI documentation and other minor changes
      Minor changes to the documentation files
      Support windows compilation
      Possibility to store protocol specific data in the vhost scope
      Rewritten the linked list in server.cpp in C++ using stl list class
      Fixed problem when a file range is specified and added comments to last changes
      Updated TODO list
      Changed DEFAULT_FILENAMEx to DEFAULT_FILENAME in the configuration file
      Server uses connections.size() instead of nConnections
      Don't add another slash between directory and file name if it is already present
      Add ReadWriteLock class
      Fast MIME types configuration file reload
      Fixed problem with Semaphore under windows
      Semaphore has the same posix's behaviour under windows
      Fixed possible segfault under high loads
      Updated copyright year
      myserver-headers points to the myserver root
      Fixed compilation problem
      Support compilation under windows
      Fixed compilation problem under windows for modules
      Fixed compilation problem under windows
      Fixed wrong XML example
      If the path is not specified use the name
      Fixed segmentation fault if it is not specified a valid log file name for a virtual host
      Python executor plugin
      Consider padding if specified by the FastCGI application
      Added element to the TODO list
      superFastHashing replaced by ELF hashing
      Don't send the security file in any case
      Fixed problems with common log format login
      Different implementation to solve segfaults in other files
      Added Multicast class and fixed several compilation warnings
      Fixed problem with multicast
      Added new events
      Break if an observer already sent a result
      Http checker plugin
      Added new signals for the server class
      Report error messages
      Send HTTP 100 only if there is an entity body
      Added setValue to HttpHeader
      Added set_header and send_redirect commands
      Don't allow different different cases for MIME types under windows
      Report warning if multiple MIME types are registered for the same extension
      Log an error message if a file can't be found
      Added possibility to read rules from file
      Fixed Keep-Alive connections problem with Opera web browser
      Source code ported to GPLv3
      Source code ported to GPLv3
      Added new methods to the plugins namespace class
      OPTIONS includes external modules too
      Fixed compilation warnings and added new HTTP status codes
      Added new methods
      FindData class handles different behaviour between UNIX and WINDOWS
      Added possibility to load options for plugins
      Return error message body if the error page doesn't exist
      Log an error if an invalid virtual host is requested
      Fixed problem with SSL read-ahead
      Restored original english files
      Check return status on Semaphore lock/unlock
      Windows update
      Fixed segmentation fault when Host is not valid
      merged patch from trunk
      Lazy threads-purge
      Restored default homepage
      Applied patch sent by <kibagami128@yahoo.com>
      Prepare release 0.8.9
      Changed default threads number
      merged libevent-experimental branch to trunk
      Prepare release 0.8.10 and windows bugs fixed
      Put correct version file
      Fixed possible segfault
      Fixed mutex starvation at shutdown
      Don't check for data size to read
      MSCGI ouput is flushed directly to the client
      Added possibility to add custom headers for MSCGI
      Added windows firewall configuration trough  the NSIS Simple Firewall Plugin
      Fixed compilation problem
      Clear map
      Rules checker plugin added
      Added XML plugins descriptors
      Added script to automatically fetch plugins
      Fixed formattation problem
      Fixed problem with HTTP pipelining
      Fixed compile problem
      Prepare release 0.8.11 and windows bugs fixed
      Copy scgi.htm with make install
      Fixed some problems under windows
      Fixed some problems under windows
      Fixed compilation warning
      Added protocol_buffer file
      Use only '127.0.0.1' if other IPs can't be found
      Added TODO list element
      Allow NULL HTTP context
      Possibility to get lfind stats under UNIX
      Use iframe instead of frame
      Changed CSS style
      Windows files updated
      Fixed  broken link
      Fixed compiling problems with gcc-4.3
      Specify Content-Type header
      Read directly the protocol name
      Added misc files repository
      Don't install the counter example by default, this avoid the libpng dependency
      Added the counter example
      Added new options to the default myserver.xml file
      Updated TODO list
      Implemented sort for HTTP directory browsing
      Added links to sort files
      compare functions ported into HttpDir class
      Cleaned up some string functions
      Fixed compiling problems under *NIX caused by revision 2500
      MSCGI library ported in the MyServer code, it is not an external module anymore <experimental>
      Removed ./cgi-lib references
      Windows files updated
      fixed include files path
      Force break for the current event loop
      Don't create new threads while the server is rebooting
      Use event_loopbreak only where it is defined
      Use the HttpDataHandler superclass where it is possible
      Cleaned some headers file
      Added new files/functions and cleaned some header files
      Ported some functions in a new class
      readPostData ported into HttpDataRead
      Changed readPostData error code reporting
      prepare new 0.8.12 version
      Fixed some compiling errors
      Check if MSCGI can be compiled
      Fixed compiling problems under windows
      Allow relative path in the virtualhosts.xml file
      Enable FTP in the GUI
      Allow reverse order for Http browsing
      Http browse directory style linked as external file
      Updated Makefiles
      Added new Makefile.am
      Fixed CGI error message
      Allow to define the connections priority in the virtual host definition
      Changed type of priority to int
      Fixed problem to detect the FLTK library at configure time
      Fixed compiling problem
      Fixed compiling problems
      Don't return an error if the PATH_INFO can't be translated
      Fixed compiling issue with g++-4.3
      Fixed some problems with HTTP handlers
      python_http_handler plugin skeleton, it is experimental and miss almost all features
      Added methods/members defined for mod_python to the python_http_handler plugin
      Added new functions to the python_http_handler plugin
      Fixed compiling issue
      Allow to specify when a plugin should be loaded globally
      Added note in the README file
      Cleaned some interfaces
      Fixed bug in the control application
      Register signals on reboots
      Removed debug output message
      Protocols made threads reentrant
      Use unique factory method to retrieve the protocol to use
      Cleaned some code
      Fixed compiling error
      Some source files were renamed
      Moved textmangler utility in a separate directory
      Added scons construction tool file
      Check for ARGP
      Fixed mistake in the UML diagram
      Added possibility to fetch/build plugins with scons
      Added SConscript files for plugins
      Removed not used argument
      Use PACKAGE_VERSION if specified
      Check for libevent and for plugins dependencies
      Removed old building system files
      Renamed some .h files
      Fixed some compiling problems with new changes in the myserver core
      Modified some interfaces
      Fixed a problem with Close connections and renamed some methods
      Added new functions to the python plugin and fixed a path problem in the building scripts
      Added the possibility to build a plugin directly from the scons script
      Fixed some compiling problems under OpenBSD
      Fixed a bug with SSL hosts, RSA keys now are 2048 bits long, changed some \t to double space
      Fixed possible segfault
      fixed typo
      Fixed threads cleaning deadlock
      Fixed some problems on server reboot
      Fixed possible hang at reboot
      Fixed problem with POST data
      Fixed different problems under Windows
      Preparing 0.9-rc1 release
      Fixed windows problems
      Fixed problem with the NSIS builder
      Cleaned source code from external lock/unlock
      Fixed segfault with the control protocol, use a visitor to access the connections list
      Added possibility to open port 21 of firewall trought the installer
      Register a new connection ID in a critical section
      Fixed compiling problems under windows
      Solved a possible segfault in the CONTROL protocol and changed some inline comments
      Added the py_control_client library.  It implements the client side of the CONTROL protocol in python
      Renamed 'external' to 'plugins'
      Added CONTROL error codes
      Don't specify g++ in the SConstruct file
      Don't raise error when some env variables are not configured
      Added some unit testing files (there is need of CppUnit for them)
      Updated copyright year
      Refactored methods and new tests
      Refactoring
      Refactored Http Response
      Added new tests
      Added Thread creation and cleaned Multicast tests
      Fixed compiling problems and added new tests
      Test utility module
      Added test for getPathRecursionLevel
      Added tests for the Connection class
      Fixed compiling problem
      Added test for iterator
      Added new tests
      Added new tests and fixed bug
      Removed debug message
      FilesUtility::splitPath cleaned and faster
      Changed behaviour of MemBuff::getBuffer
      Use a dynamic buffer instead of a static 8KB one for Connection
      Fixed possible segfault -- need to be cleaned more
      Fixed windows compiling problem
      Cleaned scheduler interface - still bugged under some circumstances
      Use socket pair in the connections scheduler - new source code needs to be cleaned
      Fixed windows problems
      Don't lock the connection thread to reschedule a waiting socket for new data
      Added new tests and fixed bug
      Changed example download file
      Changed indentation from tab to double spaces
      Added RecursiveMutex class and new tests
      source/ directory renamed to src/
      Changed some old references from source/ to src/
      Fixed source directory name
      Windows Dev-C++ project file regenerated
      Added tests for the Pipe class
      Added Regex class unit testing
      Added tests for the safetime APIs
      Added element to the TODO list
      Added tests for the Semaphore class
      Added development model document
      Prepare new 0.9-rc2 release
      changed windows projects files
      Renamed file
      Fixed compiling problem
      Fixed separator in the Makefile.am file
      Fixed file path
      Added missing file
      Refactoring and added new tests
      Changed ChangeLog note
      Modified TODO list and removed dirty code
      Removed links to non-free software and added new note about OpenSSL in the license file
      Added license note
      Renamed CgiData to MscgiData

root (2):
      initial checkin
      Initial revision

rustypaint (148):
      first linux port and Dev-C++ support
      Removed Stray Semicolon
      fixed dir dependent issues and removed temp files (oops)
      *** empty log message ***
      VC6++ files converted from VC++ 7 files
      moved lfind.h to include
      Added global makefile
      First linux port of control
      Compiled program now placed in binaries
      *** empty log message ***
      vhosts initial coding
      fix spelling error
      Fixed some file handler problems
      Cast (int) and some debug code (for now)
      Syncd with windows vr
      Linux updates
      Forgot an unused return
      Added a forgoten %s
      Fixed problem with mozilla in linux
      Fixed problem with mozilla in linux
      Linux updates
      Fixed behavor of lstrcmpi in linux and moved common #defines to header
      Fixed behavor of lstrcmpi in linux and moved common #defines to header
      Linux updates
      fixed logic error
      Linux updates
      Linux updates
      Linux updates
      Linux updates
      Fixed Segfaults under Very high load
      Linux updates
      Linux updates
      Linux updates
      Linux updates
      Linux updates
      Linux updates
      Linux updates
      Linux updates
      Linux updates
      Linux updates
      Linux updates
      Linux updates
      change casse of file name to work with linux
      Linux updates
      Linux updates
      Linux updates
      Linux updates
      Linux updates (for now)
      Linux updates
      Linux updates
      Added message for MSCGI-LIB
      Linux updates
      Linux updates
      fixed missing </ >
      added SetContent_Type
      change S to s
      overload Write for binary
      fixed include problem
      added web counter
      *** empty log message ***
      fix spelling error
      *** empty log message ***
      fixed max value problems
      fixed max value problems
      *** empty log message ***
      Added windows port of MSCGI counter
      Fixed NULL pointer problem
      Fixed signals
      Linux updates
      Linux updates
      Start of automake build system
      Start of automake build system
      Linux updates
      Automake updates
      Automake updates
      installed by autogen.sh, not needed in cvs
      Prevent -g flag as default
      Linux updates
      use pthread mutexes when we have them
      *** empty log message ***
      *** empty log message ***
      Linux updates
      Linux updates
      Linux updates
      automake updates
      1st run at make install and make dist
      Automake Updates
      Automake Updates
      Automake Updates
      Automake Updates
      Automake Updates
      some CVS cleanup
      "new file" functions
      someone can't count :)
      Automake Updates
      more "new file" functions
      added vector class
      make way for new configure app
      Added new configure app
      Automake Updates
      Control Protical updates
      Added MD5ed control password to configure app
      fix an oops
      *** empty log message ***
      added memory I/O to cXMLPraser
      start of control protocol client
      oops
      control protocol updates
      control protocol updates
      oops
      added progress indication
      control protocol updates
      updates and bug fixes
      language file updates
      added default port values
      connections dialog added
      language file updates
      some GUI tweaks
      disable service menu items in *nix for now
      dynamic protocol support (control protocol)
      dynamic protocol support (local)
      fix spelling errors
      some GUI tweaks
      win32 fixes
      win32 fixes
      win32 fixes
      win32 fixes
      UTF8Toisolat1
      UTF8Toisolat1 now done in cXMLPraser
      BSD fix
      Automake updates
      GUI updates
      fix return type
      GUI updates
      fix
      Autoconfig fix
      OSX fix
      Documentaiton updates
      Added -fPIC detection
      Added -fPIC detection
      copy default config files to /etc/myserver
      install fix
      fix directories
      Added some text formatting to the XML data
      mutex for the counter
      configure now sets isRegex with IP and host in vhosts
      Added HTTP service togals to vhosts
      Update about box and correct spelling,

whizkid_bay (1):
      *** empty log message ***

xor-pt (41):
      A small optimization.
      Forgot request->digest_uri[0]='\0';
      HttpHeaders::validHTTPResponse: Initialized nLineChars, Removed some redundant code
      Small Optimization: x*1024 -> x<<10
      New Funtion: int getEndLine(char* str, int max)
      Small Optimizations
      Removed special characters
      Just removed some invalid characters that were showing in my text editor
      Added threads.cpp
      Changed comments and added support for doxygen
      Changed comments and added support for doxygen
      Funtion declaration change
      Debug =P
      Comments corrections
      .dev update
      Small correction
      source/threads.cpp added to counter.dev
      Added filter.cpp and stream.cpp to myserver.dev
      Added stream.cpp to MyServer Configure.dev
      Added dyn_http_command.cpp and dyn_http_command.h to .dev
      New File::getPathRecursionLevel()
      Added filters_chain.cpp and filters_chain.h to windows project file.
      Added memory_stream.cpp and memory_stream.h to .dev
      Added stream.cpp and stream.h to counter.dev
      Added stream.cpp and stream.h to cgi-lib.dev
      cserver.cpp:896: freeEnvironmentStrings((LPTSTR)envString); ===> FreeEnvironmentStrings((LPTSTR)envString);
      dynamiclib.cpp:79: ret = freeLibrary((HMODULE)handle) ? 0 : 1; ===> ret = FreeLibrary((HMODULE)handle) ? 0 : 1;
      Added <algorithm> for WIN32
      Small correction
      Added http_header_checker
      Added dyn_http_manager.[h/cpp] to myserver.dev
      Added -rdynamic to the project's linker options
      Decrementors added
      HashMap Documentation
      Bug fix
      Bug Fix
      source/myserver.cpp:453
      Bug Fix
      A few fixes, and .dev updates.
      myserver.dev ++ home_dir.[cpp/h]
      ++gzip_decompress.cpp/h

zaf_er (9):
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@1976 c4c922ea-a70d-0410-937d-ec1daf91936c
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@1983 c4c922ea-a70d-0410-937d-ec1daf91936c
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@1984 c4c922ea-a70d-0410-937d-ec1daf91936c
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@1985 c4c922ea-a70d-0410-937d-ec1daf91936c
      All Turkish Translation Files
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@1987 c4c922ea-a70d-0410-937d-ec1daf91936c
      git-svn-id: svn://svn.savannah.gnu.org/myserver/trunk@1988 c4c922ea-a70d-0410-937d-ec1daf91936c
      Turkish translation update 2007.07.11
      07.07.21 all files turkish translations with link patches...

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


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Thu Nov 05 05:57:32 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N601z-0001xy-SM
	for mharc-myserver-commit@gnu.org; Thu, 05 Nov 2009 05:57:31 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N601x-0001wv-2c
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 05:57:29 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N601t-0001vW-TU
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 05:57:28 -0500
Received: from [199.232.76.173] (port=41696 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N601t-0001vR-Js
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 05:57:25 -0500
Received: from savannah.gnu.org ([199.232.41.3]:45992 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 1N601s-00060i-8M
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 05:57:25 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N601r-0003gi-39
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 10:57:23 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N601q-0003gC-36
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 10:57:23 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 27a3b5c2698d4346f24471f96d48fe526af603e0
X-Git-Newrev: 828a911010e1cb1391316cfc2bef87e093a0b6e3
Message-Id: <E1N601q-0003gC-36@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Thu, 05 Nov 2009 10:57:22 +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. 0_9-350-g828a911
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: Thu, 05 Nov 2009 10:57:29 -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  828a911010e1cb1391316cfc2bef87e093a0b6e3 (commit)
       via  28f71690b3810c7d704d507a5f1aeee31117b5db (commit)
      from  27a3b5c2698d4346f24471f96d48fe526af603e0 (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 828a911010e1cb1391316cfc2bef87e093a0b6e3
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Nov 5 11:57:08 2009 +0100

    The HTTP response header is send once, not multiple times.

diff --git a/myserver/include/protocol/http/http.h b/myserver/include/protocol/http/http.h
index b320edc..054f656 100644
--- a/myserver/include/protocol/http/http.h
+++ b/myserver/include/protocol/http/http.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002-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/>.
+  MyServer
+  Copyright (C) 2002-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 HTTP_H
@@ -104,25 +104,25 @@ public:
   int requestAuthorization ();
 
   int sendHTTPResource (string& filename,
+                        int systemrequest = 0,
+                        int onlyHeader = 0,
+                        int yetMapped = 0);
+
+  int putHTTPRESOURCE (string &filename,
                        int systemrequest = 0,
                        int onlyHeader = 0,
                        int yetMapped = 0);
 
-  int putHTTPRESOURCE (string &filename,
-                      int systemrequest = 0,
-                      int onlyHeader = 0,
-                      int yetMapped = 0);
-
   int optionsHTTPRESOURCE (string &filename,
-                          int yetMapped = 0);
+                           int yetMapped = 0);
 
   int traceHTTPRESOURCE (string& filename,
-                        int yetMapped = 0);
+                         int yetMapped = 0);
 
   int deleteHTTPRESOURCE (string &filename,
-                         int systemrequest = 0,
-                         int onlyHeader = 0,
-                         int yetMapped = 0);
+                          int systemrequest = 0,
+                          int onlyHeader = 0,
+                          int yetMapped = 0);
 
   bool allowMethod (const char *name);
 
@@ -134,26 +134,26 @@ public:
 
 
   int getPath (string& filenamePath,
-                     const string& filename,
-                     int systemrequest)
+               const string& filename,
+               int systemrequest)
   {return getPath (td, filenamePath, filename.c_str (), systemrequest);}
 
   int getPath (string& filenamePath,
-                     const char *filename,
-                     int systemrequest)
+               const char *filename,
+               int systemrequest)
   {return getPath (td, filenamePath, filename, systemrequest);}
 
 
   static int getPath (HttpThreadContext* td,
-                     string& filenamePath,
-                     const string& filename,
-                     int systemrequest)
+                      string& filenamePath,
+                      const string& filename,
+                      int systemrequest)
   {return getPath (td, filenamePath, filename.c_str (), systemrequest);}
 
   static int getPath (HttpThreadContext* td,
-                     string& filenamePath,
-                     const char *filename,
-                     int systemrequest);
+                      string& filenamePath,
+                      const char *filename,
+                      int systemrequest);
 
   MimeRecord* getMIME (string& filename);
 
@@ -165,7 +165,7 @@ public:
   virtual char* registerName (char* out,int len){return registerNameImpl (out, len);}
 
   static char* registerNameImpl (char*, int len);
-	int controlConnection (ConnectionPtr con, char *request, char *auxBuf,
+  int controlConnection (ConnectionPtr con, char *request, char *auxBuf,
                          u_long reqBufLen, u_long auxBufLen, u_long reqLen,
                          u_long tid);
 
@@ -174,18 +174,17 @@ public:
 
   u_long getTimeout ();
   int preprocessHttpRequest (string& filename, int yetmapped,
-                            int* permissions);
+                             int* permissions);
 
   int getFilePermissions (string& filename, string& directory,
-                         string& file, string &filenamePath,
-                         int yetmapped, int* permissions);
+                          string& file, string &filenamePath,
+                          int yetmapped, int* permissions);
 
   static HttpStaticData* getStaticData ();
 
   SecurityToken *getSecurityToken (){return &(td->securityToken);}
 
 protected:
-
   int processDefaultFile (string& uri, int permissions, int onlyHeader);
 
   struct HttpThreadContext *td;
@@ -201,14 +200,13 @@ protected:
 class HttpProtocol : public Protocol
 {
 public:
-	HttpProtocol ()
+  HttpProtocol ()
   {
     protocolOptions = 0;
   }
 
   virtual ~HttpProtocol ()
   {
-
   }
 
   virtual char* registerName (char* out, int len)
@@ -216,7 +214,7 @@ public:
     return Http::registerNameImpl (out, len);
   }
 
-	virtual int controlConnection (ConnectionPtr con, char *request,
+  virtual int controlConnection (ConnectionPtr con, char *request,
                                  char *auxBuf, u_long reqBufLen,
                                  u_long auxBufLen, u_long reqLen,
                                  u_long tid)
@@ -226,7 +224,7 @@ public:
                                    reqLen, tid);
   }
 
-	virtual int loadProtocol ()
+  virtual int loadProtocol ()
   {
     return Http::loadProtocolStatic ();
   }
@@ -234,9 +232,7 @@ public:
   virtual int unLoadProtocol ()
   {
     return Http::unLoadProtocolStatic ();
-
   }
-
 };
 
 
diff --git a/myserver/include/protocol/http/http_thread_context.h b/myserver/include/protocol/http/http_thread_context.h
index 7058306..7a069e4 100644
--- a/myserver/include/protocol/http/http_thread_context.h
+++ b/myserver/include/protocol/http/http_thread_context.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(at your option) any later version.
+  MyServer
+  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
+  (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.
+  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/>.
+  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 HTTP_THREAD_CONTEXT_H
@@ -51,7 +51,7 @@ class MimeRecord;
  */
 struct HttpThreadContext
 {
-	int appendOutputs;
+  int appendOutputs;
 
   /*! Set by raiseHTTPError.  */
   int lastError;
@@ -59,41 +59,44 @@ struct HttpThreadContext
   /*! Is the client asking only for the header?  */
   bool onlyHeader;
 
-	ConnectionPtr connection;
-	MemBuf *buffer;
-	MemBuf *secondaryBuffer;
-	u_long buffersize;
-	u_long id;
-	u_long nBytesToRead;
-	u_long nHeaderChars;
-	HttpResponseHeader response;
-	HttpRequestHeader  request;
-	string filenamePath;
-	string pathInfo;
-	string pathTranslated;
-	string cgiRoot;
-	string cgiFile;
-	string scriptPath;
-	string scriptDir;
-	string scriptFile;
-	string inputDataPath;
-	string outputDataPath;
-	string vhostDir;
-	string vhostSys;
-	HashMap<string,string*> other;
-	char identity[32];
-	File inputData;
-	File outputData;
-	int authScheme;
-	Http* http;
-	MimeRecord *mime;
-	int sentData;
+  /*! Was the HTTP header already flushed to the client?  */
+  bool headerSent;
+
+  ConnectionPtr connection;
+  MemBuf *buffer;
+  MemBuf *secondaryBuffer;
+  u_long buffersize;
+  u_long id;
+  u_long nBytesToRead;
+  u_long nHeaderChars;
+  HttpResponseHeader response;
+  HttpRequestHeader  request;
+  string filenamePath;
+  string pathInfo;
+  string pathTranslated;
+  string cgiRoot;
+  string cgiFile;
+  string scriptPath;
+  string scriptDir;
+  string scriptFile;
+  string inputDataPath;
+  string outputDataPath;
+  string vhostDir;
+  string vhostSys;
+  HashMap<string,string*> other;
+  char identity[32];
+  File inputData;
+  File outputData;
+  int authScheme;
+  Http* http;
+  MimeRecord *mime;
+  int sentData;
   SecurityToken securityToken;
   int permissions;
 
-	const char* getVhostDir ();
-	const char* getVhostSys ();
-	const char* getData (const char *name);
+  const char* getVhostDir ();
+  const char* getVhostSys ();
+  const char* getData (const char *name);
 };
 
 #endif
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 551240a..fdafbdb 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -785,7 +785,8 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
       td->filenamePath.assign ("");
       td->outputDataPath.assign ("");
       td->inputDataPath.assign ("");
-      td->mime = 0;
+      td->mime = NULL;
+      td->headerSent = false;
       td->sentData = 0;
       td->vhostDir.assign ("");
       td->vhostSys.assign ("");
@@ -1333,8 +1334,8 @@ int Http::raiseHTTPError (int ID)
       HttpRequestHeader::Entry *host = td->request.other.get ("Host");
       HttpRequestHeader::Entry *connection = td->request.other.get ("Connection");
       const char *useMessagesVal = td->securityToken.getData ("http.use_error_file",
-                                                          MYSERVER_VHOST_CONF
-                                                        | MYSERVER_SERVER_CONF,
+                                                              MYSERVER_VHOST_CONF
+                                                              | MYSERVER_SERVER_CONF,
                                                               NULL);
       if (useMessagesVal)
         {
@@ -1362,15 +1363,15 @@ int Http::raiseHTTPError (int ID)
       char errorName [32];
       sprintf (errorName, "http.error.file.%i", ID);
       const char *defErrorFile = td->securityToken.getData (errorName,
-                                                                  MYSERVER_SECURITY_CONF |
-                                                                  MYSERVER_VHOST_CONF |
-                                                                  MYSERVER_SERVER_CONF);
+                                                            MYSERVER_SECURITY_CONF
+                                                            | MYSERVER_VHOST_CONF
+                                                            | MYSERVER_SERVER_CONF);
       if (defErrorFile)
         {
           ostringstream nURL;
           int isPortSpecified = 0;
           const char* hostStr = host ? host->value->c_str () : "";
-           /* Change the URI to reflect the default file name.  */
+          /* Change the URI to reflect the default file name.  */
           nURL << protocolPrefix << hostStr;
           for (int i = 0; hostStr[i]; i++)
             {
@@ -1438,21 +1439,19 @@ int Http::raiseHTTPError (int ID)
             td->response.contentLength.assign (size.str ());
           }
       }
-      u_long hdrLen = HttpHeaders::buildHTTPResponseHeader (td->buffer->getBuffer (),
-                                                            &td->response);
 
-      if (td->connection->socket->send (td->buffer->getBuffer (), hdrLen, 0) == -1)
+      if (HttpHeaders::sendHeader (td->response, *td->connection->socket,
+                                   *td->buffer, td))
         return 0;
 
-      if (errorBodyLength && (td->connection->socket->send (errorBodyMessage.str ().c_str (),
-                                                            errorBodyLength, 0)
-                              == -1))
+      if (errorBodyLength
+          && (td->connection->socket->send (errorBodyMessage.str ().c_str (),
+                                            errorBodyLength, 0) < 0))
         {
           td->connection->host->warningsLogWrite (_("HTTP: socket error"));
           return 0;
         }
 
-
       return 1;
     }
   catch (...)
diff --git a/myserver/src/protocol/http/http_headers.cpp b/myserver/src/protocol/http/http_headers.cpp
index 3105ff1..36344d3 100644
--- a/myserver/src/protocol/http/http_headers.cpp
+++ b/myserver/src/protocol/http/http_headers.cpp
@@ -883,12 +883,15 @@ int HttpHeaders::sendHeader (HttpResponseHeader &response, Stream &stream,
                              MemBuf &memBuf, HttpThreadContext *ctx)
 {
   int ret = 0;
-  if (ctx == NULL || !ctx->appendOutputs)
+  if (ctx == NULL || (!ctx->appendOutputs && !ctx->headerSent))
     {
       u_long nbw;
       buildHTTPResponseHeader (memBuf.getBuffer (), &response);
       ret = stream.write (memBuf.getBuffer (), strlen (memBuf.getBuffer ()),
                           &nbw);
+
+      if (ctx)
+        ctx->headerSent = true;
     }
 
   return ret;



commit 28f71690b3810c7d704d507a5f1aeee31117b5db
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Nov 5 11:40:47 2009 +0100

    Define the new helper function HttpHeaders::sendHeader and use it in the HTTP handlers.

diff --git a/myserver/include/connection/connection.h b/myserver/include/connection/connection.h
index 317c36b..21ba5f3 100644
--- a/myserver/include/connection/connection.h
+++ b/myserver/include/connection/connection.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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) 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
+  (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 CONNECTION_H
@@ -36,16 +36,13 @@ class ClientsThread;
 
 using namespace std;
 
-
-
 class Connection;
 
 typedef  Connection* ConnectionPtr;
 
-typedef int (*continuationPROC)(ConnectionPtr con, char *request, char *auxBuf,
-                                u_long reqBufLen, u_long auxBufLen,
-                                u_long reqLen, u_long tid);
-
+typedef int (*continuationPROC) (ConnectionPtr con, char *request, char *auxBuf,
+                                 u_long reqBufLen, u_long auxBufLen,
+                                 u_long reqLen, u_long tid);
 
 class Connection
 {
@@ -58,8 +55,8 @@ public:
   void init ();
   void destroy ();
 
-	int getPriority ();
-	void setPriority (int);
+  int getPriority ();
+  void setPriority (int);
 
   u_long getID ();
   void setID (u_long);
@@ -80,9 +77,9 @@ public:
   const char* getPassword ();
   void setPassword (const char*);
 
-	void setnTries (char);
-	char getnTries ();
-	void incnTries ();
+  void setnTries (char);
+  char getnTries ();
+  void incnTries ();
 
   const char* getIpAddr ();
   void setIpAddr (const char*);
@@ -90,14 +87,14 @@ public:
   const char* getLocalIpAddr ();
   void setLocalIpAddr (const char*);
 
-	u_long getTimeout ();
+  u_long getTimeout ();
   void setTimeout (u_long);
 
-	/*! Connection socket.  */
-	Socket *socket;
+  /*! Connection socket.  */
+  Socket *socket;
 
-	/*! Pointer to an host structure.  */
-	Vhost *host;
+  /*! Pointer to an host structure.  */
+  Vhost *host;
 
   int getToRemove ();
   void setToRemove (int);
@@ -105,14 +102,14 @@ public:
   int isForceControl ();
   void setForceControl (int);
 
-	/*! Buffer for the connection struct. Used by protocols.  */
-	ProtocolBuffer *protocolBuffer;
+  /*! Buffer for the connection struct. Used by protocols.  */
+  ProtocolBuffer *protocolBuffer;
 
-	/*! Set the thread that is currently using the connection.  */
-	void setActiveThread (ClientsThread* t){thread = t;}
+  /*! Set the thread that is currently using the connection.  */
+  void setActiveThread (ClientsThread* t){thread = t;}
 
-	/*! Get the thread that is using the connection.  */
-	ClientsThread* getActiveThread (){return thread;}
+  /*! Get the thread that is using the connection.  */
+  ClientsThread* getActiveThread (){return thread;}
 
   Connection ()
   {
@@ -136,10 +133,10 @@ public:
   MemBuf *getConnectionBuffer (){return connectionBuffer;}
 protected:
 
-	/*! This buffer must be used only by the ClientsTHREAD class.  */
-	MemBuf *connectionBuffer;
+  /*! This buffer must be used only by the ClientsTHREAD class.  */
+  MemBuf *connectionBuffer;
 
-	ClientsThread *thread;
+  ClientsThread *thread;
 
   /*! Continuation function.  */
   continuationPROC continuation;
@@ -147,46 +144,46 @@ protected:
   /*! Identifier for the connection.  */
   u_long ID;
 
-	/*! The server/server.has scheduled this connection.  */
-	int scheduled;
+  /*! The server/server.has scheduled this connection.  */
+  int scheduled;
 
-	/*! Remote port used.  */
-	u_short port;
+  /*! Remote port used.  */
+  u_short port;
 
-	/*! Login name.  */
-	string *login;
+  /*! Login name.  */
+  string *login;
 
-	/*! Password used to log in.  */
-	string *password;
+  /*! Password used to log in.  */
+  string *password;
 
-	/*! # of tries for an authorized login.  */
-	char nTries;
+  /*! # of tries for an authorized login.  */
+  char nTries;
 
-	/*! Remote IP address.  */
-	string *ipAddr;
+  /*! Remote IP address.  */
+  string *ipAddr;
 
-	/*! Local IP used to connect to.  */
-	string *localIpAddr;
+  /*! Local IP used to connect to.  */
+  string *localIpAddr;
 
-	/*! Local port used to connect to.  */
-	u_short localPort;
+  /*! Local port used to connect to.  */
+  u_short localPort;
 
-	/*! Current timeout for the connection.  */
-	u_long timeout;
+  /*! Current timeout for the connection.  */
+  u_long timeout;
 
-	/*
+  /*
    *!If nonzero the server is saying to the protocol to remove the connection.
    *Protocols can not consider this but is a good idea do it to avoid server
    *overloads.
    *Reasons to remove the connection are defined at the begin of this file.
    */
-	int toRemove;
+  int toRemove;
 
-	/*! Force the connection to be parsed.  */
-	int forceControl;
+  /*! Force the connection to be parsed.  */
+  int forceControl;
 
-	/*! Connection priority, used by the scheduler.  */
-	int priority;
+  /*! Connection priority, used by the scheduler.  */
+  int priority;
 
 };
 
diff --git a/myserver/include/filter/stream.h b/myserver/include/filter/stream.h
index cdfb7d3..45eccda 100644
--- a/myserver/include/filter/stream.h
+++ b/myserver/include/filter/stream.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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) 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
+  (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 STREAM_H
@@ -41,7 +41,7 @@ class Stream
 public:
   virtual int read (char* buffer, u_long len, u_long*);
   virtual int write (const char* buffer, u_long len, u_long*);
-	virtual int flush (u_long*);
+  virtual int flush (u_long*);
   virtual Handle getHandle ();
   virtual int close ();
   Stream ();
diff --git a/myserver/include/protocol/http/http_headers.h b/myserver/include/protocol/http/http_headers.h
index a480da2..9685536 100644
--- a/myserver/include/protocol/http/http_headers.h
+++ b/myserver/include/protocol/http/http_headers.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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) 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
+  (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 HTTP_HEADERS_H
@@ -22,7 +22,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 # include "stdafx.h"
 # include <include/connection/connection.h>
 
-extern "C" {
+extern "C"
+{
 # ifdef WIN32
 #  include <direct.h>
 #  include <errno.h>
@@ -32,13 +33,14 @@ extern "C" {
 # endif
 }
 
-
 # include <string>
 using namespace std;
 
-
-# define HTTP_AUTH_SCHEME_BASIC 0
-# define HTTP_AUTH_SCHEME_DIGEST 1
+enum
+  {
+    HTTP_AUTH_SCHEME_BASIC,
+    HTTP_AUTH_SCHEME_DIGEST
+  };
 
 struct HttpThreadContext;
 struct HttpRequestHeader;
@@ -47,27 +49,30 @@ struct HttpResponseHeader;
 class HttpHeaders
 {
 public:
-	static int buildHTTPRequestHeaderStruct (const char* input,
+  static int buildHTTPRequestHeaderStruct (const char* input,
                                            u_long inputSize,
                                            u_long* nHeaderChars,
                                            HttpRequestHeader *request,
                                            Connection* connection);
 
-	static int buildHTTPResponseHeaderStruct (const char *input,
-                                           HttpResponseHeader *response,
-                                           u_long* nbtr);
+  static int buildHTTPResponseHeaderStruct (const char *input,
+                                            HttpResponseHeader *response,
+                                            u_long* nbtr);
+
+  static int sendHeader (HttpResponseHeader &response, Stream &stream,
+                         MemBuf &memBuf, HttpThreadContext *ctx);
 
-	static int validHTTPRequest (const char*, u_long, u_long*, u_long*);
-	static int validHTTPResponse (const char*, u_long*, u_long*);
+  static int validHTTPRequest (const char*, u_long, u_long*, u_long*);
+  static int validHTTPResponse (const char*, u_long*, u_long*);
 
-	static void resetHTTPRequest (HttpRequestHeader *request);
-	static void resetHTTPResponse (HttpResponseHeader *response);
+  static void resetHTTPRequest (HttpRequestHeader *request);
+  static void resetHTTPResponse (HttpResponseHeader *response);
 
-	static void buildDefaultHTTPResponseHeader (HttpResponseHeader*);
-	static void buildDefaultHTTPRequestHeader (HttpRequestHeader*);
+  static void buildDefaultHTTPResponseHeader (HttpResponseHeader*);
+  static void buildDefaultHTTPRequestHeader (HttpRequestHeader*);
 
-	static u_long buildHTTPResponseHeader (char*, HttpResponseHeader*);
-	static u_long buildHTTPRequestHeader (char*, HttpRequestHeader*);
+  static u_long buildHTTPResponseHeader (char*, HttpResponseHeader*);
+  static u_long buildHTTPRequestHeader (char*, HttpRequestHeader*);
 
 protected:
   static int readReqAuthLine (HttpRequestHeader *request,
diff --git a/myserver/src/http_handler/cgi/cgi.cpp b/myserver/src/http_handler/cgi/cgi.cpp
index 444c01e..537d73a 100644
--- a/myserver/src/http_handler/cgi/cgi.cpp
+++ b/myserver/src/http_handler/cgi/cgi.cpp
@@ -514,7 +514,7 @@ int Cgi::sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chai
        */
       if (!td->appendOutputs)
         {
-          string* location = td->response.getValue ("Location", 0);
+          string* location = td->response.getValue ("Location", NULL);
 
           /* If it is present "Location: foo" in the header then send a redirect
            * to `foo'.  */
@@ -524,18 +524,13 @@ int Cgi::sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chai
               return 1;
             }
 
-          u_long hdrLen = HttpHeaders::buildHTTPResponseHeader (td->buffer->getBuffer (),
-                                                                &td->response);
-
-          td->buffer->setLength (hdrLen);
-
-          if (chain.getStream ()->write (td->buffer->getBuffer (),
-                                         static_cast<int> (td->buffer->getLength ()),
-                                         &nbw))
+          if (HttpHeaders::sendHeader (td->response, *chain.getStream (),
+                                       *td->buffer, td))
             {
               *ret = 0;
               return 1;
             }
+
         }
     }
 
diff --git a/myserver/src/http_handler/fastcgi/fastcgi.cpp b/myserver/src/http_handler/fastcgi/fastcgi.cpp
index 580b8be..0927a23 100644
--- a/myserver/src/http_handler/fastcgi/fastcgi.cpp
+++ b/myserver/src/http_handler/fastcgi/fastcgi.cpp
@@ -783,17 +783,13 @@ int FastCgi::handleHeader (FcgiContext* con, FiltersChain* chain, bool* response
           *responseCompleted = true;
           return con->td->http->sendHTTPRedirect (location->c_str ());
         }
+    }
 
-      u_long hdrLen = HttpHeaders::buildHTTPResponseHeader (con->td->secondaryBuffer->getBuffer (),
-                                                            &con->td->response);
-
-      if (con->td->connection->socket->send (con->td->secondaryBuffer->getBuffer (),
-                                             hdrLen,
-                                             0) == SOCKET_ERROR )
-        {
-          *responseCompleted = true;
-          return 1;
-        }
+  if (HttpHeaders::sendHeader (con->td->response, *con->td->connection->socket,
+                               *con->td->secondaryBuffer, con->td))
+    {
+      *responseCompleted = true;
+      return 1;
     }
 
   con->headerSent = true;
diff --git a/myserver/src/http_handler/http_dir/http_dir.cpp b/myserver/src/http_handler/http_dir/http_dir.cpp
index 21e3c1d..89c9e32 100644
--- a/myserver/src/http_handler/http_dir/http_dir.cpp
+++ b/myserver/src/http_handler/http_dir/http_dir.cpp
@@ -361,19 +361,12 @@ int HttpDir::send (HttpThreadContext* td,
         }
     }
 
-  if (!td->appendOutputs)
-    {
-
-      HttpHeaders::buildHTTPResponseHeader (td->buffer->getBuffer (),
-                                            &(td->response));
-
-      if (td->connection->socket->send (td->buffer->getBuffer (),
-                                   strlen (td->buffer->getBuffer ()), 0) < 0)
-        return 0;
-    }
+  if (HttpHeaders::sendHeader (td->response, *td->connection->socket,
+                               *td->buffer, td))
+    return 1;
 
   if (onlyHeader)
-    return 1;
+    return 0;
 
   sortIndex = td->request.uriOpts.find ("sort=");
 
@@ -676,14 +669,14 @@ void HttpDir::formatHtml (string& in, string& out)
    */
   for (pos = 0; out[pos] != '\0'; pos++)
     {
-      if (((u_char)out[pos] >= 32 &&
-           (u_char)out[pos] <= 65)   ||
-          ((u_char)out[pos] >= 91 &&
-           (u_char)out[pos] <= 96)   ||
-          ((u_char)out[pos] >= 123 &&
-           (u_char)out[pos] <= 126) ||
-          ((u_char)out[pos] >= 160 &&
-           (u_char)out[pos] < 255))
+      if (((u_char)out[pos] >= 32
+           && (u_char)out[pos] <= 65)
+          || ((u_char)out[pos] >= 91
+              && (u_char)out[pos] <= 96)
+          || ((u_char)out[pos] >= 123
+              && (u_char)out[pos] <= 126)
+          || ((u_char)out[pos] >= 160
+              && (u_char)out[pos] < 255))
         {
           ostringstream os;
           os << "&#" << (int)((unsigned char)out[pos]) << ";";
diff --git a/myserver/src/http_handler/http_file/http_file.cpp b/myserver/src/http_handler/http_file/http_file.cpp
index 4df8458..d22c223 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -420,23 +420,13 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
 	  delete e;
       }
 
-    u_long hdrLen = HttpHeaders::buildHTTPResponseHeader (td->buffer->getBuffer (),
-                                                          &td->response);
-
-    td->buffer->setLength (hdrLen);
-
-    if (!td->appendOutputs)
+    if (HttpHeaders::sendHeader (td->response, *td->connection->socket,
+                                 *td->buffer, td))
       {
-        /* Send the HTTP header.  */
-        if (td->connection->socket->send (td->buffer->getBuffer (),
-                                          (u_long) td->buffer->getLength (),
-                                          0) == SOCKET_ERROR)
-          {
-            file->close ();
-            delete file;
-            chain.clearAllFilters ();
-            return 1;
-          }
+        file->close ();
+        delete file;
+        chain.clearAllFilters ();
+        return 1;
       }
 
     /*
diff --git a/myserver/src/http_handler/isapi/isapi.cpp b/myserver/src/http_handler/isapi/isapi.cpp
index 1a0b81e..4283296 100644
--- a/myserver/src/http_handler/isapi/isapi.cpp
+++ b/myserver/src/http_handler/isapi/isapi.cpp
@@ -217,158 +217,156 @@ BOOL WINAPI ISAPI_WriteClientExport (HCONN hConn, LPVOID Buffer, LPDWORD lpdwByt
 
   /*If the HTTP header was sent do not send it again. */
   if (!ConnInfo->headerSent)
-  {
-    int headerSize = 0;
-    u_long size = (u_long)strlen (buffer);
-    strncat (buffer, (char*)Buffer, *lpdwBytes);
-    ConnInfo->headerSize += *lpdwBytes;
-    if (buffer[0] == '\r')
-    {
-      if (buffer[1] == '\n')
-        headerSize = 2;
-    }
-    else
     {
-      for (u_long i = 0; i < size; i++)
-      {
-         if (buffer[i] == '\r')
-          if (buffer[i+1] == '\n')
-            if (buffer[i+2] == '\r')
-              if (buffer[i+3] == '\n')
-              {
-                headerSize = i + 4;
-                buffer[i + 2]='\0';
-                break;
-              }
-        if (buffer[i] == '\n')
+      int headerSize = 0;
+      u_long size = (u_long)strlen (buffer);
+      strncat (buffer, (char*)Buffer, *lpdwBytes);
+      ConnInfo->headerSize += *lpdwBytes;
+      if (buffer[0] == '\r')
         {
-          if (buffer[i+1] == '\n')
-          {
-            headerSize = i + 2;
-            buffer[i + 1]='\0';
-            break;
-          }
+          if (buffer[1] == '\n')
+            headerSize = 2;
         }
-      }
-    }
-    /*!
-     *Handle the HTTP header if exists.
-     */
-    if (headerSize)
-    {
-      int len = ConnInfo->headerSize-headerSize;
-
-      HttpHeaders::buildHTTPResponseHeaderStruct (ConnInfo->td->buffer->getBuffer (),
-                                                 &ConnInfo->td->response,
-                                                 &(ConnInfo->td->nBytesToRead));
-
-
-      if (!ConnInfo->td->appendOutputs)
-      {
-        if (keepalive)
+      else
         {
-          HttpResponseHeader::Entry *e;
-          e = ConnInfo->td->response.other.get ("Transfer-Encoding");
-          if (e)
-            e->value->assign ("chunked");
-          else
-          {
-            e = new HttpResponseHeader::Entry ();
-            e->name->assign ("Transfer-Encoding");
-            e->value->assign ("chunked");
-            ConnInfo->td->response.other.put (*(e->name), e);
-          }
+          for (u_long i = 0; i < size; i++)
+            {
+              if (buffer[i] == '\r')
+                if (buffer[i+1] == '\n')
+                  if (buffer[i+2] == '\r')
+                    if (buffer[i+3] == '\n')
+                      {
+                        headerSize = i + 4;
+                        buffer[i + 2]='\0';
+                        break;
+                      }
+              if (buffer[i] == '\n')
+                {
+                  if (buffer[i+1] == '\n')
+                    {
+                      headerSize = i + 2;
+                      buffer[i + 1]='\0';
+                      break;
+                    }
+                }
+            }
         }
-        else
-          ConnInfo->td->response.setValue ("Connection", "Close");
-
-        u_long hdrLen = HttpHeaders::buildHTTPResponseHeader ((char*)ConnInfo->td->secondaryBuffer->getBuffer (),
-                                                              &(ConnInfo->td->response));
+      /*!
+       *Handle the HTTP header if exists.
+       */
+      if (headerSize)
+        {
+          int len = ConnInfo->headerSize-headerSize;
+
+          HttpHeaders::buildHTTPResponseHeaderStruct (ConnInfo->td->buffer->getBuffer (),
+                                                      &ConnInfo->td->response,
+                                                      &(ConnInfo->td->nBytesToRead));
+
+
+          if (!ConnInfo->td->appendOutputs)
+            {
+              if (keepalive)
+                {
+                  HttpResponseHeader::Entry *e;
+                  e = ConnInfo->td->response.other.get ("Transfer-Encoding");
+                  if (e)
+                    e->value->assign ("chunked");
+                  else
+                    {
+                      e = new HttpResponseHeader::Entry ();
+                      e->name->assign ("Transfer-Encoding");
+                      e->value->assign ("chunked");
+                      ConnInfo->td->response.other.put (*(e->name), e);
+                    }
+                }
+              else
+                ConnInfo->td->response.setValue ("Connection", "Close");
+
+
+              if (HttpHeaders::sendHeader (ConnInfo->td->response, *td->connection->socket,
+                                           *ConnInfo->td->secondaryBuffer, ConnInfo->td))
+                return 1;
+            }
+          /*! Save the headerSent status. */
+          ConnInfo->headerSent=1;
+
+          /*! If only the header was requested return. */
+          if (ConnInfo->headerSent && ConnInfo->onlyHeader
+              || ConnInfo->td->response.getStatusType () == HttpResponseHeader::SUCCESSFUL)
+            return 0;
 
-        if (ConnInfo->connection->socket->send (
-                     (char*)ConnInfo->td->secondaryBuffer->getBuffer (), hdrLen, 0)==-1)
-          return 0;
-      }
-      /*! Save the headerSent status. */
-      ConnInfo->headerSent=1;
-
-      /*! If only the header was requested return. */
-      if (ConnInfo->headerSent && ConnInfo->onlyHeader
-          || ConnInfo->td->response.getStatusType () == HttpResponseHeader::SUCCESSFUL)
-        return 0;
-
-      /*!Send the first chunk. */
-      if (len)
-      {
-        /*! With keep-alive connections use chunks.*/
-        if (keepalive && (!ConnInfo->td->appendOutputs))
+          /*!Send the first chunk. */
+          if (len)
+            {
+              /*! With keep-alive connections use chunks.*/
+              if (keepalive && (!ConnInfo->td->appendOutputs))
+                {
+                  sprintf (chunkSize, "%x\r\n", len);
+                  if (ConnInfo->chain.getStream ()->write (chunkSize,
+                                                           (int)strlen (chunkSize), &nbw))
+                    return 0;
+                }
+
+              if (ConnInfo->td->appendOutputs)
+                {
+                  if (ConnInfo->td->outputData.writeToFile ((char*)(buffer + headerSize),
+                                                            len, &nbw))
+                    return 0;
+                  ConnInfo->dataSent += nbw;
+                }
+              else
+                {
+                  if (ConnInfo->chain.write ((char*)(buffer + headerSize),
+                                             len, &nbw))
+                    return 0;
+                  ConnInfo->dataSent += nbw;
+                }
+
+              /*! Send the chunk footer.  */
+              if (keepalive && (!ConnInfo->td->appendOutputs))
+                {
+                  if (ConnInfo->chain.getStream ()->write ("\r\n", 2, &nbw))
+                    return 0;
+                }
+            }
+        }
+      else
         {
-          sprintf (chunkSize, "%x\r\n", len);
-          if (ConnInfo->chain.getStream ()->write (chunkSize,
-                                                 (int)strlen (chunkSize), &nbw))
+          nbw = *lpdwBytes;
+        }
+    }
+  else/*!Continue to send data chunks*/
+    {
+      if (keepalive  && (!ConnInfo->td->appendOutputs))
+        {
+          sprintf (chunkSize, "%x\r\n", *lpdwBytes);
+          nbw = ConnInfo->connection->socket->send (chunkSize,
+                                                    (int)strlen (chunkSize), 0);
+          if ((nbw == (u_long)-1) || (!nbw))
             return 0;
         }
 
-        if (ConnInfo->td->appendOutputs)
+      if (ConnInfo->td->appendOutputs)
         {
-          if (ConnInfo->td->outputData.writeToFile ((char*)(buffer + headerSize),
-                                                  len, &nbw))
+          if (ConnInfo->td->outputData.writeToFile ((char*)Buffer,*lpdwBytes, &nbw))
             return 0;
           ConnInfo->dataSent += nbw;
         }
-        else
+      else
         {
-          if (ConnInfo->chain.write ((char*)(buffer + headerSize),
-                                    len, &nbw))
+          if (ConnInfo->chain.write ((char*)Buffer,*lpdwBytes, &nbw))
             return 0;
           ConnInfo->dataSent += nbw;
         }
 
-        /*! Send the chunk footer.  */
-        if (keepalive && (!ConnInfo->td->appendOutputs))
+      if (keepalive  && (!ConnInfo->td->appendOutputs))
         {
-          if (ConnInfo->chain.getStream ()->write ("\r\n", 2, &nbw))
+          nbw = ConnInfo->connection->socket->send ("\r\n", 2, 0);
+          if ((nbw == (u_long)-1) || (!nbw))
             return 0;
         }
-      }
-    }
-    else
-    {
-      nbw = *lpdwBytes;
-    }
-  }
-  else/*!Continue to send data chunks*/
-  {
-    if (keepalive  && (!ConnInfo->td->appendOutputs))
-    {
-      sprintf (chunkSize, "%x\r\n", *lpdwBytes);
-      nbw = ConnInfo->connection->socket->send (chunkSize,
-                                                (int)strlen (chunkSize), 0);
-      if ((nbw == (u_long)-1) || (!nbw))
-        return 0;
-    }
-
-    if (ConnInfo->td->appendOutputs)
-    {
-      if (ConnInfo->td->outputData.writeToFile ((char*)Buffer,*lpdwBytes, &nbw))
-        return 0;
-      ConnInfo->dataSent += nbw;
-    }
-    else
-    {
-      if (ConnInfo->chain.write ((char*)Buffer,*lpdwBytes, &nbw))
-        return 0;
-      ConnInfo->dataSent += nbw;
     }
 
-    if (keepalive  && (!ConnInfo->td->appendOutputs))
-    {
-      nbw = ConnInfo->connection->socket->send ("\r\n", 2, 0);
-      if ((nbw == (u_long)-1) || (!nbw))
-        return 0;
-    }
-  }
-
   *lpdwBytes = nbw;
 
   ConnInfo->td->sentData += ConnInfo->dataSent;
@@ -409,84 +407,84 @@ BOOL WINAPI ISAPI_ReadClientExport (HCONN hConn, LPVOID lpvBuffer,
 }
 
 /*!
- *Get server environment variable.
+ * Get server environment variable.
  */
 BOOL WINAPI ISAPI_GetServerVariableExport (HCONN hConn,
-                                          LPSTR lpszVariableName,
-                                          LPVOID lpvBuffer,
-                                          LPDWORD lpdwSize)
+                                           LPSTR lpszVariableName,
+                                           LPVOID lpvBuffer,
+                                           LPDWORD lpdwSize)
 {
   ConnTableRecord *ConnInfo;
-  BOOL ret =1;
+  BOOL ret = 1;
   Isapi::isapiMutex->lock ();
   ConnInfo = Isapi::HConnRecord (hConn);
   Isapi::isapiMutex->unlock ();
   if (ConnInfo == NULL)
-  {
-    Server::getInstance ()->log (
-                       "Isapi::GetServerVariableExport: invalid hConn");
-    return 0;
-  }
+    {
+      Server::getInstance ()->log (
+                            "Isapi::GetServerVariableExport: invalid hConn");
+      return 0;
+    }
 
   if (!strcmp (lpszVariableName, "ALL_HTTP"))
-  {
+    {
 
-        if (Isapi::buildAllHttpHeaders (ConnInfo->td,ConnInfo->connection, lpvBuffer, lpdwSize))
-      ret=1;
+      if (Isapi::buildAllHttpHeaders (ConnInfo->td,ConnInfo->connection,
+                                      lpvBuffer, lpdwSize))
+        ret = 1;
 
-        else
-    {
-      SetLastError (ERROR_INSUFFICIENT_BUFFER);
-      ret=0;
-    }
+      else
+        {
+          SetLastError (ERROR_INSUFFICIENT_BUFFER);
+          ret = 0;
+        }
 
-  }else if (!strcmp (lpszVariableName, "ALL_RAW"))
-  {
-    if (Isapi::buildAllRawHeaders (ConnInfo->td,ConnInfo->connection,
-                                 lpvBuffer, lpdwSize))
-      ret = 1;
-    else
-    {
-      SetLastError (ERROR_INSUFFICIENT_BUFFER);
-      ret = 0;
     }
+  else if (!strcmp (lpszVariableName, "ALL_RAW"))
+    {
+      if (Isapi::buildAllRawHeaders (ConnInfo->td,ConnInfo->connection,
+                                     lpvBuffer, lpdwSize))
+        ret = 1;
+      else
+        {
+          SetLastError (ERROR_INSUFFICIENT_BUFFER);
+          ret = 0;
+        }
 
-  }
+    }
   else
-  {
-    /*!
-     *find in ConnInfo->envString the value lpszVariableName
-     *and copy next string in lpvBuffer.
-     */
-    char *localEnv;
-    int variableNameLen;
-    ((char*)lpvBuffer)[0]='\0';
-    localEnv = ConnInfo->envString;
-    variableNameLen = (int)strlen (lpszVariableName);
-    for (u_long i = 0;;i += (u_long)strlen (&localEnv[i]) + 1)
     {
-      if (((localEnv[i + variableNameLen]) == '=') &&
-         (!strncmp (&localEnv[i], lpszVariableName, variableNameLen)))
-      {
-        strncpy ((char*)lpvBuffer, &localEnv[i + variableNameLen + 1],
-                *lpdwSize);
-        break;
-      }
-      else if ((localEnv[i] == '\0') && (localEnv[i + 1] == '\0'))
-      {
-        break;
-      }
+      /*!
+       * Find in ConnInfo->envString the value lpszVariableName
+       * and copy next string in lpvBuffer.
+       */
+      char *localEnv;
+      int variableNameLen;
+      ((char*)lpvBuffer)[0]='\0';
+      localEnv = ConnInfo->envString;
+      variableNameLen = (int)strlen (lpszVariableName);
+      for (u_long i = 0;;i += (u_long)strlen (&localEnv[i]) + 1)
+        {
+          if (((localEnv[i + variableNameLen]) == '=') &&
+              (!strncmp (&localEnv[i], lpszVariableName, variableNameLen)))
+            {
+              strncpy ((char*)lpvBuffer, &localEnv[i + variableNameLen + 1],
+                       *lpdwSize);
+              break;
+            }
+          else if ((localEnv[i] == '\0') && (localEnv[i + 1] == '\0'))
+            break;
+        }
     }
-  }
-  *lpdwSize =(DWORD)strlen ((char*)lpvBuffer);
+  *lpdwSize = (DWORD) strlen ((char*)lpvBuffer);
   return ret;
 }
 
 /*!
- *Build the string that contains all the HTTP headers.
+ * Build the string that contains all the HTTP headers.
  */
 BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
-                                LPVOID output, LPDWORD dwMaxLen)
+                                 LPVOID output, LPDWORD dwMaxLen)
 {
   DWORD valLen = 0;
   DWORD maxLen = *dwMaxLen;
@@ -496,38 +494,36 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
 
   if (accept && accept->value->length () && (valLen+30<maxLen))
     valLen += sprintf (&ValStr[valLen],"HTTP_ACCEPT:%s\n",
-                    accept->value->c_str ());
+                       accept->value->c_str ());
   else if (valLen + 30 < maxLen)
     return 0;
 
   if (cache && cache->value->length () && (valLen+30<maxLen))
     valLen += sprintf (&ValStr[valLen], "HTTP_CACHE_CONTROL:%s\n",
-                    cache->value->c_str ());
+                       cache->value->c_str ());
   else if (valLen + 30 < maxLen)
     return 0;
 
   if ((td->request.rangeByteBegin || td->request.rangeByteEnd) &&
-     (valLen + 30 < maxLen))
-  {
-    ostringstream rangeBuffer;
-    rangeBuffer << "HTTP_RANGE:" << td->request.rangeType << "=" ;
-    if (td->request.rangeByteBegin)
+      (valLen + 30 < maxLen))
     {
-      rangeBuffer << (int)td->request.rangeByteBegin;
+      ostringstream rangeBuffer;
+      rangeBuffer << "HTTP_RANGE:" << td->request.rangeType << "=" ;
+      if (td->request.rangeByteBegin)
+        {
+          rangeBuffer << (int)td->request.rangeByteBegin;
+        }
+      rangeBuffer << "-";
+      if (td->request.rangeByteEnd)
+        rangeBuffer << td->request.rangeByteEnd;
+      valLen += sprintf (&ValStr[valLen], "%s\n", rangeBuffer.str ().c_str ());
     }
-    rangeBuffer << "-";
-    if (td->request.rangeByteEnd)
-    {
-      rangeBuffer << td->request.rangeByteEnd;
-     }
-    valLen += sprintf (&ValStr[valLen], "%s\n", rangeBuffer.str ().c_str ());
-  }
 
   {
     HttpRequestHeader::Entry* e = td->request.other.get ("Accept-Encoding");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen], "HTTP_ACCEPT_ENCODING:%s\n",
-                        e->value->c_str ());
+                         e->value->c_str ());
     else if (valLen + 30 < maxLen)
       return 0;
   }
@@ -537,7 +533,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
     HttpRequestHeader::Entry* e = td->request.other.get ("Accept-Language");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_ACCEPT_LANGUAGE:%s\n",
-                      e->value->c_str ());
+                         e->value->c_str ());
     else if (valLen + 30 < maxLen)
       return 0;
   }
@@ -547,7 +543,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
     HttpRequestHeader::Entry* e = td->request.other.get ("Accept-Charset");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_ACCEPT_CHARSET:%s\n",
-                      e->value->c_str ());
+                         e->value->c_str ());
     else if (valLen + 30 < maxLen)
       return 0;
   }
@@ -556,7 +552,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
     HttpRequestHeader::Entry* e = td->request.other.get ("Pragma");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_PRAGMA:%s\n",
-                      e->value->c_str ());
+                         e->value->c_str ());
     else if (valLen + 30 < maxLen)
       return 0;
   }
@@ -565,7 +561,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
     HttpRequestHeader::Entry* e = td->request.other.get ("Connection");
     if (e && (valLen + 30< maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_CONNECTION:%s\n",
-                      e->value->c_str ());
+                         e->value->c_str ());
     else if (valLen + 30 < maxLen)
       return 0;
   }
@@ -574,7 +570,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
     HttpRequestHeader::Entry* e = td->request.other.get ("Cookie");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_COOKIE:%s\n",
-                      e->value->c_str ());
+                         e->value->c_str ());
     else if (valLen + 30 < maxLen)
       return 0;
   }
@@ -583,7 +579,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
     HttpRequestHeader::Entry* e = td->request.other.get ("Host");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_HOST:%s\n",
-                      e->value->c_str ());
+                         e->value->c_str ());
     else if (valLen + 30 < maxLen)
       return 0;
   }
@@ -592,7 +588,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
     HttpRequestHeader::Entry* e = td->request.other.get ("Date");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_DATE:%s\n",
-                      e->value->c_str ());
+                         e->value->c_str ());
     else if (valLen + 30 < maxLen)
       return 0;
   }
@@ -601,7 +597,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
     HttpRequestHeader::Entry* e = td->request.other.get ("If-Modified-Since");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_IF_MODIFIED_SINCE:%s\n",
-                      e->value->c_str ());
+                         e->value->c_str ());
     else if (valLen + 30 < maxLen)
       return 0;
   }
@@ -610,7 +606,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
     HttpRequestHeader::Entry* e = td->request.other.get ("Referer");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_REFERER:%s\n",
-                      e->value->c_str ());
+                         e->value->c_str ());
     else if (valLen + 30 < maxLen)
       return 0;
   }
@@ -619,7 +615,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
     HttpRequestHeader::Entry* e = td->request.other.get ("User-Agent");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_USER_AGENT:%s\n",
-                      e->value->c_str ());
+                         e->value->c_str ());
     else if (valLen + 30 < maxLen)
       return 0;
   }
@@ -628,7 +624,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
     HttpRequestHeader::Entry* e = td->request.other.get ("From");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_FROM:%s\n",
-                      e->value->c_str ());
+                         e->value->c_str ());
     else if (valLen + 30 < maxLen)
       return 0;
   }
@@ -637,10 +633,10 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
 }
 
 /*!
- *Build the string that contains all the headers.
+ * Build the string that contains all the headers.
  */
 BOOL Isapi::buildAllRawHeaders (HttpThreadContext* td,ConnectionPtr a,
-                               LPVOID output,LPDWORD dwMaxLen)
+                                LPVOID output,LPDWORD dwMaxLen)
 {
   DWORD valLen = 0;
   DWORD maxLen = *dwMaxLen;
@@ -651,74 +647,74 @@ BOOL Isapi::buildAllRawHeaders (HttpThreadContext* td,ConnectionPtr a,
 
   if (td->pathInfo.length () && (valLen + 30 < maxLen))
     valLen += sprintf (&ValStr[valLen], "PATH_INFO:%s\n",
-                      td->pathInfo.c_str ());
+                       td->pathInfo.c_str ());
   else if (valLen + 30 < maxLen)
     return 0;
 
   if (td->pathTranslated.length () && (valLen + 30 < maxLen))
     valLen += sprintf (&ValStr[valLen], "PATH_INFO:%s\n",
-                      td->pathTranslated.c_str ());
+                       td->pathTranslated.c_str ());
   else if (valLen + 30 < maxLen)
     return 0;
 
   if (td->request.uriOpts[0] && (valLen + 30 < maxLen))
     valLen += sprintf (&ValStr[valLen], "QUERY_STRING:%s\n",
-                      td->request.uriOpts[0]);
+                       td->request.uriOpts[0]);
   else if (valLen + 30 < maxLen)
     return 0;
 
   if (td->request.cmd[0] && (valLen + 30 < maxLen))
     valLen += sprintf (&ValStr[valLen], "REQUEST_METHOD:%s\n",
-                      td->request.cmd[0]);
+                       td->request.cmd[0]);
   else if (valLen + 30 < maxLen)
     return 0;
 
   if (td->filenamePath.length () && (valLen + 30 < maxLen))
     valLen += sprintf (&ValStr[valLen], "SCRIPT_FILENAME:%s\n",
-                      td->filenamePath[0]);
+                       td->filenamePath[0]);
   else if (valLen + 30 < maxLen)
     return 0;
 
   if (valLen + 30 < maxLen)
     valLen += sprintf (&ValStr[valLen], "SERVER_PORT:%u\n",
-                      td->connection->getLocalPort ());
+                       td->connection->getLocalPort ());
   else if (valLen + 30 < maxLen)
     return 0;
 
   if (valLen + 30 < maxLen)
     valLen += sprintf (&ValStr[valLen],
-                      "SERVER_SIGNATURE:<address>%s</address>\n",
-                      MYSERVER_VERSION);
+                       "SERVER_SIGNATURE:<address>%s</address>\n",
+                       MYSERVER_VERSION);
   else if (valLen + 30 < maxLen)
     return 0;
 
   if (td->connection->getIpAddr ()[0] && valLen + 30 < maxLen)
     valLen += sprintf (&ValStr[valLen], "REMOTE_ADDR:\n",
-                      td->connection->getIpAddr ());
+                       td->connection->getIpAddr ());
   else if (valLen + 30 < maxLen)
     return 0;
 
   if (td->connection->getPort () && valLen + 30 < maxLen)
     valLen += sprintf (&ValStr[valLen], "REMOTE_PORT:%u\n",
-                      td->connection->getPort ());
+                       td->connection->getPort ());
   else if (valLen + 30 < maxLen)
     return 0;
 
   if (valLen + 30 < maxLen)
     valLen += sprintf (&ValStr[valLen], "SERVER_ADMIN:%s\n",
-                      td->securityToken.getData ("server.admin", MYSERVER_VHOST_CONF |
-                                                       MYSERVER_SERVER_CONF, ""));
+                       td->securityToken.getData ("server.admin", MYSERVER_VHOST_CONF |
+                                                  MYSERVER_SERVER_CONF, ""));
   else if (valLen + 30 < maxLen)
     return 0;
 
   if (valLen + MAX_PATH < maxLen)
-  {
-    valLen += sprintf (&ValStr[valLen],"SCRIPT_NAME:");
-    lstrcpyn (&ValStr[valLen], td->request.uri.c_str (),
-             td->request.uri.length ()- td->pathInfo.length () + 1);
-    valLen += (DWORD)td->request.uri.length ()-td->pathInfo.length () + 1;
-    valLen += (DWORD)sprintf (&ValStr[valLen],"\n");
-  }
+    {
+      valLen += sprintf (&ValStr[valLen],"SCRIPT_NAME:");
+      lstrcpyn (&ValStr[valLen], td->request.uri.c_str (),
+                td->request.uri.length ()- td->pathInfo.length () + 1);
+      valLen += (DWORD)td->request.uri.length ()-td->pathInfo.length () + 1;
+      valLen += (DWORD)sprintf (&ValStr[valLen],"\n");
+    }
   else if (valLen + 30 < maxLen)
     return 0;
   return 1;
@@ -731,11 +727,11 @@ BOOL Isapi::buildAllRawHeaders (HttpThreadContext* td,ConnectionPtr a,
  */
 int Isapi::send (HttpThreadContext* td,
                 const char* scriptpath, const char *cgipath,
-                bool execute, bool onlyHeader)
+                 bool execute, bool onlyHeader)
 {
-/*!
- *ISAPI works only on the windows architecture.
- */
+  /*!
+   *ISAPI works only on the windows architecture.
+   */
 #ifdef WIN32
   DWORD Ret;
   EXTENSION_CONTROL_BLOCK ExtCtrlBlk;
@@ -750,16 +746,16 @@ int Isapi::send (HttpThreadContext* td,
   char fullpath[MAX_PATH * 2 + 5];
 
   if (!execute)
-  {
-    if (cgipath && strlen (cgipath))
-      sprintf (fullpath, "%s \"%s\"", cgipath, td->filenamePath.c_str ());
-    else
-      sprintf (fullpath, "%s", td->filenamePath.c_str ());
-  }
+    {
+      if (cgipath && strlen (cgipath))
+        sprintf (fullpath, "%s \"%s\"", cgipath, td->filenamePath.c_str ());
+      else
+        sprintf (fullpath, "%s", td->filenamePath.c_str ());
+    }
   else
-  {
-    sprintf (fullpath, "%s", cgipath);
-  }
+    {
+      sprintf (fullpath, "%s", cgipath);
+    }
 
   if (!(td->permissions & MYSERVER_PERMISSION_EXECUTE))
     return td->http->sendAuth ();
@@ -771,17 +767,17 @@ int Isapi::send (HttpThreadContext* td,
   Isapi::isapiMutex->lock ();
   while ((connTable[connIndex].Allocated != 0) &&
          (connIndex < maxConnections))
-  {
-    connIndex++;
-  }
+    {
+      connIndex++;
+    }
   Isapi::isapiMutex->unlock ();
   LeaveCriticalSection (&GetTableEntryCritSec);
 
   if (connIndex == maxConnections)
-  {
-    td->connection->host->warningsLogWrite (_("ISAPI: max connections"));
-    return td->http->raiseHTTPError (503);
-  }
+    {
+      td->connection->host->warningsLogWrite (_("ISAPI: max connections"));
+      return td->http->raiseHTTPError (503);
+    }
   if (execute)
     loadLib = scriptpath;
   else
@@ -799,19 +795,19 @@ int Isapi::send (HttpThreadContext* td,
   connTable[connIndex].chain.setProtocolData (td);
   connTable[connIndex].chain.setStream (td->connection->socket);
   if (td->mime)
-  {
-    u_long nbw;
-    if (td->mime && Server::getInstance ()->getFiltersFactory ()->chain (
-                                          &(connTable[connIndex].chain),
-                                          td->mime->filters,
-                                          td->connection->socket,
-                                          &nbw, 1))
-      {
-        td->connection->host->warningsLogWrite (_("ISAPI: internal error"));
-        connTable[connIndex].chain.clearAllFilters ();
-        return td->http->raiseHTTPError (500);
-      }
-  }
+    {
+      u_long nbw;
+      if (td->mime && Server::getInstance ()->getFiltersFactory ()->chain (
+                                                                           &(connTable[connIndex].chain),
+                                                                           td->mime->filters,
+                                                                           td->connection->socket,
+                                                                           &nbw, 1))
+        {
+          td->connection->host->warningsLogWrite (_("ISAPI: internal error"));
+          connTable[connIndex].chain.clearAllFilters ();
+          return td->http->raiseHTTPError (500);
+        }
+    }
 
   connTable[connIndex].connection = td->connection;
   connTable[connIndex].td = td;
@@ -826,27 +822,27 @@ int Isapi::send (HttpThreadContext* td,
   GetExtensionVersion = (PFN_GETEXTENSIONVERSION)appHnd.getProc ("GetExtensionVersion");
 
   if (GetExtensionVersion == NULL)
-  {
-    td->connection->host->warningsLogWrite (_("ISAPI: internal error"));
-    appHnd.close ();
-    connTable[connIndex].chain.clearAllFilters ();
-    return td->http->raiseHTTPError (500);
-  }
+    {
+      td->connection->host->warningsLogWrite (_("ISAPI: internal error"));
+      appHnd.close ();
+      connTable[connIndex].chain.clearAllFilters ();
+      return td->http->raiseHTTPError (500);
+    }
   if (!GetExtensionVersion (&Ver))
-  {
-    td->connection->host->warningsLogWrite (_("ISAPI: internal error"));
-    appHnd.close ();
-    connTable[connIndex].chain.clearAllFilters ();
-    return td->http->raiseHTTPError (500);
-  }
+    {
+      td->connection->host->warningsLogWrite (_("ISAPI: internal error"));
+      appHnd.close ();
+      connTable[connIndex].chain.clearAllFilters ();
+      return td->http->raiseHTTPError (500);
+    }
   if (Ver.dwExtensionVersion > MAKELONG (HSE_VERSION_MINOR,
-                                        HSE_VERSION_MAJOR))
-  {
-    td->connection->host->warningsLogWrite (_("ISAPI: version not supported"));
-    appHnd.close ();
-    connTable[connIndex].chain.clearAllFilters ();
-    return td->http->raiseHTTPError (500);
-  }
+                                         HSE_VERSION_MAJOR))
+    {
+      td->connection->host->warningsLogWrite (_("ISAPI: version not supported"));
+      appHnd.close ();
+      connTable[connIndex].chain.clearAllFilters ();
+      return td->http->raiseHTTPError (500);
+    }
   /*!
    *Store the environment string in the secondaryBuffer.
    */
@@ -890,25 +886,23 @@ int Isapi::send (HttpThreadContext* td,
     HttpRequestHeader::Entry *content =
       td->request.other.get ("Content-type");
     ExtCtrlBlk.lpszContentType = content ? (char*)content->value->c_str ()
-                                         : 0;
+      : 0;
   }
 
   connTable[connIndex].td->buffer->setLength (0);
   connTable[connIndex].td->buffer->getAt (0)='\0';
   HttpExtensionProc = (PFN_HTTPEXTENSIONPROC)appHnd.getProc ("HttpExtensionProc");
   if (HttpExtensionProc == NULL)
-  {
-    td->connection->host->warningsLogWrite (_("ISAPI: internal error"));
-    appHnd.close ();
-    connTable[connIndex].chain.clearAllFilters ();
-    return td->http->raiseHTTPError (500);
-  }
+    {
+      td->connection->host->warningsLogWrite (_("ISAPI: internal error"));
+      appHnd.close ();
+      connTable[connIndex].chain.clearAllFilters ();
+      return td->http->raiseHTTPError (500);
+    }
 
   Ret = HttpExtensionProc (&ExtCtrlBlk);
   if (Ret == HSE_STATUS_PENDING)
-  {
     WaitForSingleObject (connTable[connIndex].ISAPIDoneEvent, td->http->getTimeout ());
-  }
 
   {
     u_long nbw = 0;
@@ -919,7 +913,7 @@ int Isapi::send (HttpThreadContext* td,
   }
 
   switch (Ret)
-  {
+    {
     case HSE_STATUS_SUCCESS_AND_KEEP_CONN:
       retvalue = 1;
       break;
@@ -929,7 +923,7 @@ int Isapi::send (HttpThreadContext* td,
     default:
       retvalue = 0;
       break;
-  }
+    }
 
   appHnd.close ();
 
@@ -974,18 +968,18 @@ int Isapi::load ()
 
   connTable = new ConnTableRecord[maxConnections];
   for (int i=0;i<maxConnections; i++)
-  {
-    connTable[i].Allocated=0;
-    connTable[i].onlyHeader=0;
-    connTable[i].headerSent=0;
-    connTable[i].headerSize=0;
-    connTable[i].td=0;
-    connTable[i].dataSent=0;
-    connTable[i].envString=0;
-    connTable[i].connection=0;
-    connTable[i].ISAPIDoneEvent=0;
-    connTable[i].isapi=0;
-  }
+    {
+      connTable[i].Allocated=0;
+      connTable[i].onlyHeader=0;
+      connTable[i].headerSent=0;
+      connTable[i].headerSize=0;
+      connTable[i].td=0;
+      connTable[i].dataSent=0;
+      connTable[i].envString=0;
+      connTable[i].connection=0;
+      connTable[i].ISAPIDoneEvent=0;
+      connTable[i].isapi=0;
+    }
   InitializeCriticalSection (&GetTableEntryCritSec);
   initialized=1;
 #endif
@@ -1002,8 +996,8 @@ int Isapi::unLoad ()
   DeleteCriticalSection (&GetTableEntryCritSec);
   if (connTable)
     delete [] connTable;
-  connTable=0;
-  initialized=0;
+  connTable = 0;
+  initialized = 0;
 #endif
   return 0;
 }
diff --git a/myserver/src/http_handler/mscgi/mscgi.cpp b/myserver/src/http_handler/mscgi/mscgi.cpp
index 6ddc726..a3d8995 100644
--- a/myserver/src/http_handler/mscgi/mscgi.cpp
+++ b/myserver/src/http_handler/mscgi/mscgi.cpp
@@ -160,11 +160,8 @@ int MsCgi::write (const char* data, u_long len, MsCgiData* mcd)
   if (mcd->error)
     return 1;
 
-  if (!mcd->headerSent)
-    {
-      if (sendHeader (mcd))
-        return 1;
-    }
+  if (!mcd->headerSent && sendHeader (mcd))
+    return 1;
 
   if (mcd->onlyHeader)
     return 0;
@@ -187,22 +184,17 @@ int MsCgi::write (const char* data, u_long len, MsCgiData* mcd)
  */
 int MsCgi::sendHeader (MsCgiData* mcd)
 {
+  HttpThreadContext* td = mcd->td;
+
   if (mcd->error)
     return 1;
 
   if (mcd->headerSent)
     return 0;
 
-  if (!mcd->td->appendOutputs)
-    {
-      HttpThreadContext* td = mcd->td;
-      char *buffer = td->secondaryBuffer->getBuffer ();
-      ConnectionPtr s = td->connection;
-
-      u_long hdrLen = HttpHeaders::buildHTTPResponseHeader (buffer, &(td->response));
-      if (td->connection->socket->send (buffer, hdrLen, 0) == SOCKET_ERROR)
-        return 1;
-    }
+  if (HttpHeaders::sendHeader (td->response, *td->connection->socket,
+                               *td->secondaryBuffer, td))
+    return 1;
 
   mcd->headerSent = true;
   return 0;
diff --git a/myserver/src/http_handler/proxy/proxy.cpp b/myserver/src/http_handler/proxy/proxy.cpp
index e8c8cd4..2276e67 100644
--- a/myserver/src/http_handler/proxy/proxy.cpp
+++ b/myserver/src/http_handler/proxy/proxy.cpp
@@ -88,19 +88,17 @@ int Proxy::send (HttpThreadContext *td,
   xForwardedFor.append (td->connection->getIpAddr ());
   req.setValue ("X-Forwarded-For", xForwardedFor.c_str ());
 
-	u_long hdrLen = HttpHeaders::buildHTTPRequestHeader (td->secondaryBuffer->getBuffer (),
-                                                       &req);
-
   if (sock.connect (destUrl.getHost ().c_str (), destUrl.getPort ()))
     return td->http->raiseHTTPError (500);
 
-  if (sock.write (td->secondaryBuffer->getBuffer (), hdrLen, &nbw))
+  if (HttpHeaders::sendHeader (td->response, *td->connection->socket,
+                               *td->secondaryBuffer, td))
     {
-      sock.close ();
-      return td->http->raiseHTTPError (500);
+      chain.clearAllFilters ();
+      return 1;
     }
 
- if (td->request.uriOptsPtr &&
+  if (td->request.uriOptsPtr &&
       td->inputData.fastCopyToSocket (&sock, 0, td->secondaryBuffer, &nbw))
     {
       sock.close ();
@@ -112,10 +110,10 @@ int Proxy::send (HttpThreadContext *td,
   chain.setStream (td->connection->socket);
 
   if (td->mime && Server::getInstance ()->getFiltersFactory ()->chain (&chain,
-                                                                   td->mime->filters,
-                                                                   td->connection->socket,
-                                                                   &nbw,
-                                                                   1))
+                                                            td->mime->filters,
+                                                       td->connection->socket,
+                                                                       &nbw,
+                                                                       1))
     {
       sock.close ();
       return td->http->raiseHTTPError (500);
diff --git a/myserver/src/http_handler/scgi/scgi.cpp b/myserver/src/http_handler/scgi/scgi.cpp
index 838214d..6b85719 100644
--- a/myserver/src/http_handler/scgi/scgi.cpp
+++ b/myserver/src/http_handler/scgi/scgi.cpp
@@ -216,7 +216,7 @@ int Scgi::send (HttpThreadContext* td, const char* scriptpath,
 
 
 /*!
- *Send the response to the client.
+ * Send the response to the client.
  */
 int Scgi::sendResponse (ScgiContext* ctx, int onlyHeader, FiltersChain* chain)
 {
@@ -233,94 +233,90 @@ int Scgi::sendResponse (ScgiContext* ctx, int onlyHeader, FiltersChain* chain)
   checkDataChunks (td, &keepalive, &useChunks);
 
   for (;;)
-  {
-    while (!ctx->sock.bytesToRead ())
     {
-      if ((clock_t)(getTicks () - initialTicks) > td->http->getTimeout ())
-        break;
-      Thread::wait (1);
-    }
-
-    if (!ctx->sock.bytesToRead ())
-      return -1;
-
-    nbr = ctx->sock.recv (td->secondaryBuffer->getBuffer () + read,
-                        td->secondaryBuffer->getRealLength () - read,
-                         td->http->getTimeout ());
-
-    read += nbr;
-
+      while (!ctx->sock.bytesToRead ())
+        {
+          if ((clock_t)(getTicks () - initialTicks) > td->http->getTimeout ())
+            break;
+          Thread::wait (1);
+        }
+
+      if (!ctx->sock.bytesToRead ())
+        return -1;
 
-    for (tmpHeaderSize = (tmpHeaderSize > 3)
-          ? tmpHeaderSize - 4 : tmpHeaderSize;
-        tmpHeaderSize < read - 4; tmpHeaderSize++)
-      if ((td->secondaryBuffer->getBuffer ()[tmpHeaderSize] == '\r') &&
-         (td->secondaryBuffer->getBuffer ()[tmpHeaderSize + 1] == '\n') &&
-         (td->secondaryBuffer->getBuffer ()[tmpHeaderSize + 2] == '\r') &&
-         (td->secondaryBuffer->getBuffer ()[tmpHeaderSize + 3] == '\n'))
-      {
-        headerSize = tmpHeaderSize + 4;
+      nbr = ctx->sock.recv (td->secondaryBuffer->getBuffer () + read,
+                            td->secondaryBuffer->getRealLength () - read,
+                            td->http->getTimeout ());
+
+      read += nbr;
+
+      for (tmpHeaderSize = (tmpHeaderSize > 3)
+             ? tmpHeaderSize - 4 : tmpHeaderSize;
+           tmpHeaderSize < read - 4; tmpHeaderSize++)
+        if ((td->secondaryBuffer->getBuffer ()[tmpHeaderSize] == '\r')
+            && (td->secondaryBuffer->getBuffer ()[tmpHeaderSize + 1] == '\n')
+            && (td->secondaryBuffer->getBuffer ()[tmpHeaderSize + 2] == '\r')
+            && (td->secondaryBuffer->getBuffer ()[tmpHeaderSize + 3] == '\n'))
+          {
+            headerSize = tmpHeaderSize + 4;
+            break;
+          }
+
+      if (headerSize)
         break;
-      }
-    if (headerSize)
-      break;
-  }
+    }
 
+  if (headerSize)
+    HttpHeaders::buildHTTPResponseHeaderStruct (td->secondaryBuffer->getBuffer (),
+                                                &td->response,
+                                                &(td->nBytesToRead));
 
-  if (!td->appendOutputs)
-  {
-    if (headerSize)
-    {
-      HttpHeaders::buildHTTPResponseHeaderStruct (td->secondaryBuffer->getBuffer (),
-                                                 &td->response,
-                                                 &(td->nBytesToRead));
-    }
-    u_long hdrLen = HttpHeaders::buildHTTPResponseHeader (td->buffer->getBuffer (),
-                                                         &td->response);
+  if (HttpHeaders::sendHeader (td->response, *td->connection->socket,
+                               *td->secondaryBuffer, td))
+    return 1;
 
-    if (chain->write (td->buffer->getBuffer (), hdrLen, &nbw))
-      return -1;
-  }
+  if (onlyHeader)
+    return 0;
 
   if (read - headerSize)
     if (appendDataToHTTPChannel (td, td->secondaryBuffer->getBuffer () + headerSize,
-                               read - headerSize,
-                               &(td->outputData),
-                               chain,
-                               td->appendOutputs,
-                               useChunks))
-     return -1;
-
-  sentData += read - headerSize;
-
-  if (td->response.getStatusType () == HttpResponseHeader::SUCCESSFUL)
-  {
-    for (;;)
-    {
-      nbr = ctx->sock.recv (td->secondaryBuffer->getBuffer (),
-                           td->secondaryBuffer->getRealLength (),
-                           0);
-
-      if (!nbr || (nbr == (u_long)-1))
-        break;
-
-      if (appendDataToHTTPChannel (td, td->secondaryBuffer->getBuffer (),
-                                 nbr,
+                                 read - headerSize,
                                  &(td->outputData),
                                  chain,
                                  td->appendOutputs,
                                  useChunks))
-        return -1;
+      return -1;
 
-      sentData += nbr;
-    }
+  sentData += read - headerSize;
 
-    if (!td->appendOutputs && useChunks)
+  if (td->response.getStatusType () == HttpResponseHeader::SUCCESSFUL)
     {
-      if (chain->getStream ()->write ("0\r\n\r\n", 5, &nbw))
-        return -1;
+      for (;;)
+        {
+          nbr = ctx->sock.recv (td->secondaryBuffer->getBuffer (),
+                                td->secondaryBuffer->getRealLength (),
+                                0);
+
+          if (!nbr || (nbr == (u_long)-1))
+            break;
+
+          if (appendDataToHTTPChannel (td, td->secondaryBuffer->getBuffer (),
+                                       nbr,
+                                       &(td->outputData),
+                                       chain,
+                                       td->appendOutputs,
+                                       useChunks))
+            return -1;
+
+          sentData += nbr;
+        }
+
+      if (!td->appendOutputs && useChunks)
+        {
+          if (chain->getStream ()->write ("0\r\n\r\n", 5, &nbw))
+            return -1;
+        }
     }
-  }
   /* For logging activity.  */
   td->sentData += sentData;
 
@@ -348,27 +344,23 @@ int Scgi::sendNetString (ScgiContext* ctx, const char* data, int len)
 }
 
 /*!
- *Send the post data to the SCGI server.
+ * Send the post data to the SCGI server.
  */
 int Scgi::sendPostData (ScgiContext* ctx)
 {
-    u_long nbr;
-    do
+  u_long nbr;
+  do
     {
       if (ctx->td->inputData.read (ctx->td->secondaryBuffer->getBuffer (),
-                                         ctx->td->secondaryBuffer->getRealLength (),
-                                         &nbr))
-      {
+                                   ctx->td->secondaryBuffer->getRealLength (),
+                                   &nbr))
         return -1;
-      }
 
       if (nbr && (ctx->sock.send (ctx->td->secondaryBuffer->getBuffer (), nbr, 0) == -1))
-      {
         return -1;
-      }
     }
-    while (nbr);
-    return 0;
+  while (nbr);
+  return 0;
 }
 
 /*!
@@ -376,7 +368,7 @@ int Scgi::sendPostData (ScgiContext* ctx)
  *string.
  */
 int Scgi::buildScgiEnvironmentString (HttpThreadContext* td, char* src,
-                                     char* dest)
+                                      char* dest)
 {
   char *ptr = dest;
   char *sptr = src;
@@ -388,7 +380,7 @@ int Scgi::buildScgiEnvironmentString (HttpThreadContext* td, char* src,
 
   if ( td->request.contentLength.size ())
     ptr += myserver_strlcpy (ptr, td->request.contentLength.c_str (),
-                            td->request.contentLength.size () + 1);
+                             td->request.contentLength.size () + 1);
   else
     *ptr++ = '0';
 
@@ -401,52 +393,52 @@ int Scgi::buildScgiEnvironmentString (HttpThreadContext* td, char* src,
   *ptr++ = '\0';
 
   for (;;)
-  {
-    int i;
-    int max = 100;
-    int varNameLen;
-    int varValueLen;
-
-    varNameLen = varValueLen = 0;
-    varName[0] = '\0';
-    varValue[0] = '\0';
-
-    while (*sptr == '\0')
-      sptr++;
-
-    while ((--max) && *sptr != '=')
     {
-      varName[varNameLen++] = *sptr++;
-      varName[varNameLen] = '\0';
-    }
-    if (max == 0)
-      return -1;
-    sptr++;
-    max = 2500;
-    while ((--max) && *sptr != '\0')
-     {
-      varValue[varValueLen++] = *sptr++;
-      varValue[varValueLen] = '\0';
-    }
-
-    if (max == 0)
-      return -1;
+      int i;
+      int max = 100;
+      int varNameLen;
+      int varValueLen;
+
+      varNameLen = varValueLen = 0;
+      varName[0] = '\0';
+      varValue[0] = '\0';
+
+      while (*sptr == '\0')
+        sptr++;
+
+      while ((--max) && *sptr != '=')
+        {
+          varName[varNameLen++] = *sptr++;
+          varName[varNameLen] = '\0';
+        }
+      if (max == 0)
+        return -1;
+      sptr++;
+      max = 2500;
+      while ((--max) && *sptr != '\0')
+        {
+          varValue[varValueLen++] = *sptr++;
+          varValue[varValueLen] = '\0';
+        }
+
+      if (max == 0)
+        return -1;
 
-    if (!strcmpi (varName, "CONTENT_LENGTH") || !strcmpi (varName, "SCGI") ||
-       !varNameLen || !varValueLen)
-      continue;
+      if (!strcmpi (varName, "CONTENT_LENGTH") || !strcmpi (varName, "SCGI") ||
+          !varNameLen || !varValueLen)
+        continue;
 
-    for (i = 0; i < varNameLen; i++)
-      *ptr++ = varName[i];
-    *ptr++ = '\0';
+      for (i = 0; i < varNameLen; i++)
+        *ptr++ = varName[i];
+      *ptr++ = '\0';
 
-    for (i = 0; i < varValueLen; i++)
-      *ptr++ = varValue[i];
-    *ptr++ = '\0';
+      for (i = 0; i < varValueLen; i++)
+        *ptr++ = varValue[i];
+      *ptr++ = '\0';
 
-    if (*(++sptr) == '\0')
-      break;
-  }
+      if (*(++sptr) == '\0')
+        break;
+    }
   return static_cast<int>(ptr - dest);
 }
 
@@ -500,12 +492,12 @@ ScgiServer* Scgi::connect (ScgiContext* con, const char* path)
    *If we find a valid server try the connection to it.
    */
   if (server)
-  {
-    int ret = processServerManager->connect (&(con->sock), server);
+    {
+      int ret = processServerManager->connect (&(con->sock), server);
 
-    if (ret == -1)
-      return 0;
-  }
+      if (ret == -1)
+        return 0;
+    }
   return server;
 }
 
@@ -515,7 +507,7 @@ ScgiServer* Scgi::connect (ScgiContext* con, const char* path)
  *remote server.
  */
 ScgiServer* Scgi::runScgiServer (ScgiContext* context,
-                                const char* path)
+                                 const char* path)
 {
   /* This method needs a better home (and maybe better code).
    * Compute a simple hash from the IP address.  */
@@ -525,28 +517,28 @@ ScgiServer* Scgi::runScgiServer (ScgiContext* context,
     seed = *c * 21 + seed;
 
   ScgiServer* server =  processServerManager->getServer (SERVERS_DOMAIN,
-                                                        path,
-                                                        seed);
+                                                         path,
+                                                         seed);
   if (server)
     return server;
 
   /* If the path starts with @ then the server is remote.  */
   if (path[0] == '@')
-  {
-    int i = 1;
-    char host[128];
-    char port[6];
+    {
+      int i = 1;
+      char host[128];
+      char port[6];
 
-    while (path[i] && path[i] != ':')
-      i++;
+      while (path[i] && path[i] != ':')
+        i++;
 
-    myserver_strlcpy (host, &path[1], min (128, i));
+      myserver_strlcpy (host, &path[1], min (128, i));
 
-    myserver_strlcpy (port, &path[i + 1], 6);
+      myserver_strlcpy (port, &path[i + 1], 6);
 
-    return processServerManager->addRemoteServer (SERVERS_DOMAIN, path,
-                                                 host, atoi (port));
-  }
+      return processServerManager->addRemoteServer (SERVERS_DOMAIN, path,
+                                                    host, atoi (port));
+    }
 
   return processServerManager->runAndAddServer (SERVERS_DOMAIN, path);
 }
diff --git a/myserver/src/http_handler/wincgi/wincgi.cpp b/myserver/src/http_handler/wincgi/wincgi.cpp
index f19b397..ca29171 100644
--- a/myserver/src/http_handler/wincgi/wincgi.cpp
+++ b/myserver/src/http_handler/wincgi/wincgi.cpp
@@ -345,21 +345,14 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
   td->response.contentLength.assign (stream.str ());
   if (!td->appendOutputs)
     {
-      u_long nbw2;
-      /*!
-       *Send the header if it is not appending.
-       */
-      u_long hdrLen = HttpHeaders::buildHTTPResponseHeader (td->buffer->getBuffer (),
-                                                            &td->response);
-      if (chain.getStream ()->write ((const char*)td->buffer->getBuffer (),
-                                    hdrLen,
-                                    &nbw2))
+      if (HttpHeaders::sendHeader (td->response, *chain.getStream (),
+                                   *td->buffer, td))
         {
           OutFileHandle.close ();
           FilesUtility::deleteFile (outFilePath);
           FilesUtility::deleteFile (dataFilePath);
           chain.clearAllFilters ();
-          return 0;
+          return 1;
         }
 
       if (onlyHeader)
@@ -370,8 +363,9 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
           chain.clearAllFilters ();
           return 1;
         }
+
       /*!
-       *Send other data in the buffer.
+       * Send other data in the buffer.
        */
       chain.write ((char*)(buffer + headerSize), nBytesRead - headerSize,
                    &nbw2);
diff --git a/myserver/src/protocol/http/http_headers.cpp b/myserver/src/protocol/http/http_headers.cpp
index b8173fc..3105ff1 100644
--- a/myserver/src/protocol/http/http_headers.cpp
+++ b/myserver/src/protocol/http/http_headers.cpp
@@ -870,6 +870,32 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
 }
 
 /*!
+ * Flush a HTTP response to the specified stream.
+ *
+ * \param response Response object to flush.
+ * \param stream Destination stream.
+ * \param memBuf Temporary mem buffer to use, it is used internally.
+ * \param ctx Http Context object, it can be NULL.
+ *
+ * \return 0 on success.
+ */
+int HttpHeaders::sendHeader (HttpResponseHeader &response, Stream &stream,
+                             MemBuf &memBuf, HttpThreadContext *ctx)
+{
+  int ret = 0;
+  if (ctx == NULL || !ctx->appendOutputs)
+    {
+      u_long nbw;
+      buildHTTPResponseHeader (memBuf.getBuffer (), &response);
+      ret = stream.write (memBuf.getBuffer (), strlen (memBuf.getBuffer ()),
+                          &nbw);
+    }
+
+  return ret;
+}
+
+
+/*!
  *Build the HTTP RESPONSE HEADER string.
  *If no input is specified the input is the main buffer of the
  *HttpThreadContext structure.

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

Summary of changes:
 myserver/include/connection/connection.h           |  123 ++--
 myserver/include/filter/stream.h                   |   30 +-
 myserver/include/protocol/http/http.h              |   86 ++--
 myserver/include/protocol/http/http_headers.h      |   67 ++-
 .../include/protocol/http/http_thread_context.h    |   93 ++--
 myserver/src/http_handler/cgi/cgi.cpp              |   13 +-
 myserver/src/http_handler/fastcgi/fastcgi.cpp      |   16 +-
 myserver/src/http_handler/http_dir/http_dir.cpp    |   31 +-
 myserver/src/http_handler/http_file/http_file.cpp  |   22 +-
 myserver/src/http_handler/isapi/isapi.cpp          |  608 ++++++++++----------
 myserver/src/http_handler/mscgi/mscgi.cpp          |   22 +-
 myserver/src/http_handler/proxy/proxy.cpp          |   20 +-
 myserver/src/http_handler/scgi/scgi.cpp            |  282 +++++-----
 myserver/src/http_handler/wincgi/wincgi.cpp        |   16 +-
 myserver/src/protocol/http/http.cpp                |   27 +-
 myserver/src/protocol/http/http_headers.cpp        |   29 +
 16 files changed, 729 insertions(+), 756 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Thu Nov 05 09:56:20 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N63l6-00067n-Dt
	for mharc-myserver-commit@gnu.org; Thu, 05 Nov 2009 09:56:20 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N63l4-00066O-M1
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 09:56:18 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N63l3-00065J-Ey
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 09:56:18 -0500
Received: from [199.232.76.173] (port=58373 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N63l3-000657-4U
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 09:56:17 -0500
Received: from savannah.gnu.org ([199.232.41.3]:60572 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 1N63l2-0001vi-FQ
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 09:56:16 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N63l0-0006Od-R5
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 14:56:14 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N63kz-0006O2-JQ
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 14:56:14 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 828a911010e1cb1391316cfc2bef87e093a0b6e3
X-Git-Newrev: 2d24ff71aba154e493eedfe858fd12901a5de95a
Message-Id: <E1N63kz-0006O2-JQ@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Thu, 05 Nov 2009 14:56: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. 0_9-351-g2d24ff7
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: Thu, 05 Nov 2009 14:56:19 -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  2d24ff71aba154e493eedfe858fd12901a5de95a (commit)
      from  828a911010e1cb1391316cfc2bef87e093a0b6e3 (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 2d24ff71aba154e493eedfe858fd12901a5de95a
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Nov 5 15:56:01 2009 +0100

    Change Protocol interface: rename `registerName' to `getName', it does not accept additional parameters.

diff --git a/myserver/include/protocol/control/control_protocol.h b/myserver/include/protocol/control/control_protocol.h
index d1f6e83..fe59801 100644
--- a/myserver/include/protocol/control/control_protocol.h
+++ b/myserver/include/protocol/control/control_protocol.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2004, 2005, 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/>.
+  MyServer
+  Copyright (C) 2004, 2005, 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/>.
 */
 
 #ifndef CONTROL_PROTOCOL_H
@@ -34,11 +34,11 @@ public:
 
   int sendResponse (char*, int, ConnectionPtr, int, ControlHeader& header, File* = 0);
   virtual int loadProtocol ();
-	int controlConnection (ConnectionPtr a, char *b1, char *b2, u_long bs1,
+  int controlConnection (ConnectionPtr a, char *b1, char *b2, u_long bs1,
                          u_long bs2, u_long nbtr, u_long id);
-	virtual char* registerName (char*,int len);
-	ControlProtocol ();
-	virtual ~ControlProtocol ();
+  virtual const char* getName ();
+  ControlProtocol ();
+  virtual ~ControlProtocol ();
 
 protected:
   static char adminLogin[64];
@@ -50,9 +50,9 @@ protected:
   int showDynamicProtocols (ConnectionPtr,File* out, char *b1,int bs1, ControlHeader&);
   int killConnection (ConnectionPtr,u_long ID, File* out, char *b1,int bs1, ControlHeader&);
   int getFile (ConnectionPtr, char*, File* in, File* out,
-              char *b1,int bs1, ControlHeader&);
+               char *b1,int bs1, ControlHeader&);
   int putFile (ConnectionPtr,char*, File* in, File* out,
-              char *b1,int bs1, ControlHeader&);
+               char *b1,int bs1, ControlHeader&);
   int getVersion (ConnectionPtr,File* out, char *b1,int bs1, ControlHeader&);
   int addToLog (int retCode, ConnectionPtr con, char *b1, int bs1, ControlHeader&);
 };
diff --git a/myserver/include/protocol/ftp/ftp.h b/myserver/include/protocol/ftp/ftp.h
index fcc1b26..7bf286f 100644
--- a/myserver/include/protocol/ftp/ftp.h
+++ b/myserver/include/protocol/ftp/ftp.h
@@ -135,8 +135,8 @@ public:
   int openDataPassive ();
   int openDataActive ();
 
-  virtual char *registerName (char *out, int len);
-  static char *registerNameImpl (char *out, int len);
+  virtual const char *getName ();
+  static const char *getNameImpl ();
 
   void escapeTelnet (MemBuf & In, MemBuf & Out);
   void user (const std::string & sParam);
@@ -222,9 +222,9 @@ public:
 
   }
 
-  virtual char *registerName (char *out, int len)
+  virtual const char *getName ()
   {
-    return Ftp::registerNameImpl (out, len);
+    return Ftp::getNameImpl ();
   }
 
   virtual int controlConnection (ConnectionPtr con, char *request,
diff --git a/myserver/include/protocol/gopher/gopher.h b/myserver/include/protocol/gopher/gopher.h
index 4fa566a..e9905f0 100644
--- a/myserver/include/protocol/gopher/gopher.h
+++ b/myserver/include/protocol/gopher/gopher.h
@@ -33,12 +33,12 @@ public:
   Gopher ();
   virtual ~Gopher ();
 
-  virtual char* registerName (char* out,int len)
+  virtual const char* getName ()
   {
-    return registerNameImpl (out, len);
+    return getNameImpl ();
   }
 
-  static char* registerNameImpl (char*, int len);
+  static const char* getNameImpl ();
 
   int controlConnection (ConnectionPtr a,
                          char *b1,
@@ -72,20 +72,19 @@ public:
   virtual ~GopherProtocol ()
   {}
 
-  virtual char* registerName (char* out, int len)
+  virtual const char* getName ()
   {
-    return Gopher::registerNameImpl (out, len);
+    return Gopher::getNameImpl ();
   }
 
-  virtual int controlConnection (ConnectionPtr a, char *b1, char *b2,
-                                 u_long bs1, u_long bs2, u_long nbtr, u_long id)
+  virtual int controlConnection (ConnectionPtr con, char *request,
+                                 char *auxBuf, u_long reqBufLen,
+                                 u_long auxBufLen, u_long reqLen,
+                                 u_long tid)
   {
-    Gopher Gopher;
-    int ret = 0;
-
-    ret = Gopher.controlConnection (a, b1, b2, bs1, bs2, nbtr, id);
-
-    return ret;
+    Gopher gopher;
+    return gopher.controlConnection (con, request, auxBuf, reqBufLen, auxBufLen,
+                                     reqLen, tid);
   }
 
   virtual int loadProtocol ()
diff --git a/myserver/include/protocol/http/http.h b/myserver/include/protocol/http/http.h
index 054f656..d50ec75 100644
--- a/myserver/include/protocol/http/http.h
+++ b/myserver/include/protocol/http/http.h
@@ -162,9 +162,9 @@ public:
   int sendHTTPNonModified ();
   Http ();
   virtual ~Http ();
-  virtual char* registerName (char* out,int len){return registerNameImpl (out, len);}
+  virtual const char* getName (){return getNameImpl ();}
 
-  static char* registerNameImpl (char*, int len);
+  static const char* getNameImpl ();
   int controlConnection (ConnectionPtr con, char *request, char *auxBuf,
                          u_long reqBufLen, u_long auxBufLen, u_long reqLen,
                          u_long tid);
@@ -209,9 +209,9 @@ public:
   {
   }
 
-  virtual char* registerName (char* out, int len)
+  virtual const char* getName ()
   {
-    return Http::registerNameImpl (out, len);
+    return Http::getNameImpl ();
   }
 
   virtual int controlConnection (ConnectionPtr con, char *request,
diff --git a/myserver/include/protocol/https/https.h b/myserver/include/protocol/https/https.h
index 9fcc5ab..a777252 100644
--- a/myserver/include/protocol/https/https.h
+++ b/myserver/include/protocol/https/https.h
@@ -1,20 +1,20 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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) 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
+  (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 HTTPS_H
@@ -25,18 +25,18 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 class Https : public Http
 {
 public:
-  static char* registerNameImpl (char* out, int len);
-	virtual char* registerName (char*,int len);
-	Https ();
-	virtual ~Https ();
+  static const char* getNameImpl ();
+  virtual const char* getName ();
+  Https ();
+  virtual ~Https ();
 
   static int loadProtocolStatic (XmlParser* lang)
   {
-        return 1;
+    return 1;
   }
   static int unLoadProtocolStatic (XmlParser* lang)
   {
-        return 1;
+    return 1;
   }
 
 };
@@ -47,7 +47,7 @@ public:
 class HttpsProtocol : public Protocol
 {
 public:
-	HttpsProtocol ()
+  HttpsProtocol ()
   {
     protocolOptions = PROTOCOL_USES_SSL;
   }
@@ -57,20 +57,19 @@ public:
 
   }
 
-  virtual char* registerName (char* out, int len)
+  virtual const char* getName ()
   {
-    return Https::registerNameImpl (out, len);
+    return Https::getNameImpl ();
   }
 
-	virtual int controlConnection (ConnectionPtr a, char *b1, char *b2,
-                                u_long bs1, u_long bs2, u_long nbtr, u_long id)
+  virtual int controlConnection (ConnectionPtr con, char *request,
+                                 char *auxBuf, u_long reqBufLen,
+                                 u_long auxBufLen, u_long reqLen,
+                                 u_long tid)
   {
-    int ret = 0;
     Https https;
-
-    ret = https.controlConnection (a, b1, b2, bs1, bs2, nbtr, id);
-
-    return ret;
+    return https.controlConnection (con, request, auxBuf, reqBufLen, auxBufLen,
+                                    reqLen, tid);
   }
 
   virtual int loadProtocol (XmlParser* parser)
@@ -78,7 +77,7 @@ public:
     return Https::loadProtocolStatic (parser);
   }
 
-	virtual int unLoadProtocol (XmlParser* parser)
+  virtual int unLoadProtocol (XmlParser* parser)
   {
     return Https::unLoadProtocolStatic (parser);
   }
diff --git a/myserver/include/protocol/protocol.h b/myserver/include/protocol/protocol.h
index 6f2cceb..75720a4 100644
--- a/myserver/include/protocol/protocol.h
+++ b/myserver/include/protocol/protocol.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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) 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
+  (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 PROTOCOL_H
@@ -32,23 +32,23 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 class Protocol
 {
 public:
-	Protocol ();
+  Protocol ();
   virtual ~Protocol ();
-	virtual char* registerName (char*,int len);
+  virtual const char* getName ();
 
-	virtual int controlConnection (ConnectionPtr con, char *request,
+  virtual int controlConnection (ConnectionPtr con, char *request,
                                  char *auxBuf, u_long reqBufLen,
                                  u_long auxBufLen, u_long reqLen,
                                  u_long tid);
 
-	virtual int loadProtocol ();
-	virtual int unLoadProtocol ();
+  virtual int loadProtocol ();
+  virtual int unLoadProtocol ();
 
   virtual int getProtocolOptions (){return protocolOptions;}
 
   virtual string &getProtocolPrefix (){return protocolPrefix;}
 protected:
   string protocolPrefix;
-	int protocolOptions;
+  int protocolOptions;
 };
 #endif
diff --git a/myserver/include/protocol/protocols_manager.h b/myserver/include/protocol/protocols_manager.h
index 0253039..44f0f46 100644
--- a/myserver/include/protocol/protocols_manager.h
+++ b/myserver/include/protocol/protocols_manager.h
@@ -1,20 +1,20 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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) 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
+  (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 PROTOCOLS_MANAGER_H
@@ -34,14 +34,14 @@ using namespace std;
 class ProtocolsManager
 {
 public:
-	ProtocolsManager ();
-	~ProtocolsManager ();
+  ProtocolsManager ();
+  ~ProtocolsManager ();
 
-  Protocol* getProtocol (string& name);
+  Protocol* getProtocol (string &name);
 
-  void addProtocol (string& name, Protocol* protocol);
+  void addProtocol (string &name, Protocol *protocol);
 
-  void addProtocol (char* name, Protocol* protocol)
+  void addProtocol (const char *name, Protocol *protocol)
   {
     string strName (name);
     addProtocol (strName, protocol);
diff --git a/myserver/src/protocol/control/control_protocol.cpp b/myserver/src/protocol/control/control_protocol.cpp
index 3df69c8..0ff8f60 100644
--- a/myserver/src/protocol/control/control_protocol.cpp
+++ b/myserver/src/protocol/control/control_protocol.cpp
@@ -67,12 +67,9 @@ struct ControlProtocolVisitorArg
  *Returns the name of the protocol. If an out buffer is defined
  *fullfill it with the name too.
  */
-char* ControlProtocol::registerName (char* out,int len)
+const char* ControlProtocol::getName ()
 {
-  if (out)
-    strncpy (out, "CONTROL", len);
-
-  return (char*)"CONTROL";
+  return "CONTROL";
 }
 
 /*!
diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index c094ad4..96b8ee9 100644
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -358,18 +358,14 @@ int Ftp::controlConnection (ConnectionPtr pConnection, char *request,
 }
 
 
-char * Ftp::registerName (char *out, int len)
+const char * Ftp::getName ()
 {
-  return registerNameImpl (out, len);
+  return getNameImpl ();
 }
 
-char * Ftp::registerNameImpl (char *out, int len)
+const char * Ftp::getNameImpl ()
 {
-  if (out)
-    {
-      myserver_strlcpy (out, "FTP", len);
-    }
-  return (char *) "FTP";
+  return "FTP";
 }
 
 
diff --git a/myserver/src/protocol/gopher/gopher.cpp b/myserver/src/protocol/gopher/gopher.cpp
index ee4ded4..46f1b00 100644
--- a/myserver/src/protocol/gopher/gopher.cpp
+++ b/myserver/src/protocol/gopher/gopher.cpp
@@ -47,12 +47,9 @@ Gopher::~Gopher ()
  * Service method
  */
 
-char *Gopher::registerNameImpl (char* out, int len)
+const char *Gopher::getNameImpl ()
 {
-  if (out)
-    myserver_strlcpy (out, "GOPHER", len);
-
-  return (char*) "GOPHER";
+  return "GOPHER";
 }
 
 /*!
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index fdafbdb..161cce0 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -1808,13 +1808,9 @@ int Http::unLoadProtocolStatic ()
  * Returns the name of the protocol. If an out buffer
  * is defined fullfill it with the name too.
  */
-char* Http::registerNameImpl (char* out, int len)
+const char* Http::getNameImpl ()
 {
-  if (out)
-    {
-      myserver_strlcpy (out, "HTTP", len);
-    }
-  return (char*) "HTTP";
+  return "HTTP";
 }
 
 /*!
diff --git a/myserver/src/protocol/https/https.cpp b/myserver/src/protocol/https/https.cpp
index c7f0b5a..ddf0bb2 100644
--- a/myserver/src/protocol/https/https.cpp
+++ b/myserver/src/protocol/https/https.cpp
@@ -35,18 +35,14 @@ extern "C"
  *Returns the name of the protocol. If an out buffer is defined
  *fullfill it with the name too.
  */
-char* Https::registerNameImpl (char* out, int len)
+const char* Https::getNameImpl ()
 {
-  if (out)
-  {
-    strncpy (out, "HTTPS", len);
-  }
-  return (char*)"HTTPS";
+  return "HTTPS";
 }
 
-char* Https::registerName (char* out, int len)
+const char* Https::getName ()
 {
-  return registerNameImpl (out, len);
+  return getNameImpl ();
 }
 
 /*!
diff --git a/myserver/src/protocol/protocol.cpp b/myserver/src/protocol/protocol.cpp
index c211c4d..f03ec3b 100644
--- a/myserver/src/protocol/protocol.cpp
+++ b/myserver/src/protocol/protocol.cpp
@@ -64,9 +64,9 @@ int Protocol::controlConnection (ConnectionPtr con, char *request,
  * Returns the name of the protocol. If an out buffer is
  * defined fullfill it with the name too.
  */
-char* Protocol::registerName (char* /*out*/,int /*len*/)
+const char* Protocol::getName ()
 {
-  return 0;
+  return "";
 }
 
 /*!
diff --git a/myserver/src/protocol/protocols_manager.cpp b/myserver/src/protocol/protocols_manager.cpp
index 1ae14ee..7d698d0 100644
--- a/myserver/src/protocol/protocols_manager.cpp
+++ b/myserver/src/protocol/protocols_manager.cpp
@@ -40,7 +40,7 @@ ProtocolsManager::~ProtocolsManager ()
 /*!
  * Return a protocol by its name.
  */
-Protocol* ProtocolsManager::getProtocol (string& name)
+Protocol* ProtocolsManager::getProtocol (string &name)
 {
   return staticProtocols.get (name);
 }
@@ -48,7 +48,7 @@ Protocol* ProtocolsManager::getProtocol (string& name)
 /*!
  * Add a static protocol to the list.
  */
-void ProtocolsManager::addProtocol (string& name, Protocol* protocol)
+void ProtocolsManager::addProtocol (string &name, Protocol *protocol)
 {
   std::transform (name.begin (), name.end (), name.begin (),
                   static_cast < int (*)(int) > (tolower));
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index da88639..a998b79 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -368,10 +368,9 @@ void Server::loadPlugins ()
 
   for (int j = 0; protocolsSet[j]; j++)
     {
-      char protocolName[32];
       Protocol *protocol = protocolsSet[j];
       protocol->loadProtocol ();
-      protocol->registerName (protocolName, 32);
+      const char *protocolName = protocol->getName ();
       getProtocolsManager ()->addProtocol (protocolName, protocol);
     }
 

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

Summary of changes:
 .../include/protocol/control/control_protocol.h    |   40 ++++++------
 myserver/include/protocol/ftp/ftp.h                |    8 +-
 myserver/include/protocol/gopher/gopher.h          |   25 ++++----
 myserver/include/protocol/http/http.h              |    8 +-
 myserver/include/protocol/https/https.h            |   63 ++++++++++----------
 myserver/include/protocol/protocol.h               |   40 ++++++------
 myserver/include/protocol/protocols_manager.h      |   40 ++++++------
 myserver/src/protocol/control/control_protocol.cpp |    7 +--
 myserver/src/protocol/ftp/ftp.cpp                  |   12 +---
 myserver/src/protocol/gopher/gopher.cpp            |    7 +--
 myserver/src/protocol/http/http.cpp                |    8 +--
 myserver/src/protocol/https/https.cpp              |   12 +---
 myserver/src/protocol/protocol.cpp                 |    4 +-
 myserver/src/protocol/protocols_manager.cpp        |    4 +-
 myserver/src/server/server.cpp                     |    3 +-
 15 files changed, 130 insertions(+), 151 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Thu Nov 05 10:10:25 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N63yj-0001VV-1F
	for mharc-myserver-commit@gnu.org; Thu, 05 Nov 2009 10:10:25 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N63yg-0001TO-P6
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 10:10:22 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N63ye-0001Pd-Pk
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 10:10:22 -0500
Received: from [199.232.76.173] (port=56181 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N63ye-0001Oq-1F
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 10:10:20 -0500
Received: from savannah.gnu.org ([199.232.41.3]:44128 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 1N63yb-0004Xk-RO
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 10:10:19 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N63ya-0007Le-OT
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 15:10:16 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N63yZ-0007Kt-2b
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 15:10:16 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 2d24ff71aba154e493eedfe858fd12901a5de95a
X-Git-Newrev: c84058968a77da765df544b00bc3bb90cd7b96e5
Message-Id: <E1N63yZ-0007Kt-2b@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Thu, 05 Nov 2009 15:10:15 +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. 0_9-356-gc840589
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: Thu, 05 Nov 2009 15:10:23 -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  c84058968a77da765df544b00bc3bb90cd7b96e5 (commit)
       via  8b80af64f2f0e153e03d627f516daaf51ce39b8f (commit)
       via  705b34a0b6676db249bbb70054c864150f14d190 (commit)
       via  4f60445ff1c0b5085bc2072ca37693620734e260 (commit)
       via  014779fe0dc332743dfdce41089730e579ce2021 (commit)
      from  2d24ff71aba154e493eedfe858fd12901a5de95a (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 c84058968a77da765df544b00bc3bb90cd7b96e5
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Nov 5 16:09:01 2009 +0100

    Remove unused files.

diff --git a/myserver/binaries/web/cgi-bin/Makefile.am b/myserver/binaries/web/cgi-bin/Makefile.am
index 4d1e64e..bcacd85 100644
--- a/myserver/binaries/web/cgi-bin/Makefile.am
+++ b/myserver/binaries/web/cgi-bin/Makefile.am
@@ -1,3 +1,3 @@
 myserverdatadir = $(prefix)/var/web/cgi-bin
 
-dist_myserverdata_DATA = counter.html default.html counter.readme
+dist_myserverdata_DATA = default.html
diff --git a/myserver/binaries/web/cgi-bin/counter.html b/myserver/binaries/web/cgi-bin/counter.html
deleted file mode 100644
index 520858c..0000000
--- a/myserver/binaries/web/cgi-bin/counter.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>MyServer MSCGI counter example</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br /><img src="/logo.png" alt="" style="border: 0px;" /><br /><br />
-This is an example, on how to use the MSCGI, for writing a web counter.<br /><br />
-<br /><br /><br /><br /><br />
-You are visitor:<br /><br />
-<img src="counter.mscgi" alt="" style="border: 0px;" />
-</div>
-</body>
-</html>
diff --git a/myserver/binaries/web/cgi-bin/counter.readme b/myserver/binaries/web/cgi-bin/counter.readme
deleted file mode 100644
index 595f539..0000000
--- a/myserver/binaries/web/cgi-bin/counter.readme
+++ /dev/null
@@ -1,59 +0,0 @@
-MyServer MSCGI counter example.
-
-Description:
-This is a simple counter that creates a image of numbers representing the 
-number of calls to the counter.mscgi program.
-
-Usage:
-Point a <img> link in the HTML page pointing to the counter.mscgi program
-as demonstrated in the counter.html file.
-
-Advanced:
-The location for the count data is in the same directory as the counter.mscgi
-program.  This file is named count.dat.
-If you wish to change the image used for the counter, you must:
-	1. Create an image with evenly spaced numbers using: 0123456789
-	The image width must be divisible by 10.
-	2. Using Gimp, export an image as a c-source file with no options 
-	selected and prefixed name as numbers_image.
-	3. Remove the const in "static const struct" in the .c file.
-	4. Rename the .c file to numbers.h and copy it to the counter
-	source directory.
-	5. Compile the project or run make.
-There is an example of how the image would look in the source directory
-called: numbers.png
-
-Legal:
-The counter program is licensed under the GPL.  However, it is directly linked
-to writepng.c program that holds this notice:
-
-/*---------------------------------------------------------------------------
-
-   wpng - simple PNG-writing program                             writepng.c
-
-  ---------------------------------------------------------------------------
-
-      Copyright (c) 1998-2000 Greg Roelofs.  All rights reserved.
-
-      This software is provided "as is," without warranty of any kind,
-      express or implied.  In no event shall the author or contributors
-      be held liable for any damages arising in any way from the use of
-      this software.
-
-      Permission is granted to anyone to use this software for any purpose,
-      including commercial applications, and to alter it and redistribute
-      it freely, subject to the following restrictions:
-
-      1. Redistributions of source code must retain the above copyright
-         notice, disclaimer, and this list of conditions.
-      2. Redistributions in binary form must reproduce the above copyright
-         notice, disclaimer, and this list of conditions in the documenta-
-         tion and/or other materials provided with the distribution.
-      3. All advertising materials mentioning features or use of this
-         software must display the following acknowledgment:
-
-            This product includes software developed by Greg Roelofs
-            and contributors for the book, "PNG: The Definitive Guide,"
-            published by O'Reilly and Associates.
-
-  ---------------------------------------------------------------------------*/



commit 8b80af64f2f0e153e03d627f516daaf51ce39b8f
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Nov 5 16:06:03 2009 +0100

    Indent properly HTML files

diff --git a/myserver/binaries/system/errors/300.html b/myserver/binaries/system/errors/300.html
index 8e19538..aec15df 100644
--- a/myserver/binaries/system/errors/300.html
+++ b/myserver/binaries/system/errors/300.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>300 Multiple Choices - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 300
-<br /><br />
-Multiple Choices
-<br /><br />
-<img src="/sys/icons/codes/300myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>300 Multiple Choices - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 300
+	<br /><br />
+	Multiple Choices
+	<br /><br />
+	<img src="/sys/icons/codes/300myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/301.html b/myserver/binaries/system/errors/301.html
index f744bb8..ef7f772 100644
--- a/myserver/binaries/system/errors/301.html
+++ b/myserver/binaries/system/errors/301.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>301 Moved Permanently - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 301
-<br /><br />
-Moved Permanently
-<br /><br />
-<img src="/sys/icons/codes/301myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>301 Moved Permanently - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 301
+	<br /><br />
+	Moved Permanently
+	<br /><br />
+	<img src="/sys/icons/codes/301myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/302.html b/myserver/binaries/system/errors/302.html
index 3e88665..ac8493e 100644
--- a/myserver/binaries/system/errors/302.html
+++ b/myserver/binaries/system/errors/302.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>302 Found - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 302
-<br /><br />
-Found
-<br /><br />
-<img src="/sys/icons/codes/302myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>302 Found - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 302
+	<br /><br />
+	Found
+	<br /><br />
+	<img src="/sys/icons/codes/302myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/303.html b/myserver/binaries/system/errors/303.html
index 684a755..bb801dd 100644
--- a/myserver/binaries/system/errors/303.html
+++ b/myserver/binaries/system/errors/303.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>303 See Other - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 303
-<br /><br />
-See Other
-<br /><br />
-<img src="/sys/icons/codes/303myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>303 See Other - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 303
+	<br /><br />
+	See Other
+	<br /><br />
+	<img src="/sys/icons/codes/303myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/304.html b/myserver/binaries/system/errors/304.html
index 94d6bfd..af8dc5f 100644
--- a/myserver/binaries/system/errors/304.html
+++ b/myserver/binaries/system/errors/304.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>304 Not Modified - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 304
-<br /><br />
-Not Modified
-<br /><br />
-<img src="/sys/icons/codes/304myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>304 Not Modified - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 304
+	<br /><br />
+	Not Modified
+	<br /><br />
+	<img src="/sys/icons/codes/304myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/305.html b/myserver/binaries/system/errors/305.html
index 1d7f075..9460378 100644
--- a/myserver/binaries/system/errors/305.html
+++ b/myserver/binaries/system/errors/305.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>305 Use Proxy - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 305
-<br /><br />
-Use Proxy
-<br /><br />
-<img src="/sys/icons/codes/305myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>305 Use Proxy - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 305
+	<br /><br />
+	Use Proxy
+	<br /><br />
+	<img src="/sys/icons/codes/305myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/307.html b/myserver/binaries/system/errors/307.html
index 3d860ad..24e6584 100644
--- a/myserver/binaries/system/errors/307.html
+++ b/myserver/binaries/system/errors/307.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>307 Temporary Redirect - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 307
-<br /><br />
-Temporary Redirect
-<br /><br />
-<img src="/sys/icons/codes/307myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>307 Temporary Redirect - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 307
+	<br /><br />
+	Temporary Redirect
+	<br /><br />
+	<img src="/sys/icons/codes/307myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/400.html b/myserver/binaries/system/errors/400.html
index 2f8247e..788b790 100644
--- a/myserver/binaries/system/errors/400.html
+++ b/myserver/binaries/system/errors/400.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>400 Bad Request</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 400
-<br /><br />
-Bad Request
-<br /><br />
-<img src="/sys/icons/codes/400myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>400 Bad Request</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 400
+	<br /><br />
+	Bad Request
+	<br /><br />
+	<img src="/sys/icons/codes/400myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/401.html b/myserver/binaries/system/errors/401.html
index 6fbc64f..615d24f 100644
--- a/myserver/binaries/system/errors/401.html
+++ b/myserver/binaries/system/errors/401.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>401 Unauthorised</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 401
-<br /><br />
-Unauthorised
-<br /><br />
-<img src="/sys/icons/codes/401myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>401 Unauthorised</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 401
+	<br /><br />
+	Unauthorised
+	<br /><br />
+	<img src="/sys/icons/codes/401myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/402.html b/myserver/binaries/system/errors/402.html
index 51320a5..1825632 100644
--- a/myserver/binaries/system/errors/402.html
+++ b/myserver/binaries/system/errors/402.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>402 Payment Required - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 402
-<br /><br />
-Payment Required
-<br /><br />
-<img src="/sys/icons/codes/402myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>402 Payment Required - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 402
+	<br /><br />
+	Payment Required
+	<br /><br />
+	<img src="/sys/icons/codes/402myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/403.html b/myserver/binaries/system/errors/403.html
index b40ef7b..67e0228 100644
--- a/myserver/binaries/system/errors/403.html
+++ b/myserver/binaries/system/errors/403.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>403 Execution Access Forbidden</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 403
-<br /><br />
-Execution Access Forbidden
-<br /><br />
-<img src="/sys/icons/codes/403myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>403 Execution Access Forbidden</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 403
+	<br /><br />
+	Execution Access Forbidden
+	<br /><br />
+	<img src="/sys/icons/codes/403myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/404.html b/myserver/binaries/system/errors/404.html
index 91acc60..327aca6 100644
--- a/myserver/binaries/system/errors/404.html
+++ b/myserver/binaries/system/errors/404.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>404 File Not Found</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 404
-<br /><br />
-File Not Found
-<br /><br />
-<img src="/sys/icons/codes/404myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>404 File Not Found</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 404
+	<br /><br />
+	File Not Found
+	<br /><br />
+	<img src="/sys/icons/codes/404myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/405.html b/myserver/binaries/system/errors/405.html
index 28652f2..778006c 100644
--- a/myserver/binaries/system/errors/405.html
+++ b/myserver/binaries/system/errors/405.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>405 Method Not Allowed</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 405
-<br /><br />
-Method Not Allowed
-<br /><br />
-<img src="/sys/icons/codes/405myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>405 Method Not Allowed</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 405
+	<br /><br />
+	Method Not Allowed
+	<br /><br />
+	<img src="/sys/icons/codes/405myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/406.html b/myserver/binaries/system/errors/406.html
index 2c986b9..37cb57c 100644
--- a/myserver/binaries/system/errors/406.html
+++ b/myserver/binaries/system/errors/406.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>406 Not Acceptable - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 406
-<br /><br />
-Not Acceptable
-<br /><br />
-<img src="/sys/icons/codes/406myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>406 Not Acceptable - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 406
+	<br /><br />
+	Not Acceptable
+	<br /><br />
+	<img src="/sys/icons/codes/406myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/407.html b/myserver/binaries/system/errors/407.html
index 629e405..76cca3a 100644
--- a/myserver/binaries/system/errors/407.html
+++ b/myserver/binaries/system/errors/407.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>407 Proxy Authentication Required - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 407
-<br /><br />
-Proxy Authentication Required
-<br /><br />
-<img src="/sys/icons/codes/407myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>407 Proxy Authentication Required - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 407
+	<br /><br />
+	Proxy Authentication Required
+	<br /><br />
+	<img src="/sys/icons/codes/407myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/408.html b/myserver/binaries/system/errors/408.html
index bdec852..71eafd7 100644
--- a/myserver/binaries/system/errors/408.html
+++ b/myserver/binaries/system/errors/408.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>408 Request Timeout - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 408
-<br /><br />
-Request Timeout
-<br /><br />
-<img src="/sys/icons/codes/408myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>408 Request Timeout - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 408
+	<br /><br />
+	Request Timeout
+	<br /><br />
+	<img src="/sys/icons/codes/408myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/409.html b/myserver/binaries/system/errors/409.html
index 4169395..c6cfd96 100644
--- a/myserver/binaries/system/errors/409.html
+++ b/myserver/binaries/system/errors/409.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>409 Conflict - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 409
-<br /><br />
-Conflict
-<br /><br />
-<img src="/sys/icons/codes/409myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>409 Conflict - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 409
+	<br /><br />
+	Conflict
+	<br /><br />
+	<img src="/sys/icons/codes/409myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/410.html b/myserver/binaries/system/errors/410.html
index 73dae8c..570b24d 100644
--- a/myserver/binaries/system/errors/410.html
+++ b/myserver/binaries/system/errors/410.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>410 Gone - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 410
-<br /><br />
-Gone
-<br /><br />
-<img src="/sys/icons/codes/410myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>410 Gone - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 410
+	<br /><br />
+	Gone
+	<br /><br />
+	<img src="/sys/icons/codes/410myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/411.html b/myserver/binaries/system/errors/411.html
index 9e830b0..f7adf74 100644
--- a/myserver/binaries/system/errors/411.html
+++ b/myserver/binaries/system/errors/411.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>411 Length Required - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 411
-<br /><br />
-Length Required
-<br /><br />
-<img src="/sys/icons/codes/411myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>411 Length Required - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 411
+	<br /><br />
+	Length Required
+	<br /><br />
+	<img src="/sys/icons/codes/411myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/412.html b/myserver/binaries/system/errors/412.html
index 414b6a3..222945d 100644
--- a/myserver/binaries/system/errors/412.html
+++ b/myserver/binaries/system/errors/412.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>412 Precondition Failed - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 412
-<br /><br />
-Precondition Failed
-<br /><br />
-<img src="/sys/icons/codes/412myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>412 Precondition Failed - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 412
+	<br /><br />
+	Precondition Failed
+	<br /><br />
+	<img src="/sys/icons/codes/412myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/413.html b/myserver/binaries/system/errors/413.html
index 14fddb7..ccfaf0f 100644
--- a/myserver/binaries/system/errors/413.html
+++ b/myserver/binaries/system/errors/413.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>413 Request Entity Too Large</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 413
-<br /><br />
-Request Entity Too Large
-<br /><br />
-<img src="/sys/icons/codes/413myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>413 Request Entity Too Large</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 413
+	<br /><br />
+	Request Entity Too Large
+	<br /><br />
+	<img src="/sys/icons/codes/413myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/414.html b/myserver/binaries/system/errors/414.html
index 43f6406..97ceff9 100644
--- a/myserver/binaries/system/errors/414.html
+++ b/myserver/binaries/system/errors/414.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>414 Request URI Too Long</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 414
-<br /><br />
-Request URI Too Long
-<br /><br />
-<img src="/sys/icons/codes/414myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>414 Request URI Too Long</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 414
+	<br /><br />
+	Request URI Too Long
+	<br /><br />
+	<img src="/sys/icons/codes/414myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/415.html b/myserver/binaries/system/errors/415.html
index b05e88a..8e971e4 100644
--- a/myserver/binaries/system/errors/415.html
+++ b/myserver/binaries/system/errors/415.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>415 Unsupported Media Type - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 415
-<br /><br />
-Unsupported Media Type
-<br /><br />
-<img src="/sys/icons/codes/415myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>415 Unsupported Media Type - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 415
+	<br /><br />
+	Unsupported Media Type
+	<br /><br />
+	<img src="/sys/icons/codes/415myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/416.html b/myserver/binaries/system/errors/416.html
index 9bd076b..991bd11 100644
--- a/myserver/binaries/system/errors/416.html
+++ b/myserver/binaries/system/errors/416.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>416 Requested Range Not Satisfiable - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 416
-<br /><br />
-Requested Range Not Satisfiable
-<br /><br />
-<img src="/sys/icons/codes/416myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>416 Requested Range Not Satisfiable - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 416
+	<br /><br />
+	Requested Range Not Satisfiable
+	<br /><br />
+	<img src="/sys/icons/codes/416myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/417.html b/myserver/binaries/system/errors/417.html
index e0f5460..c6be5b1 100644
--- a/myserver/binaries/system/errors/417.html
+++ b/myserver/binaries/system/errors/417.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>417 Expectation Failed - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 417
-<br /><br />
-Expectation Failed
-<br /><br />
-<img src="/sys/icons/codes/417myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>417 Expectation Failed - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 417
+	<br /><br />
+	Expectation Failed
+	<br /><br />
+	<img src="/sys/icons/codes/417myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/500.html b/myserver/binaries/system/errors/500.html
index 128374f..61dc01b 100644
--- a/myserver/binaries/system/errors/500.html
+++ b/myserver/binaries/system/errors/500.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>500 Internal Server Error</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 500
-<br /><br />
-Internal Server Error
-<br /><br />
-<img src="/sys/icons/codes/500myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>500 Internal Server Error</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 500
+	<br /><br />
+	Internal Server Error
+	<br /><br />
+	<img src="/sys/icons/codes/500myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/501.html b/myserver/binaries/system/errors/501.html
index 19639a2..fdceaed 100644
--- a/myserver/binaries/system/errors/501.html
+++ b/myserver/binaries/system/errors/501.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>501 Method Not Implemented</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 501
-<br /><br />
-Method Not Implemented
-<br /><br />
-<img src="/sys/icons/codes/501myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>501 Method Not Implemented</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 501
+	<br /><br />
+	Method Not Implemented
+	<br /><br />
+	<img src="/sys/icons/codes/501myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/502.html b/myserver/binaries/system/errors/502.html
index 56f0b1f..99bc3a8 100644
--- a/myserver/binaries/system/errors/502.html
+++ b/myserver/binaries/system/errors/502.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>502 Bad Gateway - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 502
-<br /><br />
-Bad Gateway
-<br /><br />
-<img src="/sys/icons/codes/502myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>502 Bad Gateway - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 502
+	<br /><br />
+	Bad Gateway
+	<br /><br />
+	<img src="/sys/icons/codes/502myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/503.html b/myserver/binaries/system/errors/503.html
index 2fb5b97..666e507 100644
--- a/myserver/binaries/system/errors/503.html
+++ b/myserver/binaries/system/errors/503.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>503 Service Unavailable - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 503
-<br /><br />
-Service Unavailable
-<br /><br />
-<img src="/sys/icons/codes/503myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>503 Service Unavailable - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 503
+	<br /><br />
+	Service Unavailable
+	<br /><br />
+	<img src="/sys/icons/codes/503myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/504.html b/myserver/binaries/system/errors/504.html
index 601cd1f..1a3fa36 100644
--- a/myserver/binaries/system/errors/504.html
+++ b/myserver/binaries/system/errors/504.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>504 Gateway Timeout - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 504
-<br /><br />
-Gateway Timeout
-<br /><br />
-<img src="/sys/icons/codes/504myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>504 Gateway Timeout - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 504
+	<br /><br />
+	Gateway Timeout
+	<br /><br />
+	<img src="/sys/icons/codes/504myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/system/errors/505.html b/myserver/binaries/system/errors/505.html
index 14d6140..033222f 100644
--- a/myserver/binaries/system/errors/505.html
+++ b/myserver/binaries/system/errors/505.html
@@ -1,21 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+	  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
-<title>505 HTTP Version Not Supported - MyServer</title>
-<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
-</head>
-<body style="color: #666699;">
-<div style="text-align: center;">
-<br />
-<big>
-Error 505
-<br /><br />
-HTTP Version Not Supported
-<br /><br />
-<img src="/sys/icons/codes/505myserver.png" alt="" />
-</big>
-</div>
-</body>
-</html>
\ No newline at end of file
+  <head>
+    <title>505 HTTP Version Not Supported - MyServer</title>
+    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+  </head>
+  <body style="color: #666699;">
+    <div style="text-align: center;">
+      <br />
+      <big>
+	Error 505
+	<br /><br />
+	HTTP Version Not Supported
+	<br /><br />
+	<img src="/sys/icons/codes/505myserver.png" alt="" />
+      </big>
+    </div>
+  </body>
+</html>
diff --git a/myserver/binaries/web/default.html b/myserver/binaries/web/default.html
index 089d053..848d534 100644
--- a/myserver/binaries/web/default.html
+++ b/myserver/binaries/web/default.html
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+          "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
   <head>
     <title>MyServer</title>
@@ -26,15 +26,15 @@
       <br />
       <br />
       <a href="http://www.myserverproject.net"><img src="logo.png" alt=""
-																							      style="border: 0px;" /></a>
+						    style="border: 0px;" /></a>
       <br />
       <br />
       GNU MyServer examples. <a href="link.html"><img src="goto.png" alt=""
-																						          style="border: 0px;" /></a>
+						      style="border: 0px;" /></a>
       <br /><br />
       GNU MyServer documentation.
       <a href="documentation/index.html"><img src="goto.png" alt=""
-																			        style="border: 0px;" /></a>
+					      style="border: 0px;" /></a>
       <br />
       <br />
       <br />
diff --git a/myserver/binaries/web/link.html b/myserver/binaries/web/link.html
index 8e6b543..1c91e0c 100644
--- a/myserver/binaries/web/link.html
+++ b/myserver/binaries/web/link.html
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
-"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+          "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
   <head>
     <title>MyServer</title>
@@ -8,46 +8,46 @@
   </head>
   <body style="color: #666699;">
 
-<div style="text-align: center;">
-  <br />
-  Here are some examples pages:
-  <br />
-  <br />
-  <a href="http://www.myserverproject.net">
-    <img src="logo.png" alt="" style="border: 0px;" /></a>
-  <br />
-  <br />
-  MyServer CGI samples(MSCGI)<a href="cgi-bin/"><img src="goto.png" alt="" style="border: 0px;" /></a>
-  <br />
-  <br />
-  Browse Icons directory<a href="/sys/icons/"><img src="goto.png" alt="" style="border: 0px;" /></a>
-  <br />
-  <br />
-  Simulate a 404 error page (This file is not present on the file system)<a href="itisnthere.html">
-    <img src="goto.png" alt="" style="border: 0px;" /></a>
-  <br />
-  <br />
-  <br />
-  <br />
-  Back<a href="default.html"><img src="goto.png" alt="" style="border: 0px;" /></a>
-</div>
+    <div style="text-align: center;">
+      <br />
+      Here are some examples pages:
+      <br />
+      <br />
+      <a href="http://www.myserverproject.net">
+        <img src="logo.png" alt="" style="border: 0px;" /></a>
+      <br />
+      <br />
+      MyServer CGI samples(MSCGI)<a href="cgi-bin/"><img src="goto.png" alt="" style="border: 0px;" /></a>
+      <br />
+      <br />
+      Browse Icons directory<a href="/sys/icons/"><img src="goto.png" alt="" style="border: 0px;" /></a>
+      <br />
+      <br />
+      Simulate a 404 error page (This file is not present on the file system)<a href="itisnthere.html">
+        <img src="goto.png" alt="" style="border: 0px;" /></a>
+      <br />
+      <br />
+      <br />
+      <br />
+      Back<a href="default.html"><img src="goto.png" alt="" style="border: 0px;" /></a>
+    </div>
 
-<br />
-<br />
-<br />
-<br />
-<br />
-<br />
-<br />
+    <br />
+    <br />
+    <br />
+    <br />
+    <br />
+    <br />
+    <br />
 
-<p>
-  <div style="position: fixed; bottom: 10px; text-align: center; width:100%">
-    If you are interested to write other examples for MyServer,
-    including PHP, Perl and any sort of script pages.<br />
-    Please contact the MyServer Project developers and let us know
-    about your samples.
-  </div>
-</p>
+    <p>
+      <div style="position: fixed; bottom: 10px; text-align: center; width:100%">
+        If you are interested to write other examples for MyServer,
+        including PHP, Perl and any sort of script pages.<br />
+        Please contact the MyServer Project developers and let us know
+        about your samples.
+      </div>
+    </p>
 
   </body>
 </html>



commit 705b34a0b6676db249bbb70054c864150f14d190
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Nov 5 16:05:22 2009 +0100

    Indent properly XML files

diff --git a/myserver/binaries/MIMEtypes.default.xml b/myserver/binaries/MIMEtypes.default.xml
index f6830f6..1448cef 100755
--- a/myserver/binaries/MIMEtypes.default.xml
+++ b/myserver/binaries/MIMEtypes.default.xml
@@ -4,15 +4,15 @@
   <MIME mime="text/html" handler="MSCGI" param="">
     <EXTENSION value="mscgi"/>
   </MIME>
-  
+
   <MIME mime="text/html" handler="CGI" self="YES" param="">
     <EXTENSION value="cgi"/>
   </MIME>
-  
+
   <MIME mime="text/html" handler="ISAPI" param="">
     <EXTENSION value="isapi"/>
   </MIME>
-  
+
   <MIME mime="text/html" handler="SCGI" self="YES" param="">
     <EXTENSION value="scgi"/>
   </MIME>
@@ -20,7 +20,7 @@
   <MIME mime="text/html" handler="FASTCGI" self="YES" param="">
     <EXTENSION value="fcgi"/>
   </MIME>
-  
+
   <MIME mime="text/html" handler="WINCGI" param="">
     <EXTENSION value="wincgi"/>
   </MIME>
@@ -31,7 +31,7 @@
     <EXTENSION value="eps"/>
     <EXTENSION value="ps"/>
   </MIME>
-  
+
   <MIME mime="video/quicktime" handler="SEND" param="">
     <EXTENSION value="mov"/>
     <EXTENSION value="qt"/>
diff --git a/myserver/binaries/myserver.default.xml b/myserver/binaries/myserver.default.xml
index 5bb5d83..d6804be 100755
--- a/myserver/binaries/myserver.default.xml
+++ b/myserver/binaries/myserver.default.xml
@@ -3,28 +3,28 @@
 <!--MODIFY THE FILE ONLY IF YOU ARE SURE OF WHAT YOU ARE DOING-->
 <MYSERVER>
 
-	<!--CHOOSE THE LANGUAGE TO USE FOR THE SERVER-->
-	<DEFINE name="server.language" value="english.xml" />
+  <!--CHOOSE THE LANGUAGE TO USE FOR THE SERVER-->
+  <DEFINE name="server.language" value="english.xml" />
 
-	<!--VERBOSITY ON LOG FILE-->
-	<DEFINE name="server.verbosity" value="2" />
+  <!--VERBOSITY ON LOG FILE-->
+  <DEFINE name="server.verbosity" value="2" />
 
-	<!--NUMBER OF SERVING THREADS ALWAYS ACTIVE-->
+  <!--NUMBER OF SERVING THREADS ALWAYS ACTIVE-->
   <DEFINE name="server.static_threads" value="5" />
 
-	<!--MAXIMUM NUMBER OF SERVING THREADS THAT THE SCHEDULER CAN
-			CREATE-->
-	<DEFINE name="server.max_threads" value="200" />
+  <!--MAXIMUM NUMBER OF SERVING THREADS THAT THE SCHEDULER CAN
+      CREATE-->
+  <DEFINE name="server.max_threads" value="200" />
 
-	<!--DIMENSION OF EVERY BUFFER IN BYTES IF ON THE MACHINE THERE IS A
-			LOT OF RAM	THIS VALUES CAN BE INCREASED TO MAKE MYSERVER
-			FASTER. NORMALLY THE MEMORY USED BY BUFFERS IS EQUAL TO
-			BUFFER_SIZE * 2 * NUM_OF_THREADS-->
-	<DEFINE name="server.buffer_size" value="102400" />
+  <!--DIMENSION OF EVERY BUFFER IN BYTES IF ON THE MACHINE THERE IS A
+      LOT OF RAM	THIS VALUES CAN BE INCREASED TO MAKE MYSERVER
+      FASTER. NORMALLY THE MEMORY USED BY BUFFERS IS EQUAL TO
+      BUFFER_SIZE * 2 * NUM_OF_THREADS-->
+  <DEFINE name="server.buffer_size" value="102400" />
 
-	<!--DEFAULT FILENAME TO SEND IN A DIRECTORY
-			IF THE FILE ISN'T IN THE PATH THEN THE DIRECTORY
-			CONTENT IS SENT	-->
+  <!--DEFAULT FILENAME TO SEND IN A DIRECTORY
+      IF THE FILE ISN'T IN THE PATH THEN THE DIRECTORY
+      CONTENT IS SENT	-->
   <DEFINE name="http.default_file">
     <DEFINE value="default.html"/>
     <DEFINE value="default.htm"/>
@@ -32,23 +32,23 @@
     <DEFINE value="index.htm"/>
   </DEFINE>
 
-	<!--TIMEOUT OF EVERY CLIENTS CONNECTED TO THE SERVER.
-			IF THE CLIENT DOESN'T REQUEST ANYTHING FOR N
-			SECONDS THE CONNECTION WITH THE CLIENT IS
-			CLOSED. SET THIS TO 0 IF YOU DON'T WANT USE
-			KEEP-ALIVE CONNECTIONS	-->
-	<DEFINE name="connection.timeout" value="180" />
+  <!--TIMEOUT OF EVERY CLIENTS CONNECTED TO THE SERVER.
+      IF THE CLIENT DOESN'T REQUEST ANYTHING FOR N
+      SECONDS THE CONNECTION WITH THE CLIENT IS
+      CLOSED. SET THIS TO 0 IF YOU DON'T WANT USE
+      KEEP-ALIVE CONNECTIONS	-->
+  <DEFINE name="connection.timeout" value="180" />
 
-	<!--SET THIS TO YES FOR USE PERSONALIZED PAGES TO SEND MESSAGE,
-			PERSONALIZED PAGES ARE IN THE SYSTEM DIRECTORY	-->
-	<DEFINE name="http.use_error_file" value="YES" />
+  <!--SET THIS TO YES FOR USE PERSONALIZED PAGES TO SEND MESSAGE,
+      PERSONALIZED PAGES ARE IN THE SYSTEM DIRECTORY	-->
+  <DEFINE name="http.use_error_file" value="YES" />
 
-	<!--DEFINE THE MAX NUMBER OF CONNECTIONS TO ALLOW TO THE SERVER. IF
-			0 THEN INFINITE CONNECTIONS ARE ALLOWED.-->
-	<DEFINE name="server.max_connections" value="0" />
+  <!--DEFINE THE MAX NUMBER OF CONNECTIONS TO ALLOW TO THE SERVER. IF
+      0 THEN INFINITE CONNECTIONS ARE ALLOWED.-->
+  <DEFINE name="server.max_connections" value="0" />
 
-	<!--DEFINE THE MAX NUMBER OF CONNECTIONS TO ACCEPT.-->
-	<DEFINE name="server.max_accepted_connections" value="0" />
+  <!--DEFINE THE MAX NUMBER OF CONNECTIONS TO ACCEPT.-->
+  <DEFINE name="server.max_accepted_connections" value="0" />
 
   <!--TEXT AND BACKGROUND ATTRIBUTES FOR CONSOLE LOG MESSAGES. -->
   <DEFINE name="log_color.info_fg" value="white" />
@@ -60,42 +60,42 @@
   <DEFINE name="log_color.error_fg" value="red" />
   <DEFINE name="log_color.error_bg" value="black" />
 
-	<!--MAX SIZE OF THE LOG FILE IN BYTES	-->
-	<DEFINE name="server.max_log_size" value="1048576" />
+  <!--MAX SIZE OF THE LOG FILE IN BYTES	-->
+  <DEFINE name="server.max_log_size" value="1048576" />
 
-	<!--DEFINE THE FOLDER BROWSING STYLE-->
-	<DEFINE name="http.dir.css" value="/sys/css/browsestyle.css" />
+  <!--DEFINE THE FOLDER BROWSING STYLE-->
+  <DEFINE name="http.dir.css" value="/sys/css/browsestyle.css" />
 
-	<!--DEFINE THE ADMINISTRATOR E-MAIL-->
-	<DEFINE name="server.admin" value="administrator@localhost" />
+  <!--DEFINE THE ADMINISTRATOR E-MAIL-->
+  <DEFINE name="server.admin" value="administrator@localhost" />
 
-	<!--DEFINE THE GZIP COMPRESSION THRESHOLD VALUE-->
-	<DEFINE name="gzip.threshold" value="1048576" />
+  <!--DEFINE THE GZIP COMPRESSION THRESHOLD VALUE-->
+  <DEFINE name="gzip.threshold" value="1048576" />
 
-	<!--DEFINE IF LINKS SHOULD BE FOLLOWED-->
-	<DEFINE name="symlinks.follow" value="YES" />
+  <!--DEFINE IF LINKS SHOULD BE FOLLOWED-->
+  <DEFINE name="symlinks.follow" value="YES" />
 
-	<!--MAX CACHE SIZE FOR STATIC FILES-->
-	<DEFINE name="server.max_files_cache" value="10485760" />
+  <!--MAX CACHE SIZE FOR STATIC FILES-->
+  <DEFINE name="server.max_files_cache" value="10485760" />
 
-	<!--MAX CACHE SIZE FOR SINGLE STATIC FILE-->
-	<DEFINE name="server.max_file_cache" value="1048576" />
+  <!--MAX CACHE SIZE FOR SINGLE STATIC FILE-->
+  <DEFINE name="server.max_file_cache" value="1048576" />
 
-	<!--MIN CACHE SIZE FOR SINGLE STATIC FILE-->
-	<DEFINE name="server.min_file_cache" value="1048576" />
+  <!--MIN CACHE SIZE FOR SINGLE STATIC FILE-->
+  <DEFINE name="server.min_file_cache" value="1048576" />
 
-	<!-- ENABLE HOME DIRECTORY PER USER -->
-	<DEFINE name="http.use_home_directory" value="NO" />
+  <!-- ENABLE HOME DIRECTORY PER USER -->
+  <DEFINE name="http.use_home_directory" value="NO" />
 
-	<!-- DEFINE NAME FOR HOME DIRECTORY BROWSING, BY DEFAULT THE SERVER
-			 USES public_html -->
-	<DEFINE name="http.home_directory" value="public_html" />
+  <!-- DEFINE NAME FOR HOME DIRECTORY BROWSING, BY DEFAULT THE SERVER
+       USES public_html -->
+  <DEFINE name="http.home_directory" value="public_html" />
 
   <!--SET THIS TO YES IF YOU WANT TO ENABLE THE CONTROL PROTOCOL-->
-	<DEFINE name="control.enabled" value="NO" />
+  <DEFINE name="control.enabled" value="NO" />
 
-	<!--MAXIMUM NUMBER OF EXTERNAL SERVERS THAT CAN BE EXECUTED-->
-	<DEFINE name="server.max_servers" value="100" />
+  <!--MAXIMUM NUMBER OF EXTERNAL SERVERS THAT CAN BE EXECUTED-->
+  <DEFINE name="server.max_servers" value="100" />
 
   <!--SET HERE THE NAME FOR THE CONTROL ADMIN. WE SUGGEST YOU YO USE
       SOMETHING DIFFERENT FROM ADMIN, ADMINISTRATOR OR ROOT-->
diff --git a/myserver/binaries/virtualhosts.default.xml b/myserver/binaries/virtualhosts.default.xml
index 36b3b47..6f43c20 100755
--- a/myserver/binaries/virtualhosts.default.xml
+++ b/myserver/binaries/virtualhosts.default.xml
@@ -2,39 +2,39 @@
 
 <VHOSTS>
 
-	<VHOST>
-		<NAME>Every HTTP connection</NAME>
-		
-		<PORT>80</PORT>
-		<PROTOCOL>HTTP</PROTOCOL>
-		
-		<DOCROOT>web</DOCROOT>
-		<SYSROOT>system</SYSROOT>
-
-		<ACCESSLOG>
-                  <STREAM location="file://logs/MyServerHTTP.log" cycle="1048576"/>
-                </ACCESSLOG>
-
-                <WARNINGLOG>
-                  <STREAM location="file://logs/MyServerHTTP.err" cycle="1048576"/>
-                </WARNINGLOG>
-	</VHOST>
-
-	<VHOST>
-		<NAME>FTP connection</NAME>
-		
-		<PORT>21</PORT>
-		<PROTOCOL>FTP</PROTOCOL>
-		
-		<DOCROOT>web</DOCROOT>
-		<SYSROOT>system</SYSROOT>
-		
-		<ACCESSLOG>
-                  <STREAM location="file://logs/MyServerFTP.log" cycle="1048576"/>
-                </ACCESSLOG>
-
-		<WARNINGLOG>
-                  <STREAM location="file://logs/MyServerFTP.err" cycle="1048576"/>
-                </WARNINGLOG>
-	</VHOST>
+  <VHOST>
+    <NAME>Every HTTP connection</NAME>
+
+    <PORT>80</PORT>
+    <PROTOCOL>HTTP</PROTOCOL>
+
+    <DOCROOT>web</DOCROOT>
+    <SYSROOT>system</SYSROOT>
+
+    <ACCESSLOG>
+      <STREAM location="file://logs/MyServerHTTP.log" cycle="1048576"/>
+    </ACCESSLOG>
+
+    <WARNINGLOG>
+      <STREAM location="file://logs/MyServerHTTP.err" cycle="1048576"/>
+    </WARNINGLOG>
+  </VHOST>
+
+  <VHOST>
+    <NAME>FTP connection</NAME>
+
+    <PORT>21</PORT>
+    <PROTOCOL>FTP</PROTOCOL>
+
+    <DOCROOT>web</DOCROOT>
+    <SYSROOT>system</SYSROOT>
+
+    <ACCESSLOG>
+      <STREAM location="file://logs/MyServerFTP.log" cycle="1048576"/>
+    </ACCESSLOG>
+
+    <WARNINGLOG>
+      <STREAM location="file://logs/MyServerFTP.err" cycle="1048576"/>
+    </WARNINGLOG>
+  </VHOST>
 </VHOSTS>



commit 4f60445ff1c0b5085bc2072ca37693620734e260
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Nov 5 16:04:20 2009 +0100

    Remove configuration files customized for Windows.

diff --git a/myserver/binaries/MIMEtypes.default.windows.xml b/myserver/binaries/MIMEtypes.default.windows.xml
deleted file mode 100755
index f6830f6..0000000
--- a/myserver/binaries/MIMEtypes.default.windows.xml
+++ /dev/null
@@ -1,503 +0,0 @@
-<?xml version="1.0"?>
-
-<MIMES>
-  <MIME mime="text/html" handler="MSCGI" param="">
-    <EXTENSION value="mscgi"/>
-  </MIME>
-  
-  <MIME mime="text/html" handler="CGI" self="YES" param="">
-    <EXTENSION value="cgi"/>
-  </MIME>
-  
-  <MIME mime="text/html" handler="ISAPI" param="">
-    <EXTENSION value="isapi"/>
-  </MIME>
-  
-  <MIME mime="text/html" handler="SCGI" self="YES" param="">
-    <EXTENSION value="scgi"/>
-  </MIME>
-
-  <MIME mime="text/html" handler="FASTCGI" self="YES" param="">
-    <EXTENSION value="fcgi"/>
-  </MIME>
-  
-  <MIME mime="text/html" handler="WINCGI" param="">
-    <EXTENSION value="wincgi"/>
-  </MIME>
-
-
-  <MIME mime="application/postscript" handler="SEND" param="">
-    <EXTENSION value="ai"/>
-    <EXTENSION value="eps"/>
-    <EXTENSION value="ps"/>
-  </MIME>
-  
-  <MIME mime="video/quicktime" handler="SEND" param="">
-    <EXTENSION value="mov"/>
-    <EXTENSION value="qt"/>
-  </MIME>
-
-  <MIME mime="image/png" handler="SEND" param="">
-    <EXTENSION value="png"/>
-  </MIME>
-
-  <MIME mime="video/vndvivo" handler="SEND" param="">
-    <EXTENSION value="viv"/>
-    <EXTENSION value="vivo"/>
-  </MIME>
-
-  <MIME mime="application/xtex" handler="SEND" param="">
-    <EXTENSION value="tex"/>
-  </MIME>
-
-  <MIME mime="text/xsetext" handler="SEND" param="">
-    <EXTENSION value="etx"/>
-  </MIME>
-
-  <MIME mime="application/vda" handler="SEND" param="">
-    <EXTENSION value="vda"/>
-  </MIME>
-
-  <MIME mime="application/dsptype" handler="SEND" param="">
-    <EXTENSION value="tsp"/>
-  </MIME>
-
-  <MIME mime="application/xstuffit" handler="SEND" param="">
-    <EXTENSION value="sit"/>
-  </MIME>
-
-  <MIME mime="application/solids" handler="SEND" param="">
-    <EXTENSION value="sol"/>
-  </MIME>
-
-  <MIME mime="application/xfuturesplash" handler="SEND" param="">
-    <EXTENSION value="spl"/>
-  </MIME>
-
-  <MIME mime="application/xbcpio" handler="SEND" param="">
-    <EXTENSION value="bcpio"/>
-  </MIME>
-
-  <MIME mime="application/oda" handler="SEND" param="">
-    <EXTENSION value="oda"/>
-  </MIME>
-
-  <MIME mime="application/pro_eng" handler="SEND" param="">
-    <EXTENSION value="prt"/>
-  </MIME>
-
-  <MIME mime="model/iges" handler="SEND" param="">
-    <EXTENSION value="iges"/>
-    <EXTENSION value="igs"/>
-  </MIME>
-
-  <MIME mime="audio/TSPaudio" handler="SEND" param="">
-    <EXTENSION value="tsi"/>
-  </MIME>
-
-  <MIME mime="image/xportablegraymap" handler="SEND" param="">
-    <EXTENSION value="pgm"/>
-  </MIME>
-
-  <MIME mime="application/xlatex" handler="SEND" param="">
-    <EXTENSION value="latex"/>
-  </MIME>
-
-  <MIME mime="application/xsh" handler="SEND" param="">
-    <EXTENSION value="sh"/>
-  </MIME>
-
-  <MIME mime="application/drafting" handler="SEND" param="">
-    <EXTENSION value="drw"/>
-  </MIME>
-
-  <MIME mime="text/html" handler="SEND" param="">
-    <EXTENSION value="htm"/>
-    <EXTENSION value="html"/>
-  </MIME>
-
-  <MIME mime="application/smil" handler="SEND" param="">
-    <EXTENSION value="smi"/>
-    <EXTENSION value="smil"/>
-  </MIME>
-
-  <MIME mime="application/vndmif" handler="SEND" param="">
-    <EXTENSION value="mif"/>
-  </MIME>
-
-  <MIME mime="application/xipix" handler="SEND" param="">
-    <EXTENSION value="ipx"/>
-  </MIME>
-
-  <MIME mime="model/mesh" handler="SEND" param="">
-    <EXTENSION value="mesh"/>
-    <EXTENSION value="msh"/>
-    <EXTENSION value="silo"/>
-  </MIME>
-
-  <MIME mime="application/xtroffman" handler="SEND" param="">
-    <EXTENSION value="man"/>
-  </MIME>
-
-  <MIME mime="application/xcsh" handler="SEND" param="">
-    <EXTENSION value="csh"/>
-  </MIME>
-
-  <MIME mime="audio/xpnrealaudioplugin" handler="SEND" param="">
-    <EXTENSION value="rpm"/>
-  </MIME>
-
-  <MIME mime="image/cmuraster" handler="SEND" param="">
-    <EXTENSION value="ras"/>
-  </MIME>
-
-  <MIME mime="www/mime" handler="SEND" param="">
-    <EXTENSION value="mime"/>
-  </MIME>
-
-  <MIME mime="application/xdirector" handler="SEND" param="">
-    <EXTENSION value="dcr"/>
-    <EXTENSION value="dir"/>
-    <EXTENSION value="dxr"/>
-  </MIME>
-
-  <MIME mime="text/xml" handler="SEND" param="">
-    <EXTENSION value="xml"/>
-  </MIME>
-
-  <MIME mime="application/xfreelance" handler="SEND" param="">
-    <EXTENSION value="pre"/>
-  </MIME>
-
-  <MIME mime="image/ief" handler="SEND" param="">
-    <EXTENSION value="ief"/>
-  </MIME>
-
-  <MIME mime="application/xshar" handler="SEND" param="">
-    <EXTENSION value="shar"/>
-  </MIME>
-
-  <MIME mime="audio/xrealaudio" handler="SEND" param="">
-    <EXTENSION value="ra"/>
-  </MIME>
-
-  <MIME mime="application/mspowerpoint" handler="SEND" param="">
-    <EXTENSION value="pot"/>
-    <EXTENSION value="pps"/>
-    <EXTENSION value="ppt"/>
-    <EXTENSION value="ppz"/>
-  </MIME>
-
-  <MIME mime="audio/midi" handler="SEND" param="">
-    <EXTENSION value="kar"/>
-    <EXTENSION value="mid"/>
-    <EXTENSION value="midi"/>
-  </MIME>
-
-  <MIME mime="image/jpeg" handler="SEND" param="">
-    <EXTENSION value="jpe"/>
-    <EXTENSION value="jpeg"/>
-    <EXTENSION value="jpg"/>
-  </MIME>
-
-  <MIME mime="application/xkoan" handler="SEND" param="">
-    <EXTENSION value="skd"/>
-    <EXTENSION value="skm"/>
-    <EXTENSION value="skp"/>
-    <EXTENSION value="skt"/>
-  </MIME>
-
-  <MIME mime="application/SLA" handler="SEND" param="">
-    <EXTENSION value="stl"/>
-  </MIME>
-
-  <MIME mime="application/STEP" handler="SEND" param="">
-    <EXTENSION value="step"/>
-    <EXTENSION value="stp"/>
-  </MIME>
-
-  <MIME mime="application/xshockwaveflash" handler="SEND" param="">
-    <EXTENSION value="swf"/>
-  </MIME>
-
-  <MIME mime="image/xxwindowdump" handler="SEND" param="">
-    <EXTENSION value="xwd"/>
-  </MIME>
-
-  <MIME mime="image/xxbitmap" handler="SEND" param="">
-    <EXTENSION value="xbm"/>
-  </MIME>
-
-  <MIME mime="application/dxf" handler="SEND" param="">
-    <EXTENSION value="dxf"/>
-  </MIME>
-
-  <MIME mime="text/sgml" handler="SEND" param="">
-    <EXTENSION value="sgm"/>
-    <EXTENSION value="sgml"/>
-  </MIME>
-
-  <MIME mime="model/vrml" handler="SEND" param="">
-    <EXTENSION value="vrml"/>
-    <EXTENSION value="wrl"/>
-  </MIME>
-
-  <MIME mime="application/xipscript" handler="SEND" param="">
-    <EXTENSION value="ips"/>
-  </MIME>
-
-  <MIME mime="image/xportablepixmap" handler="SEND" param="">
-    <EXTENSION value="ppm"/>
-  </MIME>
-
-  <MIME mime="text/plain" handler="SEND" param="">
-    <EXTENSION value="asc"/>
-    <EXTENSION value="c"/>
-    <EXTENSION value="cc"/>
-    <EXTENSION value="f"/>
-    <EXTENSION value="f90"/>
-    <EXTENSION value="h"/>
-    <EXTENSION value="hh"/>
-    <EXTENSION value="m"/>
-    <EXTENSION value="txt"/>
-  </MIME>
-
-  <MIME mime="application/set" handler="SEND" param="">
-    <EXTENSION value="set"/>
-  </MIME>
-
-  <MIME mime="video/xmsvideo" handler="SEND" param="">
-    <EXTENSION value="avi"/>
-  </MIME>
-
-  <MIME mime="audio/xwav" handler="SEND" param="">
-    <EXTENSION value="wav"/>
-  </MIME>
-
-  <MIME mime="application/xgtar" handler="SEND" param="">
-    <EXTENSION value="gtar"/>
-  </MIME>
-
-  <MIME mime="application/xwaissource" handler="SEND" param="">
-    <EXTENSION value="src"/>
-  </MIME>
-
-  <MIME mime="application/acad" handler="SEND" param="">
-    <EXTENSION value="dwg"/>
-  </MIME>
-
-  <MIME mime="application/xlisp" handler="SEND" param="">
-    <EXTENSION value="lsp"/>
-  </MIME>
-
-  <MIME mime="application/zip" handler="SEND" param="">
-    <EXTENSION value="zip"/>
-  </MIME>
-
-  <MIME mime="audio/xpnrealaudio" handler="SEND" param="">
-    <EXTENSION value="ram"/>
-    <EXTENSION value="rm"/>
-  </MIME>
-
-  <MIME mime="text/tabseparatedvalues" handler="SEND" param="">
-    <EXTENSION value="tsv"/>
-  </MIME>
-
-  <MIME mime="image/xxpixmap" handler="SEND" param="">
-    <EXTENSION value="xpm"/>
-  </MIME>
-
-  <MIME mime="application/xtexinfo" handler="SEND" param="">
-    <EXTENSION value="texi"/>
-    <EXTENSION value="texinfo"/>
-  </MIME>
-
-  <MIME mime="application/xustar" handler="SEND" param="">
-    <EXTENSION value="ustar"/>
-  </MIME>
-
-  <MIME mime="application/xcpio" handler="SEND" param="">
-    <EXTENSION value="cpio"/>
-  </MIME>
-
-  <MIME mime="application/vndmsexcel" handler="SEND" param="">
-    <EXTENSION value="xlc"/>
-    <EXTENSION value="xll"/>
-    <EXTENSION value="xlm"/>
-    <EXTENSION value="xls"/>
-    <EXTENSION value="xlw"/>
-  </MIME>
-
-  <MIME mime="image/xrgb" handler="SEND" param="">
-    <EXTENSION value="rgb"/>
-  </MIME>
-
-  <MIME mime="image/xportablebitmap" handler="SEND" param="">
-    <EXTENSION value="pbm"/>
-  </MIME>
-
-  <MIME mime="application/pdf" handler="SEND" param="">
-    <EXTENSION value="pdf"/>
-  </MIME>
-
-  <MIME mime="application/xjavascript" handler="SEND" param="">
-    <EXTENSION value="js"/>
-  </MIME>
-
-  <MIME mime="application/xcdlink" handler="SEND" param="">
-    <EXTENSION value="vcd"/>
-  </MIME>
-
-  <MIME mime="chemical/xpdb" handler="SEND" param="">
-    <EXTENSION value="pdb"/>
-    <EXTENSION value="xyz"/>
-  </MIME>
-
-  <MIME mime="application/xsv4crc" handler="SEND" param="">
-    <EXTENSION value="sv4crc"/>
-  </MIME>
-
-  <MIME mime="image/gif" handler="SEND" param="">
-    <EXTENSION value="gif"/>
-  </MIME>
-
-  <MIME mime="application/xlotusscreencam" handler="SEND" param="">
-    <EXTENSION value="scm"/>
-  </MIME>
-
-  <MIME mime="image/tiff" handler="SEND" param="">
-    <EXTENSION value="tif"/>
-    <EXTENSION value="tiff"/>
-  </MIME>
-
-  <MIME mime="application/maccompactpro" handler="SEND" param="">
-    <EXTENSION value="cpt"/>
-  </MIME>
-
-  <MIME mime="application/clariscad" handler="SEND" param="">
-    <EXTENSION value="ccad"/>
-  </MIME>
-
-  <MIME mime="video/mpeg" handler="SEND" param="">
-    <EXTENSION value="mpe"/>
-    <EXTENSION value="mpeg"/>
-    <EXTENSION value="mpg"/>
-  </MIME>
-
-  <MIME mime="application/xtcl" handler="SEND" param="">
-    <EXTENSION value="tcl"/>
-  </MIME>
-
-  <MIME mime="application/xhdf" handler="SEND" param="">
-    <EXTENSION value="hdf"/>
-  </MIME>
-
-  <MIME mime="text/css" handler="SEND" param="">
-    <EXTENSION value="css"/>
-  </MIME>
-
-  <MIME mime="application/xtroff" handler="SEND" param="">
-    <EXTENSION value="roff"/>
-    <EXTENSION value="t"/>
-    <EXTENSION value="tr"/>
-  </MIME>
-
-  <MIME mime="application/macbinhex40" handler="SEND" param="">
-    <EXTENSION value="hqx"/>
-  </MIME>
-
-  <MIME mime="application/ideas" handler="SEND" param="">
-    <EXTENSION value="unv"/>
-  </MIME>
-
-  <MIME mime="audio/xaiff" handler="SEND" param="">
-    <EXTENSION value="aif"/>
-    <EXTENSION value="aifc"/>
-    <EXTENSION value="aiff"/>
-  </MIME>
-
-  <MIME mime="application/xdvi" handler="SEND" param="">
-    <EXTENSION value="dvi"/>
-  </MIME>
-
-  <MIME mime="application/andrewinset" handler="SEND" param="">
-    <EXTENSION value="ez"/>
-  </MIME>
-
-  <MIME mime="application/xnetcdf" handler="SEND" param="">
-    <EXTENSION value="cdf"/>
-    <EXTENSION value="nc"/>
-  </MIME>
-
-  <MIME mime="application/xsv4cpio" handler="SEND" param="">
-    <EXTENSION value="sv4cpio"/>
-  </MIME>
-
-  <MIME mime="video/xsgimovie" handler="SEND" param="">
-    <EXTENSION value="movie"/>
-  </MIME>
-
-  <MIME mime="audio/mpeg" handler="SEND" param="">
-    <EXTENSION value="mp2"/>
-    <EXTENSION value="mp3"/>
-    <EXTENSION value="mpga"/>
-  </MIME>
-
-  <MIME mime="application/xtroffme" handler="SEND" param="">
-    <EXTENSION value="me"/>
-  </MIME>
-
-  <MIME mime="xconference/xcooltalk" handler="SEND" param="">
-    <EXTENSION value="ice"/>
-  </MIME>
-
-  <MIME mime="application/octetstream" handler="SEND" param="">
-    <EXTENSION value="bin"/>
-    <EXTENSION value="class"/>
-    <EXTENSION value="dms"/>
-    <EXTENSION value="exe"/>
-    <EXTENSION value="lha"/>
-    <EXTENSION value="lzh"/>
-  </MIME>
-
-  <MIME mime="application/xtroffms" handler="SEND" param="">
-    <EXTENSION value="ms"/>
-  </MIME>
-
-  <MIME mime="application/xgzip" handler="SEND" param="">
-    <EXTENSION value="gz"/>
-  </MIME>
-
-  <MIME mime="audio/basic" handler="SEND" param="">
-    <EXTENSION value="au"/>
-    <EXTENSION value="snd"/>
-  </MIME>
-
-  <MIME mime="application/xtar" handler="SEND" param="">
-    <EXTENSION value="tar"/>
-  </MIME>
-
-  <MIME mime="text/rtf" handler="SEND" param="">
-    <EXTENSION value="rtf"/>
-  </MIME>
-
-  <MIME mime="text/richtext" handler="SEND" param="">
-    <EXTENSION value="rtx"/>
-  </MIME>
-
-  <MIME mime="image/xportableanymap" handler="SEND" param="">
-    <EXTENSION value="pnm"/>
-  </MIME>
-
-  <MIME mime="application/xchesspgn" handler="SEND" param="">
-    <EXTENSION value="pgn"/>
-  </MIME>
-
-  <MIME mime="video/xfli" handler="SEND" param="">
-    <EXTENSION value="fli"/>
-  </MIME>
-
-  <MIME mime="application/msword" handler="SEND" param="">
-    <EXTENSION value="doc"/>
-  </MIME>
-</MIMES>
diff --git a/myserver/binaries/myserver.default.windows.xml b/myserver/binaries/myserver.default.windows.xml
deleted file mode 100755
index 5bb5d83..0000000
--- a/myserver/binaries/myserver.default.windows.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0"?>
-
-<!--MODIFY THE FILE ONLY IF YOU ARE SURE OF WHAT YOU ARE DOING-->
-<MYSERVER>
-
-	<!--CHOOSE THE LANGUAGE TO USE FOR THE SERVER-->
-	<DEFINE name="server.language" value="english.xml" />
-
-	<!--VERBOSITY ON LOG FILE-->
-	<DEFINE name="server.verbosity" value="2" />
-
-	<!--NUMBER OF SERVING THREADS ALWAYS ACTIVE-->
-  <DEFINE name="server.static_threads" value="5" />
-
-	<!--MAXIMUM NUMBER OF SERVING THREADS THAT THE SCHEDULER CAN
-			CREATE-->
-	<DEFINE name="server.max_threads" value="200" />
-
-	<!--DIMENSION OF EVERY BUFFER IN BYTES IF ON THE MACHINE THERE IS A
-			LOT OF RAM	THIS VALUES CAN BE INCREASED TO MAKE MYSERVER
-			FASTER. NORMALLY THE MEMORY USED BY BUFFERS IS EQUAL TO
-			BUFFER_SIZE * 2 * NUM_OF_THREADS-->
-	<DEFINE name="server.buffer_size" value="102400" />
-
-	<!--DEFAULT FILENAME TO SEND IN A DIRECTORY
-			IF THE FILE ISN'T IN THE PATH THEN THE DIRECTORY
-			CONTENT IS SENT	-->
-  <DEFINE name="http.default_file">
-    <DEFINE value="default.html"/>
-    <DEFINE value="default.htm"/>
-    <DEFINE value="index.html"/>
-    <DEFINE value="index.htm"/>
-  </DEFINE>
-
-	<!--TIMEOUT OF EVERY CLIENTS CONNECTED TO THE SERVER.
-			IF THE CLIENT DOESN'T REQUEST ANYTHING FOR N
-			SECONDS THE CONNECTION WITH THE CLIENT IS
-			CLOSED. SET THIS TO 0 IF YOU DON'T WANT USE
-			KEEP-ALIVE CONNECTIONS	-->
-	<DEFINE name="connection.timeout" value="180" />
-
-	<!--SET THIS TO YES FOR USE PERSONALIZED PAGES TO SEND MESSAGE,
-			PERSONALIZED PAGES ARE IN THE SYSTEM DIRECTORY	-->
-	<DEFINE name="http.use_error_file" value="YES" />
-
-	<!--DEFINE THE MAX NUMBER OF CONNECTIONS TO ALLOW TO THE SERVER. IF
-			0 THEN INFINITE CONNECTIONS ARE ALLOWED.-->
-	<DEFINE name="server.max_connections" value="0" />
-
-	<!--DEFINE THE MAX NUMBER OF CONNECTIONS TO ACCEPT.-->
-	<DEFINE name="server.max_accepted_connections" value="0" />
-
-  <!--TEXT AND BACKGROUND ATTRIBUTES FOR CONSOLE LOG MESSAGES. -->
-  <DEFINE name="log_color.info_fg" value="white" />
-  <DEFINE name="log_color.info_bg" value="black" />
-
-  <DEFINE name="log_color.warning_fg" value="yellow" />
-  <DEFINE name="log_color.warning_bg" value="black" />
-
-  <DEFINE name="log_color.error_fg" value="red" />
-  <DEFINE name="log_color.error_bg" value="black" />
-
-	<!--MAX SIZE OF THE LOG FILE IN BYTES	-->
-	<DEFINE name="server.max_log_size" value="1048576" />
-
-	<!--DEFINE THE FOLDER BROWSING STYLE-->
-	<DEFINE name="http.dir.css" value="/sys/css/browsestyle.css" />
-
-	<!--DEFINE THE ADMINISTRATOR E-MAIL-->
-	<DEFINE name="server.admin" value="administrator@localhost" />
-
-	<!--DEFINE THE GZIP COMPRESSION THRESHOLD VALUE-->
-	<DEFINE name="gzip.threshold" value="1048576" />
-
-	<!--DEFINE IF LINKS SHOULD BE FOLLOWED-->
-	<DEFINE name="symlinks.follow" value="YES" />
-
-	<!--MAX CACHE SIZE FOR STATIC FILES-->
-	<DEFINE name="server.max_files_cache" value="10485760" />
-
-	<!--MAX CACHE SIZE FOR SINGLE STATIC FILE-->
-	<DEFINE name="server.max_file_cache" value="1048576" />
-
-	<!--MIN CACHE SIZE FOR SINGLE STATIC FILE-->
-	<DEFINE name="server.min_file_cache" value="1048576" />
-
-	<!-- ENABLE HOME DIRECTORY PER USER -->
-	<DEFINE name="http.use_home_directory" value="NO" />
-
-	<!-- DEFINE NAME FOR HOME DIRECTORY BROWSING, BY DEFAULT THE SERVER
-			 USES public_html -->
-	<DEFINE name="http.home_directory" value="public_html" />
-
-  <!--SET THIS TO YES IF YOU WANT TO ENABLE THE CONTROL PROTOCOL-->
-	<DEFINE name="control.enabled" value="NO" />
-
-	<!--MAXIMUM NUMBER OF EXTERNAL SERVERS THAT CAN BE EXECUTED-->
-	<DEFINE name="server.max_servers" value="100" />
-
-  <!--SET HERE THE NAME FOR THE CONTROL ADMIN. WE SUGGEST YOU YO USE
-      SOMETHING DIFFERENT FROM ADMIN, ADMINISTRATOR OR ROOT-->
-  <DEFINE name="control.admin" value="ADMIN" />
-
-  <!--DEFINE HERE A GOOD STRONG PASSWORD FOR THE ADMIN-->
-  <DEFINE name="control.password" value="PLEASE_CHANGE_THIS_PASSWORD" />
-
-  <!--FTP GLOBAL CONFIGURATION-->
-  <!--ALLOW ANONYMOUS LOGIN-->
-  <DEFINE name="ftp.allow_anonymous" value="YES" />
-
-  <!--IF ANONYMOUS ALLOWED, TELLS IF NEEDS PASS-->
-  <DEFINE name="ftp.anonymous_need_pass" value="NO" />
-
-  <!--ALLOW ASYNCHRONOUS CMDS LIKE Abor, Quit, Stat-->
-  <DEFINE name="ftp.allow_asynchronous_cmds" value="YES" />
-
-  <!--ALLOW CLIENTS TO SEND MORE THAN ONE COMMAND TO SERVER INTO ONE REQUEST-->
-  <DEFINE name="ftp.allow_pipelining" value="NO" />
-
-  <!--ALLOW CLIENTS TO CHANGE SERVER FILES-->
-  <DEFINE name="ftp.allow_store" value="NO" />
-</MYSERVER>
diff --git a/myserver/binaries/virtualhosts.default.windows.xml b/myserver/binaries/virtualhosts.default.windows.xml
deleted file mode 100755
index 36b3b47..0000000
--- a/myserver/binaries/virtualhosts.default.windows.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0"?>
-
-<VHOSTS>
-
-	<VHOST>
-		<NAME>Every HTTP connection</NAME>
-		
-		<PORT>80</PORT>
-		<PROTOCOL>HTTP</PROTOCOL>
-		
-		<DOCROOT>web</DOCROOT>
-		<SYSROOT>system</SYSROOT>
-
-		<ACCESSLOG>
-                  <STREAM location="file://logs/MyServerHTTP.log" cycle="1048576"/>
-                </ACCESSLOG>
-
-                <WARNINGLOG>
-                  <STREAM location="file://logs/MyServerHTTP.err" cycle="1048576"/>
-                </WARNINGLOG>
-	</VHOST>
-
-	<VHOST>
-		<NAME>FTP connection</NAME>
-		
-		<PORT>21</PORT>
-		<PROTOCOL>FTP</PROTOCOL>
-		
-		<DOCROOT>web</DOCROOT>
-		<SYSROOT>system</SYSROOT>
-		
-		<ACCESSLOG>
-                  <STREAM location="file://logs/MyServerFTP.log" cycle="1048576"/>
-                </ACCESSLOG>
-
-		<WARNINGLOG>
-                  <STREAM location="file://logs/MyServerFTP.err" cycle="1048576"/>
-                </WARNINGLOG>
-	</VHOST>
-</VHOSTS>



commit 014779fe0dc332743dfdce41089730e579ce2021
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Nov 5 16:02:19 2009 +0100

    Separe static components loading from plugins.

diff --git a/myserver/include/server/server.h b/myserver/include/server/server.h
index 6cb8e4b..8382e99 100644
--- a/myserver/include/server/server.h
+++ b/myserver/include/server/server.h
@@ -199,6 +199,7 @@ private:
   Server ();
 
   void mainLoop ();
+  void loadStaticComponents ();
   void loadPlugins ();
   void displayBoot ();
   int postLoad ();
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index a998b79..8e93aeb 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -306,6 +306,7 @@ int Server::postLoad ()
   /* Load the home directories configuration.  */
   homeDir.load ();
 
+  loadStaticComponents ();
   loadPlugins ();
 
   /* Load the virtual hosts configuration from the xml file.  */
@@ -344,9 +345,9 @@ int Server::postLoad ()
 }
 
 /*!
- * Load the plugins.
+ * Load static built-in components.
  */
-void Server::loadPlugins ()
+void Server::loadStaticComponents ()
 {
   string xml ("xml");
 
@@ -376,7 +377,13 @@ void Server::loadPlugins ()
 
   Md5::initialize (&cryptAlgoManager);
   Sha1::initialize (&cryptAlgoManager);
+}
 
+/*!
+ * Load the plugins.
+ */
+void Server::loadPlugins ()
+{
   getPluginsManager ()->preLoad (this, externalPath);
   getPluginsManager ()->load (this);
   getPluginsManager ()->postLoad (this);

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

Summary of changes:
 myserver/binaries/MIMEtypes.default.windows.xml    |  503 --------------------
 myserver/binaries/MIMEtypes.default.xml            |   10 +-
 myserver/binaries/myserver.default.windows.xml     |  122 -----
 myserver/binaries/myserver.default.xml             |  108 +++---
 myserver/binaries/system/errors/300.html           |   36 +-
 myserver/binaries/system/errors/301.html           |   36 +-
 myserver/binaries/system/errors/302.html           |   36 +-
 myserver/binaries/system/errors/303.html           |   36 +-
 myserver/binaries/system/errors/304.html           |   36 +-
 myserver/binaries/system/errors/305.html           |   36 +-
 myserver/binaries/system/errors/307.html           |   36 +-
 myserver/binaries/system/errors/400.html           |   36 +-
 myserver/binaries/system/errors/401.html           |   36 +-
 myserver/binaries/system/errors/402.html           |   36 +-
 myserver/binaries/system/errors/403.html           |   36 +-
 myserver/binaries/system/errors/404.html           |   36 +-
 myserver/binaries/system/errors/405.html           |   36 +-
 myserver/binaries/system/errors/406.html           |   36 +-
 myserver/binaries/system/errors/407.html           |   36 +-
 myserver/binaries/system/errors/408.html           |   36 +-
 myserver/binaries/system/errors/409.html           |   36 +-
 myserver/binaries/system/errors/410.html           |   36 +-
 myserver/binaries/system/errors/411.html           |   36 +-
 myserver/binaries/system/errors/412.html           |   36 +-
 myserver/binaries/system/errors/413.html           |   36 +-
 myserver/binaries/system/errors/414.html           |   36 +-
 myserver/binaries/system/errors/415.html           |   36 +-
 myserver/binaries/system/errors/416.html           |   36 +-
 myserver/binaries/system/errors/417.html           |   36 +-
 myserver/binaries/system/errors/500.html           |   36 +-
 myserver/binaries/system/errors/501.html           |   36 +-
 myserver/binaries/system/errors/502.html           |   36 +-
 myserver/binaries/system/errors/503.html           |   36 +-
 myserver/binaries/system/errors/504.html           |   36 +-
 myserver/binaries/system/errors/505.html           |   36 +-
 myserver/binaries/virtualhosts.default.windows.xml |   40 --
 myserver/binaries/virtualhosts.default.xml         |   70 ++--
 myserver/binaries/web/cgi-bin/Makefile.am          |    2 +-
 myserver/binaries/web/cgi-bin/counter.html         |   18 -
 myserver/binaries/web/cgi-bin/counter.readme       |   59 ---
 myserver/binaries/web/default.html                 |    8 +-
 myserver/binaries/web/link.html                    |   78 ++--
 myserver/include/server/server.h                   |    1 +
 myserver/src/server/server.cpp                     |   11 +-
 44 files changed, 706 insertions(+), 1440 deletions(-)
 delete mode 100755 myserver/binaries/MIMEtypes.default.windows.xml
 delete mode 100755 myserver/binaries/myserver.default.windows.xml
 delete mode 100755 myserver/binaries/virtualhosts.default.windows.xml
 delete mode 100644 myserver/binaries/web/cgi-bin/counter.html
 delete mode 100644 myserver/binaries/web/cgi-bin/counter.readme


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Thu Nov 05 11:23:13 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N657B-0005Km-6F
	for mharc-myserver-commit@gnu.org; Thu, 05 Nov 2009 11:23:13 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N6579-0005J0-60
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 11:23:11 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N6577-0005Hl-9s
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 11:23:10 -0500
Received: from [199.232.76.173] (port=33752 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N6577-0005Hd-1G
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 11:23:09 -0500
Received: from savannah.gnu.org ([199.232.41.3]:53556 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 1N6576-0007s5-Kz
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 11:23:08 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N6574-0004AP-I2
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 16:23:06 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N6574-00049x-9M
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 16:23:06 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: c84058968a77da765df544b00bc3bb90cd7b96e5
X-Git-Newrev: 8803a55881b0fecc63e40662a9e2771f1bfe20b0
Message-Id: <E1N6574-00049x-9M@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Thu, 05 Nov 2009 16:23:06 +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. 0_9-357-g8803a55
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: Thu, 05 Nov 2009 16:23:11 -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  8803a55881b0fecc63e40662a9e2771f1bfe20b0 (commit)
      from  c84058968a77da765df544b00bc3bb90cd7b96e5 (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 8803a55881b0fecc63e40662a9e2771f1bfe20b0
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Nov 5 17:22:57 2009 +0100

    Read from the main configuration the default MIME types and virtual hosts handlers to be used.

diff --git a/myserver/include/conf/mime/mime_manager.h b/myserver/include/conf/mime/mime_manager.h
index 9d30448..79c8781 100644
--- a/myserver/include/conf/mime/mime_manager.h
+++ b/myserver/include/conf/mime/mime_manager.h
@@ -99,6 +99,8 @@ public:
   void registerHandler (string &name, MimeManagerHandler *handler);
   void setDefaultHandler (string &name);
   void clean ();
+  MimeManagerHandler *getDefaultHandler () {return defHandler;}
+
 
   void registerBuilder (string &name, MAKE_HANDLER builder);
   MimeManagerHandler *buildHandler (string &name);
diff --git a/myserver/include/server/server.h b/myserver/include/server/server.h
index 8382e99..4947ee0 100644
--- a/myserver/include/server/server.h
+++ b/myserver/include/server/server.h
@@ -171,8 +171,7 @@ public:
 private:
   friend class ClientsThread;
   XmlValidator *xmlValidator;
-  XmlMimeHandler *xmlMimeHandler;
-  XmlVhostHandler *vhostHandler;
+  VhostManagerHandler *vhostHandler;
 
   MainConfiguration *configurationFileManager;
   MainConfiguration* (*genMainConf) (Server *server, const char *arg);
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 8e93aeb..2c2b803 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -279,36 +279,36 @@ int Server::postLoad ()
 
   log (MYSERVER_LOG_MSG_INFO, _("IP: %s"), ipAddresses->c_str ());
 
-  /* Load the MIME types.  */
-  log (MYSERVER_LOG_MSG_INFO, _("Loading MIME types..."));
-
-  xmlMimeHandler = new XmlMimeHandler ();
-  if (int nMIMEtypes = xmlMimeHandler->load (mimeConfigurationFile.c_str ()))
-    log (MYSERVER_LOG_MSG_INFO, _("Using %i MIME types"), nMIMEtypes);
-  else
-    log (MYSERVER_LOG_MSG_ERROR, _("Error while loading MIME types"));
-
-  string xml ("xml");
-  mimeManager.registerHandler (xml, xmlMimeHandler);
-  mimeManager.setDefaultHandler (xml);
-
   log (MYSERVER_LOG_MSG_INFO, _("Detected %i CPUs"), (int) getCPUCount ());
 
   connectionsScheduler.restart ();
 
   listenThreads.initialize ();
 
-  vhostHandler = new XmlVhostHandler (&listenThreads, logManager);
-  vhostManager.setHandler (vhostHandler);
-
   getProcessServerManager ()->load ();
 
+  if (path == NULL)
+    path = new string ();
+
+  if (getdefaultwd (*path))
+    return -1;
+
   /* Load the home directories configuration.  */
   homeDir.load ();
 
   loadStaticComponents ();
   loadPlugins ();
 
+  /* FIXME: refactor.. the same code is present in the main loop.  */
+  const char *vhostHandlerN = getData ("server.vhost_manager");
+  if (!vhostHandlerN)
+    vhostHandlerN = "xml";
+
+  string vhostHandlerStr (vhostHandlerN);
+  vhostHandler = vhostManager.buildHandler (vhostHandlerStr, &listenThreads,
+                                            logManager);
+  vhostManager.setHandler (vhostHandler);
+
   /* Load the virtual hosts configuration from the xml file.  */
   if (vhostHandler->load (vhostConfigurationFile.c_str ()))
     {
@@ -318,11 +318,22 @@ int Server::postLoad ()
       return -1;
     }
 
-  if (path == 0)
-    path = new string ();
 
-  if (getdefaultwd (*path))
-    return -1;
+  /* Load the MIME types.  */
+  log (MYSERVER_LOG_MSG_INFO, _("Loading MIME types..."));
+
+  const char *mimeManagerCfg = getData ("server.mime_manager");
+  if (!mimeManagerCfg)
+    mimeManagerCfg = "xml";
+
+  string handlerStr (mimeManagerCfg);
+  mimeManager.setDefaultHandler (handlerStr);
+
+  MimeManagerHandler *mimeHandler = mimeManager.getDefaultHandler ();
+  if (int nMIMEtypes = mimeHandler->load (mimeConfigurationFile.c_str ()))
+    log (MYSERVER_LOG_MSG_INFO, _("Using %i MIME types"), nMIMEtypes);
+  else
+    log (MYSERVER_LOG_MSG_ERROR, _("Error while loading MIME types"));
 
   for (u_long i = 0; i < nStaticThreads; i++)
     {
@@ -351,6 +362,8 @@ void Server::loadStaticComponents ()
 {
   string xml ("xml");
 
+  mimeManager.registerHandler (xml, new XmlMimeHandler ());
+
   XmlVhostHandler::registerBuilder (vhostManager);
   XmlMimeHandler::registerBuilder (mimeManager);
 
@@ -489,7 +502,16 @@ void Server::mainLoop ()
                   connectionsScheduler.restart ();
                   listenThreads.initialize ();
 
-                  vhostHandler = new XmlVhostHandler (&listenThreads, logManager);
+                  delete vhostHandler;
+
+                  const char *vhostHandlerN = getData ("server.vhost_manager");
+                  if (!vhostHandlerN)
+                    vhostHandlerN = "xml";
+
+                  string vhostHandlerStr (vhostHandlerN);
+                  vhostHandler = vhostManager.buildHandler (vhostHandlerStr,
+                                                            &listenThreads,
+                                                            logManager);
                   vhostManager.setHandler (vhostHandler);
 
                   delete oldvhost;
@@ -504,8 +526,7 @@ void Server::mainLoop ()
                   log (MYSERVER_LOG_MSG_INFO, _("Reloaded"));
                 }
             }
-        }//end  if (autoRebootEnabled)
-
+        }
     }
 }
 
@@ -1118,7 +1139,7 @@ ConnectionPtr Server::addConnectionToList (Socket* s,
   newConnection->setIpAddr (ipAddr);
   newConnection->setLocalIpAddr (localIpAddr);
   newConnection->host = vhostManager.getVHost (0, localIpAddr, localPort);
-  if (newConnection->host == 0)
+  if (newConnection->host == NULL)
     {
       connectionsPoolLock.lock ();
       connectionsPool.put (newConnection);

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

Summary of changes:
 myserver/include/conf/mime/mime_manager.h |    2 +
 myserver/include/server/server.h          |    3 +-
 myserver/src/server/server.cpp            |   69 +++++++++++++++++++----------
 3 files changed, 48 insertions(+), 26 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Thu Nov 05 16:28:51 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N69sw-0003aW-OD
	for mharc-myserver-commit@gnu.org; Thu, 05 Nov 2009 16:28:50 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N69st-0003We-JN
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 16:28:47 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N69sr-0003UK-RH
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 16:28:46 -0500
Received: from [199.232.76.173] (port=38030 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N69sr-0003U5-NU
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 16:28:45 -0500
Received: from savannah.gnu.org ([199.232.41.3]:47356 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 1N69sr-0008Ms-Am
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 16:28:45 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N69sq-00006U-KX
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 21:28:44 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N69sp-00005t-3E
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 21:28:44 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 8803a55881b0fecc63e40662a9e2771f1bfe20b0
X-Git-Newrev: 16ded713f3e44e1677dd2d7b7d0da234fa9f70d9
Message-Id: <E1N69sp-00005t-3E@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Thu, 05 Nov 2009 21:28:43 +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. 0_9-360-g16ded71
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: Thu, 05 Nov 2009 21:28:48 -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  16ded713f3e44e1677dd2d7b7d0da234fa9f70d9 (commit)
       via  890d5ec417290ec31483bfb0a9c35faf124713ff (commit)
       via  89eef0881e9f93e534594f2b23d85a9ccc447c8a (commit)
      from  8803a55881b0fecc63e40662a9e2771f1bfe20b0 (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 16ded713f3e44e1677dd2d7b7d0da234fa9f70d9
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Nov 5 22:08:51 2009 +0100

    Rename "server.{mime,vhost}_manager" to "server.{mime,vhost}_handler".
    
    Server::getData () accepts an additional `defValue' param.  If the
    desired variable is not found then return `defValue'.  By default its
    value is NULL.

diff --git a/myserver/documentation/basic_configuration.texi b/myserver/documentation/basic_configuration.texi
index 1ce43a0..8f0b235 100644
--- a/myserver/documentation/basic_configuration.texi
+++ b/myserver/documentation/basic_configuration.texi
@@ -32,7 +32,7 @@ are looked exclusively in this directory.
 @subsection Alternative handlers
 Plugins are allowed to install new handlers to read the configuration
 from other sources.  It is done changing the value of the variables
-@code{server.vhost_manager} and @code{server.server.mime_manager},
+@code{server.vhost_handler} and @code{server.server.mime_handler},
 respectively to use a different handler for the virtual hosts and for
 the MIME types.  If no value is specified then the value @value{xml}
 is used.
diff --git a/myserver/include/server/server.h b/myserver/include/server/server.h
index 91af0f3..60fd436 100644
--- a/myserver/include/server/server.h
+++ b/myserver/include/server/server.h
@@ -90,7 +90,7 @@ public:
   int loadLibraries ();
 
   CachedFileFactory* getCachedFiles ();
-  const char* getData (const char* name);
+  const char* getData (const char *name, const char *defValue = NULL);
 
   void setGlobalData (const char* name, void* data);
   void* getGlobalData (const char* name);
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 20ab5d7..7615166 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -305,14 +305,17 @@ int Server::postLoad ()
   /* Load the MIME types.  */
   log (MYSERVER_LOG_MSG_INFO, _("Loading MIME types..."));
 
-  const char *mimeManagerCfg = getData ("server.mime_manager");
-  if (!mimeManagerCfg)
-    mimeManagerCfg = "xml";
-
-  string handlerStr (mimeManagerCfg);
+  string handlerStr (getData ("server.mime_handler", "xml"));
   mimeManager.setDefaultHandler (handlerStr);
 
   MimeManagerHandler *mimeHandler = mimeManager.getDefaultHandler ();
+  if (!mimeHandler)
+    {
+      log (MYSERVER_LOG_MSG_ERROR,
+          _("Error creating the MIME types handler: %s"), handlerStr.c_str ());
+      return -1;
+    }
+
   if (int nMIMEtypes = mimeHandler->load (mimeConfigurationFile.c_str ()))
     log (MYSERVER_LOG_MSG_INFO, _("Using %i MIME types"), nMIMEtypes);
   else
@@ -343,13 +346,18 @@ int Server::postLoad ()
  */
 int Server::loadVHostConf ()
 {
-  const char *vhostHandlerN = getData ("server.vhost_manager");
-  if (!vhostHandlerN)
-    vhostHandlerN = "xml";
-
-  string vhostHandlerStr (vhostHandlerN);
+  string vhostHandlerStr (getData ("server.vhost_handler", "xml"));
   vhostHandler = vhostManager.buildHandler (vhostHandlerStr, &listenThreads,
                                             logManager);
+
+  if (!vhostHandler)
+    {
+      log (MYSERVER_LOG_MSG_ERROR,
+           _("Error creating the virtual hosts handler: %s"),
+           vhostHandlerStr.c_str ());
+      return -1;
+    }
+
   vhostManager.setHandler (vhostHandler);
 
   /* Load the virtual hosts configuration.  */
@@ -1365,12 +1373,13 @@ int Server::freeHashedData ()
 
 /*!
  * Get the value for name in the hash dictionary.
+ * If the value is not found then defValue is returned.
  */
-const char* Server::getData (const char* name)
+const char *Server::getData (const char *name, const char *defValue)
 {
   NodeTree<string> *s = hashedData.get (name);
 
-  return s ? s->getValue ()->c_str () : 0;
+  return s ? s->getValue ()->c_str () : defValue;
 }
 
 /*!



commit 890d5ec417290ec31483bfb0a9c35faf124713ff
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Nov 5 21:58:32 2009 +0100

    Document how use different configuration files handlers.

diff --git a/myserver/documentation/basic_configuration.texi b/myserver/documentation/basic_configuration.texi
index d211224..1ce43a0 100644
--- a/myserver/documentation/basic_configuration.texi
+++ b/myserver/documentation/basic_configuration.texi
@@ -29,6 +29,14 @@ 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.
 
+@subsection Alternative handlers
+Plugins are allowed to install new handlers to read the configuration
+from other sources.  It is done changing the value of the variables
+@code{server.vhost_manager} and @code{server.server.mime_manager},
+respectively to use a different handler for the virtual hosts and for
+the MIME types.  If no value is specified then the value @value{xml}
+is used.
+
 @section Server administrator
 CGI scripts can get the server administrator e-mail and show them to
 the user (through the SERVER_ADMIN environment variable). 



commit 89eef0881e9f93e534594f2b23d85a9ccc447c8a
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Thu Nov 5 21:57:38 2009 +0100

    Refactor common code in a single function.

diff --git a/myserver/include/server/server.h b/myserver/include/server/server.h
index 4947ee0..91af0f3 100644
--- a/myserver/include/server/server.h
+++ b/myserver/include/server/server.h
@@ -175,6 +175,7 @@ private:
 
   MainConfiguration *configurationFileManager;
   MainConfiguration* (*genMainConf) (Server *server, const char *arg);
+  int loadVHostConf ();
 
 # ifdef WIN32
   friend int __stdcall control_handler (u_long control_type);
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 2c2b803..20ab5d7 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -299,25 +299,8 @@ int Server::postLoad ()
   loadStaticComponents ();
   loadPlugins ();
 
-  /* FIXME: refactor.. the same code is present in the main loop.  */
-  const char *vhostHandlerN = getData ("server.vhost_manager");
-  if (!vhostHandlerN)
-    vhostHandlerN = "xml";
-
-  string vhostHandlerStr (vhostHandlerN);
-  vhostHandler = vhostManager.buildHandler (vhostHandlerStr, &listenThreads,
-                                            logManager);
-  vhostManager.setHandler (vhostHandler);
-
-  /* Load the virtual hosts configuration from the xml file.  */
-  if (vhostHandler->load (vhostConfigurationFile.c_str ()))
-    {
-      log (MYSERVER_LOG_MSG_ERROR,
-           _("Error loading the vhost configuration file %s"),
-           vhostConfigurationFile.c_str ());
-      return -1;
-    }
-
+  if (loadVHostConf ())
+    return -1;
 
   /* Load the MIME types.  */
   log (MYSERVER_LOG_MSG_INFO, _("Loading MIME types..."));
@@ -356,6 +339,32 @@ int Server::postLoad ()
 }
 
 /*!
+ * Reload the virtual hosts configuration.
+ */
+int Server::loadVHostConf ()
+{
+  const char *vhostHandlerN = getData ("server.vhost_manager");
+  if (!vhostHandlerN)
+    vhostHandlerN = "xml";
+
+  string vhostHandlerStr (vhostHandlerN);
+  vhostHandler = vhostManager.buildHandler (vhostHandlerStr, &listenThreads,
+                                            logManager);
+  vhostManager.setHandler (vhostHandler);
+
+  /* Load the virtual hosts configuration.  */
+  if (vhostHandler->load (vhostConfigurationFile.c_str ()))
+    {
+      log (MYSERVER_LOG_MSG_ERROR,
+           _("Error loading the vhost configuration file %s"),
+           vhostConfigurationFile.c_str ());
+      return -1;
+    }
+
+  return 0;
+}
+
+/*!
  * Load static built-in components.
  */
 void Server::loadStaticComponents ()
@@ -502,22 +511,9 @@ void Server::mainLoop ()
                   connectionsScheduler.restart ();
                   listenThreads.initialize ();
 
-                  delete vhostHandler;
-
-                  const char *vhostHandlerN = getData ("server.vhost_manager");
-                  if (!vhostHandlerN)
-                    vhostHandlerN = "xml";
-
-                  string vhostHandlerStr (vhostHandlerN);
-                  vhostHandler = vhostManager.buildHandler (vhostHandlerStr,
-                                                            &listenThreads,
-                                                            logManager);
-                  vhostManager.setHandler (vhostHandler);
-
                   delete oldvhost;
 
-                  /* Load the virtual hosts configuration from the xml file.  */
-                  if (vhostHandler->load (vhostConfigurationFile.c_str ()))
+                  if (loadVHostConf ())
                     listenThreads.rollbackFastReboot ();
                   else
                     listenThreads.commitFastReboot ();

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

Summary of changes:
 myserver/documentation/basic_configuration.texi |    8 ++
 myserver/include/server/server.h                |    3 +-
 myserver/src/server/server.cpp                  |   85 ++++++++++++-----------
 3 files changed, 55 insertions(+), 41 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Thu Nov 05 19:14:45 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N6CTV-0000QV-DO
	for mharc-myserver-commit@gnu.org; Thu, 05 Nov 2009 19:14:45 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N6CTT-0000OX-M0
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 19:14:43 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N6CTS-0000NQ-Os
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 19:14:43 -0500
Received: from [199.232.76.173] (port=59241 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N6CTS-0000NC-Iw
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 19:14:42 -0500
Received: from savannah.gnu.org ([199.232.41.3]:41825 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 1N6CTS-00008k-B2
	for myserver-commit@gnu.org; Thu, 05 Nov 2009 19:14:42 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N6CTR-0004X6-L3
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 00:14:41 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N6CTQ-0004Wd-So
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 00:14:41 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 16ded713f3e44e1677dd2d7b7d0da234fa9f70d9
X-Git-Newrev: 5454284e8ee015351d807f5ee10f5b985af4b56b
Message-Id: <E1N6CTQ-0004Wd-So@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Fri, 06 Nov 2009 00:14:41 +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. 0_9-361-g5454284
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, 06 Nov 2009 00:14:44 -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  5454284e8ee015351d807f5ee10f5b985af4b56b (commit)
      from  16ded713f3e44e1677dd2d7b7d0da234fa9f70d9 (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 5454284e8ee015351d807f5ee10f5b985af4b56b
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Nov 6 01:14:53 2009 +0100

    Fix typo

diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index db4e7d5..25a2e73 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -139,7 +139,7 @@ struct argp_input
   /* If executed as a daemon, write the pid to this file.  */
   const char *pidFileName;
 
-  /* Define an alternate location for the configuration files.  */
+  /* Define an alternative location for the configuration files.  */
   const char *confFilesLocation;
 
   /* Specify if the fork server is used.  */
@@ -163,7 +163,7 @@ static struct argp_option options[] =
     {"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")},
+    {"cfgdir", CONFIG_OPT, "dir", 0, _("Specify an alternative directory where look for configuration files")},
     {0}
   };
 
@@ -336,7 +336,7 @@ static MainConfiguration *genMainConf (Server *server, const char *arg)
       delete conf;
       return NULL;
     }
-    return conf;
+  return conf;
 }
 
 const char *program_name = NULL;
@@ -606,8 +606,8 @@ int writePidfile (const char* filename)
 /*!
  * Start MyServer in console mode.
  */
- void consoleService (string &mainConf, string &mimeConf, string &vhostConf, string &externPath,
-                      MainConfiguration* (*genMainConf) (Server *server, const char *arg))
+void consoleService (string &mainConf, string &mimeConf, string &vhostConf, string &externPath,
+                     MainConfiguration* (*genMainConf) (Server *server, const char *arg))
 {
   Server::getInstance ()->start (mainConf, mimeConf, vhostConf, externPath, genMainConf);
 }

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

Summary of changes:
 myserver/src/myserver.cpp |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Nov 06 04:33:48 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N6LCW-00068t-Mt
	for mharc-myserver-commit@gnu.org; Fri, 06 Nov 2009 04:33:48 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N6LCU-000676-QU
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 04:33:46 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N6LCS-00065v-Rc
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 04:33:46 -0500
Received: from [199.232.76.173] (port=34635 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N6LCS-00065d-Kl
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 04:33:44 -0500
Received: from savannah.gnu.org ([199.232.41.3]:49365 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 1N6LCR-0006Kb-T6
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 04:33:44 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N6LCR-0007b4-07
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 09:33:43 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N6LCQ-0007aV-Fq
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 09:33:42 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 5454284e8ee015351d807f5ee10f5b985af4b56b
X-Git-Newrev: 8b2808f4556d1bf86af3708332d0f4e4ad599cf8
Message-Id: <E1N6LCQ-0007aV-Fq@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Fri, 06 Nov 2009 09:33:42 +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. 0_9-364-g8b2808f
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, 06 Nov 2009 09:33:47 -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  8b2808f4556d1bf86af3708332d0f4e4ad599cf8 (commit)
       via  5ab8a057a885421230d65f9d4159233a6e8b0468 (commit)
       via  d7b86d91d7d7198a55def013b010b12a989442ab (commit)
      from  5454284e8ee015351d807f5ee10f5b985af4b56b (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 8b2808f4556d1bf86af3708332d0f4e4ad599cf8
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Nov 6 10:33:34 2009 +0100

    Move protocol modes from globals #define's to an enum inside the Protocol class itself.

diff --git a/myserver/include/protocol/ftp/ftp.h b/myserver/include/protocol/ftp/ftp.h
index 7bf286f..df4ea16 100644
--- a/myserver/include/protocol/ftp/ftp.h
+++ b/myserver/include/protocol/ftp/ftp.h
@@ -1,20 +1,20 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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 2 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, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+  MyServer
+  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 2 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, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
 
 #ifndef FTP_H
@@ -214,7 +214,7 @@ class FtpProtocol:public Protocol
 public:
   FtpProtocol ()
   {
-    protocolOptions = PROTOCOL_FAST_CHECK;
+    protocolOptions = Protocol::FAST_CHECK;
   }
 
   virtual ~ FtpProtocol ()
diff --git a/myserver/include/protocol/http/dyn_http_command.h b/myserver/include/protocol/http/dyn_http_command.h
index 76e119d..0024500 100644
--- a/myserver/include/protocol/http/dyn_http_command.h
+++ b/myserver/include/protocol/http/dyn_http_command.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2005, 2007, 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.
+  MyServer
+  Copyright (C) 2005, 2007, 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.
+  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/>.
+  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 DYN_HTTP_COMMAND_H
@@ -37,8 +37,8 @@ public:
   string getName ();
   virtual int acceptData () = 0;
   virtual int send (HttpThreadContext* context, ConnectionPtr lpconnection,
-									 string& Uri, int systemrequest = 0,
-									 int OnlyHeader = 0, int yetmapped = 0) = 0;
+                    string& Uri, int systemrequest = 0,
+                    int OnlyHeader = 0, int yetmapped = 0) = 0;
 private:
   string name;
 };
diff --git a/myserver/include/protocol/http/dyn_http_command_manager.h b/myserver/include/protocol/http/dyn_http_command_manager.h
index c62ef80..954c735 100644
--- a/myserver/include/protocol/http/dyn_http_command_manager.h
+++ b/myserver/include/protocol/http/dyn_http_command_manager.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2005, 2007, 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/>.
+  MyServer
+  Copyright (C) 2005, 2007, 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 DYN_HTTP_COMMAND_MANAGER_H
@@ -53,7 +53,7 @@ public:
     addHttpCommand (strName, httpCommand);
   }
 private:
-	HashMap<string, DynamicHttpCommand*> dynamicHttpCommands;
+  HashMap<string, DynamicHttpCommand*> dynamicHttpCommands;
 };
 
 #endif
diff --git a/myserver/include/protocol/http/dyn_http_manager.h b/myserver/include/protocol/http/dyn_http_manager.h
index 7488d31..5e6734b 100644
--- a/myserver/include/protocol/http/dyn_http_manager.h
+++ b/myserver/include/protocol/http/dyn_http_manager.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2005, 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/>.
+  MyServer
+  Copyright (C) 2005, 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 DYN_HTTP_MANAGER_H
@@ -33,10 +33,10 @@ using namespace std;
 class DynamicHttpManager
 {
 public:
-	DynamicHttpManager ();
-	virtual ~DynamicHttpManager ();
-	virtual int send (HttpThreadContext*, ConnectionPtr s, const char *filenamePath,
-                   const char* cgi, int selfExecuted, int onlyHeader = 0) = 0;
+  DynamicHttpManager ();
+  virtual ~DynamicHttpManager ();
+  virtual int send (HttpThreadContext*, ConnectionPtr s, const char *filenamePath,
+                    const char* cgi, int selfExecuted, int onlyHeader = 0) = 0;
 
 };
 
diff --git a/myserver/include/protocol/http/dyn_http_manager_list.h b/myserver/include/protocol/http/dyn_http_manager_list.h
index c77af1c..3621031 100644
--- a/myserver/include/protocol/http/dyn_http_manager_list.h
+++ b/myserver/include/protocol/http/dyn_http_manager_list.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-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.
+  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.
+  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/>.
+  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 DYN_HTTP_MANAGER_LIST_H
@@ -38,8 +38,8 @@ public:
 
   HttpDataHandler *getHttpManager (const char *name)
   {
-   	string strName (name);
-   	return getHttpManager (strName);
+    string strName (name);
+    return getHttpManager (strName);
   }
 
   HashMap<string, HttpDataHandler*>::Iterator begin (){return dynamicHttpManagers.begin ();}
@@ -49,8 +49,8 @@ public:
 
   void addHttpManager (const char* name, HttpDataHandler* httpManager)
   {
-   	string strName (name);
-   	addHttpManager (strName, httpManager);
+    string strName (name);
+    addHttpManager (strName, httpManager);
   }
 
   void clear ();
@@ -58,7 +58,7 @@ public:
   DynHttpManagerList ();
   ~DynHttpManagerList ();
 private:
-	HashMap<string, HttpDataHandler*> dynamicHttpManagers;
+  HashMap<string, HttpDataHandler*> dynamicHttpManagers;
 };
 
 #endif
diff --git a/myserver/include/protocol/http/http_data_handler.h b/myserver/include/protocol/http/http_data_handler.h
index 8866ba2..9de3caa 100644
--- a/myserver/include/protocol/http/http_data_handler.h
+++ b/myserver/include/protocol/http/http_data_handler.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-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.
+  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.
+  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/>.
+  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 HTTP_DATA_HANDLER_H
@@ -35,14 +35,14 @@ public:
   virtual int load ();
   virtual int unLoad ();
 
-	virtual int send (HttpThreadContext*, const char* exec,
-                   const char* cmdLine = 0, bool execute = false,
-                   bool onlyHeader = false);
+  virtual int send (HttpThreadContext*, const char* exec,
+                    const char* cmdLine = 0, bool execute = false,
+                    bool onlyHeader = false);
 
   HttpDataHandler ();
   virtual ~HttpDataHandler ();
 
-	static void checkDataChunks (HttpThreadContext*, bool*, bool*);
+  static void checkDataChunks (HttpThreadContext*, bool*, bool*);
 
   static int appendDataToHTTPChannel (HttpThreadContext* td,
                                       char* buffer,
@@ -54,13 +54,13 @@ public:
                                       u_long realBufferSize,
                                       MemoryStream *tmpStream);
 
-	static int appendDataToHTTPChannel (HttpThreadContext* td,
-                                     char* buffer,
-                                     u_long size,
-                                     File* appendFile,
-                                     FiltersChain* chain,
-                                     bool append,
-                                     bool useChunks);
+  static int appendDataToHTTPChannel (HttpThreadContext* td,
+                                      char* buffer,
+                                      u_long size,
+                                      File* appendFile,
+                                      FiltersChain* chain,
+                                      bool append,
+                                      bool useChunks);
 
 };
 
diff --git a/myserver/include/protocol/https/https.h b/myserver/include/protocol/https/https.h
index a777252..3f2a896 100644
--- a/myserver/include/protocol/https/https.h
+++ b/myserver/include/protocol/https/https.h
@@ -49,7 +49,7 @@ class HttpsProtocol : public Protocol
 public:
   HttpsProtocol ()
   {
-    protocolOptions = PROTOCOL_USES_SSL;
+    protocolOptions = Protocol::SSL;
   }
 
   virtual ~HttpsProtocol ()
diff --git a/myserver/include/protocol/protocol.h b/myserver/include/protocol/protocol.h
index 75720a4..6be5ce0 100644
--- a/myserver/include/protocol/protocol.h
+++ b/myserver/include/protocol/protocol.h
@@ -21,10 +21,6 @@
 # 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
 
 /*!
  *This is the base class to derive other protocols implementations for the server.
@@ -32,6 +28,14 @@
 class Protocol
 {
 public:
+  /*! Various options that can be use for the protocol.  */
+  enum
+    {
+      SSL = 1,
+      FAST_CHECK = 2,
+      DENY_DELETE = 4
+    };
+
   Protocol ();
   virtual ~Protocol ();
   virtual const char* getName ();
diff --git a/myserver/include/protocol/protocol_buffer.h b/myserver/include/protocol/protocol_buffer.h
index 1e9e592..74c48ed 100644
--- a/myserver/include/protocol/protocol_buffer.h
+++ b/myserver/include/protocol/protocol_buffer.h
@@ -1,20 +1,20 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(at your option) any later version.
+  MyServer
+  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
+  (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.
+  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/>.
+  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 PROTOCOL_BUFFER_H
@@ -23,11 +23,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /*!
  *Base class to handle a buffer in the connection.
  */
-class	ProtocolBuffer
+class ProtocolBuffer
 {
 public:
   ProtocolBuffer ();
-	virtual ~ProtocolBuffer ();
+  virtual ~ProtocolBuffer ();
   virtual bool allowDelete (bool wait);
 };
 
diff --git a/myserver/include/protocol/protocols_manager.h b/myserver/include/protocol/protocols_manager.h
index 44f0f46..dbb4095 100644
--- a/myserver/include/protocol/protocols_manager.h
+++ b/myserver/include/protocol/protocols_manager.h
@@ -36,11 +36,9 @@ class ProtocolsManager
 public:
   ProtocolsManager ();
   ~ProtocolsManager ();
-
   Protocol* getProtocol (string &name);
 
   void addProtocol (string &name, Protocol *protocol);
-
   void addProtocol (const char *name, Protocol *protocol)
   {
     string strName (name);
diff --git a/myserver/include/protocol/url.h b/myserver/include/protocol/url.h
index 836304d..08f1327 100644
--- a/myserver/include/protocol/url.h
+++ b/myserver/include/protocol/url.h
@@ -1,19 +1,19 @@
 /* -*- 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.
+  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.
+  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/>.
+  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 URL_H
diff --git a/myserver/src/conf/vhost/vhost.cpp b/myserver/src/conf/vhost/vhost.cpp
index 0249ba5..5fa3804 100644
--- a/myserver/src/conf/vhost/vhost.cpp
+++ b/myserver/src/conf/vhost/vhost.cpp
@@ -476,7 +476,7 @@ int Vhost::initializeSSL ()
   if (!protocol)
     return 0;
 
-  if (!(protocol->getProtocolOptions () & PROTOCOL_USES_SSL))
+  if (!(protocol->getProtocolOptions () & Protocol::SSL))
     return 0;
 
   return sslContext.initialize ();
diff --git a/myserver/src/http_handler/http_file/http_file.cpp b/myserver/src/http_handler/http_file/http_file.cpp
index d22c223..407fdec 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -446,7 +446,7 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
      * file to the socket.
      */
     if (!useChunks && chain.isEmpty () && !td->appendOutputs
-        && !(td->http->getProtocolOptions () & PROTOCOL_USES_SSL))
+        && !(td->http->getProtocolOptions () & Protocol::SSL))
       {
         u_long nbw = 0;
         int ret = file->fastCopyToSocket (td->connection->socket, firstByte,
diff --git a/myserver/src/protocol/control/control_protocol.cpp b/myserver/src/protocol/control/control_protocol.cpp
index 4e61967..aea6af7 100644
--- a/myserver/src/protocol/control/control_protocol.cpp
+++ b/myserver/src/protocol/control/control_protocol.cpp
@@ -75,7 +75,7 @@ const char* ControlProtocol::getName ()
  */
 ControlProtocol::ControlProtocol ()
 {
-  protocolOptions = PROTOCOL_USES_SSL;
+  protocolOptions = Protocol::SSL;
   protocolPrefix.assign ("control://");
 }
 
diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index 96b8ee9..99ac809 100644
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -295,7 +295,7 @@ int Ftp::LAST_PASV_PORT = 65000;
 Ftp::Ftp ()
 {
   m_nPassiveport = Ftp::FIRST_PASV_PORT;
-  protocolOptions = PROTOCOL_FAST_CHECK | PROTOCOL_DENY_DELETE;
+  protocolOptions = Protocol::FAST_CHECK | Protocol::DENY_DELETE;
   protocolPrefix.assign ("ftp://");
 }
 
diff --git a/myserver/src/protocol/http/env/env.cpp b/myserver/src/protocol/http/env/env.cpp
index 469925c..dc15dc1 100644
--- a/myserver/src/protocol/http/env/env.cpp
+++ b/myserver/src/protocol/http/env/env.cpp
@@ -146,7 +146,7 @@ void Env::buildEnvironmentString (HttpThreadContext* td, char *cgiEnv,
   memCgi << end_str << "REMOTE_USER=";
   memCgi << td->connection->getLogin ();
 
-  if (td->http->getProtocolOptions () & PROTOCOL_USES_SSL)
+  if (td->http->getProtocolOptions () & Protocol::SSL)
     memCgi << end_str << "SSL=ON";
   else
     memCgi << end_str << "SSL=OFF";
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 161cce0..c4ac163 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -1117,7 +1117,6 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
                         ret = 1;
                         retvalue = ClientsThread::KEEP_CONNECTION;
                         break;
-
                       }
 
                   }
diff --git a/myserver/src/protocol/https/https.cpp b/myserver/src/protocol/https/https.cpp
index ddf0bb2..fe97141 100644
--- a/myserver/src/protocol/https/https.cpp
+++ b/myserver/src/protocol/https/https.cpp
@@ -51,7 +51,7 @@ const char* Https::getName ()
 Https::Https ()
 {
   protocolPrefix.assign ("https://");
-  protocolOptions = PROTOCOL_USES_SSL;
+  protocolOptions = Protocol::SSL;
 }
 
 /*!
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 577b296..d7edcb7 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -1155,14 +1155,13 @@ ConnectionPtr Server::addConnectionToList (Socket* s,
   if (protocol)
     opts = protocol->getProtocolOptions ();
 
-  if (opts & PROTOCOL_USES_SSL)
+  if (opts & Protocol::SSL)
     doSSLhandshake = 1;
 
-  if (opts & PROTOCOL_FAST_CHECK)
+  if (opts & Protocol::FAST_CHECK)
     doFastCheck = 1;
 
   string msg ("new-connection");
-
   handlers = getHandlers (msg);
   if (handlers)
     {



commit 5ab8a057a885421230d65f9d4159233a6e8b0468
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Nov 6 10:16:39 2009 +0100

    Code refactoring: rename a function and remove some unused macro's.

diff --git a/myserver/include/server/server.h b/myserver/include/server/server.h
index 60fd436..9a9b3e4 100644
--- a/myserver/include/server/server.h
+++ b/myserver/include/server/server.h
@@ -108,7 +108,7 @@ public:
   void enableAutoReboot ();
   bool isAutorebootEnabled ();
   bool isRebooting (){return rebooting;}
-  void rebootOnNextLoop ();
+  void delayedReboot ();
   ~Server ();
   Protocol* getProtocol (const char *protocolName);
   int addConnection (Socket*, MYSERVER_SOCKADDRIN*);
diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index df82918..d044359 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -80,7 +80,7 @@ void Sig_Hup (int signal)
   /*
    *On the SIGHUP signal reboot the server.
    */
-  Server::getInstance ()->rebootOnNextLoop ();
+  Server::getInstance ()->delayedReboot ();
   registerSignals ();
 }
 #else
diff --git a/myserver/src/protocol/control/control_protocol.cpp b/myserver/src/protocol/control/control_protocol.cpp
index 0ff8f60..4e61967 100644
--- a/myserver/src/protocol/control/control_protocol.cpp
+++ b/myserver/src/protocol/control/control_protocol.cpp
@@ -53,19 +53,17 @@ struct ControlProtocolVisitorArg
   static const int SHOW_CONNECTIONS = 1;
   static const int KILL_CONNECTION = 2;
   int command;
-
   ConnectionPtr connection;
-  File* out;
+  File *out;
   char *buffer;
   int bufferSize;
-  ControlHeader* header;
-
+  ControlHeader *header;
   u_long id;
 };
 
 /*!
- *Returns the name of the protocol. If an out buffer is defined
- *fullfill it with the name too.
+ * Returns the name of the protocol. If an out buffer is defined
+ * fullfill it with the name too.
  */
 const char* ControlProtocol::getName ()
 {
@@ -367,7 +365,7 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *request,
   authorized = checkAuth (header);
 
   /*
-   *If the client is not authorized remove the connection.
+   * If the client is not authorized remove the connection.
    */
   if (authorized == 0)
     {
@@ -382,8 +380,8 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *request,
       return 0;
     }
   /*
-   *If the specified length is different from the length that the
-   *server can read, remove the connection.
+   * If the specified length is different from the length that the
+   * server can read, remove the connection.
    */
   if (dataWritten != specifiedLength)
     {
@@ -403,11 +401,8 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *request,
 
   knownCommand = 0;
 
-  /*
-   *Create an out file. This can be used by commands that
-   *needs it.
-   */
-  outFile = new File ();
+  /* Create an out file. This can be used by commands needing it. */
+    outFile = new File ();
   outFilePath << getdefaultwd (0, 0) << "/ControlOutput_" << (u_int) id;
 
   ret = outFile->createTemporaryFile (outFilePath.str ().c_str ());
@@ -444,7 +439,7 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *request,
   else if (!strcmp (command, "REBOOT"))
     {
       knownCommand = 1;
-      Server::getInstance ()->rebootOnNextLoop ();
+      Server::getInstance ()->delayedReboot ();
       ret = 0;
     }
   else if (!strcmp (command, "GETFILE"))
@@ -482,34 +477,36 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *request,
       char *connection;
       outFile->seek (0);
       if (ret)
-        {
-          sendResponse (auxBuffer, bufferSize, a, CONTROL_INTERNAL, header, 0);
-        }
+        sendResponse (auxBuffer, bufferSize, a, CONTROL_INTERNAL, header, 0);
       else
         sendResponse (auxBuffer, bufferSize, a, CONTROL_OK, header, outFile);
+
       if (inFile)
         {
           inFile->close ();
           delete inFile;
-          inFile=0;
+          inFile = NULL;
         }
+
       if (outFile)
         {
           outFile->close ();
           delete outFile;
-          outFile=0;
+          outFile = NULL;
         }
+
       FilesUtility::deleteFile (inFilePath.str ().c_str ());
       FilesUtility::deleteFile (outFilePath.str ().c_str ());
       connection = header.getConnection ();
+
       /*
-       *If the Keep-Alive was specified keep the connection in the
-       *active connections list.
+       * If the Keep-Alive was specified keep the connection in the
+       * active connections list.
        */
-      if (!strcmpi (connection,"keep-alive"))
-        return 1;
+      if (!strcmpi (connection, "keep-alive"))
+        return ClientsThread::KEEP_CONNECTION;
       else
-        return 0;
+        return ClientsThread::DELETE_CONNECTION;
     }
   else
     {
@@ -521,6 +518,7 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *request,
           delete inFile;
           inFile = NULL;
         }
+
       if (outFile)
         {
           outFile->close ();
@@ -529,15 +527,16 @@ int ControlProtocol::controlConnection (ConnectionPtr a, char *request,
         }
       FilesUtility::deleteFile (inFilePath.str ().c_str ());
       FilesUtility::deleteFile (outFilePath.str ().c_str ());
-      return 0;
+
+      return ClientsThread::DELETE_CONNECTION;
     }
 }
 
 /*!
- *Add the entry to the log file.
+ * Add the entry to the log file.
  */
 int ControlProtocol::addToLog (int retCode, ConnectionPtr con, char *buffer,
-                               int bufferSize, ControlHeader& header)
+                               int bufferSize, ControlHeader &header)
 {
   string time;
   getRFC822GMTTime (time, 32);
@@ -549,92 +548,79 @@ int ControlProtocol::addToLog (int retCode, ConnectionPtr con, char *buffer,
 }
 
 /*!
- *Send the response with status=errID and the data contained in the outFile.
- *Return nonzero on errors.
+ * Send the response with status=errID and the data contained in the outFile.
+ * Return nonzero on errors.
  */
 int ControlProtocol::sendResponse (char *buffer, int buffersize,
                                    ConnectionPtr a, int errID,
-                                   ControlHeader& header, File* outFile)
+                                   ControlHeader &header, File *outFile)
 {
   u_long dataLength = 0;
-  int err;
-  err = addToLog (errID, a, buffer, buffersize, header);
-  if (err)
-    return err;
+
+  if (addToLog (errID, a, buffer, buffersize, header))
+    return -1;
 
   if (outFile)
     dataLength = outFile->getFileSize ();
-  /* Build and send the first line.  */
-#ifdef HAVE_SNPRINTF
-  snprintf (buffer, buffersize,
-#else
-  sprintf (buffer,
-#endif
-          "/%i\r\n", errID);
 
-  err = a->socket->send (buffer, strlen (buffer), 0);
-  if (err == -1)
-  {
-    a->host->warningsLogWrite (_("Control: socket error"));
-    return -1;
-  }
-
-  /* Build and send the Length line.  */
-#ifdef HAVE_SNPRINTF
-  snprintf (buffer, buffersize,
-#else
-  sprintf (buffer,
-#endif
-          "/LEN %u\r\n", (u_int)dataLength);
+  /* Build and send the first line.  */
+  snprintf (buffer, buffersize, "/%i\r\n", errID);
+  if (a->socket->send (buffer, strlen (buffer), 0) < 0)
+    {
+      a->host->warningsLogWrite (_("Control: socket error"));
+      return -1;
+    }
 
-  err = a->socket->send (buffer, strlen (buffer), 0);
-           if (err == -1)
-  {
-    a->host->warningsLogWrite (_("Control: socket error"));
-    return -1;
-  }
+  snprintf (buffer, buffersize, "/LEN %u\r\n", (u_int)dataLength);
+  if (a->socket->send (buffer, strlen (buffer), 0) < 0)
+    {
+      a->host->warningsLogWrite (_("Control: socket error"));
+      return -1;
+    }
 
   /* Send the end of the header.  */
-  err = a->socket->send ("\r\n", 2, 0);
-  if (err == -1)
-  {
-    a->host->warningsLogWrite (_("Control: socket error"));
-    return -1;
-  }
+  if (a->socket->send ("\r\n", 2, 0) < 0)
+    {
+      a->host->warningsLogWrite (_("Control: socket error"));
+      return -1;
+    }
 
   /* Flush the content of the file if any.  */
   if (dataLength)
-  {
-    int dataToSend = dataLength;
-    u_long nbr;
-    for ( ; ; )
     {
-      err = outFile->read (buffer, min (dataToSend, buffersize), &nbr);
-      if (err)
-      {
-        a->host->warningsLogWrite (_("Control: internal error"));
-        return -1;
-      }
-      dataToSend -= nbr;
-      err = a->socket->send (buffer, nbr, 0);
-      if (dataToSend == 0)
-        break;
-      if (err == -1)
-      {
-        a->host->warningsLogWrite (_("Control: socket error"));
-        return -1;
-      }
+      int dataToSend = dataLength;
+      u_long nbr;
+      for ( ; ; )
+        {
+          int err;
+          if (outFile->read (buffer, min (dataToSend, buffersize), &nbr))
+            {
+              a->host->warningsLogWrite (_("Control: internal error"));
+              return -1;
+            }
+
+          dataToSend -= nbr;
+          err = a->socket->send (buffer, nbr, 0);
+
+          if (dataToSend == 0)
+            break;
+
+          if (err == -1)
+            {
+              a->host->warningsLogWrite (_("Control: socket error"));
+              return -1;
+            }
+        }
     }
-  }
 
   return 0;
 }
 
 /*!
- *Show the currect active connections.
+ * Show the currect active connections.
  */
-int  ControlProtocol::showConnections (ConnectionPtr a,File* out, char *buffer,
-                                      int bufferSize, ControlHeader& header)
+int  ControlProtocol::showConnections (ConnectionPtr a,File *out, char *buffer,
+                                      int bufferSize, ControlHeader &header)
 {
   ControlProtocolVisitorArg args;
   args.command = ControlProtocolVisitorArg::SHOW_CONNECTIONS;
@@ -648,7 +634,7 @@ int  ControlProtocol::showConnections (ConnectionPtr a,File* out, char *buffer,
 }
 
 /*!
- *Kill a connection by its ID.
+ * Kill a connection by its ID.
  */
 int ControlProtocol::killConnection (ConnectionPtr a, u_long id, File *out,
                                     char *buffer, int bufferSize,
@@ -672,9 +658,9 @@ int ControlProtocol::killConnection (ConnectionPtr a, u_long id, File *out,
 }
 
 /*!
- *Visitor.
+ * Visitor.
  */
-int ControlProtocol::visitConnection (ConnectionPtr con, void* argP)
+int ControlProtocol::visitConnection (ConnectionPtr con, void *argP)
 {
   int ret = 0;
   u_long nbw;
@@ -682,19 +668,11 @@ int ControlProtocol::visitConnection (ConnectionPtr con, void* argP)
 
   if (arg->command == ControlProtocolVisitorArg::SHOW_CONNECTIONS)
   {
-#ifdef HAVE_SNPRINTF
     snprintf (arg->buffer, arg->bufferSize, "%i - %s - %i - %s - %i - %s - %s\r\n",
              static_cast<int>(con->getID ()),  con->getIpAddr (),
              static_cast<int>(con->getPort ()),
              con->getLocalIpAddr (),  static_cast<int>(con->getLocalPort ()),
              con->getLogin (), con->getPassword ());
-#else
-    sprintf (arg->buffer, "%i - %s - %i - %s - %i - %s - %s\r\n",
-            static_cast<int>(con->getID ()),  con->getIpAddr (),
-            static_cast<int>(con->getPort ()),
-            con->getLocalIpAddr (),  static_cast<int>(con->getLocalPort ()),
-            con->getLogin (), con->getPassword ());
-#endif
 
     ret = arg->out->writeToFile (arg->buffer, strlen (arg->buffer), &nbw);
 
@@ -776,9 +754,9 @@ int ControlProtocol::getFile (ConnectionPtr a, char *fn, File *in, File *out,
 /*!
  * Save the file on the local FS.
  */
-int ControlProtocol::putFile (ConnectionPtr a, char* fn, File* in,
-                              File* out, char *buffer,int bufferSize,
-                              ControlHeader& header)
+int ControlProtocol::putFile (ConnectionPtr a, char *fn, File *in,
+                              File *out, char *buffer, int bufferSize,
+                              ControlHeader &header)
 {
   const char *filename = 0;
   File localfile;
@@ -847,8 +825,8 @@ int ControlProtocol::putFile (ConnectionPtr a, char* fn, File* in,
 /*!
  *Return the current MyServer version.
  */
-int ControlProtocol::getVersion (ConnectionPtr a, File* out, char *buffer,
-                                 int bufferSize, ControlHeader& header)
+int ControlProtocol::getVersion (ConnectionPtr a, File *out, char *buffer,
+                                 int bufferSize, ControlHeader &header)
 {
   u_long nbw;
   myserver_strlcpy (buffer, MYSERVER_VERSION, bufferSize);
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 7615166..577b296 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -1507,7 +1507,7 @@ bool Server::isServerReady ()
 /*!
  * Reboot the server on the next loop.
  */
-void Server::rebootOnNextLoop ()
+void Server::delayedReboot ()
 {
   serverReady = false;
   toReboot = true;



commit d7b86d91d7d7198a55def013b010b12a989442ab
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Nov 6 09:55:25 2009 +0100

    Remove the globals `argc' and `argv'.  use an enum instead of #define's for run modes.

diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index 25a2e73..df82918 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -44,8 +44,11 @@ extern "C"
 #endif
 
 
-#define MYSERVER_RUNAS_CONSOLE 1
-#define MYSERVER_RUNAS_SERVICE 2
+enum
+{
+  MYSERVER_RUNAS_CONSOLE = 1,
+  MYSERVER_RUNAS_SERVICE
+};
 
 void consoleService (string &, string &, string &, string &,
            MainConfiguration* (*genMainConf) (Server *server, const char *arg));
@@ -61,9 +64,6 @@ void runService ();
 void registerService ();
 void removeService ();
 void runAsService ();
-
-int argn;
-char **argv;
 void registerSignals ();
 
 #ifndef WIN32
@@ -108,10 +108,10 @@ void registerSignals ()
   sig1.sa_handler = SIG_IGN;
   sig2.sa_handler = Sig_Quit;
   sig3.sa_handler = Sig_Hup;
-  sigaction (SIGPIPE,&sig1,NULL); // catch broken pipes
-  sigaction (SIGINT, &sig2,NULL); // catch ctrl-c
-  sigaction (SIGTERM,&sig2,NULL); // catch the kill signal
-  sigaction (SIGHUP,&sig3,NULL); // catch the HUP signal
+  sigaction (SIGPIPE, &sig1, NULL);
+  sigaction (SIGINT, &sig2, NULL);
+  sigaction (SIGTERM, &sig2, NULL);
+  sigaction (SIGHUP, &sig3, NULL);
 
   /* Avoid zombie processes.  */
   sigaction (SIGCHLD, &sa, (struct sigaction *)NULL);
@@ -348,15 +348,13 @@ int main  (int argn, char **argv)
 #ifdef ARGP
   struct argp_input input;
 #endif
+
 #ifndef WIN32
   pid_t pid;
   pid_t sid;
 #endif
   string mainConf, mimeConf, vhostConf, externPath;
 
-  ::argn = argn;
-  ::argv = argv;
-
   registerSignals ();
 
 #if HAVE_GETTEXT

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

Summary of changes:
 myserver/include/protocol/ftp/ftp.h                |   32 ++--
 myserver/include/protocol/http/dyn_http_command.h  |   28 ++--
 .../protocol/http/dyn_http_command_manager.h       |   30 ++--
 myserver/include/protocol/http/dyn_http_manager.h  |   36 ++--
 .../include/protocol/http/dyn_http_manager_list.h  |   34 ++--
 myserver/include/protocol/http/http_data_handler.h |   46 +++---
 myserver/include/protocol/https/https.h            |    2 +-
 myserver/include/protocol/protocol.h               |   12 +-
 myserver/include/protocol/protocol_buffer.h        |   30 ++--
 myserver/include/protocol/protocols_manager.h      |    2 -
 myserver/include/protocol/url.h                    |   24 ++--
 myserver/include/server/server.h                   |    2 +-
 myserver/src/conf/vhost/vhost.cpp                  |    2 +-
 myserver/src/http_handler/http_file/http_file.cpp  |    2 +-
 myserver/src/myserver.cpp                          |   24 +--
 myserver/src/protocol/control/control_protocol.cpp |  194 +++++++++-----------
 myserver/src/protocol/ftp/ftp.cpp                  |    2 +-
 myserver/src/protocol/http/env/env.cpp             |    2 +-
 myserver/src/protocol/http/http.cpp                |    1 -
 myserver/src/protocol/https/https.cpp              |    2 +-
 myserver/src/server/server.cpp                     |    7 +-
 21 files changed, 245 insertions(+), 269 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Nov 06 06:37:41 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N6N8P-0002WF-LY
	for mharc-myserver-commit@gnu.org; Fri, 06 Nov 2009 06:37:41 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N6N8N-0002VQ-Vq
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 06:37:40 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N6N8L-0002UB-Jd
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 06:37:39 -0500
Received: from [199.232.76.173] (port=51423 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N6N8L-0002Tu-AI
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 06:37:37 -0500
Received: from savannah.gnu.org ([199.232.41.3]:46258 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 1N6N8K-0004cn-4G
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 06:37:37 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N6N8J-000819-0s
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 11:37:35 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N6N8F-00080d-M0
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 11:37:33 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 8b2808f4556d1bf86af3708332d0f4e4ad599cf8
X-Git-Newrev: 62e32877f1bbf2e92ecab11d88ff30eb3c5713cf
Message-Id: <E1N6N8F-00080d-M0@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Fri, 06 Nov 2009 11:37:32 +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. 0_9-365-g62e3287
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, 06 Nov 2009 11:37:40 -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  62e32877f1bbf2e92ecab11d88ff30eb3c5713cf (commit)
      from  8b2808f4556d1bf86af3708332d0f4e4ad599cf8 (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 62e32877f1bbf2e92ecab11d88ff30eb3c5713cf
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Nov 6 12:21:24 2009 +0100

    Define and use HttpDataHandler::{RET_FAILURE, RET_OK}.
    
    Now all HTTP handlers return these values instead of magic numbers.
    The responsibility to translate these codes to return values understood
    from the Protocol layer and by the connections scheduler is left to the
    Http class.

diff --git a/myserver/include/protocol/http/http_data_handler.h b/myserver/include/protocol/http/http_data_handler.h
index 9de3caa..16de99f 100644
--- a/myserver/include/protocol/http/http_data_handler.h
+++ b/myserver/include/protocol/http/http_data_handler.h
@@ -27,11 +27,18 @@
 
 
 /*!
- *Base class to handle HTTP data.
+ * Base class to handle HTTP data.
  */
 class HttpDataHandler
 {
 public:
+
+  enum
+    {
+      RET_OK = 0,
+      RET_FAILURE
+    };
+
   virtual int load ();
   virtual int unLoad ();
 
@@ -64,5 +71,4 @@ public:
 
 };
 
-
 #endif
diff --git a/myserver/src/http_handler/cgi/cgi.cpp b/myserver/src/http_handler/cgi/cgi.cpp
index 537d73a..209c397 100644
--- a/myserver/src/http_handler/cgi/cgi.cpp
+++ b/myserver/src/http_handler/cgi/cgi.cpp
@@ -340,7 +340,7 @@ int Cgi::sendData (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain,
     return ret;
 
   if (!nph && onlyHeader)
-    return 1;
+    return HttpDataHandler::RET_OK;
 
   /* Create the output filters chain.  */
   if (td->mime
@@ -378,7 +378,7 @@ int Cgi::sendData (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain,
       if (stdOutFile.read (td->secondaryBuffer->getBuffer (),
                            td->secondaryBuffer->getRealLength (),
                            &nBytesRead))
-        return 0;
+        return HttpDataHandler::RET_FAILURE;
 
       if (!aliveProcess && !nBytesRead)
         break;
@@ -391,19 +391,20 @@ int Cgi::sendData (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain,
                                                     &chain,
                                                     td->appendOutputs,
                                                     useChunks))
-        return 0;
+        return HttpDataHandler::RET_FAILURE;
 
       nbw += nBytesRead;
     }
 
     /* Send the last null chunk if needed.  */
     if (useChunks && chain.getStream ()->write ("0\r\n\r\n", 5, &nbw2))
-      return 0;
+        return HttpDataHandler::RET_FAILURE;
   }
 
   /* Update the Content-length field for logging activity.  */
   td->sentData += nbw;
-  return 1;
+
+  return HttpDataHandler::RET_OK;
 }
 
 /*!
@@ -527,7 +528,7 @@ int Cgi::sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chai
           if (HttpHeaders::sendHeader (td->response, *chain.getStream (),
                                        *td->buffer, td))
             {
-              *ret = 0;
+              *ret = HttpDataHandler::RET_FAILURE;
               return 1;
             }
 
@@ -544,7 +545,10 @@ int Cgi::sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chai
                                                     &chain,
                                                     td->appendOutputs,
                                                     useChunks))
-        return 0;
+        {
+          *ret = HttpDataHandler::RET_FAILURE;
+          return 1;
+        }
 
       td->sentData += headerOffset - headerSize;
     }
diff --git a/myserver/src/http_handler/fastcgi/fastcgi.cpp b/myserver/src/http_handler/fastcgi/fastcgi.cpp
index 0927a23..c5d9adc 100644
--- a/myserver/src/http_handler/fastcgi/fastcgi.cpp
+++ b/myserver/src/http_handler/fastcgi/fastcgi.cpp
@@ -1,24 +1,24 @@
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2006, 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/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2006, 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/>.
 */
 
 /*
- *To get more info about the FastCGI protocol please visit the official
- *FastCGI site at: http://www.fastcgi.com.
- *On that site you can find samples and all the supported languages.
+  To get more info about the FastCGI protocol please visit the official
+  FastCGI site at: http://www.fastcgi.com.
+  On that site you can find samples and all the supported languages.
  */
 #include <include/http_handler/fastcgi/fastcgi.h>
 #include <include/protocol/http/env/env.h>
@@ -44,7 +44,6 @@ int FastCgi::timeout = MYSERVER_SEC (15);
 /*! Process server manager.  */
 ProcessServerManager *FastCgi::processServerManager = 0;
 
-
 struct FourChar
 {
   union
@@ -55,7 +54,7 @@ struct FourChar
 };
 
 /*!
- *Entry-Point to manage a FastCGI request.
+ * Entry-Point to manage a FastCGI request.
  */
 int FastCgi::send (HttpThreadContext* td, const char* scriptpath,
                    const char *cgipath, bool execute, bool onlyHeader)
@@ -89,14 +88,11 @@ int FastCgi::send (HttpThreadContext* td, const char* scriptpath,
   if (!(td->permissions & MYSERVER_PERMISSION_EXECUTE))
     return td->http->sendAuth ();
 
-
-  {
-    string tmp;
-    tmp.assign (cgipath);
-    FilesUtility::splitPath (tmp, td->cgiRoot, td->cgiFile);
-    tmp.assign (scriptpath);
-    FilesUtility::splitPath (tmp, td->scriptDir, td->scriptFile);
-  }
+  string tmp;
+  tmp.assign (cgipath);
+  FilesUtility::splitPath (tmp, td->cgiRoot, td->cgiFile);
+  tmp.assign (scriptpath);
+  FilesUtility::splitPath (tmp, td->scriptDir, td->scriptFile);
 
   chain.setProtocol (td->http);
   chain.setProtocolData (td);
@@ -131,10 +127,10 @@ int FastCgi::send (HttpThreadContext* td, const char* scriptpath,
         subString = !subString;
     }
   /*!
-   *Save the cgi path and the possible arguments.
-   *the (x < len) case is when additional arguments are specified.
-   *If the cgipath is enclosed between " and " do not consider them
-   *when splitting directory and file name.
+    Save the cgi path and the possible arguments.
+    the (x < len) case is when additional arguments are specified.
+    If the cgipath is enclosed between " and " do not consider them
+    when splitting directory and file name.
    */
   if (len)
     {
@@ -221,7 +217,7 @@ int FastCgi::send (HttpThreadContext* td, const char* scriptpath,
   exit = 0;
 
   /*! Return 1 if keep the connection. A nonzero value also mean no errors. */
-  ret = 1;
+  ret = HttpDataHandler::RET_OK;
 
   initialTicks = getTicks ();
 
@@ -235,8 +231,7 @@ int FastCgi::send (HttpThreadContext* td, const char* scriptpath,
       if (readHeader (&con, &header, initialTicks, timeout, id))
         {
           exit = 1;
-          ret = 1;
-          td->http->raiseHTTPError (500);
+          ret = td->http->raiseHTTPError (500);
           break;
         }
 
@@ -251,7 +246,7 @@ int FastCgi::send (HttpThreadContext* td, const char* scriptpath,
       if (dim == 0)
         {
           exit = 1;
-          ret = 1;
+          ret = HttpDataHandler::RET_FAILURE;
         }
       else
         {
@@ -263,7 +258,7 @@ int FastCgi::send (HttpThreadContext* td, const char* scriptpath,
               con.sock.close ();
               td->http->raiseHTTPError (501);
               exit = 1;
-              ret = 0;
+              ret = HttpDataHandler::RET_FAILURE;
               break;
             case FCGISTDOUT:
               headerCompleted = false;
@@ -276,7 +271,8 @@ int FastCgi::send (HttpThreadContext* td, const char* scriptpath,
                   if (ret == 1)
                     responseCompleted = true;
                   else
-                    ret = 0;
+                    ret = HttpDataHandler::RET_FAILURE;
+
                   break;
                 }
 
@@ -310,7 +306,7 @@ int FastCgi::send (HttpThreadContext* td, const char* scriptpath,
               if (nbr == (u_long)-1)
                 {
                   exit = 1;
-                  ret = 0;
+                  ret = HttpDataHandler::RET_FAILURE;
                   break;
                 }
               toPad -= nbr;
@@ -662,16 +658,17 @@ int FastCgi::fastCgiRequest (FcgiContext* con, int id)
 
 
 /*!
- *Handle the STDOUT data received from the FastCGI server.
- *The FastCGI header must be read previously, only the payload is processed here.
- *\param con The current FastCGI context.
- *\param dim Size of the payload.
- *\param timeout Connection timeout to use.
- *\param chain Output chain where to send data.
- *\param responseCompleted Output value.  It is true when the response is completed.
- *\param onlyHeader Send only the HTTP header.
- *\return 0 on success.
- *\return 1 if a full response is sent to the client.
+  Handle the STDOUT data received from the FastCGI server.
+  The FastCGI header must be read previously, only the payload is processed here.
+  \param con The current FastCGI context.
+  \param dim Size of the payload.
+  \param timeout Connection timeout to use.
+  \param chain Output chain where to send data.
+  \param responseCompleted Output value.  It is true when the response is completed.
+  \param onlyHeader Send only the HTTP header.
+  \return 0 on success.
+  \return 1 if a full response is sent to the client.
+  \return -1 on error.
  */
 int FastCgi::sendData (FcgiContext* con, u_long dim, u_long timeout, FiltersChain* chain,
                        bool *responseCompleted, bool onlyHeader)
diff --git a/myserver/src/http_handler/http_dir/http_dir.cpp b/myserver/src/http_handler/http_dir/http_dir.cpp
index 89c9e32..25eb7ec 100644
--- a/myserver/src/http_handler/http_dir/http_dir.cpp
+++ b/myserver/src/http_handler/http_dir/http_dir.cpp
@@ -363,10 +363,10 @@ int HttpDir::send (HttpThreadContext* td,
 
   if (HttpHeaders::sendHeader (td->response, *td->connection->socket,
                                *td->buffer, td))
-    return 1;
+    return HttpDataHandler::RET_FAILURE;
 
   if (onlyHeader)
-    return 0;
+    return HttpDataHandler::RET_OK;
 
   sortIndex = td->request.uriOpts.find ("sort=");
 
@@ -644,14 +644,13 @@ int HttpDir::send (HttpThreadContext* td,
 
   if (!td->appendOutputs && useChunks
       && chain.getStream ()->write ("0\r\n\r\n", 5, &nbw))
-    return 1;
+    return HttpDataHandler::RET_FAILURE;
 
   /* For logging activity.  */
   td->sentData += sentData;
 
   chain.clearAllFilters ();
-  return 1;
-
+  return HttpDataHandler::RET_OK;
 }
 
 /*!
diff --git a/myserver/src/http_handler/http_file/http_file.cpp b/myserver/src/http_handler/http_file/http_file.cpp
index 407fdec..17ad2c9 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -1,21 +1,20 @@
 /*
-MyServer
-Copyright (C) 2005, 2006, 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/>.
+  MyServer
+  Copyright (C) 2005, 2006, 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 <include/protocol/http/http.h>
 #include <include/protocol/http/http_headers.h>
 #include <include/http_handler/http_file/http_file.h>
@@ -39,7 +38,7 @@ extern "C"
 }
 
 /*!
- * Main function to handle the HTTP PUT command.
+  Main function to handle the HTTP PUT command.
  */
 int HttpFile::putFile (HttpThreadContext* td,
                        string& filename)
@@ -98,7 +97,7 @@ int HttpFile::putFile (HttpThreadContext* td,
         file.close ();
 
         td->http->raiseHTTPError (200);
-        return keepalive;
+        return HttpDataHandler::RET_OK;
       }
     else
       {
@@ -139,7 +138,7 @@ int HttpFile::putFile (HttpThreadContext* td,
         file.close ();
 
         td->http->raiseHTTPError (201);
-        return 1;
+        return HttpDataHandler::RET_OK;
       }
   }
   catch (...)
@@ -358,7 +357,7 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
             file->close ();
             delete file;
             chain.clearAllFilters ();
-            return 0;
+            return HttpDataHandler::RET_FAILURE;
           }
         memStream.refresh ();
         dataSent += nbw;
@@ -426,25 +425,25 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
         file->close ();
         delete file;
         chain.clearAllFilters ();
-        return 1;
+        return HttpDataHandler::RET_FAILURE;
       }
 
     /*
-     * If is requested only the header exit from the function;
-     * used by the HEAD request.
-     */
+      If is requested only the header exit from the function;
+      used by the HEAD request.
+    */
     if (onlyHeader)
       {
         file->close ();
         delete file;
         chain.clearAllFilters ();
-        return 0;
+        return HttpDataHandler::RET_OK;
       }
 
     /*
-     * Check if there are all the conditions to use a direct copy from the
-     * file to the socket.
-     */
+      Check if there are all the conditions to use a direct copy from the
+      file to the socket.
+    */
     if (!useChunks && chain.isEmpty () && !td->appendOutputs
         && !(td->http->getProtocolOptions () & Protocol::SSL))
       {
@@ -459,7 +458,10 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
 
         td->sentData += nbw;
 
-        return ret;
+        if (ret)
+          return HttpDataHandler::RET_FAILURE;
+        else
+          return HttpDataHandler::RET_OK;
       }
 
     if (td->appendOutputs)
@@ -468,10 +470,10 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
       chain.setStream (td->connection->socket);
 
     /*
-     * Flush initial data.  This is data that filters could have added
-     * and we have to send before the file itself, for example the gzip
-     * filter add a header to file.
-     */
+      Flush initial data.  This is data that filters could have added
+      and we have to send before the file itself, for example the gzip
+      filter add a header to file.
+    */
     if (memStream.availableToRead ())
       {
         if (memStream.read (td->buffer->getBuffer (),
@@ -480,7 +482,7 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
             file->close ();
             delete file;
             chain.clearAllFilters ();
-            return 0;
+            return HttpDataHandler::RET_FAILURE;
           }
 
         memStream.refresh ();
@@ -493,8 +495,8 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
             file->close ();
             delete file;
             chain.clearAllFilters ();
-            return 1;
             dataSent += nbw;
+            return HttpDataHandler::RET_FAILURE;
           }
       } /* memStream.availableToRead ().  */
 
@@ -540,11 +542,11 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
             else
               {
                 /*
-                 * Replace the final stream before the flush and write to a
-                 * memory buffer, after all the data is flushed from the
-                 * chain we can replace the stream with the original one and
-                 * write there the HTTP data chunk.
-                 */
+                  Replace the final stream before the flush and write to a
+                  memory buffer, after all the data is flushed from the
+                  chain we can replace the stream with the original one and
+                  write there the HTTP data chunk.
+                */
                 Stream* tmpStream = chain.getStream ();
                 chain.setStream (&memStream);
                 memStream.refresh ();
@@ -585,36 +587,40 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
   /* For logging activity.  */
   td->sentData += dataSent;
   chain.clearAllFilters ();
-  return !ret;
+
+  if (ret)
+  return HttpDataHandler::RET_FAILURE;
+  else
+    return HttpDataHandler::RET_OK;
 }
 
 /*!
- * Constructor for the class.
- */
+  Constructor for the class.
+*/
 HttpFile::HttpFile ()
 {
 
 }
 
 /*!
- * Destroy the object.
- */
+  Destroy the object.
+*/
 HttpFile::~HttpFile ()
 {
 
 }
 
 /*!
- * Load the static elements.
- * \param confFile Not used.
- */
+  Load the static elements.
+  \param confFile Not used.
+*/
 int HttpFile::load ()
 {
   return 0;
 }
 
 /*!
- * Unload the static elements.
+  Unload the static elements.
  */
 int HttpFile::unLoad ()
 {
diff --git a/myserver/src/http_handler/isapi/isapi.cpp b/myserver/src/http_handler/isapi/isapi.cpp
index 4283296..9c96057 100644
--- a/myserver/src/http_handler/isapi/isapi.cpp
+++ b/myserver/src/http_handler/isapi/isapi.cpp
@@ -1,18 +1,18 @@
 /*
-MyServer
-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
-(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) 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
+  (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"
@@ -53,7 +53,7 @@ BOOL WINAPI ISAPI_ServerSupportFunctionExport (HCONN hConn, DWORD dwHSERRequest,
   if (ConnInfo == NULL)
     {
       Server::getInstance ()->log ("isapi::ServerSupportFunctionExport: invalid hConn");
-      return 0;
+      return HttpDataHandler::RET_FAILURE;
     }
 
   switch (dwHSERRequest)
@@ -81,6 +81,7 @@ BOOL WINAPI ISAPI_ServerSupportFunctionExport (HCONN hConn, DWORD dwHSERRequest,
       mapInfo->dwFlags = HSE_URL_FLAGS_WRITE | HSE_URL_FLAGS_SCRIPT
         | HSE_URL_FLAGS_EXECUTE;
       break;
+
     case HSE_REQ_MAP_URL_TO_PATH:
       if (((char*)lpvBuffer)[0])
         strcpy (uri,(char*)lpvBuffer);
@@ -88,52 +89,58 @@ BOOL WINAPI ISAPI_ServerSupportFunctionExport (HCONN hConn, DWORD dwHSERRequest,
         lstrcpyn (uri,ConnInfo->td->request.uri.c_str (),
                  (int)ConnInfo->td->request.uri.length ()-ConnInfo->td->pathInfo.length () +1);
       ret = ConnInfo->td->http->getPath (tmp ,uri,0);
-      if (ret!=200)
+      if (ret != 200)
         {
           if (buffer)
             delete [] buffer;
-          return 1;
+          return HttpDataHandler::RET_FAILURE;
         }
 
       if (tmp.length () >= *lpdwSize)
         {
           SetLastError (ERROR_INSUFFICIENT_BUFFER);
-          return 0;
+          return HttpDataHandler::RET_FAILURE;
         }
       strcpy ((char*)lpvBuffer, tmp.c_str ());
       if (FilesUtility::completePath ((char**)&lpvBuffer,(int*)lpdwSize,  1))
         {
           SetLastError (ERROR_INSUFFICIENT_BUFFER);
-          return 0;
+          return HttpDataHandler::RET_FAILURE;
         }
       *lpdwSize=(DWORD)strlen ((char*)lpvBuffer);
       break;
+
     case HSE_REQ_SEND_URL_REDIRECT_RESP:
       return ((Isapi*)ConnInfo->isapi)->Redirect (ConnInfo->td,
                                                  ConnInfo->connection,(char *)lpvBuffer);
       break;
+
     case HSE_REQ_SEND_URL:
       return ((Isapi*)ConnInfo->isapi)->Senduri (ConnInfo->td,
                                                 ConnInfo->connection,(char *)lpvBuffer);
       break;
+
     case HSE_REQ_SEND_RESPONSE_HEADER:
       return ((Isapi*)ConnInfo->isapi)->SendHeader (ConnInfo->td,
                                                    ConnInfo->connection,(char *)lpvBuffer);
       break;
+
     case HSE_REQ_DONE_WITH_SESSION:
       ConnInfo->td->response.httpStatus=*(DWORD*)lpvBuffer;
       SetEvent (ConnInfo->ISAPIDoneEvent);
       break;
+
     case HSE_REQ_IS_KEEP_CONN:
       if (ConnInfo->td->request.isKeepAlive ())
         *((BOOL*)lpvBuffer)=1;
       else
         *((BOOL*)lpvBuffer)=0;
       break;
+
     default:
-      return 0;
+      return HttpDataHandler::RET_FAILURE;
     }
-  return 1;
+  return HttpDataHandler::RET_OK;
 }
 
 /*!
@@ -197,23 +204,24 @@ BOOL WINAPI ISAPI_WriteClientExport (HCONN hConn, LPVOID Buffer, LPDWORD lpdwByt
   u_long nbw=0;
 
   if (*lpdwBytes == 0)
-    return 1;
+    return HttpDataHandler::RET_FAILURE;
 
   Isapi::isapiMutex->lock ();
   ConnInfo = Isapi::HConnRecord (hConn);
   Isapi::isapiMutex->unlock ();
 
   if (ConnInfo == NULL)
-    return 1;
-  buffer=(char*)ConnInfo->td->buffer->getBuffer ();
+    return HttpDataHandler::RET_FAILURE;
+
+  buffer= (char*)ConnInfo->td->buffer->getBuffer ();
   HttpRequestHeader::Entry *connection = ConnInfo->td->request.other.get ("Connection");
 
   if (ConnInfo == NULL)
   {
     ((Vhost*)(ConnInfo->td->connection->host))->warningsLogWrite (_("ISAPI: internal error"));
-    return 0;
+    return HttpDataHandler::RET_FAILURE;
   }
-  keepalive =connection && (!stringcmpi (connection->value->c_str (), "keep-alive")) ;
+  keepalive = connection && (!stringcmpi (connection->value->c_str (), "keep-alive")) ;
 
   /*If the HTTP header was sent do not send it again. */
   if (!ConnInfo->headerSent)
@@ -285,7 +293,7 @@ BOOL WINAPI ISAPI_WriteClientExport (HCONN hConn, LPVOID Buffer, LPDWORD lpdwByt
 
               if (HttpHeaders::sendHeader (ConnInfo->td->response, *td->connection->socket,
                                            *ConnInfo->td->secondaryBuffer, ConnInfo->td))
-                return 1;
+                return HttpDataHandler::RET_FAILURE;
             }
           /*! Save the headerSent status. */
           ConnInfo->headerSent=1;
@@ -304,21 +312,21 @@ BOOL WINAPI ISAPI_WriteClientExport (HCONN hConn, LPVOID Buffer, LPDWORD lpdwByt
                   sprintf (chunkSize, "%x\r\n", len);
                   if (ConnInfo->chain.getStream ()->write (chunkSize,
                                                            (int)strlen (chunkSize), &nbw))
-                    return 0;
+                    return HttpDataHandler::RET_FAILURE;
                 }
 
               if (ConnInfo->td->appendOutputs)
                 {
                   if (ConnInfo->td->outputData.writeToFile ((char*)(buffer + headerSize),
                                                             len, &nbw))
-                    return 0;
+                    return HttpDataHandler::RET_FAILURE;
                   ConnInfo->dataSent += nbw;
                 }
               else
                 {
                   if (ConnInfo->chain.write ((char*)(buffer + headerSize),
                                              len, &nbw))
-                    return 0;
+                    return HttpDataHandler::RET_FAILURE;
                   ConnInfo->dataSent += nbw;
                 }
 
@@ -326,7 +334,7 @@ BOOL WINAPI ISAPI_WriteClientExport (HCONN hConn, LPVOID Buffer, LPDWORD lpdwByt
               if (keepalive && (!ConnInfo->td->appendOutputs))
                 {
                   if (ConnInfo->chain.getStream ()->write ("\r\n", 2, &nbw))
-                    return 0;
+                    return HttpDataHandler::RET_FAILURE;
                 }
             }
         }
@@ -343,19 +351,19 @@ BOOL WINAPI ISAPI_WriteClientExport (HCONN hConn, LPVOID Buffer, LPDWORD lpdwByt
           nbw = ConnInfo->connection->socket->send (chunkSize,
                                                     (int)strlen (chunkSize), 0);
           if ((nbw == (u_long)-1) || (!nbw))
-            return 0;
+            return HttpDataHandler::RET_FAILURE;
         }
 
       if (ConnInfo->td->appendOutputs)
         {
           if (ConnInfo->td->outputData.writeToFile ((char*)Buffer,*lpdwBytes, &nbw))
-            return 0;
+            return HttpDataHandler::RET_FAILURE;
           ConnInfo->dataSent += nbw;
         }
       else
         {
           if (ConnInfo->chain.write ((char*)Buffer,*lpdwBytes, &nbw))
-            return 0;
+            return HttpDataHandler::RET_FAILURE;
           ConnInfo->dataSent += nbw;
         }
 
@@ -363,7 +371,7 @@ BOOL WINAPI ISAPI_WriteClientExport (HCONN hConn, LPVOID Buffer, LPDWORD lpdwByt
         {
           nbw = ConnInfo->connection->socket->send ("\r\n", 2, 0);
           if ((nbw == (u_long)-1) || (!nbw))
-            return 0;
+            return HttpDataHandler::RET_FAILURE;
         }
     }
 
@@ -371,7 +379,7 @@ BOOL WINAPI ISAPI_WriteClientExport (HCONN hConn, LPVOID Buffer, LPDWORD lpdwByt
 
   ConnInfo->td->sentData += ConnInfo->dataSent;
 
-  return (nbw != -1) ? 1 : 0;
+  return HttpDataHandler::RET_OK;
 }
 
 /*!
@@ -389,21 +397,19 @@ BOOL WINAPI ISAPI_ReadClientExport (HCONN hConn, LPVOID lpvBuffer,
   if (ConnInfo == NULL)
   {
     ((Vhost*)(ConnInfo->td->connection->host))->warningsLogWrite (_("ISAPI: internal error"));
-    return 0;
+    return HttpDataHandler::RET_FAILURE;
   }
 
   ConnInfo->td->inputData.read ((char*)lpvBuffer, *lpdwSize, &NumRead);
 
   if (NumRead == -1)
-  {
-    *lpdwSize = 0;
-    return 0;
-  }
-  else
-  {
-    *lpdwSize = (DWORD)NumRead;
-    return 1;
-  }
+    {
+      *lpdwSize = 0;
+      return HttpDataHandler::RET_FAILURE;
+    }
+
+  *lpdwSize = (DWORD)NumRead;
+  return HttpDataHandler::RET_OK;
 }
 
 /*!
@@ -415,15 +421,17 @@ BOOL WINAPI ISAPI_GetServerVariableExport (HCONN hConn,
                                            LPDWORD lpdwSize)
 {
   ConnTableRecord *ConnInfo;
-  BOOL ret = 1;
+  BOOL ret = HttpDataHandler::RET_OK;
+
   Isapi::isapiMutex->lock ();
   ConnInfo = Isapi::HConnRecord (hConn);
   Isapi::isapiMutex->unlock ();
+
   if (ConnInfo == NULL)
     {
       Server::getInstance ()->log (
                             "Isapi::GetServerVariableExport: invalid hConn");
-      return 0;
+      return HttpDataHandler::RET_FAILURE;
     }
 
   if (!strcmp (lpszVariableName, "ALL_HTTP"))
@@ -431,12 +439,9 @@ BOOL WINAPI ISAPI_GetServerVariableExport (HCONN hConn,
 
       if (Isapi::buildAllHttpHeaders (ConnInfo->td,ConnInfo->connection,
                                       lpvBuffer, lpdwSize))
-        ret = 1;
-
-      else
         {
           SetLastError (ERROR_INSUFFICIENT_BUFFER);
-          ret = 0;
+          ret = HttpDataHandler::RET_FAILURE;
         }
 
     }
@@ -444,13 +449,10 @@ BOOL WINAPI ISAPI_GetServerVariableExport (HCONN hConn,
     {
       if (Isapi::buildAllRawHeaders (ConnInfo->td,ConnInfo->connection,
                                      lpvBuffer, lpdwSize))
-        ret = 1;
-      else
         {
           SetLastError (ERROR_INSUFFICIENT_BUFFER);
-          ret = 0;
+          ret = HttpDataHandler::RET_FAILURE;
         }
-
     }
   else
     {
@@ -496,13 +498,13 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
     valLen += sprintf (&ValStr[valLen],"HTTP_ACCEPT:%s\n",
                        accept->value->c_str ());
   else if (valLen + 30 < maxLen)
-    return 0;
+    return 1;
 
   if (cache && cache->value->length () && (valLen+30<maxLen))
     valLen += sprintf (&ValStr[valLen], "HTTP_CACHE_CONTROL:%s\n",
                        cache->value->c_str ());
   else if (valLen + 30 < maxLen)
-    return 0;
+    return 1;
 
   if ((td->request.rangeByteBegin || td->request.rangeByteEnd) &&
       (valLen + 30 < maxLen))
@@ -525,17 +527,16 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
       valLen += sprintf (&ValStr[valLen], "HTTP_ACCEPT_ENCODING:%s\n",
                          e->value->c_str ());
     else if (valLen + 30 < maxLen)
-      return 0;
+      return 1;
   }
 
-
   {
     HttpRequestHeader::Entry* e = td->request.other.get ("Accept-Language");
     if (e && (valLen + 30 < maxLen))
       valLen += sprintf (&ValStr[valLen],"HTTP_ACCEPT_LANGUAGE:%s\n",
                          e->value->c_str ());
     else if (valLen + 30 < maxLen)
-      return 0;
+      return 1;
   }
 
 
@@ -545,7 +546,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
       valLen += sprintf (&ValStr[valLen],"HTTP_ACCEPT_CHARSET:%s\n",
                          e->value->c_str ());
     else if (valLen + 30 < maxLen)
-      return 0;
+      return 1;
   }
 
   {
@@ -554,7 +555,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
       valLen += sprintf (&ValStr[valLen],"HTTP_PRAGMA:%s\n",
                          e->value->c_str ());
     else if (valLen + 30 < maxLen)
-      return 0;
+      return 1;
   }
 
   {
@@ -563,7 +564,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
       valLen += sprintf (&ValStr[valLen],"HTTP_CONNECTION:%s\n",
                          e->value->c_str ());
     else if (valLen + 30 < maxLen)
-      return 0;
+      return 1;
   }
 
   {
@@ -572,7 +573,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
       valLen += sprintf (&ValStr[valLen],"HTTP_COOKIE:%s\n",
                          e->value->c_str ());
     else if (valLen + 30 < maxLen)
-      return 0;
+      return 1;
   }
 
   {
@@ -581,7 +582,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
       valLen += sprintf (&ValStr[valLen],"HTTP_HOST:%s\n",
                          e->value->c_str ());
     else if (valLen + 30 < maxLen)
-      return 0;
+      return 1;
   }
 
   {
@@ -590,7 +591,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
       valLen += sprintf (&ValStr[valLen],"HTTP_DATE:%s\n",
                          e->value->c_str ());
     else if (valLen + 30 < maxLen)
-      return 0;
+      return 1;
   }
 
   {
@@ -599,7 +600,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
       valLen += sprintf (&ValStr[valLen],"HTTP_IF_MODIFIED_SINCE:%s\n",
                          e->value->c_str ());
     else if (valLen + 30 < maxLen)
-      return 0;
+      return 1;
   }
 
   {
@@ -608,7 +609,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
       valLen += sprintf (&ValStr[valLen],"HTTP_REFERER:%s\n",
                          e->value->c_str ());
     else if (valLen + 30 < maxLen)
-      return 0;
+      return 1;
   }
 
   {
@@ -617,7 +618,7 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
       valLen += sprintf (&ValStr[valLen],"HTTP_USER_AGENT:%s\n",
                          e->value->c_str ());
     else if (valLen + 30 < maxLen)
-      return 0;
+      return 1;
   }
 
   {
@@ -626,10 +627,10 @@ BOOL Isapi::buildAllHttpHeaders (HttpThreadContext* td, ConnectionPtr /*!a*/,
       valLen += sprintf (&ValStr[valLen],"HTTP_FROM:%s\n",
                          e->value->c_str ());
     else if (valLen + 30 < maxLen)
-      return 0;
+      return 1;
   }
 
-  return 1;
+  return 0;
 }
 
 /*!
@@ -641,71 +642,71 @@ BOOL Isapi::buildAllRawHeaders (HttpThreadContext* td,ConnectionPtr a,
   DWORD valLen = 0;
   DWORD maxLen = *dwMaxLen;
   char *ValStr = (char*)output;
-  if (buildAllHttpHeaders (td, a, output, dwMaxLen) == 0)
-    return 0;
+  if (buildAllHttpHeaders (td, a, output, dwMaxLen))
+    return 1;
   valLen = (DWORD)strlen (ValStr);
 
   if (td->pathInfo.length () && (valLen + 30 < maxLen))
     valLen += sprintf (&ValStr[valLen], "PATH_INFO:%s\n",
                        td->pathInfo.c_str ());
   else if (valLen + 30 < maxLen)
-    return 0;
+    return 1;
 
   if (td->pathTranslated.length () && (valLen + 30 < maxLen))
     valLen += sprintf (&ValStr[valLen], "PATH_INFO:%s\n",
                        td->pathTranslated.c_str ());
   else if (valLen + 30 < maxLen)
-    return 0;
+    return 1;
 
   if (td->request.uriOpts[0] && (valLen + 30 < maxLen))
     valLen += sprintf (&ValStr[valLen], "QUERY_STRING:%s\n",
                        td->request.uriOpts[0]);
   else if (valLen + 30 < maxLen)
-    return 0;
+    return 1;
 
   if (td->request.cmd[0] && (valLen + 30 < maxLen))
     valLen += sprintf (&ValStr[valLen], "REQUEST_METHOD:%s\n",
                        td->request.cmd[0]);
   else if (valLen + 30 < maxLen)
-    return 0;
+    return 1;
 
   if (td->filenamePath.length () && (valLen + 30 < maxLen))
     valLen += sprintf (&ValStr[valLen], "SCRIPT_FILENAME:%s\n",
                        td->filenamePath[0]);
   else if (valLen + 30 < maxLen)
-    return 0;
+    return 1;
 
   if (valLen + 30 < maxLen)
     valLen += sprintf (&ValStr[valLen], "SERVER_PORT:%u\n",
                        td->connection->getLocalPort ());
   else if (valLen + 30 < maxLen)
-    return 0;
+    return 1;
 
   if (valLen + 30 < maxLen)
     valLen += sprintf (&ValStr[valLen],
                        "SERVER_SIGNATURE:<address>%s</address>\n",
                        MYSERVER_VERSION);
   else if (valLen + 30 < maxLen)
-    return 0;
+    return 1;
 
   if (td->connection->getIpAddr ()[0] && valLen + 30 < maxLen)
     valLen += sprintf (&ValStr[valLen], "REMOTE_ADDR:\n",
                        td->connection->getIpAddr ());
   else if (valLen + 30 < maxLen)
-    return 0;
+    return 1;
 
   if (td->connection->getPort () && valLen + 30 < maxLen)
     valLen += sprintf (&ValStr[valLen], "REMOTE_PORT:%u\n",
                        td->connection->getPort ());
   else if (valLen + 30 < maxLen)
-    return 0;
+    return 1;
 
   if (valLen + 30 < maxLen)
     valLen += sprintf (&ValStr[valLen], "SERVER_ADMIN:%s\n",
                        td->securityToken.getData ("server.admin", MYSERVER_VHOST_CONF |
                                                   MYSERVER_SERVER_CONF, ""));
   else if (valLen + 30 < maxLen)
-    return 0;
+    return 1;
 
   if (valLen + MAX_PATH < maxLen)
     {
@@ -716,8 +717,9 @@ BOOL Isapi::buildAllRawHeaders (HttpThreadContext* td,ConnectionPtr a,
       valLen += (DWORD)sprintf (&ValStr[valLen],"\n");
     }
   else if (valLen + 30 < maxLen)
-    return 0;
-  return 1;
+    return 1;
+
+  return 0;
 }
 
 #endif
@@ -745,17 +747,15 @@ int Isapi::send (HttpThreadContext* td,
   /*! Under windows there is MAX_PATH then we can use it. */
   char fullpath[MAX_PATH * 2 + 5];
 
-  if (!execute)
+  if (execute)
+    sprintf (fullpath, "%s", cgipath);
+  else
     {
       if (cgipath && strlen (cgipath))
         sprintf (fullpath, "%s \"%s\"", cgipath, td->filenamePath.c_str ());
       else
         sprintf (fullpath, "%s", td->filenamePath.c_str ());
     }
-  else
-    {
-      sprintf (fullpath, "%s", cgipath);
-    }
 
   if (!(td->permissions & MYSERVER_PERMISSION_EXECUTE))
     return td->http->sendAuth ();
@@ -828,6 +828,7 @@ int Isapi::send (HttpThreadContext* td,
       connTable[connIndex].chain.clearAllFilters ();
       return td->http->raiseHTTPError (500);
     }
+
   if (!GetExtensionVersion (&Ver))
     {
       td->connection->host->warningsLogWrite (_("ISAPI: internal error"));
@@ -835,6 +836,7 @@ int Isapi::send (HttpThreadContext* td,
       connTable[connIndex].chain.clearAllFilters ();
       return td->http->raiseHTTPError (500);
     }
+
   if (Ver.dwExtensionVersion > MAKELONG (HSE_VERSION_MINOR,
                                          HSE_VERSION_MAJOR))
     {
@@ -843,14 +845,11 @@ int Isapi::send (HttpThreadContext* td,
       connTable[connIndex].chain.clearAllFilters ();
       return td->http->raiseHTTPError (500);
     }
-  /*!
-   *Store the environment string in the secondaryBuffer.
-   */
+
+  /* Store the environment string in the secondaryBuffer.  */
   connTable[connIndex].envString=td->secondaryBuffer->getBuffer ();
 
-  /*!
-   *Build the environment string.
-   */
+  /* Build the environment string.  */
   td->scriptPath.assign (scriptpath);
 
   string tmp;
@@ -882,12 +881,10 @@ int Isapi::send (HttpThreadContext* td,
   ExtCtrlBlk.cbTotalBytes = td->inputData.getFileSize ();
   ExtCtrlBlk.cbAvailable = 0;
   ExtCtrlBlk.lpbData = 0;
-  {
-    HttpRequestHeader::Entry *content =
-      td->request.other.get ("Content-type");
-    ExtCtrlBlk.lpszContentType = content ? (char*)content->value->c_str ()
-      : 0;
-  }
+
+
+  HttpRequestHeader::Entry *content = td->request.other.get ("Content-type");
+  ExtCtrlBlk.lpszContentType = content ? (char*)content->value->c_str () : NULL;
 
   connTable[connIndex].td->buffer->setLength (0);
   connTable[connIndex].td->buffer->getAt (0)='\0';
@@ -915,13 +912,14 @@ int Isapi::send (HttpThreadContext* td,
   switch (Ret)
     {
     case HSE_STATUS_SUCCESS_AND_KEEP_CONN:
-      retvalue = 1;
+      retvalue = HttpDataHandler::RET_OK;
       break;
+
     case 0:
     case HSE_STATUS_SUCCESS:
     case HSE_STATUS_ERROR:
     default:
-      retvalue = 0;
+      retvalue = HttpDataHandler::RET_FAILURE;
       break;
     }
 
@@ -961,34 +959,35 @@ int Isapi::load ()
     return 0;
 
   isapiMutex = new Mutex;
-  maxConnections = nThreads ? nThreads : 20 ;
+  maxConnections = nThreads ? nThreads : 20;
 
   if (connTable)
     free (connTable);
 
   connTable = new ConnTableRecord[maxConnections];
-  for (int i=0;i<maxConnections; i++)
+  for (int i = 0; i < maxConnections; i++)
     {
-      connTable[i].Allocated=0;
-      connTable[i].onlyHeader=0;
-      connTable[i].headerSent=0;
-      connTable[i].headerSize=0;
-      connTable[i].td=0;
-      connTable[i].dataSent=0;
-      connTable[i].envString=0;
-      connTable[i].connection=0;
-      connTable[i].ISAPIDoneEvent=0;
-      connTable[i].isapi=0;
+      connTable[i].Allocated = 0;
+      connTable[i].onlyHeader = 0;
+      connTable[i].headerSent = 0;
+      connTable[i].headerSize = 0;
+      connTable[i].td = 0;
+      connTable[i].dataSent = 0;
+      connTable[i].envString = 0;
+      connTable[i].connection = 0;
+      connTable[i].ISAPIDoneEvent = 0;
+      connTable[i].isapi = 0;
     }
+
   InitializeCriticalSection (&GetTableEntryCritSec);
-  initialized=1;
+  initialized = 1;
 #endif
   return 0;
 }
 
 /*!
- * Cleanup the memory used by ISAPI.
- */
+  Cleanup the memory used by ISAPI.
+*/
 int Isapi::unLoad ()
 {
 #ifdef WIN32
diff --git a/myserver/src/http_handler/mscgi/mscgi.cpp b/myserver/src/http_handler/mscgi/mscgi.cpp
index a3d8995..d27cdde 100644
--- a/myserver/src/http_handler/mscgi/mscgi.cpp
+++ b/myserver/src/http_handler/mscgi/mscgi.cpp
@@ -32,23 +32,23 @@ using namespace std;
 DynamicLibrary MsCgi::mscgiModule;
 
 /*!
- * Entry-point for the MyServer CGI; differently from standard CGI this doesn't
- * need a new process to run making it faster.
- * \param td The HTTP thread context.
- * \param exec The script path.
- * \param cmdLine The command line.
- * \param execute Specify if the script has to be executed.
- * \param onlyHeader Specify if send only the HTTP header.
+  Entry-point for the MyServer CGI; differently from standard CGI this doesn't
+  need a new process to run making it faster.
+  \param td The HTTP thread context.
+  \param exec The script path.
+  \param cmdLine The command line.
+  \param execute Specify if the script has to be executed.
+  \param onlyHeader Specify if send only the HTTP header.
  */
 int MsCgi::send (HttpThreadContext* td, const char* exec, const char* cmdLine,
                  bool /*execute*/, bool onlyHeader)
 {
   /*
-   * This is the code for manage a .mscgi file.
-   * This files differently from standard CGI don't need a new process to run
-   * but are allocated in the caller process virtual space.
-   * Usually these files are faster than standard CGI.
-   * Actually myServerCGI (.mscgi) is only at an alpha status.
+    This is the code for manage a .mscgi file.
+    This files differently from standard CGI don't need a new process to run
+    but are allocated in the caller process virtual space.
+    Usually these files are faster than standard CGI.
+    Actually myServerCGI (.mscgi) is only at an alpha status.
    */
   ostringstream tmpStream;
   string outDataPath;
@@ -139,17 +139,17 @@ int MsCgi::send (HttpThreadContext* td, const char* exec, const char* cmdLine,
 
   if (!td->appendOutputs && data.useChunks && !data.error
       && chain.getStream ()->write ("0\r\n\r\n", 5, &nbw))
-    return 0;
+    return HttpDataHandler::RET_FAILURE;
 
   if (!data.error)
-    return 0;
+    return HttpDataHandler::RET_FAILURE;
 
   ostringstream tmp;
   tmp << td->sentData;
   td->response.contentLength.assign (tmp.str ());
 
   chain.clearAllFilters ();
-  return 1;
+  return HttpDataHandler::RET_OK;
 }
 
 /*!
@@ -201,8 +201,8 @@ int MsCgi::sendHeader (MsCgiData* mcd)
 }
 
 /*!
- * Map the library in the application address space.
- * \param confFile The xml parser with configuration.
+  Map the library in the application address space.
+  \param confFile The xml parser with configuration.
  */
 int MsCgi::load ()
 {
@@ -210,7 +210,7 @@ int MsCgi::load ()
 }
 
 /*!
- * Free the memory allocated by the MSCGI library.
+  Free the memory allocated by the MSCGI library.
  */
 int MsCgi::unLoad ()
 {
diff --git a/myserver/src/http_handler/proxy/proxy.cpp b/myserver/src/http_handler/proxy/proxy.cpp
index 2276e67..846aaed 100644
--- a/myserver/src/http_handler/proxy/proxy.cpp
+++ b/myserver/src/http_handler/proxy/proxy.cpp
@@ -1,18 +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/>.
+  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 "stdafx.h"
@@ -32,13 +32,13 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include <sstream>
 
 /*
- *Forward the HTTP requesto to another server.
- *
- *\param td The HTTP thread context.
- *\param scriptpath Not used.
- *\param exec The remote server Url.
- *\param execute Not used.
- *\param onlyHeader Specify if send only the HTTP header.
+  Forward the HTTP requesto to another server.
+
+  \param td The HTTP thread context.
+  \param scriptpath Not used.
+  \param exec The remote server Url.
+  \param execute Not used.
+  \param onlyHeader Specify if send only the HTTP header.
  */
 int Proxy::send (HttpThreadContext *td,
                  const char* scriptpath,
@@ -95,7 +95,7 @@ int Proxy::send (HttpThreadContext *td,
                                *td->secondaryBuffer, td))
     {
       chain.clearAllFilters ();
-      return 1;
+      return HttpDataHandler::RET_FAILURE;
     }
 
   if (td->request.uriOptsPtr &&
@@ -143,19 +143,18 @@ int Proxy::flushToClient (HttpThreadContext* td, Socket& client,
 
   do
     {
-      ret = client.recv (td->secondaryBuffer->getBuffer () + read,
-                         td->secondaryBuffer->getRealLength () - read,
-                         0,
-                         td->http->getTimeout ());
-
-      if (ret == 0)
+      if (client.recv (td->secondaryBuffer->getBuffer () + read,
+                       td->secondaryBuffer->getRealLength () - read,
+                       0,
+                       td->http->getTimeout () == 0))
         return td->http->raiseHTTPError (500);
 
       read += ret;
 
-      ret = HttpHeaders::buildHTTPResponseHeaderStruct (td->secondaryBuffer->getBuffer (),
-                                                        &td->response,
-                                                        &headerLength);
+      if (HttpHeaders::buildHTTPResponseHeaderStruct (td->secondaryBuffer->getBuffer (),
+                                                      &td->response,
+                                                      &headerLength))
+      ret = HttpDataHandler::RET_FAILURE;
     }
   while (ret == -1);
 
@@ -197,8 +196,7 @@ int Proxy::flushToClient (HttpThreadContext* td, Socket& client,
     return 0;
 
   if (onlyHeader)
-    return keepalive;
-
+    ret = HttpDataHandler::RET_OK;
 
   ret = readPayLoad (td,
                      &td->response,
@@ -211,29 +209,30 @@ int Proxy::flushToClient (HttpThreadContext* td, Socket& client,
                      keepalive,
                      hasTransferEncoding ? &transferEncoding : NULL);
 
-  if (ret != -1)
-    td->sentData += ret;
+  if (ret == -1)
+    return HttpDataHandler::RET_FAILURE;
 
-  return ret == -1 ? 0 : keepalive;
+  td->sentData += ret;
+  return HttpDataHandler::RET_OK;
 }
 
 /*!
- *Forward the message payload to the client.
- *
- *\param td The current HTTP thread context.
- *\param res Response obtained by the server.
- *\param out The client chain.
- *\param initBuffer Initial read data.
- *\param initBufferSize Size of initial data.
- *\param timeout Connection timeout.
- *\param useChunks Use chunked transfer encoding
- *with the client.
- *\param keepalive The connection is keep-alive.
- *\param serverTransferEncoding Transfer-Encoding
- *used by the server.
- *
- *\return -1 on error.
- *\return Otherwise the number of bytes transmitted.
+  Forward the message payload to the client.
+
+  \param td The current HTTP thread context.
+  \param res Response obtained by the server.
+  \param out The client chain.
+  \param initBuffer Initial read data.
+  \param initBufferSize Size of initial data.
+  \param timeout Connection timeout.
+  \param useChunks Use chunked transfer encoding
+  with the client.
+  \param keepalive The connection is keep-alive.
+  \param serverTransferEncoding Transfer-Encoding
+  used by the server.
+
+  \return -1 on error.
+  \return Otherwise the number of bytes transmitted.
  */
 int Proxy::readPayLoad (HttpThreadContext* td,
                         HttpResponseHeader* res,
@@ -252,16 +251,15 @@ int Proxy::readPayLoad (HttpThreadContext* td,
   u_long bufferDataSize = 0;
   u_long written = 0;
 
-
   /* Only the chunked transfer encoding is supported.  */
   if (serverTransferEncoding && serverTransferEncoding->compare ("chunked"))
-    return -1;
+    return HttpDataHandler::RET_FAILURE;
 
   if (res->contentLength.length ())
     {
       contentLength = atol (res->contentLength.c_str ());
       if (contentLength < 0)
-        return -1;
+        return HttpDataHandler::RET_FAILURE;
     }
 
   length = contentLength;
@@ -287,7 +285,7 @@ int Proxy::readPayLoad (HttpThreadContext* td,
                                                  timeout,
                                                  NULL,
                                                  1))
-            return -1;
+            return HttpDataHandler::RET_FAILURE;
 
           if (!nbr)
             break;
@@ -299,7 +297,7 @@ int Proxy::readPayLoad (HttpThreadContext* td,
                                                         out,
                                                         td->appendOutputs,
                                                         useChunks))
-            return -1;
+            return HttpDataHandler::RET_FAILURE;
 
           written += nbr;
         }
@@ -325,9 +323,7 @@ int Proxy::readPayLoad (HttpThreadContext* td,
                                                       len,
                                                       &nbr,
                                                       timeout))
-    {
-      return -1;
-    }
+      return HttpDataHandler::RET_FAILURE;
 
     if (contentLength == 0 && nbr == 0)
       break;
@@ -342,7 +338,7 @@ int Proxy::readPayLoad (HttpThreadContext* td,
                                                          out,
                                                          td->appendOutputs,
                                                          useChunks))
-      return -1;
+      return HttpDataHandler::RET_FAILURE;
 
     written += nbr;
 
@@ -351,7 +347,7 @@ int Proxy::readPayLoad (HttpThreadContext* td,
   }
 
   if (useChunks && out->getStream ()->write ("0\r\n\r\n", 5, &nbw))
-    return -1;
+    return HttpDataHandler::RET_FAILURE;
 
   return written;
 }
diff --git a/myserver/src/http_handler/scgi/scgi.cpp b/myserver/src/http_handler/scgi/scgi.cpp
index 6b85719..1923405 100644
--- a/myserver/src/http_handler/scgi/scgi.cpp
+++ b/myserver/src/http_handler/scgi/scgi.cpp
@@ -1,18 +1,18 @@
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2006, 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/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2006, 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 <include/http_handler/scgi/scgi.h>
 #include <include/protocol/http/env/env.h>
@@ -34,10 +34,9 @@ int Scgi::initialized = 0;
 /*! Process server manager.  */
 ProcessServerManager *Scgi::processServerManager = 0;
 
-
 /*!
- *Entry-Point to manage a SCGI request.
- */
+  Entry-Point to manage a SCGI request.
+*/
 int Scgi::send (HttpThreadContext* td, const char* scriptpath,
                const char *cgipath, bool execute, bool onlyHeader)
 {
@@ -90,7 +89,7 @@ int Scgi::send (HttpThreadContext* td, const char* scriptpath,
   td->secondaryBuffer->getAt (0) = '\0';
 
   {
-    /*! Do not modify the text between " and ".  */
+    /* Do not modify the text between " and ".  */
     int i;
     int subString = cgipath[0] == '"';
     int len = strlen (cgipath);
@@ -103,10 +102,10 @@ int Scgi::send (HttpThreadContext* td, const char* scriptpath,
         subString = !subString;
     }
     /*!
-     *Save the cgi path and the possible arguments.
-     *the (x < len) case is when additional arguments are specified.
-     *If the cgipath is enclosed between " and " do not consider them
-     *when splitting directory and file name.
+      Save the cgi path and the possible arguments.
+      the (x < len) case is when additional arguments are specified.
+      If the cgipath is enclosed between " and " do not consider them
+      when splitting directory and file name.
      */
     if (len)
     {
@@ -204,7 +203,7 @@ int Scgi::send (HttpThreadContext* td, const char* scriptpath,
     }
   }
 
-  ret = !sendResponse (&con, onlyHeader, &chain);
+  ret = sendResponse (&con, onlyHeader, &chain);
 
 
   chain.clearAllFilters ();
@@ -242,7 +241,7 @@ int Scgi::sendResponse (ScgiContext* ctx, int onlyHeader, FiltersChain* chain)
         }
 
       if (!ctx->sock.bytesToRead ())
-        return -1;
+        return HttpDataHandler::RET_FAILURE;
 
       nbr = ctx->sock.recv (td->secondaryBuffer->getBuffer () + read,
                             td->secondaryBuffer->getRealLength () - read,
@@ -273,10 +272,10 @@ int Scgi::sendResponse (ScgiContext* ctx, int onlyHeader, FiltersChain* chain)
 
   if (HttpHeaders::sendHeader (td->response, *td->connection->socket,
                                *td->secondaryBuffer, td))
-    return 1;
+    return HttpDataHandler::RET_FAILURE;
 
   if (onlyHeader)
-    return 0;
+    return HttpDataHandler::RET_OK;
 
   if (read - headerSize)
     if (appendDataToHTTPChannel (td, td->secondaryBuffer->getBuffer () + headerSize,
@@ -285,7 +284,7 @@ int Scgi::sendResponse (ScgiContext* ctx, int onlyHeader, FiltersChain* chain)
                                  chain,
                                  td->appendOutputs,
                                  useChunks))
-      return -1;
+      return HttpDataHandler::RET_FAILURE;
 
   sentData += read - headerSize;
 
@@ -306,7 +305,7 @@ int Scgi::sendResponse (ScgiContext* ctx, int onlyHeader, FiltersChain* chain)
                                        chain,
                                        td->appendOutputs,
                                        useChunks))
-            return -1;
+            return HttpDataHandler::RET_FAILURE;
 
           sentData += nbr;
         }
@@ -314,13 +313,13 @@ int Scgi::sendResponse (ScgiContext* ctx, int onlyHeader, FiltersChain* chain)
       if (!td->appendOutputs && useChunks)
         {
           if (chain->getStream ()->write ("0\r\n\r\n", 5, &nbw))
-            return -1;
+            return HttpDataHandler::RET_FAILURE;
         }
     }
   /* For logging activity.  */
   td->sentData += sentData;
 
-  return 0;
+  return HttpDataHandler::RET_OK;
 }
 
 /*!
diff --git a/myserver/src/http_handler/wincgi/wincgi.cpp b/myserver/src/http_handler/wincgi/wincgi.cpp
index ca29171..cac7388 100644
--- a/myserver/src/http_handler/wincgi/wincgi.cpp
+++ b/myserver/src/http_handler/wincgi/wincgi.cpp
@@ -1,18 +1,18 @@
 /*
-MyServer
-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
-(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) 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
+  (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"
@@ -33,6 +33,7 @@ extern "C"
 #ifdef WIN32
 # include <direct.h>
 #endif
+
 #include <string.h>
 }
 
@@ -42,7 +43,7 @@ using namespace std;
 
 
 /*!
- * Constructor for the wincgi class.
+  Constructor for the wincgi class.
  */
 WinCgi::WinCgi ()
 {
@@ -50,7 +51,7 @@ WinCgi::WinCgi ()
 }
 
 /*!
- * Destructor for the wincgi class.
+  Destructor for the wincgi class.
  */
 WinCgi::~WinCgi ()
 {
@@ -58,7 +59,7 @@ WinCgi::~WinCgi ()
 }
 
 /*!
- * Send the WinCGI data.
+  Send the WinCGI data.
  */
 int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
                   const char *cgipath, bool /*execute*/, bool onlyHeader)
@@ -67,8 +68,8 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
   FiltersChain chain;
   Process proc;
   u_long nbr;
-  char  dataFilePath[MAX_PATH];/*! Use MAX_PATH under windows. */
-  char outFilePath[MAX_PATH];  /*! Use MAX_PATH under windows. */
+  char  dataFilePath[MAX_PATH];
+  char outFilePath[MAX_PATH];
   char *buffer;
   File DataFileHandle, OutFileHandle;
   StartProcInfo spi;
@@ -77,9 +78,8 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
   int bias;
 
   int ret;
-  char execname[MAX_PATH];/*! Use MAX_PATH under windows. */
-  char pathname[MAX_PATH];/*! Use MAX_PATH under windows. */
-
+  char execname[MAX_PATH];
+  char pathname[MAX_PATH];
   u_long nBytesRead = 0;
   u_long headerSize = 0;
   u_long nbw = 0;
@@ -107,9 +107,10 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
   if (td->mime)
     {
       u_long nbw2;
-      if (td->mime && Server::getInstance ()->getFiltersFactory ()->chain (&chain,
-                                                                         td->mime->filters,
-                                                                         td->connection->socket, &nbw2, 1))
+      if (td->mime
+          && Server::getInstance ()->getFiltersFactory ()->chain (&chain,
+                                                       td->mime->filters,
+                                        td->connection->socket, &nbw2, 1))
         {
           td->connection->host->warningsLogWrite (_("WinCGI: internal error"));
           chain.clearAllFilters ();
@@ -117,10 +118,7 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
         }
     }
 
-
-  /*!
-   *The WinCGI protocol uses a .ini file to send data to the new process.
-   */
+  /* The WinCGI protocol uses a .ini file to send data to the new process.  */
   ret = DataFileHandle.openFile (dataFilePath, File::FILE_CREATE_ALWAYS
                                  | File::WRITE);
   if (ret)
@@ -352,7 +350,7 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
           FilesUtility::deleteFile (outFilePath);
           FilesUtility::deleteFile (dataFilePath);
           chain.clearAllFilters ();
-          return 1;
+          return HttpDataHandler::RET_FAILURE;
         }
 
       if (onlyHeader)
@@ -361,12 +359,9 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
           FilesUtility::deleteFile (outFilePath);
           FilesUtility::deleteFile (dataFilePath);
           chain.clearAllFilters ();
-          return 1;
+          return HttpDataHandler::RET_OK;
         }
 
-      /*!
-       * Send other data in the buffer.
-       */
       chain.write ((char*)(buffer + headerSize), nBytesRead - headerSize,
                    &nbw2);
       nbw += nbw2;
@@ -379,7 +374,7 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
       if (onlyHeader)
         {
           chain.clearAllFilters ();
-          return 1;
+          return HttpDataHandler::RET_OK;
         }
 
       td->outputData.writeToFile ((char*)(buffer + headerSize),
@@ -407,7 +402,7 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
                       FilesUtility::deleteFile (outFilePath);
                       FilesUtility::deleteFile (dataFilePath);
                       chain.clearAllFilters ();
-                      return 0;
+                      return HttpDataHandler::RET_FAILURE;
                     }
                 }
               else
@@ -420,7 +415,7 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
                       FilesUtility::deleteFile (outFilePath);
                       FilesUtility::deleteFile (dataFilePath);
                       chain.clearAllFilters ();
-                      return 0;
+                      return HttpDataHandler::RET_FAILURE;
                     }
                 }
             }
@@ -435,12 +430,9 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
   OutFileHandle.close ();
   FilesUtility::deleteFile (outFilePath);
   FilesUtility::deleteFile (dataFilePath);
-  return 1;
+
+  return HttpDataHandler::RET_OK;
 #else
-  /*
-   * WinCGI is available only under windows. Raise the right error
-   * when it is used under another architecture.
-   */
   td->connection->host->warningsLogWrite (_("WinCGI: not implemented"));
 
   return td->http->raiseHTTPError (501);
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index c4ac163..56cb45b 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -523,8 +523,9 @@ u_long Http::checkDigest ()
   u_long digestCount;
 
   /* Return 0 if the password is different.  */
-  if (td->request.digestOpaque[0] && strcmp (td->request.digestOpaque,
-                                             ((HttpUserData*) td->connection->protocolBuffer)->opaque))
+  if (td->request.digestOpaque[0]
+      && strcmp (td->request.digestOpaque,
+                 ((HttpUserData*) td->connection->protocolBuffer)->opaque))
     return 0;
 
   /*! If is not equal return 0.  */
@@ -540,7 +541,8 @@ u_long Http::checkDigest ()
 
   md5.init ();
   td->secondaryBuffer->setLength (0);
-  *td->secondaryBuffer << td->request.digestUsername << ":" << td->request.digestRealm
+  *td->secondaryBuffer << td->request.digestUsername << ":"
+                       << td->request.digestRealm
                        << ":" << td->securityToken.getNeededPassword ();
 
   md5.update ((char const*) td->secondaryBuffer->getBuffer (),
@@ -670,7 +672,7 @@ Http::sendHTTPResource (string& uri, int systemrequest, int onlyHeader,
       return raiseHTTPError (500);
     };
 
-  return ret;
+  return HttpDataHandler::RET_OK;
 }
 
 /*!
@@ -751,7 +753,7 @@ int Http::logHTTPaccess ()
     }
   catch (...)
     {
-      return 1;
+      return HttpDataHandler::RET_FAILURE;
     };
   return 0;
 }
@@ -762,8 +764,7 @@ int Http::logHTTPaccess ()
 int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
                              u_long nbtr, u_long id)
 {
-  int retvalue = -1;
-  int ret = 0;
+  int ret = -1;
   int validRequest;
 
   /* Dimension of the POST data. */
@@ -805,7 +806,7 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
       td->response.httpStatus = 200;
 
       /*
-       * If the connection must be removed, remove it.
+       * The connection should be removed.
        */
       if (td->connection->getToRemove ())
         {
@@ -813,11 +814,12 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
             {
               /* Remove the connection from the list.  */
             case Connection::REMOVE_OVERLOAD:
-              retvalue = raiseHTTPError (503);
+              ret = raiseHTTPError (503);
               logHTTPaccess ();
               return ClientsThread::DELETE_CONNECTION;
 
             default:
+              logHTTPaccess ();
               return ClientsThread::DELETE_CONNECTION;
             }
         }
@@ -839,7 +841,7 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
       /* If the validRequest cointains an error code send it to the user.  */
       if (validRequest != 200)
         {
-          retvalue = raiseHTTPError (validRequest);
+          ret = raiseHTTPError (validRequest);
           logHTTPaccess ();
           return ClientsThread::DELETE_CONNECTION;
         }
@@ -881,7 +883,6 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
           (!td->request.cmd.compare ("PUT")) ||
           (dynamicCommand && dynamicCommand->acceptData ()))
         {
-          int ret;
           int httpErrorCode;
 
           /* Be sure that the client can handle the 100 status code.  */
@@ -905,12 +906,7 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
             }
           else if (ret)
             {
-              int retvalue = raiseHTTPError (httpErrorCode);
-
-              logHTTPaccess ();
-
-              return retvalue ? ClientsThread::KEEP_CONNECTION
-                      : ClientsThread::DELETE_CONNECTION;
+              ret = raiseHTTPError (httpErrorCode);
             }
         }
       else
@@ -920,7 +916,7 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
         }
 
       /* If return value is not configured propertly.  */
-      if (retvalue == -1)
+      if (ret < 0)
         {
           /*
            * How is expressly said in the RFC2616 a client that sends an
@@ -1035,55 +1031,38 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
            *Check if there is a limit for the number of connections in the
            *virtual host A value of zero means no limit.
            */
-          {
-            const char* val = td->securityToken.getData ("MAX_CONNECTIONS",
-                                                    MYSERVER_VHOST_CONF
-                                                   | MYSERVER_SERVER_CONF,
-                                                         NULL);
-
-            if (val)
-              {
-                u_long limit = (u_long) atoi (val);
-                if (limit && (u_long) a->host->getRef () >= limit)
-                  {
-                    retvalue = raiseHTTPError (500);
-                    logHTTPaccess ();
-                    return retvalue ? ClientsThread::KEEP_CONNECTION
-                                    : ClientsThread::DELETE_CONNECTION;
-                  }
-              }
-          }
+          const char* val = td->securityToken.getData ("MAX_CONNECTIONS",
+                                                       MYSERVER_VHOST_CONF
+                                                       | MYSERVER_SERVER_CONF,
+                                                       NULL);
+          if (val)
+            {
+              u_long limit = (u_long) atoi (val);
+              if (limit && (u_long) a->host->getRef () >= limit)
+                ret = raiseHTTPError (500);
+            }
 
-          if (!td->request.isKeepAlive ())
-            retvalue = ClientsThread::DELETE_CONNECTION;
-          else
+          /* Support for HTTP pipelining.  */
+          if (contentLength == 0)
             {
-              /* Support for HTTP pipelining.  */
-              if (contentLength == 0)
-                {
-                  /*  connectionBuffer is 8 KB, so don't copy more bytes.  */
-                  u_long bufferStrLen = strlen (td->buffer->getBuffer ());
-                  u_long remainingData = 0;
+              /*  connectionBuffer is 8 KB, so don't copy more bytes.  */
+              u_long bufferStrLen = strlen (td->buffer->getBuffer ());
+              u_long remainingData = 0;
 
-                  if (bufferStrLen - td->nHeaderChars >= MYSERVER_KB (8))
-                    remainingData = MYSERVER_KB (8);
-                  else
-                    remainingData = bufferStrLen - td->nHeaderChars;
+              if (bufferStrLen - td->nHeaderChars >= MYSERVER_KB (8))
+                remainingData = MYSERVER_KB (8);
+              else
+                remainingData = bufferStrLen - td->nHeaderChars;
 
-                  if (remainingData)
-                    {
-                      const char *data = (td->buffer->getBuffer ()
-                                          + td->nHeaderChars);
-                      u_long toCopy = nbtr - td->nHeaderChars;
+              if (remainingData)
+                {
+                  const char *data = (td->buffer->getBuffer ()
+                                      + td->nHeaderChars);
+                  u_long toCopy = nbtr - td->nHeaderChars;
 
-                      a->getConnectionBuffer ()->setBuffer (data, toCopy);
-                      retvalue = ClientsThread::INCOMPLETE_REQUEST_NO_WAIT;
-                    }
-                  else
-                    retvalue = ClientsThread::KEEP_CONNECTION;
+                  a->getConnectionBuffer ()->setBuffer (data, toCopy);
+                  return ClientsThread::INCOMPLETE_REQUEST_NO_WAIT;
                 }
-              else
-                retvalue = ClientsThread::KEEP_CONNECTION;
             }
 
           /*
@@ -1106,50 +1085,41 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
                   {
                     int handlerRet = (*handlers)[i]->updateMulticast (getStaticData (),
                                                                       msg, td);
-                    if (handlerRet == 1)
+
+                    if (handlerRet == ClientsThread::DELETE_CONNECTION)
                       {
-                        ret = 1;
-                        retvalue = ClientsThread::DELETE_CONNECTION;
+                        ret = ClientsThread::DELETE_CONNECTION;
                         break;
                       }
-                    else if (handlerRet == 2)
+                    else if (handlerRet == ClientsThread::KEEP_CONNECTION)
                       {
-                        ret = 1;
-                        retvalue = ClientsThread::KEEP_CONNECTION;
+                        ret = ClientsThread::KEEP_CONNECTION;
                         break;
                       }
-
                   }
               }
           }
 
-          if (!ret)
+          if (ret < 0)
             {
               if (!allowMethod (td->request.cmd.c_str ()))
                 return raiseHTTPError (401);
 
-              /* GET REQUEST.  */
               if (!td->request.cmd.compare ("GET"))
                 ret = sendHTTPResource (td->request.uri);
-                /* POST REQUEST.  */
               else if (!td->request.cmd.compare ("POST"))
                 ret = sendHTTPResource (td->request.uri);
-                /* HEAD REQUEST.  */
               else if (!td->request.cmd.compare ("HEAD"))
                 {
                   td->onlyHeader = 1;
                   ret = sendHTTPResource (td->request.uri, 0, 1);
                 }
-                /* DELETE REQUEST.  */
               else if (!td->request.cmd.compare ("DELETE"))
                 ret = deleteHTTPRESOURCE (td->request.uri, 0, 1);
-                /* PUT REQUEST.  */
               else if (!td->request.cmd.compare ("PUT"))
                 ret = putHTTPRESOURCE (td->request.uri, 0, 1);
-                /* OPTIONS REQUEST.  */
               else if (!td->request.cmd.compare ("OPTIONS"))
                 ret = optionsHTTPRESOURCE (td->request.uri, 0);
-                /* TRACE REQUEST.  */
               else if (!td->request.cmd.compare ("TRACE"))
                 ret = traceHTTPRESOURCE (td->request.uri, 0);
               else
@@ -1161,13 +1131,10 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
                   if (!dynamicCommand)
                     ret = raiseHTTPError (501);
                   else
-                    retvalue = dynamicCommand->send (td, a, td->request.uri, 0,
-                                                     0, 0)
-                      ? ClientsThread::KEEP_CONNECTION
-                      : ClientsThread::DELETE_CONNECTION;
+                    ret = dynamicCommand->send (td, a, td->request.uri, 0,
+                                                0, 0);
                 }
             }
-          logHTTPaccess ();
         }
 
       /* If the inputData file was not closed close it.  */
@@ -1184,22 +1151,24 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
           FilesUtility::deleteFile (td->outputDataPath);
         }
 
+      bool keepalive = false;
       HttpRequestHeader::Entry *connection = td->request.other.get
                                                        ("Connection");
       if (connection)
-        ret &= !stringcmpi (connection->value->c_str (), "keep-alive");
+        keepalive = !stringcmpi (connection->value->c_str (), "keep-alive");
+
+      logHTTPaccess ();
+
+      if (ret == HttpDataHandler::RET_OK && keepalive)
+        return ClientsThread::KEEP_CONNECTION;
       else
-        ret = 0;
+        return ClientsThread::DELETE_CONNECTION;
 
-      return (ret && retvalue != ClientsThread::DELETE_CONNECTION)
-              ? retvalue
-              : ClientsThread::DELETE_CONNECTION;
     }
   catch (...)
     {
-
       td->connection->host->warningsLogWrite (_("HTTP: internal error"));
-      return raiseHTTPError (500);
+      raiseHTTPError (500);
       logHTTPaccess ();
       return ClientsThread::DELETE_CONNECTION;
     }
@@ -1252,7 +1221,7 @@ int Http::requestAuthorization ()
           if (!td->connection->protocolBuffer)
             {
               sendHTTPhardError500 ();
-              return 0;
+              return HttpDataHandler::RET_FAILURE;
             }
           ((HttpUserData*) (td->connection->protocolBuffer))->reset ();
         }
@@ -1311,9 +1280,10 @@ int Http::requestAuthorization ()
                                     td->secondaryBuffer->getLength (), 0) == -1)
     {
       td->connection->host->warningsLogWrite (_("HTTP: socket error"));
-      return 0;
+      return HttpDataHandler::RET_FAILURE;
     }
-  return 1;
+
+  return HttpDataHandler::RET_OK;
 }
 
 /*!
@@ -1413,7 +1383,6 @@ int Http::raiseHTTPError (int ID)
             td->connection->host->warningsLogWrite (
                _("HTTP: The specified error page: %s does not exist"),
                errorFile.str ().c_str ());
-
         }
 
       HttpErrors::getErrorMessage (ID, errorMessage);
@@ -1441,22 +1410,22 @@ int Http::raiseHTTPError (int ID)
 
       if (HttpHeaders::sendHeader (td->response, *td->connection->socket,
                                    *td->buffer, td))
-        return 0;
+        return 1;
 
       if (errorBodyLength
           && (td->connection->socket->send (errorBodyMessage.str ().c_str (),
                                             errorBodyLength, 0) < 0))
         {
           td->connection->host->warningsLogWrite (_("HTTP: socket error"));
-          return 0;
+          return HttpDataHandler::RET_FAILURE;
         }
 
-      return 1;
+      return HttpDataHandler::RET_OK;
     }
   catch (...)
     {
       td->connection->host->warningsLogWrite (_("HTTP: internal error"));
-      return 0;
+      return HttpDataHandler::RET_FAILURE;
     }
 }
 
@@ -1507,12 +1476,14 @@ Internal Server Error\n\
   *td->secondaryBuffer << "\r\n\r\n";
 
   if (td->connection->socket->send (td->secondaryBuffer->getBuffer (),
-                                    (u_long) td->secondaryBuffer->getLength (), 0) != -1)
-    {
-      if (!td->onlyHeader)
-        td->connection->socket->send (hardHTML, (u_long) strlen (hardHTML), 0);
-    }
-  return 0;
+                                    (u_long) td->secondaryBuffer->getLength (),
+                                    0) < 0)
+    return HttpDataHandler::RET_FAILURE;
+
+  if (!td->onlyHeader)
+    td->connection->socket->send (hardHTML, (u_long) strlen (hardHTML), 0);
+
+  return HttpDataHandler::RET_FAILURE;
 }
 
 /*!
@@ -1649,12 +1620,7 @@ int Http::processDefaultFile (string& uri, int permissions, int onlyHeader)
                 nUrl << "?" << td->request.uriOpts;
 
               /* Send a redirect to the new location.  */
-              if (sendHTTPRedirect (nUrl.str ().c_str ()))
-                ret = 1;
-              else
-                ret = 0;
-
-              return ret;
+              return sendHTTPRedirect (nUrl.str ().c_str ());
             }
         }
     }
@@ -1695,14 +1661,13 @@ int Http::sendHTTPRedirect (const char *newURL)
   *td->secondaryBuffer << time
           << "\r\n\r\n";
   if (td->connection->socket->send (td->secondaryBuffer->getBuffer (),
-                                    (int) td->secondaryBuffer->getLength (), 0) == -1)
+                                    (int) td->secondaryBuffer->getLength (), 0) < 0)
     {
       td->connection->host->warningsLogWrite (_("HTTP: socket error"));
-      return 0;
+      return HttpDataHandler::RET_FAILURE;
     }
 
-
-  return 1;
+  return HttpDataHandler::RET_OK;
 }
 
 /*!
@@ -1728,12 +1693,13 @@ int Http::sendHTTPNonModified ()
   *td->secondaryBuffer << "Date: " << time << "\r\n\r\n";
 
   if (td->connection->socket->send (td->secondaryBuffer->getBuffer (),
-                                    (int) td->secondaryBuffer->getLength (), 0) == -1)
+                                    (int) td->secondaryBuffer->getLength (), 0) < 0)
     {
       td->connection->host->warningsLogWrite (_("HTTP: socket error"));
-      return 0;
+      return HttpDataHandler::RET_FAILURE;
     }
-  return 1;
+
+  return HttpDataHandler::RET_OK;
 }
 
 /*!
@@ -1742,9 +1708,7 @@ int Http::sendHTTPNonModified ()
 int Http::sendAuth ()
 {
   if (td->connection->getnTries () > 2)
-    {
-      return raiseHTTPError (401);
-    }
+    return raiseHTTPError (401);
   else
     {
       td->connection->incnTries ();

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

Summary of changes:
 myserver/include/protocol/http/http_data_handler.h |   10 +-
 myserver/src/http_handler/cgi/cgi.cpp              |   18 +-
 myserver/src/http_handler/fastcgi/fastcgi.cpp      |   93 ++++----
 myserver/src/http_handler/http_dir/http_dir.cpp    |    9 +-
 myserver/src/http_handler/http_file/http_file.cpp  |  102 +++++----
 myserver/src/http_handler/isapi/isapi.cpp          |  239 ++++++++++----------
 myserver/src/http_handler/mscgi/mscgi.cpp          |   36 ++--
 myserver/src/http_handler/proxy/proxy.cpp          |  120 +++++-----
 myserver/src/http_handler/scgi/scgi.cpp            |   59 +++---
 myserver/src/http_handler/wincgi/wincgi.cpp        |   76 +++----
 myserver/src/protocol/http/http.cpp                |  200 +++++++----------
 11 files changed, 462 insertions(+), 500 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Nov 06 16:47:20 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N6WeO-0006xt-3q
	for mharc-myserver-commit@gnu.org; Fri, 06 Nov 2009 16:47:20 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N6WeL-0006vz-RA
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 16:47:17 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N6WeJ-0006tM-1i
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 16:47:17 -0500
Received: from [199.232.76.173] (port=51994 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N6WeI-0006t1-Nx
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 16:47:14 -0500
Received: from savannah.gnu.org ([199.232.41.3]:48096 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 1N6WeH-0006xS-DB
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 16:47:14 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N6WeG-0004go-FP
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 21:47:12 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N6WeD-0004g9-VK
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 21:47:12 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 62e32877f1bbf2e92ecab11d88ff30eb3c5713cf
X-Git-Newrev: 9f1c92dd0e26be61966e575160fd19b4f778cf55
Message-Id: <E1N6WeD-0004g9-VK@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Fri, 06 Nov 2009 21:47:10 +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. 0_9-369-g9f1c92d
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, 06 Nov 2009 21:47:18 -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  9f1c92dd0e26be61966e575160fd19b4f778cf55 (commit)
       via  acd88b22484af18820aac9d319623708110fb11b (commit)
       via  ad8d6493d58bbf648d1565e00daeeb0bfe58f518 (commit)
       via  53541f6cb187e7d80f77e3156338a97b40c1d60e (commit)
      from  62e32877f1bbf2e92ecab11d88ff30eb3c5713cf (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 9f1c92dd0e26be61966e575160fd19b4f778cf55
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Nov 6 22:41:56 2009 +0100

    Use what buildHTTPResponseHeader returns in place of strlen on the buffer.
    
    Add a new test case to ensure the returned value is the same to the length
    computed by strlen.

diff --git a/myserver/src/protocol/http/http_headers.cpp b/myserver/src/protocol/http/http_headers.cpp
index 36344d3..c1031b6 100644
--- a/myserver/src/protocol/http/http_headers.cpp
+++ b/myserver/src/protocol/http/http_headers.cpp
@@ -886,9 +886,8 @@ int HttpHeaders::sendHeader (HttpResponseHeader &response, Stream &stream,
   if (ctx == NULL || (!ctx->appendOutputs && !ctx->headerSent))
     {
       u_long nbw;
-      buildHTTPResponseHeader (memBuf.getBuffer (), &response);
-      ret = stream.write (memBuf.getBuffer (), strlen (memBuf.getBuffer ()),
-                          &nbw);
+      u_long len = buildHTTPResponseHeader (memBuf.getBuffer (), &response);
+      ret = stream.write (memBuf.getBuffer (), len, &nbw);
 
       if (ctx)
         ctx->headerSent = true;
diff --git a/myserver/tests/test_http_response.cpp b/myserver/tests/test_http_response.cpp
index 62fe6a9..3afd4a0 100644
--- a/myserver/tests/test_http_response.cpp
+++ b/myserver/tests/test_http_response.cpp
@@ -34,12 +34,13 @@ using namespace std;
 
 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 (TestHttpResponse);
+  CPPUNIT_TEST (testSimpleHeader);
+  CPPUNIT_TEST (testInvalidResponse);
+  CPPUNIT_TEST (testJoinField);
+  CPPUNIT_TEST (testValidResponse);
+  CPPUNIT_TEST (testReset);
+  CPPUNIT_TEST (testResponseLength);
   CPPUNIT_TEST_SUITE_END ();
 
 public:
@@ -103,7 +104,6 @@ ToJoin: b\r\n";
     CPPUNIT_ASSERT (ret != 0);
   }
 
-
   void testInvalidResponse ()
   {
     HttpResponseHeader header;
@@ -115,14 +115,11 @@ ToJoin: b\r\n";
     ret = HttpHeaders::validHTTPResponse (responseStr,
                                          &nLinesptr,
                                          &ncharsptr);
-
     CPPUNIT_ASSERT_EQUAL (ret, 0);
 
-
     ret = HttpHeaders::validHTTPResponse (NULL,
                                          &nLinesptr,
                                          &ncharsptr);
-
     CPPUNIT_ASSERT_EQUAL (ret, 0);
   }
 
@@ -157,8 +154,15 @@ ToJoin: b\r\n";
     CPPUNIT_ASSERT_EQUAL (header.getStatusType (), HttpResponseHeader::SERVER_ERROR);
   }
 
-
+  void testResponseLength ()
+  {
+    char buffer[512];
+    HttpResponseHeader response;
+    response.setValue ("foo", "bar");
+    response.setValue ("baz", "foo");
+    u_long len = HttpHeaders::buildHTTPResponseHeader (buffer, &response);
+    CPPUNIT_ASSERT_EQUAL (len, (u_long) strlen (buffer));
+  }
 };
 
-
 CPPUNIT_TEST_SUITE_REGISTRATION ( TestHttpResponse );



commit acd88b22484af18820aac9d319623708110fb11b
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Nov 6 22:30:29 2009 +0100

    Update plugins to recent interfaces changes

diff --git a/plugins/src/http_checker/http_checker.cpp b/plugins/src/http_checker/http_checker.cpp
index 2019bea..597df4c 100644
--- a/plugins/src/http_checker/http_checker.cpp
+++ b/plugins/src/http_checker/http_checker.cpp
@@ -15,18 +15,20 @@ 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>
+
+#include <Python.h>
+
 #include <string.h>
 #include <include/server/server.h>
 #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
-#define EXPORTABLE(x) x _declspec(dllexport)
+# define EXPORTABLE(x) x _declspec(dllexport)
 #else
-#define EXPORTABLE(x) extern "C" x
+# define EXPORTABLE(x) extern "C" x
 #endif
 
 typedef int (*executePROC)(char*, u_long);
@@ -231,21 +233,13 @@ EXPORTABLE(char*) name(char* name, u_long len)
 EXPORTABLE(int) load(void* server,void* parser)
 {
   Server* serverInstance = (Server*)server;
-  HttpStaticData* staticData =(HttpStaticData*) serverInstance->getGlobalData("http-static");
   string msg("new-http-request");
   string pythonName("python");
   Plugin* python;
   MainConfiguration* configuration;
   xmlDocPtr xmlDoc;
 
-  if(!staticData)
-    {
-      serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("HttpChecker: invalid HTTP static data"));
-      return -1;
-    }
-
   python = serverInstance->getPluginsManager()->getPlugin(pythonName);
-
   if(!python)
     {
       serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("HttpChecker: cannot find executors::python"));
@@ -253,13 +247,16 @@ EXPORTABLE(int) load(void* server,void* parser)
     }
   observer.setPythonExecutor(python);
 
-  staticData->addMulticast(msg, &observer);
+  string httpStr ("http");
+  Protocol *p = serverInstance->getProtocolsManager ()->getProtocol (httpStr);
+  static_cast<HttpProtocol*>(p)->addMulticast(msg, &observer);
 
   init = (INIT_MODULE) python->getDirectMethod((char*)"initModule");
 
   if(!init)
     {
-      serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("HttpChecker: cannot find method initModule in executors::python"));
+      serverInstance->log (MYSERVER_LOG_MSG_ERROR,
+         _("HttpChecker: cannot find method initModule in executors::python"));
       return -1;
     }
 
diff --git a/plugins/src/python_http_handler/python_http_handler.cpp b/plugins/src/python_http_handler/python_http_handler.cpp
index 508e824..b15159d 100644
--- a/plugins/src/python_http_handler/python_http_handler.cpp
+++ b/plugins/src/python_http_handler/python_http_handler.cpp
@@ -16,21 +16,23 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 #include <stdafx.h>
 #include <string.h>
+
+#include <Python.h>
+
 #include <include/server/server.h>
 #include <include/protocol/http/http_data_handler.h>
 #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>
 
 
 static Server* serverInstance;
 
 #ifdef WIN32
-#define EXPORTABLE(x) x _declspec(dllexport)
+# define EXPORTABLE(x) x _declspec(dllexport)
 #else
-#define EXPORTABLE(x) extern "C" x
+# define EXPORTABLE(x) extern "C" x
 #endif
 
 typedef int (*executePROC)(char*, u_long);
@@ -45,39 +47,39 @@ class ThreadData : public HttpDataHandler
   FiltersChain chain;
 public:
 
-  ThreadData(HttpThreadContext* td)
+  ThreadData (HttpThreadContext* td)
   {
     this->td = td;
     ret = 0;
   }
 
-	HttpThreadContext* getHttpThreadContext(){return td;}
-	int getRet(){return ret;}
+	HttpThreadContext* getHttpThreadContext (){return td;}
+	int getRet (){return ret;}
 
-	void setHttpThreadContext(HttpThreadContext* td){this->td = td;}
-	void setRet(int r){ret = r;}
+	void setHttpThreadContext (HttpThreadContext* td){this->td = td;}
+	void setRet (int r){ret = r;}
 
 
-	virtual int send(HttpThreadContext*, ConnectionPtr s,
-                   const char* exec, const char* cmdLine,
-                   int execute, int onlyHeader)
+	virtual int send (HttpThreadContext*, ConnectionPtr s,
+                    const char* exec, const char* cmdLine,
+                    int execute, int onlyHeader)
   {
     return 0;
   }
 
-  int send(char* buffer, u_long size)
+  int send (char* buffer, u_long size)
   {
-    return appendDataToHTTPChannel(td, buffer, size, 0, &chain, 0, useChunks);
+    return appendDataToHTTPChannel (td, buffer, size, 0, &chain,
+                                    0, useChunks);
   }
 
-  void check()
+  void check ()
   {
-    checkDataChunks(td, &keepalive, &useChunks);
-    chain.setProtocol(td->http);
-    chain.setProtocolData(td);
-    chain.setStream(td->connection->socket);
+    checkDataChunks (td, &keepalive, &useChunks);
+    chain.setProtocol (td->http);
+    chain.setProtocolData (td);
+    chain.setStream (td->connection->socket);
   }
-
 };
 
 static HashMap<ThreadID, ThreadData*> pythonThreadData;
@@ -87,87 +89,86 @@ typedef int (*INIT_MODULE)(char* name, PyMethodDef methods[]);
 static INIT_MODULE init;
 
 
-static ThreadData* getThreadData()
+static ThreadData* getThreadData ()
 {
 	ThreadID tid = Thread::threadID();
 	ThreadData* ret;
-	mutex.lock();
-	ret = pythonThreadData.get(tid);
-	mutex.unlock();
+	mutex.lock ();
+	ret = pythonThreadData.get (tid);
+	mutex.unlock ();
 	return ret;
 }
 
-static HttpThreadContext* getThreadContext()
+static HttpThreadContext* getThreadContext ()
 {
-	return getThreadData()->getHttpThreadContext();
+	return getThreadData ()->getHttpThreadContext ();
 }
 
-static PyObject *get_remote_addr(PyObject *self, PyObject *args)
+static PyObject *get_remote_addr (PyObject *self, PyObject *args)
 {
-	HttpThreadContext* context = getThreadContext();
-  return Py_BuildValue((char*)"s", context->connection->getIpAddr());
+	HttpThreadContext* context = getThreadContext ();
+  return Py_BuildValue((char*)"s", context->connection->getIpAddr ());
 }
 
-static PyObject *get_remote_port(PyObject *self, PyObject *args)
+static PyObject *get_remote_port (PyObject *self, PyObject *args)
 {
-	HttpThreadContext* context = getThreadContext();
-  return Py_BuildValue((char*)"i", context->connection->getPort());
+	HttpThreadContext* context = getThreadContext ();
+  return Py_BuildValue((char*)"i", context->connection->getPort ());
 }
 
-static PyObject *get_local_addr(PyObject *self, PyObject *args)
+static PyObject *get_local_addr (PyObject *self, PyObject *args)
 {
-	HttpThreadContext* context = getThreadContext();
-  return Py_BuildValue((char*)"s", context->connection->getLocalIpAddr());
+	HttpThreadContext* context = getThreadContext ();
+  return Py_BuildValue ((char*)"s", context->connection->getLocalIpAddr ());
 }
 
-static PyObject *get_local_port(PyObject *self, PyObject *args)
+static PyObject *get_local_port (PyObject *self, PyObject *args)
 {
-	HttpThreadContext* context = getThreadContext();
-  return Py_BuildValue((char*)"i", context->connection->getLocalPort());
+	HttpThreadContext* context = getThreadContext ();
+  return Py_BuildValue ((char*)"i", context->connection->getLocalPort ());
 }
 
 
-static PyObject *get_response_header(PyObject *self, PyObject *args)
+static PyObject *get_response_header (PyObject *self, PyObject *args)
 {
 	char *header;
 	string value;
-	if (!PyArg_ParseTuple(args, (char*)"s", &header))
+	if (!PyArg_ParseTuple (args, (char*)"s", &header))
 		return NULL;
 
-	HttpThreadContext* context = getThreadContext();
+	HttpThreadContext* context = getThreadContext ();
 
-	context->response.getValue(header, &value);
+	context->response.getValue (header, &value);
 
-	return Py_BuildValue((char*)"s", value.c_str());
+	return Py_BuildValue ((char*)"s", value.c_str());
 }
 
-static PyObject *get_request_header(PyObject *self, PyObject *args)
+static PyObject *get_request_header (PyObject *self, PyObject *args)
 {
 	char *header;
 	string value;
 	if (!PyArg_ParseTuple(args, (char*)"s", &header))
 		return NULL;
 
-	HttpThreadContext* context = getThreadContext();
+	HttpThreadContext* context = getThreadContext ();
 
-	context->request.getValue(header, &value);
+	context->request.getValue (header, &value);
 
-	return Py_BuildValue((char*)"s", value.c_str());
+	return Py_BuildValue ((char*)"s", value.c_str ());
 }
 
-static PyObject *log_server_error(PyObject *self, PyObject *args)
+static PyObject *log_server_error (PyObject *self, PyObject *args)
 {
 	char *msg;
 
 	if (!PyArg_ParseTuple(args, (char*)"s", &msg))
 		return NULL;
 
-  serverInstance->log(MYSERVER_LOG_MSG_ERROR, "%s", msg);
-
+  serverInstance->log (MYSERVER_LOG_MSG_ERROR, "%s", msg);
 	return NULL;
 }
 
-static PyObject *set_response_header(PyObject *self, PyObject *args)
+static PyObject *set_response_header (PyObject *self, PyObject *args)
 {
 	char *header;
 	char *value;
@@ -175,19 +176,19 @@ static PyObject *set_response_header(PyObject *self, PyObject *args)
 	if (!PyArg_ParseTuple(args, (char*)"ss", &header, &value))
 		return NULL;
 
-	HttpThreadContext* context = getThreadContext();
+	HttpThreadContext* context = getThreadContext ();
 
-	string *retS =  context->response.setValue(header, value);
+	string *retS =  context->response.setValue (header, value);
 
-  if(retS)
-  {
-    ret = retS->c_str();
-    return Py_BuildValue((char*)"s", ret);
-  }
-  return Py_BuildValue((char*)"s", "");
+  if (retS)
+    {
+      ret = retS->c_str ();
+      return Py_BuildValue ((char*)"s", ret);
+    }
+  return Py_BuildValue ((char*)"s", "");
 }
 
-static PyObject *set_request_header(PyObject *self, PyObject *args)
+static PyObject *set_request_header (PyObject *self, PyObject *args)
 {
 	char *header;
 	char *value;
@@ -195,123 +196,120 @@ static PyObject *set_request_header(PyObject *self, PyObject *args)
 	if (!PyArg_ParseTuple(args, (char*)"ss", &header, &value))
 		return NULL;
 
-	HttpThreadContext* context = getThreadContext();
+	HttpThreadContext* context = getThreadContext ();
 
-	string *retS =  context->request.setValue(header, value);
-
-  if(retS)
-  {
-    ret = retS->c_str();
-    return Py_BuildValue((char*)"s", ret);
-  }
-  return Py_BuildValue((char*)"s", "");
+	string *retS =  context->request.setValue (header, value);
+  if (retS)
+    {
+      ret = retS->c_str ();
+      return Py_BuildValue ((char*)"s", ret);
+    }
+  return Py_BuildValue ((char*)"s", "");
 }
 
-static PyObject *send_header(PyObject *self, PyObject *args)
+static PyObject *send_header (PyObject *self, PyObject *args)
 {
-	ThreadData *tdata = getThreadData();
-	HttpThreadContext* td = tdata->getHttpThreadContext();
+	ThreadData *tdata = getThreadData ();
+	HttpThreadContext* td = tdata->getHttpThreadContext ();
 
-  tdata->check();
+  tdata->check ();
 
-  HttpHeaders::buildHTTPResponseHeader(td->buffer->getBuffer(),
-                                       &(td->response));
+  HttpHeaders::buildHTTPResponseHeader (td->buffer->getBuffer(),
+                                        &(td->response));
 
-  if(td->connection->socket->send(td->buffer->getBuffer(),
-             (u_long)strlen(td->buffer->getBuffer()), 0)
-     == SOCKET_ERROR)
-		{
-      return Py_BuildValue((char*)"i", 1);
-		}
+  if(td->connection->socket->send (td->buffer->getBuffer(),
+                                  (u_long)strlen(td->buffer->getBuffer()), 0)
+     < 0)
+    return Py_BuildValue((char*)"i", 1);
 
-  tdata->setRet(1);
+  tdata->setRet (1);
 
-  return Py_BuildValue((char*)"i", 0);
+  return Py_BuildValue ((char*)"i", 0);
 }
 
-static PyObject *get_document_root(PyObject *self, PyObject *args)
+static PyObject *get_document_root (PyObject *self, PyObject *args)
 {
 	char *data;
 	if (!PyArg_ParseTuple(args, (char*)"s", &data))
 		return NULL;
 
-	HttpThreadContext* context = getThreadContext();
+	HttpThreadContext* context = getThreadContext ();
 
-	return Py_BuildValue((char*)"s", context->getVhostDir());
+	return Py_BuildValue ((char*)"s", context->getVhostDir ());
 }
 
-static PyObject *send_data(PyObject *self, PyObject *args)
+static PyObject *send_data (PyObject *self, PyObject *args)
 {
 	char *data;
   u_long size = 0;
 	if (!PyArg_ParseTuple(args, (char*)"s", &data))
 		return NULL;
 
-  size = strlen(data);
+  size = strlen (data);
 
-	ThreadData *tdata = getThreadData();
+	ThreadData *tdata = getThreadData ();
 
-  if(tdata->send(data, size))
-    return Py_BuildValue((char*)"i", 0);
+  if (tdata->send(data, size))
+    return Py_BuildValue ((char*)"i", 0);
 
-  tdata->setRet(1);
+  tdata->setRet (1);
 
 	return Py_BuildValue((char*)"i", size);
 }
 
-static PyObject *end_send_data(PyObject *, PyObject *)
+static PyObject *end_send_data (PyObject *, PyObject *)
 {
-	ThreadData *tdata = getThreadData();
+	ThreadData *tdata = getThreadData ();
 
-  tdata->send(0, 0);
+  tdata->send (0, 0);
 
-	return Py_BuildValue((char*)"i", 0);
+	return Py_BuildValue ((char*)"i", 0);
 }
 
-static PyObject *raise_error(PyObject *self, PyObject *args)
+static PyObject *raise_error (PyObject *self, PyObject *args)
 {
 	int error;
 	if (!PyArg_ParseTuple(args, (char*)"i", &error))
 		return NULL;
 
-	ThreadData* data = getThreadData();
+	ThreadData* data = getThreadData ();
 
 	if(data->getRet())
 		return NULL;
 
-	data->getHttpThreadContext()->http->raiseHTTPError(error);
+	data->getHttpThreadContext ()->http->raiseHTTPError (error);
 
-	data->setRet(1);
+	data->setRet (1);
 
-	return Py_BuildValue((char*)"s", "");
+	return Py_BuildValue ((char*)"s", "");
 }
 
 
-static PyObject *is_ssl(PyObject *self, PyObject *args)
+static PyObject *is_ssl (PyObject *self, PyObject *args)
 {
-	HttpThreadContext* context = getThreadContext();
-	int isSsl = context->http->getProtocolOptions() & PROTOCOL_USES_SSL;
+	HttpThreadContext* context = getThreadContext ();
+	int isSsl = context->http->getProtocolOptions () & Protocol::SSL;
 
-	return Py_BuildValue((char*)"b", isSsl);
+	return Py_BuildValue ((char*)"b", isSsl);
 }
 
 
-static PyObject *send_redirect(PyObject *self, PyObject *args)
+static PyObject *send_redirect (PyObject *self, PyObject *args)
 {
 	char* dest;
 	if (!PyArg_ParseTuple(args, (char*)"s", &dest))
 		return NULL;
 
-	ThreadData* data = getThreadData();
+	ThreadData* data = getThreadData ();
 
-	if(data->getRet())
+	if (data->getRet())
 		return NULL;
 
-	data->getHttpThreadContext()->http->sendHTTPRedirect(dest);
+	data->getHttpThreadContext ()->http->sendHTTPRedirect (dest);
 
-	data->setRet(1);
+	data->setRet (1);
 
-	return Py_BuildValue((char*)"s", dest);
+	return Py_BuildValue ((char*)"s", dest);
 }
 
 static PyMethodDef PythonHttpHandlerMethods[] = {
@@ -344,46 +342,49 @@ class HttpObserver : public Multicast<string, void*, int>
 	};
 public:
 
-	virtual int updateMulticast (MulticastRegistry<string, void*, int>* reg, string& msg, void* arg)
+	virtual int updateMulticast (MulticastRegistry<string, void*, int>* reg,
+                               string& msg, void* arg)
 	{
 		HttpThreadContext *td = (HttpThreadContext*)arg;
-		ThreadID tid = Thread::threadID();
+		ThreadID tid = Thread::threadID ();
 		list<Item>::iterator it;
-		mutex.lock();
-		ThreadData threadData(td);
-		pythonThreadData.put(tid, &threadData);
-		mutex.unlock();
-
-		init((char*)"python_http_handler_internal", PythonHttpHandlerMethods);
-
-		for(it = rules.begin(); it != rules.end(); it++)
-		{
-			if((*it).file)
-			{
-				executeFromFilePROC execute = ((executeFromFilePROC)python->getDirectMethod((char*)"executeFromFile"));
-				if (execute)
-				  execute((char*)(*it).data.c_str());
-			}else
-			{
-				executePROC execute = ((executePROC)python->getDirectMethod((char*)"execute"));
-
-				if (execute)
-				  execute((char*)(*it).data.c_str(), (*it).data.length());
-			}
-		}
-		return threadData.getRet();
+		mutex.lock ();
+		ThreadData threadData (td);
+		pythonThreadData.put (tid, &threadData);
+		mutex.unlock ();
+
+		init ((char*)"python_http_handler_internal", PythonHttpHandlerMethods);
+
+		for (it = rules.begin (); it != rules.end (); it++)
+      {
+        if ((*it).file)
+          {
+            char *method = (char*)"executeFromFile";
+            executeFromFilePROC execute =
+              ((executeFromFilePROC)python->getDirectMethod(method);
+            if (execute)
+              execute((char*)(*it).data.c_str ());
+          }
+        else
+          {
+            executePROC execute =
+              ((executePROC)python->getDirectMethod((char*)"execute"));
+            if (execute)
+              execute ((char*)(*it).data.c_str(), (*it).data.length());
+          }
+      }
+		return threadData.getRet ();
 	}
 
 	void addRule (const char* rule, bool file)
 	{
 		Item it;
-		it.data.assign(rule);
+		it.data.assign (rule);
 		it.file = file;
-		rules.push_back(it);
+		rules.push_back (it);
 	}
 
 	void setPythonExecutor (Plugin* python){this->python = python;}
-
 private:
 	list<Item> rules;
 	Plugin* python;
@@ -403,34 +404,31 @@ EXPORTABLE(char*) name (char* name, u_long len)
 EXPORTABLE(int) load (void* server)
 {
 	serverInstance = (Server*)server;
-	HttpStaticData* staticData =(HttpStaticData*) serverInstance->getGlobalData("http-static");
 	string msg("new-http-request");
 	string pythonName("python");
 	Plugin* python;
   MainConfiguration* configuration;
 	xmlDocPtr xmlDoc;
-
-	if(!staticData)
-    {
-      serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("PythonHttpHandler: Invalid HTTP static data"));
-      return -1;
-    }
 	python = serverInstance->getPluginsManager ()->getPlugin (pythonName);
 
 	if(!python)
     {
-      serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("PythonHttpHandler: Cannot find executors::python"));
+      serverInstance->log (MYSERVER_LOG_MSG_ERROR,
+                           _("PythonHttpHandler: Cannot find python"));
       return -1;
     }
 	observer.setPythonExecutor(python);
 
-	staticData->addMulticast(msg, &observer);
+  string httpStr ("http");
+  Protocol *p = serverInstance->getProtocolsManager ()->getProtocol (httpStr);
+  static_cast<HttpProtocol*>(p)->addMulticast(msg, &observer);
 
 	init = (INIT_MODULE) python->getDirectMethod((char*)"initModule");
 
 	if(!init)
     {
-      serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("PythonHttpHandler: Cannot find method initModule in executors::python"));
+      serverInstance->log (MYSERVER_LOG_MSG_ERROR,
+      _("PythonHttpHandler: Cannot find method initModule in python"));
       return -1;
     }
 
@@ -439,16 +437,16 @@ EXPORTABLE(int) load (void* server)
   /* FIXME: DON'T DO THIS.  */
   xmlDoc = ((XmlMainConfiguration*)configuration)->getDoc ();
 
-	for(xmlNodePtr ptr = xmlDoc->children->next->children; ptr; ptr = ptr->next)
+	for (xmlNodePtr ptr = xmlDoc->children->next->children; ptr; ptr = ptr->next)
 	  {
-	    if(!xmlStrcmp(ptr->name, (const xmlChar *)"PYTHON_HTTP_HANDLER"))
+	    if (!xmlStrcmp(ptr->name, (const xmlChar *)"PYTHON_HTTP_HANDLER"))
 	      {
           bool file = false;
           xmlAttrPtr properties = ptr->properties;
           char* data = 0;
-          while(properties)
+          while (properties)
             {
-              if(!xmlStrcmp(properties->name, (const xmlChar *)"file"))
+              if (!xmlStrcmp(properties->name, (const xmlChar *)"file"))
                 {
                   if(properties->children && properties->children->content)
                     data = (char*)properties->children->content;
@@ -458,12 +456,14 @@ EXPORTABLE(int) load (void* server)
               properties = properties->next;
             }
 
-          if(!file && ptr->children && ptr->children->next && ptr->children->next->content)
+          if (!file && ptr->children && ptr->children->next
+             && ptr->children->next->content)
             data = (char*)ptr->children->next->content;
 
-          if(!data)
+          if (!data)
             {
-              serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("PythonHttpHandler: Invalid rule"));
+              serverInstance->log (MYSERVER_LOG_MSG_ERROR,
+                                   _("PythonHttpHandler: Invalid rule"));
               return -1;
             }
 
diff --git a/plugins/src/rules_checker/rules_checker.cpp b/plugins/src/rules_checker/rules_checker.cpp
index 682f29d..969ebbf 100644
--- a/plugins/src/rules_checker/rules_checker.cpp
+++ b/plugins/src/rules_checker/rules_checker.cpp
@@ -23,12 +23,11 @@
 #include "heading.h"
 
 #ifdef WIN32
-#define EXPORTABLE(x) x _declspec(dllexport)
+# define EXPORTABLE(x) x _declspec(dllexport)
 #else
-#define EXPORTABLE(x) extern "C" x
+# define EXPORTABLE(x) extern "C" x
 #endif
 
-
 class RulesCheckerObserver : public Multicast<string, void*, int>
 {
   struct Item
@@ -97,18 +96,12 @@ EXPORTABLE(char*) name (char* name, u_long len)
 EXPORTABLE(int) load (void* server)
 {
   Server* serverInstance = (Server*)server;
-  HttpStaticData* staticData =(HttpStaticData*) serverInstance->getGlobalData("http-static");
   string msg("new-http-request");
   MainConfiguration* configuration;
   xmlDocPtr xmlDoc;
-  if(!staticData)
-    {
-      serverInstance->log("RulesChecker: Invalid HTTP static data");
-      return -1;
-    }
-
-
-  staticData->addMulticast(msg, &observer);
+  string httpStr ("http");
+  Protocol *p = serverInstance->getProtocolsManager ()->getProtocol (httpStr);
+  static_cast<HttpProtocol*>(p)->addMulticast(msg, &observer);
 
   configuration = serverInstance->getConfiguration ();
 



commit ad8d6493d58bbf648d1565e00daeeb0bfe58f518
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Nov 6 22:07:03 2009 +0100

    The Server class does not store any opaque static data anymore.
    
    The methods Server::{get,set}GlobalData are not offered by Server.
    
    Store any static data related to the Http implementation in the
    HttpProtocol class.  It is shared by different Http class instances.

diff --git a/myserver/include/protocol/http/http.h b/myserver/include/protocol/http/http.h
index d50ec75..1978b68 100644
--- a/myserver/include/protocol/http/http.h
+++ b/myserver/include/protocol/http/http.h
@@ -41,33 +41,8 @@
 
 using namespace std;
 
-class HttpStaticData : public MulticastRegistry<string, void*, int>
-{
-public:
-  vector<Multicast<string, void*, int>*>* getHandlers (string& msg)
-  {
-    return MulticastRegistry<string, void*, int>::getHandlers (msg);
-  }
-
-  HttpStaticData ();
-  virtual ~HttpStaticData ();
-
-  void clear ()
-  {
-    clearMulticastRegistry ();
-    dynManagerList.clear ();
-    dynCmdManager.clear ();
-  }
-
-  u_long timeout;
-  int allowVhostMime;
-
-  DynHttpCommandManager dynCmdManager;
-  DynHttpManagerList dynManagerList;
-};
-
 /*!
- *Data used only by an HTTP user.
+ * Data used only by an HTTP user.
  */
 class HttpUserData : public ProtocolBuffer
 {
@@ -97,6 +72,7 @@ public:
   void reset ();
 };
 
+class HttpProtocol;
 
 class Http : public Protocol
 {
@@ -160,7 +136,7 @@ public:
   int logHTTPaccess ();
   int sendHTTPRedirect (const char *newURL);
   int sendHTTPNonModified ();
-  Http ();
+  Http (HttpProtocol *staticData);
   virtual ~Http ();
   virtual const char* getName (){return getNameImpl ();}
 
@@ -170,7 +146,6 @@ public:
                          u_long tid);
 
   static int loadProtocolStatic ();
-  static int unLoadProtocolStatic ();
 
   u_long getTimeout ();
   int preprocessHttpRequest (string& filename, int yetmapped,
@@ -180,10 +155,8 @@ public:
                           string& file, string &filenamePath,
                           int yetmapped, int* permissions);
 
-  static HttpStaticData* getStaticData ();
-
   SecurityToken *getSecurityToken (){return &(td->securityToken);}
-
+  HttpProtocol *getStaticData () {return staticData;}
 protected:
   int processDefaultFile (string& uri, int permissions, int onlyHeader);
 
@@ -191,13 +164,17 @@ protected:
   void clean ();
   void computeDigest (char*, char*);
   u_long checkDigest ();
+
+  HttpProtocol *staticData;
+
 };
 
 
 /*!
  *Adapter class to make Http reentrant.
  */
-class HttpProtocol : public Protocol
+class HttpProtocol : public Protocol,
+                     public MulticastRegistry<string, void*, int>
 {
 public:
   HttpProtocol ()
@@ -219,20 +196,30 @@ public:
                                  u_long auxBufLen, u_long reqLen,
                                  u_long tid)
   {
-    Http http;
+    Http http (this);
     return http.controlConnection (con, request, auxBuf, reqBufLen, auxBufLen,
                                    reqLen, tid);
   }
 
-  virtual int loadProtocol ()
-  {
-    return Http::loadProtocolStatic ();
-  }
+  virtual int loadProtocol ();
+  virtual int unLoadProtocol ();
 
-  virtual int unLoadProtocol ()
+  vector<Multicast<string, void*, int>*>* getHandlers (string& msg)
   {
-    return Http::unLoadProtocolStatic ();
+    return MulticastRegistry<string, void*, int>::getHandlers (msg);
   }
+
+  DynHttpCommandManager *getDynCmdManager (){return &dynCmdManager;}
+  DynHttpManagerList *getDynManagerList (){return &dynManagerList;}
+
+  u_long getTimeout () {return timeout;}
+  int getAllowVhostMime () {return allowVhostMime;}
+private:
+  u_long timeout;
+  int allowVhostMime;
+
+  DynHttpCommandManager dynCmdManager;
+  DynHttpManagerList dynManagerList;
 };
 
 
diff --git a/myserver/include/protocol/https/https.h b/myserver/include/protocol/https/https.h
index 3f2a896..badcb3d 100644
--- a/myserver/include/protocol/https/https.h
+++ b/myserver/include/protocol/https/https.h
@@ -27,18 +27,9 @@ class Https : public Http
 public:
   static const char* getNameImpl ();
   virtual const char* getName ();
-  Https ();
+  Https (HttpProtocol *https);
   virtual ~Https ();
 
-  static int loadProtocolStatic (XmlParser* lang)
-  {
-    return 1;
-  }
-  static int unLoadProtocolStatic (XmlParser* lang)
-  {
-    return 1;
-  }
-
 };
 
 /*!
@@ -47,9 +38,10 @@ public:
 class HttpsProtocol : public Protocol
 {
 public:
-  HttpsProtocol ()
+  HttpsProtocol (HttpProtocol *http)
   {
     protocolOptions = Protocol::SSL;
+    this->http = http;
   }
 
   virtual ~HttpsProtocol ()
@@ -67,20 +59,12 @@ public:
                                  u_long auxBufLen, u_long reqLen,
                                  u_long tid)
   {
-    Https https;
+    Https https (http);
     return https.controlConnection (con, request, auxBuf, reqBufLen, auxBufLen,
                                     reqLen, tid);
   }
-
-  virtual int loadProtocol (XmlParser* parser)
-  {
-    return Https::loadProtocolStatic (parser);
-  }
-
-  virtual int unLoadProtocol (XmlParser* parser)
-  {
-    return Https::unLoadProtocolStatic (parser);
-  }
+protected:
+  HttpProtocol *http;
 };
 
 #endif
diff --git a/myserver/include/server/server.h b/myserver/include/server/server.h
index 9a9b3e4..9740482 100644
--- a/myserver/include/server/server.h
+++ b/myserver/include/server/server.h
@@ -92,9 +92,6 @@ public:
   CachedFileFactory* getCachedFiles ();
   const char* getData (const char *name, const char *defValue = NULL);
 
-  void setGlobalData (const char* name, void* data);
-  void* getGlobalData (const char* name);
-
   FiltersFactory* getFiltersFactory ();
   int getMaxThreads ();
   const char *getUid ();
@@ -215,7 +212,6 @@ private:
   list<NodeTree<string>*> hashedDataTrees;
   HashMap<string, NodeTree<string>*> hashedData;
 
-  HashMap<string, void*> globalData;
   FiltersFactory filtersFactory;
   string uid;
   string gid;
diff --git a/myserver/src/http_handler/fastcgi/fastcgi.cpp b/myserver/src/http_handler/fastcgi/fastcgi.cpp
index c5d9adc..2e1bbd9 100644
--- a/myserver/src/http_handler/fastcgi/fastcgi.cpp
+++ b/myserver/src/http_handler/fastcgi/fastcgi.cpp
@@ -755,8 +755,9 @@ int FastCgi::handleHeader (FcgiContext* con, FiltersChain* chain, bool* response
       string *sendfile = con->td->response.getValue ("X-Sendfile", NULL);
       if (sendfile)
         {
-          HttpStaticData *staticData = con->td->http->getStaticData ();
-          HttpDataHandler *handler = staticData->dynManagerList.getHttpManager ("SEND");
+          DynHttpManagerList *m =
+            con->td->http->getStaticData ()->getDynManagerList ();
+          HttpDataHandler *handler = m->getHttpManager ("SEND");
           if (!handler)
             {
               con->td->connection->host->warningsLogWrite
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 56cb45b..2e8adc8 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -1,20 +1,19 @@
 /*
-MyServer
-Copyright (C) 2002-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/>.
- */
-
+  MyServer
+  Copyright (C) 2002-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/protocol/http/http.h>
 #include <include/protocol/http/http_headers.h>
@@ -61,19 +60,46 @@ extern "C"
 #endif
 }
 
-static HttpStaticData staticHttp;
-
-/*!
- * Get a pointer to a structure shared among all the instances.
- */
-HttpStaticData* Http::getStaticData ()
+int HttpProtocol::loadProtocol ()
 {
-  return &staticHttp;
-}
+  const char *data = NULL;
+
+  timeout = MYSERVER_SEC (15);
+  dynManagerList.addHttpManager ("SEND", new HttpFile ());
+  dynManagerList.addHttpManager ("DIR", new HttpDir ());
+  dynManagerList.addHttpManager ("CGI", new Cgi ());
+  dynManagerList.addHttpManager ("MSCGI", new MsCgi ());
+  dynManagerList.addHttpManager ("SCGI", new Scgi ());
+  dynManagerList.addHttpManager ("WINGI", new WinCgi ());
+  dynManagerList.addHttpManager ("FASTCGI", new FastCgi ());
+  dynManagerList.addHttpManager ("ISAPI", new Isapi ());
+  dynManagerList.addHttpManager ("PROXY", new Proxy ());
+
+  data = Server::getInstance ()->getData ("vhost.allow_mime");
+  if (data)
+    {
+
+      if (!strcmpi (data, "YES"))
+        allowVhostMime = 1;
+      else
+        allowVhostMime = 0;
+    }
 
-HttpStaticData::HttpStaticData () { }
+  data = Server::getInstance ()->getData ("cgi.timeout");
+  if (data)
+    timeout = MYSERVER_SEC (atoi (data));
+
+  return 1;
+}
 
-HttpStaticData::~HttpStaticData () { }
+int HttpProtocol::unLoadProtocol ()
+{
+  HttpErrors::unLoad ();
+  clearMulticastRegistry ();
+  dynManagerList.clear ();
+  dynCmdManager.clear ();
+  return 0;
+}
 
 /*!
  * Build a response for an OPTIONS request.
@@ -89,8 +115,9 @@ int Http::optionsHTTPRESOURCE (string& filename, int yetmapped)
       HttpRequestHeader::Entry *connection = td->request.other.get ("Connection");
       string methods ("OPTIONS, GET, POST, HEAD, DELETE, PUT, TRACE");
 
-      HashMap<string, DynamicHttpCommand*>::Iterator it = staticHttp.dynCmdManager.begin ();
-      while (it != staticHttp.dynCmdManager.end ())
+      HashMap<string, DynamicHttpCommand*>::Iterator it =
+        staticData->getDynCmdManager ()->begin ();
+      while (it != staticData->getDynCmdManager ()->end ())
         {
           methods.append (", ");
           methods.append ((*it)->getName ());
@@ -210,7 +237,7 @@ bool Http::allowMethod (const char *method)
  */
 u_long Http::getTimeout ()
 {
-  return staticHttp.timeout;
+  return staticData->getTimeout ();
 }
 
 /*!
@@ -649,15 +676,15 @@ Http::sendHTTPResource (string& uri, int systemrequest, int onlyHeader,
           cgiManager = "";
         }
 
-      if (td->mime && (manager = staticHttp.dynManagerList.getHttpManager (td->mime->cmdName)))
+      if (td->mime && (manager =
+          staticData->getDynManagerList ()->getHttpManager (td->mime->cmdName)))
         return manager->send (td, td->filenamePath.c_str (), cgiManager,
                               td->mime->selfExecuted, onlyHeader);
 
-
       if (!(td->permissions & MYSERVER_PERMISSION_READ))
         return sendAuth ();
 
-      manager = staticHttp.dynManagerList.getHttpManager ("SEND");
+      manager = staticData->getDynManagerList ()->getHttpManager ("SEND");
       if (!manager)
         {
           td->connection->host->warningsLogWrite (_("HTTP: internal error"));
@@ -876,7 +903,8 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
       FilesUtility::temporaryFileName (td->id, td->inputDataPath);
       FilesUtility::temporaryFileName (td->id, td->outputDataPath);
 
-      dynamicCommand = staticHttp.dynCmdManager.getHttpCommand (td->request.cmd);
+      dynamicCommand =
+        staticData->getDynCmdManager ()->getHttpCommand (td->request.cmd);
 
       /* If the used method supports POST data, read it.  */
       if ((!td->request.cmd.compare ("POST")) ||
@@ -1077,15 +1105,13 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
           {
             string msg ("new-http-request");
             vector<Multicast<string, void*, int>*>* handlers =
-                    staticHttp.getHandlers (msg);
-
+                    staticData->getHandlers (msg);
             if (handlers)
               {
                 for (size_t i = 0; i < handlers->size (); i++)
                   {
                     int handlerRet = (*handlers)[i]->updateMulticast (getStaticData (),
                                                                       msg, td);
-
                     if (handlerRet == ClientsThread::DELETE_CONNECTION)
                       {
                         ret = ClientsThread::DELETE_CONNECTION;
@@ -1495,7 +1521,7 @@ MimeRecord* Http::getMIME (string &filename)
   const char *handler = td->securityToken.getData ("mime.handler",
                       MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF, NULL);
 
-  if (staticHttp.allowVhostMime && td->connection->host->isMIME ())
+  if (staticData->getAllowVhostMime () && td->connection->host->isMIME ())
     return td->connection->host->getMIME ()->getMIME (filename);
 
   return Server::getInstance ()->getMimeManager ()->getMIME (filename, handler);
@@ -1625,7 +1651,8 @@ int Http::processDefaultFile (string& uri, int permissions, int onlyHeader)
         }
     }
 
-  HttpDataHandler *handler = staticHttp.dynManagerList.getHttpManager ("DIR");
+  HttpDataHandler *handler =
+    staticData->getDynManagerList ()->getHttpManager ("DIR");
   if (!handler)
     {
       td->connection->host->warningsLogWrite (_("HTTP: internal error"));
@@ -1721,50 +1748,6 @@ int Http::sendAuth ()
  */
 int Http::loadProtocolStatic ()
 {
-  const char *data = NULL;
-
-  staticHttp.timeout = MYSERVER_SEC (15);
-
-  Server::getInstance ()->setGlobalData ("http-static", getStaticData ());
-
-  staticHttp.dynManagerList.addHttpManager ("SEND", new HttpFile ());
-  staticHttp.dynManagerList.addHttpManager ("DIR", new HttpDir ());
-  staticHttp.dynManagerList.addHttpManager ("CGI", new Cgi ());
-  staticHttp.dynManagerList.addHttpManager ("MSCGI", new MsCgi ());
-  staticHttp.dynManagerList.addHttpManager ("SCGI", new Scgi ());
-  staticHttp.dynManagerList.addHttpManager ("WINGI", new WinCgi ());
-  staticHttp.dynManagerList.addHttpManager ("FASTCGI", new FastCgi ());
-  staticHttp.dynManagerList.addHttpManager ("ISAPI", new Isapi ());
-  staticHttp.dynManagerList.addHttpManager ("PROXY", new Proxy ());
-
-  data = Server::getInstance ()->getData ("vhost.allow_mime");
-  if (data)
-    {
-
-      if (!strcmpi (data, "YES"))
-        staticHttp.allowVhostMime = 1;
-      else
-        staticHttp.allowVhostMime = 0;
-    }
-
-  data = Server::getInstance ()->getData ("cgi.timeout");
-  if (data)
-    staticHttp.timeout = MYSERVER_SEC (atoi (data));
-
-  return 1;
-}
-
-/*!
- * Unload the HTTP protocol.
- */
-int Http::unLoadProtocolStatic ()
-{
-  /* Unload the errors.  */
-  HttpErrors::unLoad ();
-
-  staticHttp.clear ();
-
-  return 1;
 }
 
 /*!
@@ -1779,10 +1762,10 @@ const char* Http::getNameImpl ()
 /*!
  * Constructor for the class http.
  */
-Http::Http ()
+Http::Http (HttpProtocol *staticData)
 {
   td = new HttpThreadContext ();
-
+  this->staticData = staticData;
   protocolPrefix.assign ("http://");
   protocolOptions = 0;
   td->filenamePath.assign ("");
diff --git a/myserver/src/protocol/https/https.cpp b/myserver/src/protocol/https/https.cpp
index fe97141..cbd53e0 100644
--- a/myserver/src/protocol/https/https.cpp
+++ b/myserver/src/protocol/https/https.cpp
@@ -1,18 +1,18 @@
 /*
-MyServer
-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
-(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) 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
+  (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/protocol/protocol.h>
@@ -30,11 +30,10 @@ extern "C"
 #endif
 }
 
-
 /*!
- *Returns the name of the protocol. If an out buffer is defined
- *fullfill it with the name too.
- */
+  Returns the name of the protocol. If an out buffer is defined
+  fullfill it with the name too.
+*/
 const char* Https::getNameImpl ()
 {
   return "HTTPS";
@@ -46,17 +45,17 @@ const char* Https::getName ()
 }
 
 /*!
- *Https class constructor.
- */
-Https::Https ()
+  Https class constructor.
+*/
+Https::Https (HttpProtocol *http) : Http (http)
 {
   protocolPrefix.assign ("https://");
   protocolOptions = Protocol::SSL;
 }
 
 /*!
- *Destructor for the class Https.
- */
+  Destructor for the class Https.
+*/
 Https::~Https ()
 {
 
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 4fd32c9..690a9a9 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -390,8 +390,9 @@ void Server::loadStaticComponents ()
   if (filtersFactory.insert ("gzip", Gzip::factory))
     log (MYSERVER_LOG_MSG_ERROR, _("Error while loading plugins"));
 
-  Protocol *protocolsSet[] = {new HttpProtocol (),
-                              new HttpsProtocol (),
+  HttpProtocol *http = new HttpProtocol ();
+  Protocol *protocolsSet[] = {http,
+                              new HttpsProtocol (http),
                               new GopherProtocol (),
                               new FtpProtocol (),
                               new ControlProtocol (),
@@ -762,8 +763,6 @@ int Server::terminate ()
 
   clearMulticastRegistry ();
 
-  globalData.clear ();
-
   /*
    * Free all the threads.
    */
@@ -1750,21 +1749,3 @@ u_long Server::getBuffersize ()
 {
   return buffersize;
 }
-
-/*!
- * Set a global descriptor.
- */
-void Server::setGlobalData (const char* name, void* data)
-{
-  string str (name);
-  globalData.put (str, data);
-}
-
-/*!
- * Get a global descriptor.
- */
-void* Server::getGlobalData (const char* name)
-{
-  string str (name);
-  return globalData.get (str);
-}



commit 53541f6cb187e7d80f77e3156338a97b40c1d60e
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Fri Nov 6 20:45:35 2009 +0100

    Rename ConnectionsScheduler::getConnectionsNumber to ConnectionsScheduler::getNumAliveConnections.

diff --git a/myserver/include/connections_scheduler/connections_scheduler.h b/myserver/include/connections_scheduler/connections_scheduler.h
index 64ebf90..5fe13bd 100644
--- a/myserver/include/connections_scheduler/connections_scheduler.h
+++ b/myserver/include/connections_scheduler/connections_scheduler.h
@@ -94,7 +94,7 @@ public:
   void initialize ();
   void listener (struct ListenerArg* );
   void removeListener (struct ListenerArg*);
-  u_long getConnectionsNumber ();
+  u_long getNumAliveConnections ();
   void removeConnection (ConnectionPtr connection);
   void terminateConnections ();
   void getConnections (list<ConnectionPtr> &out);
diff --git a/myserver/src/connections_scheduler/connections_scheduler.cpp b/myserver/src/connections_scheduler/connections_scheduler.cpp
index 585bdba..1e56f60 100644
--- a/myserver/src/connections_scheduler/connections_scheduler.cpp
+++ b/myserver/src/connections_scheduler/connections_scheduler.cpp
@@ -528,7 +528,7 @@ void ConnectionsScheduler::getConnections (list<ConnectionPtr> &out)
 /*!
  * Get the alive connections number.
  */
-u_long ConnectionsScheduler::getConnectionsNumber ()
+u_long ConnectionsScheduler::getNumAliveConnections ()
 {
   return connections.size ();
 }
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index d7edcb7..4fd32c9 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -1,18 +1,18 @@
 /*
-MyServer
-Copyright (C) 2002-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/>.
+  MyServer
+  Copyright (C) 2002-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"
@@ -674,7 +674,7 @@ const char *Server::getGid ()
  */
 u_long Server::getNumConnections ()
 {
-  return connectionsScheduler.getConnectionsNumber ();
+  return connectionsScheduler.getNumAliveConnections ();
 }
 
 /*!
@@ -1042,9 +1042,8 @@ int Server::addConnection (Socket *s, MYSERVER_SOCKADDRIN *asockIn)
    * Do not accept this connection if a MAX_CONNECTIONS_TO_ACCEPT limit is
    * defined.
    */
-  if (maxConnectionsToAccept
-      && ((u_long)connectionsScheduler.getConnectionsNumber ()
-          >= maxConnectionsToAccept))
+  if (maxConnectionsToAccept && connectionsScheduler.getNumAliveConnections ()
+      >= maxConnectionsToAccept)
     return -1;
 
 #if ( HAVE_IPV6 )
@@ -1213,8 +1212,8 @@ ConnectionPtr Server::addConnectionToList (Socket* s,
    * is bigger than it say to the protocol that will parse the connection
    * to remove it from the active connections list.
    */
-  if (maxConnections && ((u_long)connectionsScheduler.getConnectionsNumber ()
-                         > maxConnections))
+  if (maxConnections
+      && connectionsScheduler.getNumAliveConnections () > maxConnections)
     newConnection->setToRemove (Connection::REMOVE_OVERLOAD);
 
   connectionsScheduler.registerConnectionID (newConnection);
diff --git a/myserver/tests/test_connections_scheduler.cpp b/myserver/tests/test_connections_scheduler.cpp
index d7653c6..3d8478f 100644
--- a/myserver/tests/test_connections_scheduler.cpp
+++ b/myserver/tests/test_connections_scheduler.cpp
@@ -1,19 +1,19 @@
 /*
- MyServer
- 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
- (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, 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"
 #include <ctype.h>
@@ -130,11 +130,11 @@ public:
     u_long max = 3;
 
     for (u_long i = 0; i < max; i++)
-    {
-      ConnectionPtr conn = new Connection;
-      conn->socket = new MockSocket ((FileHandle) i);
-      scheduler->addWaitingConnection (conn);
-    }
+      {
+        ConnectionPtr conn = new Connection;
+        conn->socket = new MockSocket ((FileHandle) i);
+        scheduler->addWaitingConnection (conn);
+      }
 
     scheduler->accept (&visitor, arg);
 
@@ -216,12 +216,12 @@ public:
 
     scheduler->addWaitingConnection (conn);
 
-    CPPUNIT_ASSERT_EQUAL (scheduler->getConnectionsNumber (), 1ul);
+    CPPUNIT_ASSERT_EQUAL (scheduler->getNumAliveConnections (), 1ul);
 
     scheduler->removeConnection (conn);
 
     CPPUNIT_ASSERT_EQUAL (scheduler->getNumTotalConnections (), 0ul);
-    //The connection is freed by the scheduler.
+    /* The connection is freed by the scheduler.  */
   }
 
 

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

Summary of changes:
 .../connections_scheduler/connections_scheduler.h  |    2 +-
 myserver/include/protocol/http/http.h              |   65 ++---
 myserver/include/protocol/https/https.h            |   28 +--
 myserver/include/server/server.h                   |    4 -
 .../connections_scheduler.cpp                      |    2 +-
 myserver/src/http_handler/fastcgi/fastcgi.cpp      |    5 +-
 myserver/src/protocol/http/http.cpp                |  151 +++++------
 myserver/src/protocol/http/http_headers.cpp        |    5 +-
 myserver/src/protocol/https/https.cpp              |   45 ++--
 myserver/src/server/server.cpp                     |   64 ++---
 myserver/tests/test_connections_scheduler.cpp      |   44 ++--
 myserver/tests/test_http_response.cpp              |   28 +-
 plugins/src/http_checker/http_checker.cpp          |   23 +-
 .../python_http_handler/python_http_handler.cpp    |  310 ++++++++++----------
 plugins/src/rules_checker/rules_checker.cpp        |   17 +-
 15 files changed, 358 insertions(+), 435 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Nov 06 19:10:53 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N6YtJ-00087T-Ex
	for mharc-myserver-commit@gnu.org; Fri, 06 Nov 2009 19:10:53 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N6YtI-00085o-4s
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 19:10:52 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N6YtE-00083o-MG
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 19:10:51 -0500
Received: from [199.232.76.173] (port=57770 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N6YtE-00083a-E0
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 19:10:48 -0500
Received: from savannah.gnu.org ([199.232.41.3]:38307 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 1N6YtC-00035m-BJ
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 19:10:48 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N6YtB-0005Tr-6O
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 00:10:45 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N6YtA-0005TP-Tz
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 00:10:45 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 9f1c92dd0e26be61966e575160fd19b4f778cf55
X-Git-Newrev: ad39c98edc29a37a2e51a0199f817d336ad56fe6
Message-Id: <E1N6YtA-0005TP-Tz@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sat, 07 Nov 2009 00:10:44 +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. 0_9-370-gad39c98
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, 07 Nov 2009 00:10:52 -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  ad39c98edc29a37a2e51a0199f817d336ad56fe6 (commit)
      from  9f1c92dd0e26be61966e575160fd19b4f778cf55 (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 ad39c98edc29a37a2e51a0199f817d336ad56fe6
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Nov 7 01:04:04 2009 +0100

    Ensure that stdafx.h is the first include in any .h or .cpp file.

diff --git a/myserver/include/base/base64/mime_utils.h b/myserver/include/base/base64/mime_utils.h
index 9d0ca80..a4be1f7 100644
--- a/myserver/include/base/base64/mime_utils.h
+++ b/myserver/include/base/base64/mime_utils.h
@@ -1,25 +1,27 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2007, 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/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2007, 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 MIMEUTILS_H
 # define MIMEUTILS_H
 
+# include "stdafx.h"
+
 class CBase64Utils
 {
 private:
diff --git a/myserver/include/conf/mime/mime_manager.h b/myserver/include/conf/mime/mime_manager.h
index 79c8781..1a47a79 100644
--- a/myserver/include/conf/mime/mime_manager.h
+++ b/myserver/include/conf/mime/mime_manager.h
@@ -1,24 +1,26 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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) 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
+  (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 MIME_MANAGER_H
 # define MIME_MANAGER_H
 
+# include "stdafx.h"
+
 # include <include/base/utility.h>
 # include <include/base/hash_map/hash_map.h>
 # include <include/base/sync/mutex.h>
diff --git a/myserver/include/conf/mime/xml_mime_handler.h b/myserver/include/conf/mime/xml_mime_handler.h
index d9ca111..62062d6 100644
--- a/myserver/include/conf/mime/xml_mime_handler.h
+++ b/myserver/include/conf/mime/xml_mime_handler.h
@@ -1,24 +1,26 @@
 /* -*- 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/>.
+  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_MIME_HANDLER_H
 # define XML_MIME_HANDLER_H
 
+# include "stdafx.h"
+
 # include <include/base/utility.h>
 # include <include/base/hash_map/hash_map.h>
 # include <include/base/sync/mutex.h>
diff --git a/myserver/include/conf/nodetree.h b/myserver/include/conf/nodetree.h
index cca47ce..4011adb 100644
--- a/myserver/include/conf/nodetree.h
+++ b/myserver/include/conf/nodetree.h
@@ -1,24 +1,26 @@
 /* -*- 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.
+  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.
+  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/>.
+  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 NODE_TREE_H
 # define NODE_TREE_H
 
+# include "stdafx.h"
+
 # include <src/conf/nodetree.cpp>
 
 #endif
diff --git a/myserver/include/conf/security/security_cache.h b/myserver/include/conf/security/security_cache.h
index 89f42f7..f6e361b 100644
--- a/myserver/include/conf/security/security_cache.h
+++ b/myserver/include/conf/security/security_cache.h
@@ -1,22 +1,25 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2005, 2006, 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/>.
+  MyServer
+  Copyright (C) 2005, 2006, 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/>.
 */
 #ifndef SECURITY_CACHE_H
 # define SECURITY_CACHE_H
+
+# include "stdafx.h"
+
 # include <include/base/hash_map/hash_map.h>
 # include <include/conf/security/security_manager.h>
 
diff --git a/myserver/include/conf/xml_conf.h b/myserver/include/conf/xml_conf.h
index 2eb1fc5..38f659c 100644
--- a/myserver/include/conf/xml_conf.h
+++ b/myserver/include/conf/xml_conf.h
@@ -1,24 +1,26 @@
 /* -*- 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/>.
+  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_CONF_H
 # define XML_CONF_H
 
+# include "stdafx.h"
+
 # include <include/conf/nodetree.h>
 # include <include/base/xml/xml_parser.h>
 # include <include/base/hash_map/hash_map.h>
diff --git a/myserver/include/connection/connection.h b/myserver/include/connection/connection.h
index 21ba5f3..db6ceba 100644
--- a/myserver/include/connection/connection.h
+++ b/myserver/include/connection/connection.h
@@ -19,6 +19,8 @@
 #ifndef CONNECTION_H
 # define CONNECTION_H
 
+# include "stdafx.h"
+
 extern "C"
 {
 # include <sys/time.h>
diff --git a/myserver/include/filter/console.h b/myserver/include/filter/console.h
index 42806e7..11d3894 100644
--- a/myserver/include/filter/console.h
+++ b/myserver/include/filter/console.h
@@ -19,6 +19,8 @@
 #ifndef CONSOLE_H
 # define CONSOLE_H
 
+# include "stdafx.h"
+
 # include <iostream>
 # include <map>
 
diff --git a/myserver/include/http_handler/cgi/cgi.h b/myserver/include/http_handler/cgi/cgi.h
index f6a9232..50b1b3b 100644
--- a/myserver/include/http_handler/cgi/cgi.h
+++ b/myserver/include/http_handler/cgi/cgi.h
@@ -1,24 +1,26 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(at your option) any later version.
+  MyServer
+  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
+  (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.
+  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/>.
+  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 CGI_H
 # define CGI_H
 
+# include "stdafx.h"
+
 # include <include/protocol/http/http_response.h>
 # include <include/protocol/http/http_request.h>
 # include <include/protocol/http/http_headers.h>
diff --git a/myserver/include/http_handler/proxy/proxy.h b/myserver/include/http_handler/proxy/proxy.h
index b008c43..536eb42 100644
--- a/myserver/include/http_handler/proxy/proxy.h
+++ b/myserver/include/http_handler/proxy/proxy.h
@@ -1,24 +1,26 @@
 /* -*- 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/>.
+  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 PROXY_H
 # define PROXY_H
 
+# include "stdafx.h"
+
 # include <include/protocol/http/http_response.h>
 # include <include/protocol/http/http_request.h>
 # include <include/protocol/http/http_headers.h>
diff --git a/myserver/include/http_handler/wincgi/wincgi.h b/myserver/include/http_handler/wincgi/wincgi.h
index ef422c5..b5efdad 100644
--- a/myserver/include/http_handler/wincgi/wincgi.h
+++ b/myserver/include/http_handler/wincgi/wincgi.h
@@ -1,24 +1,26 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(at your option) any later version.
+  MyServer
+  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
+  (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.
+  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/>.
+  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 WINCGI_H
 # define WINCGI_H
 
+# include "stdafx.h"
+
 # include <include/protocol/http/http_request.h>
 # include <include/protocol/http/http_response.h>
 # include <include/conf/mime/mime_manager.h>
diff --git a/myserver/include/log/stream/console_stream.h b/myserver/include/log/stream/console_stream.h
index 575f960..b722f63 100644
--- a/myserver/include/log/stream/console_stream.h
+++ b/myserver/include/log/stream/console_stream.h
@@ -19,6 +19,8 @@
 #ifndef CONSOLE_STREAM_H
 # define CONSOLE_STREAM_H
 
+# include "stdafx.h"
+
 # include <list>
 # include <map>
 # include <string>
diff --git a/myserver/include/log/stream/console_stream_creator.h b/myserver/include/log/stream/console_stream_creator.h
index 3975505..c742501 100644
--- a/myserver/include/log/stream/console_stream_creator.h
+++ b/myserver/include/log/stream/console_stream_creator.h
@@ -19,6 +19,8 @@
 #ifndef CONSOLE_STREAM_CREATOR_H
 # define CONSOLE_STREAM_CREATOR_H
 
+# include "stdafx.h"
+
 # include <include/log/stream/log_stream_creator.h>
 # include <include/log/stream/console_stream.h>
 
diff --git a/myserver/include/log/stream/file_stream.h b/myserver/include/log/stream/file_stream.h
index 4f3f0c7..0f6d27b 100644
--- a/myserver/include/log/stream/file_stream.h
+++ b/myserver/include/log/stream/file_stream.h
@@ -19,6 +19,8 @@
 #ifndef FILE_STREAM_H
 # define FILE_STREAM_H
 
+# include "stdafx.h"
+
 # include <list>
 # include <sstream>
 # include <string>
diff --git a/myserver/include/log/stream/file_stream_creator.h b/myserver/include/log/stream/file_stream_creator.h
index ba26775..cd9adc2 100644
--- a/myserver/include/log/stream/file_stream_creator.h
+++ b/myserver/include/log/stream/file_stream_creator.h
@@ -19,6 +19,8 @@
 #ifndef FILE_STREAM_CREATOR_H
 # define FILE_STREAM_CREATOR_H
 
+# include "stdafx.h"
+
 # include <include/log/stream/log_stream_creator.h>
 # include <include/log/stream/file_stream.h>
 
diff --git a/myserver/include/log/stream/log_stream.h b/myserver/include/log/stream/log_stream.h
index cd115dd..42016d9 100644
--- a/myserver/include/log/stream/log_stream.h
+++ b/myserver/include/log/stream/log_stream.h
@@ -19,6 +19,8 @@
 #ifndef LOG_STREAM_H
 # define LOG_STREAM_H
 
+# include "stdafx.h"
+
 # include <list>
 # include <string>
 
diff --git a/myserver/include/log/stream/log_stream_creator.h b/myserver/include/log/stream/log_stream_creator.h
index f12dd95..02d04b0 100644
--- a/myserver/include/log/stream/log_stream_creator.h
+++ b/myserver/include/log/stream/log_stream_creator.h
@@ -19,6 +19,8 @@
 #ifndef LOG_STREAM_CREATOR_H
 # define LOG_STREAM_CREATOR_H
 
+# include "stdafx.h"
+
 # include <list>
 # include <string>
 
diff --git a/myserver/include/log/stream/log_stream_factory.h b/myserver/include/log/stream/log_stream_factory.h
index 53fab3c..7e85429 100644
--- a/myserver/include/log/stream/log_stream_factory.h
+++ b/myserver/include/log/stream/log_stream_factory.h
@@ -19,6 +19,8 @@
 #ifndef LOG_STREAM_FACTORY_H
 # define LOG_STREAM_FACTORY_H
 
+# include "stdafx.h"
+
 # include <list>
 # include <map>
 # include <string>
diff --git a/myserver/include/log/stream/socket_stream.h b/myserver/include/log/stream/socket_stream.h
index 71bec1c..4861f46 100644
--- a/myserver/include/log/stream/socket_stream.h
+++ b/myserver/include/log/stream/socket_stream.h
@@ -19,6 +19,8 @@
 #ifndef SOCKET_STREAM_H
 # define SOCKET_STREAM_H
 
+# include "stdafx.h"
+
 # include <list>
 # include <string>
 
diff --git a/myserver/include/log/stream/socket_stream_creator.h b/myserver/include/log/stream/socket_stream_creator.h
index fd2a8d8..a75e1fb 100644
--- a/myserver/include/log/stream/socket_stream_creator.h
+++ b/myserver/include/log/stream/socket_stream_creator.h
@@ -19,6 +19,8 @@
 #ifndef SOCKET_STREAM_CREATOR_H
 # define SOCKET_STREAM_CREATOR_H
 
+# include "stdafx.h"
+
 # include <include/log/stream/log_stream_creator.h>
 # include <include/log/stream/socket_stream.h>
 
diff --git a/myserver/include/protocol/control/control_errors.h b/myserver/include/protocol/control/control_errors.h
index 897e3e7..626f6f6 100644
--- a/myserver/include/protocol/control/control_errors.h
+++ b/myserver/include/protocol/control/control_errors.h
@@ -1,26 +1,29 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2004, 2005, 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/>.
+  MyServer
+  Copyright (C) 2004, 2005, 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 CONTROL_ERRORS_H
 # define CONTROL_ERRORS_H
+
+# include "stdafx.h"
+
 /*!
- *These are all the errors that the control server can return to a client.
- *Use these definitions instead of hardly-code the value.
+ * 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. */
diff --git a/myserver/include/protocol/ftp/ftp_common.h b/myserver/include/protocol/ftp/ftp_common.h
index f4ca64e..cec7339 100644
--- a/myserver/include/protocol/ftp/ftp_common.h
+++ b/myserver/include/protocol/ftp/ftp_common.h
@@ -1,24 +1,26 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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 2 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, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+  MyServer
+  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 2 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, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
 
-#ifndef __FTP_COMMON_H__
-# define __FTP_COMMON_H__
+#ifndef FTP_COMMON_H
+# define FTP_COMMON_H
+
+# include "stdafx.h"
 
 # include <string>
 
diff --git a/myserver/include/protocol/http/env/env.h b/myserver/include/protocol/http/env/env.h
index ef19888..70aeed8 100644
--- a/myserver/include/protocol/http/env/env.h
+++ b/myserver/include/protocol/http/env/env.h
@@ -1,25 +1,27 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(at your option) any later version.
+  MyServer
+  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
+  (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.
+  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/>.
+  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 ENV_H
 # define ENV_H
 
+# include "stdafx.h"
+
 # include <include/protocol/http/http_response.h>
 # include <include/protocol/http/http_request.h>
 # include <include/protocol/http/http_headers.h>
diff --git a/myserver/include/protocol/http/http_errors.h b/myserver/include/protocol/http/http_errors.h
index 47ea172..278b195 100644
--- a/myserver/include/protocol/http/http_errors.h
+++ b/myserver/include/protocol/http/http_errors.h
@@ -1,26 +1,28 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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) 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
+  (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 HTTP_ERRORS_H
 # define HTTP_ERRORS_H
 
+# include "stdafx.h"
+
 # include <string>
 # include <include/base/hash_map/hash_map.h>
 
diff --git a/myserver/include/protocol/http/http_header.h b/myserver/include/protocol/http/http_header.h
index ce8ee85..48a5919 100644
--- a/myserver/include/protocol/http/http_header.h
+++ b/myserver/include/protocol/http/http_header.h
@@ -1,28 +1,29 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2007, 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.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2007, 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.
+  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/>.
+  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 <string>
-#include <include/base/hash_map/hash_map.h>
-
 #ifndef HTTP_HEADER_H
 # define HTTP_HEADER_H
 
+# include "stdafx.h"
+
+# include <string>
+# include <include/base/hash_map/hash_map.h>
+
 using namespace std;
 
 struct HttpHeader
diff --git a/myserver/include/protocol/http/http_request.h b/myserver/include/protocol/http/http_request.h
index 6717bca..b381573 100644
--- a/myserver/include/protocol/http/http_request.h
+++ b/myserver/include/protocol/http/http_request.h
@@ -1,29 +1,30 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2007, 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/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2007, 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 <string>
-#include <include/base/hash_map/hash_map.h>
-#include <include/protocol/http/http_header.h>
-
 #ifndef HTTP_REQUEST_H
 # define HTTP_REQUEST_H
 
+# include "stdafx.h"
+# include <string>
+# include <include/base/hash_map/hash_map.h>
+# include <include/protocol/http/http_header.h>
+
 using namespace std;
 
 
diff --git a/myserver/include/protocol/http/http_response.h b/myserver/include/protocol/http/http_response.h
index 1281aea..926f7ed 100644
--- a/myserver/include/protocol/http/http_response.h
+++ b/myserver/include/protocol/http/http_response.h
@@ -1,28 +1,30 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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) 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
+  (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 <string>
-#include <include/base/hash_map/hash_map.h>
-#include <include/protocol/http/http_header.h>
-
 #ifndef HTTP_RESPONSE_H
 # define HTTP_RESPONSE_H
 
+# include "stdafx.h"
+
+# include <string>
+# include <include/base/hash_map/hash_map.h>
+# include <include/protocol/http/http_header.h>
+
 using namespace std;
 
 /*! Max length for a HTTP response fields. */
diff --git a/myserver/include/protocol/protocol_buffer.h b/myserver/include/protocol/protocol_buffer.h
index 74c48ed..b9e3df9 100644
--- a/myserver/include/protocol/protocol_buffer.h
+++ b/myserver/include/protocol/protocol_buffer.h
@@ -20,8 +20,10 @@
 #ifndef PROTOCOL_BUFFER_H
 # define PROTOCOL_BUFFER_H
 
+# include "stdafx.h"
+
 /*!
- *Base class to handle a buffer in the connection.
+ * Base class to handle a buffer in the connection.
  */
 class ProtocolBuffer
 {
diff --git a/myserver/src/base/crypt/crypt_algo_manager.cpp b/myserver/src/base/crypt/crypt_algo_manager.cpp
index fae94da..973f153 100644
--- a/myserver/src/base/crypt/crypt_algo_manager.cpp
+++ b/myserver/src/base/crypt/crypt_algo_manager.cpp
@@ -1,19 +1,21 @@
 /*
- MyServer
- Copyright (C) 2005-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/>.
- */
+  MyServer
+  Copyright (C) 2005-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"
 
 #include <include/base/crypt/crypt_algo_manager.h>
 #include <memory>
diff --git a/myserver/src/base/dynamic_lib/dynamiclib.cpp b/myserver/src/base/dynamic_lib/dynamiclib.cpp
index 521ca84..37d338a 100644
--- a/myserver/src/base/dynamic_lib/dynamiclib.cpp
+++ b/myserver/src/base/dynamic_lib/dynamiclib.cpp
@@ -1,20 +1,21 @@
 /*
-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.
+  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.
+  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/>.
+  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"
 #include <include/base/dynamic_lib/dynamiclib.h>
 
 /*!
diff --git a/myserver/src/base/hash_map/hash_map.cpp b/myserver/src/base/hash_map/hash_map.cpp
index 31b0110..d9fa913 100644
--- a/myserver/src/base/hash_map/hash_map.cpp
+++ b/myserver/src/base/hash_map/hash_map.cpp
@@ -1,21 +1,23 @@
 /*
-MyServer
-Copyright (C) 2005, 2006, 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/>.
+  MyServer
+  Copyright (C) 2005, 2006, 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/>.
 */
 
 #define HASHMAP_CPP
+#include "stdafx.h"
+
 #include <include/base/hash_map/hash_map.h>
 #include <string.h>
 
diff --git a/myserver/src/base/multicast/multicast.cpp b/myserver/src/base/multicast/multicast.cpp
index e8d03f7..2ca3455 100644
--- a/myserver/src/base/multicast/multicast.cpp
+++ b/myserver/src/base/multicast/multicast.cpp
@@ -1,23 +1,27 @@
 /*
-MyServer
-Copyright (C) 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/>.
+  MyServer
+  Copyright (C) 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 <include/base/multicast/multicast.h>
+
 #ifndef MULTICAST_CPP
 # define MULTICAST_CPP
 
+#include "stdafx.h"
+#include <include/base/multicast/multicast.h>
+
+
 /*!
  *Register the handler for the specified message type.
  */
diff --git a/myserver/src/base/process/fork_server.cpp b/myserver/src/base/process/fork_server.cpp
index fd2a388..805f7e5 100644
--- a/myserver/src/base/process/fork_server.cpp
+++ b/myserver/src/base/process/fork_server.cpp
@@ -15,6 +15,8 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include "stdafx.h"
+
 #include <include/base/process/fork_server.h>
 #include <include/base/file/files_utility.h>
 #include <include/base/utility.h>
diff --git a/myserver/src/base/process/process_server_manager.cpp b/myserver/src/base/process/process_server_manager.cpp
index 959989c..5f7765c 100644
--- a/myserver/src/base/process/process_server_manager.cpp
+++ b/myserver/src/base/process/process_server_manager.cpp
@@ -1,20 +1,22 @@
 /*
-MyServer
-Copyright (C) 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/>.
+  MyServer
+  Copyright (C) 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"
+
 #include <include/base/process/process_server_manager.h>
 
 #include <include/server/server.h>
diff --git a/myserver/src/base/read_directory/read_directory.cpp b/myserver/src/base/read_directory/read_directory.cpp
index 75694f5..8b4d984 100644
--- a/myserver/src/base/read_directory/read_directory.cpp
+++ b/myserver/src/base/read_directory/read_directory.cpp
@@ -1,19 +1,22 @@
 /*
-MyServer
-Copyright (C) 2002, 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/>.
+  MyServer
+  Copyright (C) 2002, 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"
+
 #include <include/base/read_directory/read_directory.h>
 
 extern "C"
diff --git a/myserver/src/base/regex/myserver_regex.cpp b/myserver/src/base/regex/myserver_regex.cpp
index 1068b32..9fcf68f 100644
--- a/myserver/src/base/regex/myserver_regex.cpp
+++ b/myserver/src/base/regex/myserver_regex.cpp
@@ -1,20 +1,22 @@
 /*
-MyServer
-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
-(at your option) any later version.
+  MyServer
+  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
+  (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.
+  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/>.
+  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"
+
 #include <include/base/regex/myserver_regex.h>
 
 /*!
diff --git a/myserver/src/base/ssl/ssl.cpp b/myserver/src/base/ssl/ssl.cpp
index cbf5ad9..e2174dd 100644
--- a/myserver/src/base/ssl/ssl.cpp
+++ b/myserver/src/base/ssl/ssl.cpp
@@ -1,20 +1,22 @@
 /*
-MyServer
-Copyright (C) 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/>.
+  MyServer
+  Copyright (C) 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"
+
 #include <include/base/ssl/ssl.h>
 #include <include/base/file/files_utility.h>
 
diff --git a/myserver/src/base/string/securestr.cpp b/myserver/src/base/string/securestr.cpp
index 28531a6..967bd25 100644
--- a/myserver/src/base/string/securestr.cpp
+++ b/myserver/src/base/string/securestr.cpp
@@ -16,6 +16,9 @@
   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"
+
 #include <include/base/string/securestr.h>
 #include <string.h>
 
diff --git a/myserver/src/base/xml/xml_parser.cpp b/myserver/src/base/xml/xml_parser.cpp
index f64e3b2..8e104ba 100644
--- a/myserver/src/base/xml/xml_parser.cpp
+++ b/myserver/src/base/xml/xml_parser.cpp
@@ -1,20 +1,22 @@
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2006, 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/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2006, 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"
+
 #include <include/base/xml/xml_parser.h>
 #include <include/base/utility.h>
 #include <include/base/file/files_utility.h>
diff --git a/myserver/src/conf/main/main_configuration.cpp b/myserver/src/conf/main/main_configuration.cpp
index cd09f41..b8e04a0 100644
--- a/myserver/src/conf/main/main_configuration.cpp
+++ b/myserver/src/conf/main/main_configuration.cpp
@@ -15,6 +15,8 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include "stdafx.h"
+
 #include <include/conf/main/main_configuration.h>
 
 
diff --git a/myserver/src/conf/main/xml_main_configuration.cpp b/myserver/src/conf/main/xml_main_configuration.cpp
index 56ce4ce..5b0b94c 100644
--- a/myserver/src/conf/main/xml_main_configuration.cpp
+++ b/myserver/src/conf/main/xml_main_configuration.cpp
@@ -15,6 +15,8 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include "stdafx.h"
+
 #include <include/conf/main/xml_main_configuration.h>
 #include <include/conf/xml_conf.h>
 
diff --git a/myserver/src/conf/security/auth_domain.cpp b/myserver/src/conf/security/auth_domain.cpp
index 5f713c4..28d1b3f 100644
--- a/myserver/src/conf/security/auth_domain.cpp
+++ b/myserver/src/conf/security/auth_domain.cpp
@@ -1,21 +1,22 @@
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2005, 2006, 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/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2005, 2006, 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"
 
 #include <include/conf/security/auth_domain.h>
 #include <include/conf/security/security_manager.h>
diff --git a/myserver/src/conf/security/auth_method.cpp b/myserver/src/conf/security/auth_method.cpp
index 62716ac..a4d81e0 100644
--- a/myserver/src/conf/security/auth_method.cpp
+++ b/myserver/src/conf/security/auth_method.cpp
@@ -1,22 +1,22 @@
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2005, 2006, 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/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2005, 2006, 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"
 #include <include/conf/security/auth_method.h>
 
 
diff --git a/myserver/src/conf/security/auth_method_factory.cpp b/myserver/src/conf/security/auth_method_factory.cpp
index 3412762..04960a0 100644
--- a/myserver/src/conf/security/auth_method_factory.cpp
+++ b/myserver/src/conf/security/auth_method_factory.cpp
@@ -1,21 +1,23 @@
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2005, 2006, 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.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2005, 2006, 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.
+  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/>.
+  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"
+
 #include <include/conf/security/auth_method_factory.h>
 #include <include/conf/security/auth_method.h>
 
diff --git a/myserver/src/conf/security/security_cache.cpp b/myserver/src/conf/security/security_cache.cpp
index 09fcf5d..ee41360 100644
--- a/myserver/src/conf/security/security_cache.cpp
+++ b/myserver/src/conf/security/security_cache.cpp
@@ -1,20 +1,22 @@
 /*
-MyServer
-Copyright (C) 2005, 2006, 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/>.
+  MyServer
+  Copyright (C) 2005, 2006, 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"
+
 #include <include/conf/security/security_cache.h>
 #include <include/conf/security/security_manager.h>
 #include <include/conf/security/auth_domain.h>
diff --git a/myserver/src/conf/security/security_domain.cpp b/myserver/src/conf/security/security_domain.cpp
index 7e59211..b533488 100644
--- a/myserver/src/conf/security/security_domain.cpp
+++ b/myserver/src/conf/security/security_domain.cpp
@@ -1,21 +1,23 @@
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2005, 2006, 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/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2005, 2006, 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"
+
 
 #include <include/conf/security/security_domain.h>
 
diff --git a/myserver/src/conf/security/security_manager.cpp b/myserver/src/conf/security/security_manager.cpp
index 77c4b94..57d6c18 100644
--- a/myserver/src/conf/security/security_manager.cpp
+++ b/myserver/src/conf/security/security_manager.cpp
@@ -1,20 +1,21 @@
 /*
-MyServer
-Copyright (C) 2002-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/>.
+  MyServer
+  Copyright (C) 2002-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"
 
 #include <include/conf/security/security_manager.h>
 #include <include/conf/security/validator.h>
diff --git a/myserver/src/conf/security/security_token.cpp b/myserver/src/conf/security/security_token.cpp
index ffcf5d0..c976edf 100644
--- a/myserver/src/conf/security/security_token.cpp
+++ b/myserver/src/conf/security/security_token.cpp
@@ -1,20 +1,22 @@
 /*
-MyServer
-Copyright (C) 2002-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/>.
+  MyServer
+  Copyright (C) 2002-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"
+
 
 #include <include/conf/security/security_token.h>
 #include <include/conf/vhost/vhost.h>
diff --git a/myserver/src/conf/security/validator.cpp b/myserver/src/conf/security/validator.cpp
index 8fc787b..378474b 100644
--- a/myserver/src/conf/security/validator.cpp
+++ b/myserver/src/conf/security/validator.cpp
@@ -1,20 +1,21 @@
 /*
-MyServer
-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
-(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, 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"
 
 #include <include/conf/security/validator.h>
 #include <include/conf/security/auth_domain.h>
diff --git a/myserver/src/conf/security/validator_factory.cpp b/myserver/src/conf/security/validator_factory.cpp
index a428b46..39a806b 100644
--- a/myserver/src/conf/security/validator_factory.cpp
+++ b/myserver/src/conf/security/validator_factory.cpp
@@ -1,21 +1,22 @@
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2005, 2006, 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.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2005, 2006, 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.
+  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/>.
+  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"
 
 #include <include/conf/security/validator.h>
 #include <include/conf/security/validator_factory.h>
diff --git a/myserver/src/conf/security/xml_validator.cpp b/myserver/src/conf/security/xml_validator.cpp
index 8cd63ce..6f28b22 100644
--- a/myserver/src/conf/security/xml_validator.cpp
+++ b/myserver/src/conf/security/xml_validator.cpp
@@ -1,20 +1,22 @@
 /*
-MyServer
-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
-(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, 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"
+
 
 #include <include/conf/security/xml_validator.h>
 #include <include/conf/security/auth_domain.h>
diff --git a/myserver/src/conf/vhost/ip.cpp b/myserver/src/conf/vhost/ip.cpp
index 8513d0e..34a5e00 100644
--- a/myserver/src/conf/vhost/ip.cpp
+++ b/myserver/src/conf/vhost/ip.cpp
@@ -15,11 +15,13 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include "stdafx.h"
+
 #include <include/conf/vhost/ip.h>
 #include <sstream>
 
 /*!
- * comment here
+ * Create a new IpRange object given its value.
  */
 IpRange *IpRange::RangeFactory (const std::string &ipRange)
 {
diff --git a/myserver/src/conf/vhost/vhost_manager.cpp b/myserver/src/conf/vhost/vhost_manager.cpp
index 05ed0a3..3f6574e 100644
--- a/myserver/src/conf/vhost/vhost_manager.cpp
+++ b/myserver/src/conf/vhost/vhost_manager.cpp
@@ -14,6 +14,9 @@
   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"
+
 #include <include/conf/vhost/vhost_manager.h>
 #include <include/conf/vhost/vhost.h>
 #include <include/conf/mime/xml_mime_handler.h>
diff --git a/myserver/src/conf/vhost/xml_vhost_handler.cpp b/myserver/src/conf/vhost/xml_vhost_handler.cpp
index 7a6225a..f9a5134 100644
--- a/myserver/src/conf/vhost/xml_vhost_handler.cpp
+++ b/myserver/src/conf/vhost/xml_vhost_handler.cpp
@@ -14,6 +14,9 @@
   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"
+
 #include <include/conf/vhost/xml_vhost_handler.h>
 #include <include/conf/vhost/vhost.h>
 #include <include/conf/mime/xml_mime_handler.h>
diff --git a/myserver/src/connections_scheduler/connections_scheduler.cpp b/myserver/src/connections_scheduler/connections_scheduler.cpp
index 1e56f60..6677bfe 100644
--- a/myserver/src/connections_scheduler/connections_scheduler.cpp
+++ b/myserver/src/connections_scheduler/connections_scheduler.cpp
@@ -1,20 +1,22 @@
 /*
-MyServer
-Copyright (C) 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/>.
+  MyServer
+  Copyright (C) 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"
+
 #include <include/connections_scheduler/connections_scheduler.h>
 #include <include/server/server.h>
 
diff --git a/myserver/src/connections_scheduler/listen_threads.cpp b/myserver/src/connections_scheduler/listen_threads.cpp
index ee796a0..090d3cf 100644
--- a/myserver/src/connections_scheduler/listen_threads.cpp
+++ b/myserver/src/connections_scheduler/listen_threads.cpp
@@ -1,19 +1,22 @@
 /*
-MyServer
-Copyright (C) 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/>.
+  MyServer
+  Copyright (C) 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"
+
 #include <include/server/server.h>
 #include <include/base/file/files_utility.h>
 #include <include/connections_scheduler/listen_threads.h>
diff --git a/myserver/src/filter/gzip/gzip.cpp b/myserver/src/filter/gzip/gzip.cpp
index 2ec3a94..7515c92 100644
--- a/myserver/src/filter/gzip/gzip.cpp
+++ b/myserver/src/filter/gzip/gzip.cpp
@@ -1,20 +1,22 @@
 /*
-MyServer
-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
-(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) 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
+  (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"
+
 #include <include/filter/gzip/gzip.h>
 #include <include/base/string/securestr.h>
 
diff --git a/myserver/src/filter/gzip/gzip_decompress.cpp b/myserver/src/filter/gzip/gzip_decompress.cpp
index 0d1c579..d01aea5 100644
--- a/myserver/src/filter/gzip/gzip_decompress.cpp
+++ b/myserver/src/filter/gzip/gzip_decompress.cpp
@@ -15,6 +15,7 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include "stdafx.h"
 #include <include/filter/gzip/gzip_decompress.h>
 #include <include/base/string/securestr.h>
 
diff --git a/myserver/src/filter/memory_stream.cpp b/myserver/src/filter/memory_stream.cpp
index 1ce3e00..4368431 100644
--- a/myserver/src/filter/memory_stream.cpp
+++ b/myserver/src/filter/memory_stream.cpp
@@ -1,21 +1,22 @@
 /*
-MyServer
-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
-(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) 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
+  (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"
 
 #include <include/filter/memory_stream.h>
 
diff --git a/myserver/src/filter/stream.cpp b/myserver/src/filter/stream.cpp
index a50f883..d125566 100644
--- a/myserver/src/filter/stream.cpp
+++ b/myserver/src/filter/stream.cpp
@@ -1,20 +1,22 @@
 /*
-MyServer
-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
-(at your option) any later version.
+  MyServer
+  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
+  (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.
+  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/>.
+  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"
+
 #include <include/filter/stream.h>
 
 #include <string>
diff --git a/myserver/src/http_handler/fastcgi/fastcgi.cpp b/myserver/src/http_handler/fastcgi/fastcgi.cpp
index 2e1bbd9..396ac0e 100644
--- a/myserver/src/http_handler/fastcgi/fastcgi.cpp
+++ b/myserver/src/http_handler/fastcgi/fastcgi.cpp
@@ -20,6 +20,9 @@
   FastCGI site at: http://www.fastcgi.com.
   On that site you can find samples and all the supported languages.
  */
+
+#include "stdafx.h"
+
 #include <include/http_handler/fastcgi/fastcgi.h>
 #include <include/protocol/http/env/env.h>
 #include <include/protocol/http/http.h>
diff --git a/myserver/src/http_handler/http_file/http_file.cpp b/myserver/src/http_handler/http_file/http_file.cpp
index 17ad2c9..287b937 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -15,6 +15,7 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include "stdafx.h"
 #include <include/protocol/http/http.h>
 #include <include/protocol/http/http_headers.h>
 #include <include/http_handler/http_file/http_file.h>
diff --git a/myserver/src/http_handler/scgi/scgi.cpp b/myserver/src/http_handler/scgi/scgi.cpp
index 1923405..5fe64a4 100644
--- a/myserver/src/http_handler/scgi/scgi.cpp
+++ b/myserver/src/http_handler/scgi/scgi.cpp
@@ -14,6 +14,9 @@
   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"
+
 #include <include/http_handler/scgi/scgi.h>
 #include <include/protocol/http/env/env.h>
 #include <include/protocol/http/http.h>
diff --git a/myserver/src/plugin/plugin.cpp b/myserver/src/plugin/plugin.cpp
index 5fe7eb7..55189c5 100644
--- a/myserver/src/plugin/plugin.cpp
+++ b/myserver/src/plugin/plugin.cpp
@@ -1,20 +1,21 @@
 /*
-MyServer
-Copyright (C) 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/>.
+  MyServer
+  Copyright (C) 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"
 #include <include/plugin/plugin.h>
 
 using namespace std;
diff --git a/myserver/src/plugin/plugin_info.cpp b/myserver/src/plugin/plugin_info.cpp
index 858dbd7..d039c3b 100644
--- a/myserver/src/plugin/plugin_info.cpp
+++ b/myserver/src/plugin/plugin_info.cpp
@@ -15,6 +15,7 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include "stdafx.h"
 #include <include/plugin/plugin_info.h>
 
 using namespace std;
diff --git a/myserver/src/protocol/control/control_header.cpp b/myserver/src/protocol/control/control_header.cpp
index 10dc818..19e9db1 100644
--- a/myserver/src/protocol/control/control_header.cpp
+++ b/myserver/src/protocol/control/control_header.cpp
@@ -1,20 +1,22 @@
 /*
-MyServer
-Copyright (C) 2004, 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/>.
+  MyServer
+  Copyright (C) 2004, 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"
+
 #include <include/protocol/protocol.h>
 #include <include/base/string/securestr.h>
 #include <include/protocol/control/control_header.h>
diff --git a/myserver/src/protocol/control/control_protocol.cpp b/myserver/src/protocol/control/control_protocol.cpp
index aea6af7..02de42c 100644
--- a/myserver/src/protocol/control/control_protocol.cpp
+++ b/myserver/src/protocol/control/control_protocol.cpp
@@ -1,20 +1,22 @@
 /*
-MyServer
-Copyright (C) 2004, 2005, 2006, 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/>.
+  MyServer
+  Copyright (C) 2004, 2005, 2006, 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"
+
 #include <include/protocol/protocol.h>
 #include <include/protocol/control/control_protocol.h>
 #include <include/base/xml/xml_parser.h>
diff --git a/myserver/src/protocol/http/dyn_http_command.cpp b/myserver/src/protocol/http/dyn_http_command.cpp
index 72082b2..459d71a 100644
--- a/myserver/src/protocol/http/dyn_http_command.cpp
+++ b/myserver/src/protocol/http/dyn_http_command.cpp
@@ -1,20 +1,22 @@
 /*
-MyServer
-Copyright (C) 2005, 2006, 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/>.
+  MyServer
+  Copyright (C) 2005, 2006, 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"
+
 #include <include/protocol/http/dyn_http_command.h>
 #include <include/server/server.h>
 
diff --git a/myserver/src/protocol/http/dyn_http_command_manager.cpp b/myserver/src/protocol/http/dyn_http_command_manager.cpp
index 33ef910..5b7b8ff 100644
--- a/myserver/src/protocol/http/dyn_http_command_manager.cpp
+++ b/myserver/src/protocol/http/dyn_http_command_manager.cpp
@@ -1,20 +1,21 @@
 /*
-MyServer
-Copyright (C) 2005, 2006, 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.
+  MyServer
+  Copyright (C) 2005, 2006, 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.
+  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/>.
+  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"
 
 #include <include/protocol/http/dyn_http_command_manager.h>
 #include <include/protocol/http/dyn_http_command.h>
diff --git a/myserver/src/protocol/http/dyn_http_manager.cpp b/myserver/src/protocol/http/dyn_http_manager.cpp
index 9781a7c..5b04c95 100644
--- a/myserver/src/protocol/http/dyn_http_manager.cpp
+++ b/myserver/src/protocol/http/dyn_http_manager.cpp
@@ -1,20 +1,21 @@
 /*
-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/>.
+  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"
 
 #include <include/protocol/http/dyn_http_manager.h>
 #include <include/base/xml/xml_parser.h>
diff --git a/myserver/src/protocol/http/dyn_http_manager_list.cpp b/myserver/src/protocol/http/dyn_http_manager_list.cpp
index 2851569..26a5465 100644
--- a/myserver/src/protocol/http/dyn_http_manager_list.cpp
+++ b/myserver/src/protocol/http/dyn_http_manager_list.cpp
@@ -1,20 +1,21 @@
 /*
-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.
+  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.
+  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/>.
+  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"
 
 #include <include/protocol/http/dyn_http_manager_list.h>
 #include <include/protocol/http/dyn_http_manager.h>
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 2e8adc8..a098074 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -15,6 +15,8 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include "stdafx.h"
+
 #include <include/protocol/http/http.h>
 #include <include/protocol/http/http_headers.h>
 #include <include/protocol/http/http_req_security_domain.h>
diff --git a/myserver/src/protocol/http/http_data_handler.cpp b/myserver/src/protocol/http/http_data_handler.cpp
index 2b9b665..c242e44 100644
--- a/myserver/src/protocol/http/http_data_handler.cpp
+++ b/myserver/src/protocol/http/http_data_handler.cpp
@@ -1,19 +1,22 @@
 /*
-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/>.
- */
+  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"
+
 #include <include/protocol/http/http_headers.h>
 #include <include/protocol/http/http.h>
 #include <include/protocol/http/http_data_handler.h>
diff --git a/myserver/src/protocol/http/http_data_read.cpp b/myserver/src/protocol/http/http_data_read.cpp
index 5d4c25a..ad406c0 100644
--- a/myserver/src/protocol/http/http_data_read.cpp
+++ b/myserver/src/protocol/http/http_data_read.cpp
@@ -1,20 +1,21 @@
 /*
-MyServer
-Copyright (C) 2002-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/>.
+  MyServer
+  Copyright (C) 2002-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"
 
 #include <include/protocol/http/http.h>
 #include <include/protocol/http/http_headers.h>
diff --git a/myserver/src/protocol/http/http_req_security_domain.cpp b/myserver/src/protocol/http/http_req_security_domain.cpp
index 7796d80..90301b4 100644
--- a/myserver/src/protocol/http/http_req_security_domain.cpp
+++ b/myserver/src/protocol/http/http_req_security_domain.cpp
@@ -1,21 +1,22 @@
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2005, 2006, 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/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2005, 2006, 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"
 
 #include <include/protocol/http/http_req_security_domain.h>
 #include <include/conf/security/security_domain.h>
@@ -24,7 +25,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *C'tor.
  *\param request The HTTP Request object to use.
  */
-HttpReqSecurityDomain::HttpReqSecurityDomain (HttpRequestHeader *request) : SecurityDomain ("http_request")
+HttpReqSecurityDomain::HttpReqSecurityDomain (HttpRequestHeader *request)
+  : SecurityDomain ("http_request")
 {
   this->request = request;
 }
diff --git a/myserver/src/protocol/https/https.cpp b/myserver/src/protocol/https/https.cpp
index cbd53e0..ed64a63 100644
--- a/myserver/src/protocol/https/https.cpp
+++ b/myserver/src/protocol/https/https.cpp
@@ -15,6 +15,8 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include "stdafx.h"
+
 #include <include/protocol/protocol.h>
 #include <include/protocol/https/https.h>
 
diff --git a/myserver/src/protocol/protocol_buffer.cpp b/myserver/src/protocol/protocol_buffer.cpp
index 87e4698..12c9b31 100644
--- a/myserver/src/protocol/protocol_buffer.cpp
+++ b/myserver/src/protocol/protocol_buffer.cpp
@@ -1,20 +1,22 @@
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2007, 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/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2007, 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"
+
 #include <include/protocol/protocol_buffer.h>
 
 /*!
diff --git a/myserver/src/protocol/protocols_manager.cpp b/myserver/src/protocol/protocols_manager.cpp
index 7d698d0..1b6b2b9 100644
--- a/myserver/src/protocol/protocols_manager.cpp
+++ b/myserver/src/protocol/protocols_manager.cpp
@@ -1,20 +1,22 @@
 /*
-MyServer
-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
-(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) 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
+  (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"
+
 
 #include <include/protocol/protocols_manager.h>
 #include <string>
diff --git a/myserver/src/protocol/url.cpp b/myserver/src/protocol/url.cpp
index 78863d3..76ef064 100644
--- a/myserver/src/protocol/url.cpp
+++ b/myserver/src/protocol/url.cpp
@@ -1,21 +1,21 @@
 /*
-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/>.
+  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 "stdafx.h"
 #include <include/protocol/url.h>
 
 

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

Summary of changes:
 myserver/include/base/base64/mime_utils.h          |   30 +++++++++--------
 myserver/include/conf/mime/mime_manager.h          |   26 ++++++++------
 myserver/include/conf/mime/xml_mime_handler.h      |   30 +++++++++--------
 myserver/include/conf/nodetree.h                   |   26 ++++++++------
 myserver/include/conf/security/security_cache.h    |   27 ++++++++------
 myserver/include/conf/xml_conf.h                   |   30 +++++++++--------
 myserver/include/connection/connection.h           |    2 +
 myserver/include/filter/console.h                  |    2 +
 myserver/include/http_handler/cgi/cgi.h            |   26 ++++++++------
 myserver/include/http_handler/proxy/proxy.h        |   26 ++++++++------
 myserver/include/http_handler/wincgi/wincgi.h      |   26 ++++++++------
 myserver/include/log/stream/console_stream.h       |    2 +
 .../include/log/stream/console_stream_creator.h    |    2 +
 myserver/include/log/stream/file_stream.h          |    2 +
 myserver/include/log/stream/file_stream_creator.h  |    2 +
 myserver/include/log/stream/log_stream.h           |    2 +
 myserver/include/log/stream/log_stream_creator.h   |    2 +
 myserver/include/log/stream/log_stream_factory.h   |    2 +
 myserver/include/log/stream/socket_stream.h        |    2 +
 .../include/log/stream/socket_stream_creator.h     |    2 +
 myserver/include/protocol/control/control_errors.h |   35 ++++++++++---------
 myserver/include/protocol/ftp/ftp_common.h         |   36 ++++++++++---------
 myserver/include/protocol/http/env/env.h           |   28 ++++++++-------
 myserver/include/protocol/http/http_errors.h       |   32 +++++++++--------
 myserver/include/protocol/http/http_header.h       |   35 ++++++++++---------
 myserver/include/protocol/http/http_request.h      |   35 ++++++++++---------
 myserver/include/protocol/http/http_response.h     |   34 ++++++++++---------
 myserver/include/protocol/protocol_buffer.h        |    4 ++-
 myserver/src/base/crypt/crypt_algo_manager.cpp     |   28 ++++++++-------
 myserver/src/base/dynamic_lib/dynamiclib.cpp       |   25 +++++++------
 myserver/src/base/hash_map/hash_map.cpp            |   26 ++++++++------
 myserver/src/base/multicast/multicast.cpp          |   34 ++++++++++--------
 myserver/src/base/process/fork_server.cpp          |    2 +
 .../src/base/process/process_server_manager.cpp    |   26 ++++++++------
 .../src/base/read_directory/read_directory.cpp     |   27 ++++++++------
 myserver/src/base/regex/myserver_regex.cpp         |   26 ++++++++------
 myserver/src/base/ssl/ssl.cpp                      |   30 +++++++++--------
 myserver/src/base/string/securestr.cpp             |    3 ++
 myserver/src/base/xml/xml_parser.cpp               |   26 ++++++++------
 myserver/src/conf/main/main_configuration.cpp      |    2 +
 myserver/src/conf/main/xml_main_configuration.cpp  |    2 +
 myserver/src/conf/security/auth_domain.cpp         |   31 +++++++++--------
 myserver/src/conf/security/auth_method.cpp         |   32 +++++++++---------
 myserver/src/conf/security/auth_method_factory.cpp |   28 ++++++++-------
 myserver/src/conf/security/security_cache.cpp      |   26 ++++++++------
 myserver/src/conf/security/security_domain.cpp     |   32 +++++++++--------
 myserver/src/conf/security/security_manager.cpp    |   25 +++++++------
 myserver/src/conf/security/security_token.cpp      |   30 +++++++++--------
 myserver/src/conf/security/validator.cpp           |   29 ++++++++--------
 myserver/src/conf/security/validator_factory.cpp   |   27 ++++++++-------
 myserver/src/conf/security/xml_validator.cpp       |   26 ++++++++------
 myserver/src/conf/vhost/ip.cpp                     |    4 ++-
 myserver/src/conf/vhost/vhost_manager.cpp          |    3 ++
 myserver/src/conf/vhost/xml_vhost_handler.cpp      |    3 ++
 .../connections_scheduler.cpp                      |   26 ++++++++------
 .../src/connections_scheduler/listen_threads.cpp   |   27 ++++++++------
 myserver/src/filter/gzip/gzip.cpp                  |   30 +++++++++--------
 myserver/src/filter/gzip/gzip_decompress.cpp       |    1 +
 myserver/src/filter/memory_stream.cpp              |   31 +++++++++--------
 myserver/src/filter/stream.cpp                     |   26 ++++++++------
 myserver/src/http_handler/fastcgi/fastcgi.cpp      |    3 ++
 myserver/src/http_handler/http_file/http_file.cpp  |    1 +
 myserver/src/http_handler/scgi/scgi.cpp            |    3 ++
 myserver/src/plugin/plugin.cpp                     |   29 ++++++++--------
 myserver/src/plugin/plugin_info.cpp                |    1 +
 myserver/src/protocol/control/control_header.cpp   |   30 +++++++++--------
 myserver/src/protocol/control/control_protocol.cpp |   30 +++++++++--------
 myserver/src/protocol/http/dyn_http_command.cpp    |   30 +++++++++--------
 .../src/protocol/http/dyn_http_command_manager.cpp |   25 +++++++------
 myserver/src/protocol/http/dyn_http_manager.cpp    |   29 ++++++++--------
 .../src/protocol/http/dyn_http_manager_list.cpp    |   25 +++++++------
 myserver/src/protocol/http/http.cpp                |    2 +
 myserver/src/protocol/http/http_data_handler.cpp   |   33 ++++++++++--------
 myserver/src/protocol/http/http_data_read.cpp      |   25 +++++++------
 .../src/protocol/http/http_req_security_domain.cpp |   34 ++++++++++---------
 myserver/src/protocol/https/https.cpp              |    2 +
 myserver/src/protocol/protocol_buffer.cpp          |   30 +++++++++--------
 myserver/src/protocol/protocols_manager.cpp        |   30 +++++++++--------
 myserver/src/protocol/url.cpp                      |   26 +++++++-------
 79 files changed, 870 insertions(+), 720 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Nov 06 19:37:01 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N6ZIb-0002c3-7j
	for mharc-myserver-commit@gnu.org; Fri, 06 Nov 2009 19:37:01 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N6ZIa-0002bG-Dm
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 19:37:00 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N6ZIZ-0002aA-M8
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 19:36:59 -0500
Received: from [199.232.76.173] (port=38424 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N6ZIZ-0002Zz-Fe
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 19:36:59 -0500
Received: from savannah.gnu.org ([199.232.41.3]:38651 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 1N6ZIZ-0006Wt-5X
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 19:36:59 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N6ZIY-00071m-Hm
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 00:36:58 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N6ZIY-00071J-BT
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 00:36:58 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: ad39c98edc29a37a2e51a0199f817d336ad56fe6
X-Git-Newrev: b3af1c9fcee65903a7e9fda30b3c9aad9c6f2611
Message-Id: <E1N6ZIY-00071J-BT@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sat, 07 Nov 2009 00:36: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. 0_9-371-gb3af1c9
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, 07 Nov 2009 00:37: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  b3af1c9fcee65903a7e9fda30b3c9aad9c6f2611 (commit)
      from  ad39c98edc29a37a2e51a0199f817d336ad56fe6 (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 b3af1c9fcee65903a7e9fda30b3c9aad9c6f2611
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Nov 7 01:29:39 2009 +0100

    Use an enum to define the control protocol codes.

diff --git a/myserver/include/protocol/control/control_errors.h b/myserver/include/protocol/control/control_errors.h
index 626f6f6..322bbf0 100644
--- a/myserver/include/protocol/control/control_errors.h
+++ b/myserver/include/protocol/control/control_errors.h
@@ -26,34 +26,37 @@
  * Use these definitions instead of hardly-code the value.
  */
 
-  /*! The request was accepted and served. */
-# define CONTROL_OK            100
+enum
+  {
+    /*! The request was accepted and served. */
+    CONTROL_OK = 100,
 
-  /*! A generic error was encountered. */
-# define CONTROL_ERROR         200
+    /*! A generic error was encountered. */
+    CONTROL_ERROR = 200,
 
-  /*! An internal server error happened. */
-# define CONTROL_INTERNAL      201
+    /*! An internal server error happened. */
+    CONTROL_INTERNAL = 201,
 
-  /*! The Authorization was not accepted. */
-# define CONTROL_AUTH          202
+    /*! The Authorization was not accepted. */
+    CONTROL_AUTH = 202,
 
-  /*! A malformed request was sent. */
-# define CONTROL_MALFORMED     203
+    /*! A malformed request was sent. */
+    CONTROL_MALFORMED = 203,
 
-  /*! A bad command was specified. */
-# define CONTROL_CMD_NOT_FOUND    204
+    /*! A bad command was specified. */
+    CONTROL_CMD_NOT_FOUND = 204,
 
-  /*! A bad length field was specified. */
-# define CONTROL_BAD_LEN     205
+    /*! A bad length field was specified. */
+    CONTROL_BAD_LEN = 205,
 
-  /*! The server is too busy to handle the request. */
-# define CONTROL_SERVER_BUSY      206
+    /*! The server is too busy to handle the request. */
+    CONTROL_SERVER_BUSY = 206,
 
-  /*! The client uses a version of this protocol that we cannot understand. */
-# define CONTROL_BAD_VERSION      207
+    /*! The client uses a version of this protocol that we cannot understand. */
+    CONTROL_BAD_VERSION = 207,
 
-  /*! The requested file doesn't exist on the local FS. */
-# define CONTROL_FILE_NOT_FOUND      208
+    /*! The requested file doesn't exist on the local FS. */
+    CONTROL_FILE_NOT_FOUND = 208
+  };
 
 #endif

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

Summary of changes:
 myserver/include/protocol/control/control_errors.h |   43 ++++++++++---------
 1 files changed, 23 insertions(+), 20 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Fri Nov 06 20:25:28 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N6a3U-0006hW-Ca
	for mharc-myserver-commit@gnu.org; Fri, 06 Nov 2009 20:25:28 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N6a3R-0006hJ-SR
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 20:25:25 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N6a3P-0006gr-18
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 20:25:24 -0500
Received: from [199.232.76.173] (port=50006 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N6a3O-0006go-Qd
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 20:25:22 -0500
Received: from savannah.gnu.org ([199.232.41.3]:59370 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 1N6a3N-0004Md-Kb
	for myserver-commit@gnu.org; Fri, 06 Nov 2009 20:25:22 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N6a3M-0001nO-Kv
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 01:25:20 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N6a3K-0001ms-F4
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 01:25:20 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: b3af1c9fcee65903a7e9fda30b3c9aad9c6f2611
X-Git-Newrev: 2061dc519cc864c8da2ff425b2733b71722eaa93
Message-Id: <E1N6a3K-0001ms-F4@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sat, 07 Nov 2009 01:25:19 +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. 0_9-373-g2061dc5
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, 07 Nov 2009 01:25:26 -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  2061dc519cc864c8da2ff425b2733b71722eaa93 (commit)
       via  643175177b8348828d281cbb6268c11a0a74a122 (commit)
      from  b3af1c9fcee65903a7e9fda30b3c9aad9c6f2611 (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 2061dc519cc864c8da2ff425b2733b71722eaa93
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Nov 7 02:11:51 2009 +0100

    Rename secondaryBuffer to auxiliaryBuffer plus minor style changes.

diff --git a/myserver/include/protocol/ftp/ftp.h b/myserver/include/protocol/ftp/ftp.h
index df4ea16..e420bbf 100644
--- a/myserver/include/protocol/ftp/ftp.h
+++ b/myserver/include/protocol/ftp/ftp.h
@@ -90,7 +90,7 @@ struct FtpThreadContext
   FtpThreadContext ();
   ConnectionPtr pConnection;
   MemBuf *buffer;
-  MemBuf *secondaryBuffer;
+  MemBuf *auxiliaryBuffer;
   u_long buffersize;
   u_long m_nParseLength;
   u_long nBytesToRead;
diff --git a/myserver/include/protocol/http/http_thread_context.h b/myserver/include/protocol/http/http_thread_context.h
index 7a069e4..5df3dab 100644
--- a/myserver/include/protocol/http/http_thread_context.h
+++ b/myserver/include/protocol/http/http_thread_context.h
@@ -64,7 +64,7 @@ struct HttpThreadContext
 
   ConnectionPtr connection;
   MemBuf *buffer;
-  MemBuf *secondaryBuffer;
+  MemBuf *auxiliaryBuffer;
   u_long buffersize;
   u_long id;
   u_long nBytesToRead;
diff --git a/myserver/include/server/clients_thread.h b/myserver/include/server/clients_thread.h
index ec18093..9b44f81 100644
--- a/myserver/include/server/clients_thread.h
+++ b/myserver/include/server/clients_thread.h
@@ -85,7 +85,7 @@ private:
   bool isRunning ();
   bool isStopped ();
   MemBuf buffer;
-  MemBuf secondaryBuffer;
+  MemBuf auxiliaryBuffer;
   int controlConnections ();
   u_long nBytesToRead;
 };
diff --git a/myserver/src/http_handler/cgi/cgi.cpp b/myserver/src/http_handler/cgi/cgi.cpp
index 209c397..79dbe14 100644
--- a/myserver/src/http_handler/cgi/cgi.cpp
+++ b/myserver/src/http_handler/cgi/cgi.cpp
@@ -231,10 +231,10 @@ int Cgi::send (HttpThreadContext* td, const char* scriptpath,
 
   /*
    *Build the environment string used by the CGI process.
-   *Use the td->secondaryBuffer to build the environment string.
+   *Use the td->auxiliaryBuffer to build the environment string.
    */
-  (td->secondaryBuffer->getBuffer ())[0] = '\0';
-  Env::buildEnvironmentString (td, td->secondaryBuffer->getBuffer ());
+  (td->auxiliaryBuffer->getBuffer ())[0] = '\0';
+  Env::buildEnvironmentString (td, td->auxiliaryBuffer->getBuffer ());
 
   spi.cmdLine = cmdLine.str ();
   spi.cwd.assign (td->scriptDir);
@@ -255,7 +255,7 @@ int Cgi::send (HttpThreadContext* td, const char* scriptpath,
   spi.stdError = (FileHandle) stdOutFile.getWriteHandle ();
   spi.stdIn = (FileHandle) stdInFile.getHandle ();
   spi.stdOut = (FileHandle) stdOutFile.getWriteHandle ();
-  spi.envString = td->secondaryBuffer->getBuffer ();
+  spi.envString = td->auxiliaryBuffer->getBuffer ();
 
   if (spi.stdError == (FileHandle) -1 ||
       spi.stdIn == (FileHandle) -1 ||
@@ -328,8 +328,8 @@ int Cgi::sendData (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain,
   bool keepalive = false;
   int ret = 0;
 
-  /* Reset the secondaryBuffer length counter. */
-  td->secondaryBuffer->setLength (0);
+  /* Reset the auxiliaryBuffer length counter. */
+  td->auxiliaryBuffer->setLength (0);
 
   procStartTime = getTicks ();
 
@@ -375,8 +375,8 @@ int Cgi::sendData (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain,
       aliveProcess = !stdOutFile.pipeTerminated ();
 
       /* Read data from the process standard output file.  */
-      if (stdOutFile.read (td->secondaryBuffer->getBuffer (),
-                           td->secondaryBuffer->getRealLength (),
+      if (stdOutFile.read (td->auxiliaryBuffer->getBuffer (),
+                           td->auxiliaryBuffer->getRealLength (),
                            &nBytesRead))
         return HttpDataHandler::RET_FAILURE;
 
@@ -385,7 +385,7 @@ int Cgi::sendData (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain,
 
       if (nBytesRead &&
           HttpDataHandler::appendDataToHTTPChannel (td,
-                                                    td->secondaryBuffer->getBuffer (),
+                                                    td->auxiliaryBuffer->getBuffer (),
                                                     nBytesRead,
                                                     &(td->outputData),
                                                     &chain,
@@ -432,7 +432,7 @@ int Cgi::sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chai
 
     /* Do not try to read using a small buffer as this has some
        bad influence on the performances.  */
-    if (td->secondaryBuffer->getRealLength () - headerOffset - 1 < 512)
+    if (td->auxiliaryBuffer->getRealLength () - headerOffset - 1 < 512)
       break;
 
     term = stdOutFile.pipeTerminated ();
@@ -445,8 +445,8 @@ int Cgi::sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chai
         break;
       }
 
-    if (stdOutFile.read (td->secondaryBuffer->getBuffer () + headerOffset,
-                         td->secondaryBuffer->getRealLength () - headerOffset - 1,
+    if (stdOutFile.read (td->auxiliaryBuffer->getBuffer () + headerOffset,
+                         td->auxiliaryBuffer->getRealLength () - headerOffset - 1,
                          &nBytesRead))
       {
         *ret = td->http->raiseHTTPError (500);
@@ -462,7 +462,7 @@ int Cgi::sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chai
 
     headerOffset += nBytesRead;
     if (headerOffset > td->buffersize - 5)
-      (td->secondaryBuffer->getBuffer ())[headerOffset] = '\0';
+      (td->auxiliaryBuffer->getBuffer ())[headerOffset] = '\0';
 
     if (headerOffset == 0)
       {
@@ -473,7 +473,7 @@ int Cgi::sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chai
     for (u_long i = std::max (0UL, headerOffset - nBytesRead - 10);
          i < headerOffset; i++)
       {
-        char *buff = td->secondaryBuffer->getBuffer ();
+        char *buff = td->auxiliaryBuffer->getBuffer ();
         if ((buff[i] == '\r') && (buff[i+1] == '\n')
             && (buff[i+2] == '\r') && (buff[i+3] == '\n'))
           {
@@ -506,7 +506,7 @@ int Cgi::sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chai
 
       /* Send the header.  */
       if (headerSize)
-        HttpHeaders::buildHTTPResponseHeaderStruct (td->secondaryBuffer->getBuffer (),
+        HttpHeaders::buildHTTPResponseHeaderStruct (td->auxiliaryBuffer->getBuffer (),
                                                     &td->response,
                                                     &(td->nBytesToRead));
       /*
@@ -539,7 +539,7 @@ int Cgi::sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chai
     {
       /* Flush the buffer.  Data from the header parsing can be present.  */
       if (HttpDataHandler::appendDataToHTTPChannel (td,
-                             td->secondaryBuffer->getBuffer () + headerSize,
+                             td->auxiliaryBuffer->getBuffer () + headerSize,
                                                     headerOffset - headerSize,
                                                     &(td->outputData),
                                                     &chain,
diff --git a/myserver/src/http_handler/fastcgi/fastcgi.cpp b/myserver/src/http_handler/fastcgi/fastcgi.cpp
index 396ac0e..194bd71 100644
--- a/myserver/src/http_handler/fastcgi/fastcgi.cpp
+++ b/myserver/src/http_handler/fastcgi/fastcgi.cpp
@@ -114,7 +114,7 @@ int FastCgi::send (HttpThreadContext* td, const char* scriptpath,
     }
 
   td->buffer->setLength (0);
-  td->secondaryBuffer->getAt (0) = '\0';
+  td->auxiliaryBuffer->getAt (0) = '\0';
 
 
   /*! Do not modify the text between " and ".  */
@@ -573,7 +573,7 @@ int FastCgi::fastCgiRequest (FcgiContext* con, int id)
 
   Env::buildEnvironmentString (td, td->buffer->getBuffer ());
   sizeEnvString = buildFASTCGIEnvironmentString (td,td->buffer->getBuffer (),
-                                                td->secondaryBuffer->getBuffer ());
+                                                td->auxiliaryBuffer->getBuffer ());
   if (sizeEnvString == -1)
   {
     td->buffer->setLength (0);
@@ -594,7 +594,7 @@ int FastCgi::fastCgiRequest (FcgiContext* con, int id)
     return 1;
   }
 
-  if (sendFcgiBody (con, td->secondaryBuffer->getBuffer (), sizeEnvString,
+  if (sendFcgiBody (con, td->auxiliaryBuffer->getBuffer (), sizeEnvString,
                   FCGIPARAMS, id))
   {
     td->buffer->setLength (0);
@@ -787,7 +787,7 @@ int FastCgi::handleHeader (FcgiContext* con, FiltersChain* chain, bool* response
     }
 
   if (HttpHeaders::sendHeader (con->td->response, *con->td->connection->socket,
-                               *con->td->secondaryBuffer, con->td))
+                               *con->td->auxiliaryBuffer, con->td))
     {
       *responseCompleted = true;
       return 1;
diff --git a/myserver/src/http_handler/http_dir/http_dir.cpp b/myserver/src/http_handler/http_dir/http_dir.cpp
index 25eb7ec..9a53ee1 100644
--- a/myserver/src/http_handler/http_dir/http_dir.cpp
+++ b/myserver/src/http_handler/http_dir/http_dir.cpp
@@ -394,14 +394,14 @@ int HttpDir::send (HttpThreadContext* td,
                                        | MYSERVER_VHOST_CONF
                                        | MYSERVER_SERVER_CONF, NULL);
 
-  td->secondaryBuffer->setLength (0);
-  *td->secondaryBuffer << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"
+  td->auxiliaryBuffer->setLength (0);
+  *td->auxiliaryBuffer << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"
     "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"\r\n"
     "\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\r\n"
     "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">"
     "\r\n<head>\r\n<title>" ;
-  *td->secondaryBuffer << td->request.uri.c_str () ;
-  *td->secondaryBuffer << "</title>\r\n";
+  *td->auxiliaryBuffer << td->request.uri.c_str () ;
+  *td->auxiliaryBuffer << "</title>\r\n";
 
   /*
    * If it is defined a CSS file for the graphic layout of
@@ -409,15 +409,15 @@ int HttpDir::send (HttpThreadContext* td,
    */
   if (cssFile)
     {
-      *td->secondaryBuffer << "<link rel=\"stylesheet\" href=\""
+      *td->auxiliaryBuffer << "<link rel=\"stylesheet\" href=\""
                            << cssFile
                            << "\" type=\"text/css\" media=\"all\"/>\r\n";
     }
 
-  *td->secondaryBuffer << "</head>\r\n";
+  *td->auxiliaryBuffer << "</head>\r\n";
 
-  ret = appendDataToHTTPChannel (td, td->secondaryBuffer->getBuffer (),
-                                 td->secondaryBuffer->getLength (),
+  ret = appendDataToHTTPChannel (td, td->auxiliaryBuffer->getBuffer (),
+                                 td->auxiliaryBuffer->getLength (),
                                  &(td->outputData), &chain,
                                  td->appendOutputs, useChunks);
   if (ret)
@@ -428,16 +428,16 @@ int HttpDir::send (HttpThreadContext* td,
       return td->http->raiseHTTPError (500);
     }
 
-  sentData = td->secondaryBuffer->getLength ();
+  sentData = td->auxiliaryBuffer->getLength ();
 
   filename = directory;
-  td->secondaryBuffer->setLength (0);
-  *td->secondaryBuffer << "<body>\r\n<h1>Contents of directory ";
-  *td->secondaryBuffer <<  &td->request.uri[lastSlash] ;
-  *td->secondaryBuffer << "</h1>\r\n<hr />\r\n";
+  td->auxiliaryBuffer->setLength (0);
+  *td->auxiliaryBuffer << "<body>\r\n<h1>Contents of directory ";
+  *td->auxiliaryBuffer <<  &td->request.uri[lastSlash] ;
+  *td->auxiliaryBuffer << "</h1>\r\n<hr />\r\n";
 
-  ret = appendDataToHTTPChannel (td, td->secondaryBuffer->getBuffer (),
-                                 td->secondaryBuffer->getLength (),
+  ret = appendDataToHTTPChannel (td, td->auxiliaryBuffer->getBuffer (),
+                                 td->auxiliaryBuffer->getLength (),
                                  &(td->outputData), &chain,
                                  td->appendOutputs, useChunks);
 
@@ -447,7 +447,7 @@ int HttpDir::send (HttpThreadContext* td,
       /* Return an internal server error.  */
       return td->http->raiseHTTPError (500);
     }
-  sentData += td->secondaryBuffer->getLength ();
+  sentData += td->auxiliaryBuffer->getLength ();
 
   ret = fd.findfirst (filename.c_str ());
 
@@ -461,13 +461,13 @@ int HttpDir::send (HttpThreadContext* td,
    * With the current code we build the HTML TABLE to indicize the
    * files in the directory.
    */
-  td->secondaryBuffer->setLength (0);
-  *td->secondaryBuffer << "<table width=\"100%\">\r\n" ;
+  td->auxiliaryBuffer->setLength (0);
+  *td->auxiliaryBuffer << "<table width=\"100%\">\r\n" ;
 
-  generateHeader (*td->secondaryBuffer, sortType, sortReverse, formatString);
+  generateHeader (*td->auxiliaryBuffer, sortType, sortReverse, formatString);
 
-  ret = appendDataToHTTPChannel (td, td->secondaryBuffer->getBuffer (),
-                                 td->secondaryBuffer->getLength (),
+  ret = appendDataToHTTPChannel (td, td->auxiliaryBuffer->getBuffer (),
+                                 td->auxiliaryBuffer->getLength (),
                                  &(td->outputData), &chain,
                                  td->appendOutputs, useChunks);
 
@@ -479,9 +479,9 @@ int HttpDir::send (HttpThreadContext* td,
       return td->http->raiseHTTPError (500);
     }
 
-  sentData += td->secondaryBuffer->getLength ();
+  sentData += td->auxiliaryBuffer->getLength ();
 
-  td->secondaryBuffer->setLength (0);
+  td->auxiliaryBuffer->setLength (0);
 
   if (FilesUtility::getPathRecursionLevel (td->request.uri) >= 1)
     {
@@ -490,7 +490,7 @@ int HttpDir::send (HttpThreadContext* td,
       file.assign (td->request.uri);
       file.append ("/../");
 
-      *td->secondaryBuffer << "<tr>\r\n";
+      *td->auxiliaryBuffer << "<tr>\r\n";
 
       for (;;)
         {
@@ -501,20 +501,20 @@ int HttpDir::send (HttpThreadContext* td,
             break;
 
           if (*cur == 'f')
-            *td->secondaryBuffer << "<td>\n"
+            *td->auxiliaryBuffer << "<td>\n"
                                  << "<a href=\""
                                  << (td->request.uriEndsWithSlash ? ".." : ".")
                                  << "\">[ .. ]</a></td>\n";
           else
-            *td->secondaryBuffer << "<td></td>\n";
+            *td->auxiliaryBuffer << "<td></td>\n";
 
           cur++;
         }
 
-      *td->secondaryBuffer << "</tr>\r\n";
+      *td->auxiliaryBuffer << "</tr>\r\n";
 
-      ret = appendDataToHTTPChannel (td, td->secondaryBuffer->getBuffer (),
-                                     td->secondaryBuffer->getLength (),
+      ret = appendDataToHTTPChannel (td, td->auxiliaryBuffer->getBuffer (),
+                                     td->auxiliaryBuffer->getLength (),
                                      &(td->outputData), &chain,
                                      td->appendOutputs, useChunks);
       if (ret)
@@ -525,7 +525,7 @@ int HttpDir::send (HttpThreadContext* td,
           /* Return an internal server error.  */
           return td->http->raiseHTTPError (500);
         }
-      sentData += td->secondaryBuffer->getLength ();
+      sentData += td->auxiliaryBuffer->getLength ();
     }
 
   /* Put all files in a vector.  */
@@ -583,12 +583,12 @@ int HttpDir::send (HttpThreadContext* td,
     {
       FileStruct& file = *it;
 
-      td->secondaryBuffer->setLength (0);
+      td->auxiliaryBuffer->setLength (0);
 
-      generateElement (*td->secondaryBuffer, file, linkPrefix, formatString);
+      generateElement (*td->auxiliaryBuffer, file, linkPrefix, formatString);
 
-      ret = appendDataToHTTPChannel (td, td->secondaryBuffer->getBuffer (),
-                                     td->secondaryBuffer->getLength (),
+      ret = appendDataToHTTPChannel (td, td->auxiliaryBuffer->getBuffer (),
+                                     td->auxiliaryBuffer->getLength (),
                                      &(td->outputData), &chain,
                                      td->appendOutputs, useChunks);
       if (ret)
@@ -599,31 +599,31 @@ int HttpDir::send (HttpThreadContext* td,
           return td->http->raiseHTTPError (500);
         }
 
-      sentData += td->secondaryBuffer->getLength ();
+      sentData += td->auxiliaryBuffer->getLength ();
 
     }
 
-  td->secondaryBuffer->setLength (0);
-  *td->secondaryBuffer << "</table>\r\n<hr />\r\n<address>"
+  td->auxiliaryBuffer->setLength (0);
+  *td->auxiliaryBuffer << "</table>\r\n<hr />\r\n<address>"
                        << MYSERVER_VERSION;
 
   if (host && host->value->length ())
     {
       ostringstream portBuff;
       size_t portSeparator = host->value->find (':');
-      *td->secondaryBuffer << " on ";
+      *td->auxiliaryBuffer << " on ";
       if (portSeparator != string::npos)
-        *td->secondaryBuffer << host->value->substr (0, portSeparator).c_str () ;
+        *td->auxiliaryBuffer << host->value->substr (0, portSeparator).c_str () ;
       else
-        *td->secondaryBuffer << host->value->c_str () ;
+        *td->auxiliaryBuffer << host->value->c_str () ;
 
-      *td->secondaryBuffer << " Port ";
+      *td->auxiliaryBuffer << " Port ";
       portBuff << td->connection->getLocalPort ();
-      *td->secondaryBuffer << portBuff.str ();
+      *td->auxiliaryBuffer << portBuff.str ();
     }
-  *td->secondaryBuffer << "</address>\r\n</body>\r\n</html>\r\n";
-  ret = appendDataToHTTPChannel (td, td->secondaryBuffer->getBuffer (),
-                                 td->secondaryBuffer->getLength (),
+  *td->auxiliaryBuffer << "</address>\r\n</body>\r\n</html>\r\n";
+  ret = appendDataToHTTPChannel (td, td->auxiliaryBuffer->getBuffer (),
+                                 td->auxiliaryBuffer->getLength (),
                                  &(td->outputData), &chain,
                                  td->appendOutputs, useChunks);
 
@@ -633,11 +633,11 @@ int HttpDir::send (HttpThreadContext* td,
       /* Return an internal server error.  */
       return td->http->raiseHTTPError (500);
     }
-  sentData += td->secondaryBuffer->getLength ();
+  sentData += td->auxiliaryBuffer->getLength ();
 
-  *td->secondaryBuffer << end_str;
+  *td->auxiliaryBuffer << end_str;
   /* Changes the \ character in the / character.  */
-  bufferloop = td->secondaryBuffer->getBuffer ();
+  bufferloop = td->auxiliaryBuffer->getBuffer ();
   while (*bufferloop++)
     if (*bufferloop == '\\')
       *bufferloop = '/';
diff --git a/myserver/src/http_handler/http_file/http_file.cpp b/myserver/src/http_handler/http_file/http_file.cpp
index 287b937..0488ab6 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -221,7 +221,7 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
   bool keepalive = false;
   bool useChunks = false;
   bool useModifiers = false;
-  MemoryStream memStream (td->secondaryBuffer);
+  MemoryStream memStream (td->auxiliaryBuffer);
   FiltersChain chain;
   u_long nbw;
   u_long nbr;
diff --git a/myserver/src/http_handler/isapi/isapi.cpp b/myserver/src/http_handler/isapi/isapi.cpp
index 9c96057..ce5f352 100644
--- a/myserver/src/http_handler/isapi/isapi.cpp
+++ b/myserver/src/http_handler/isapi/isapi.cpp
@@ -292,7 +292,7 @@ BOOL WINAPI ISAPI_WriteClientExport (HCONN hConn, LPVOID Buffer, LPDWORD lpdwByt
 
 
               if (HttpHeaders::sendHeader (ConnInfo->td->response, *td->connection->socket,
-                                           *ConnInfo->td->secondaryBuffer, ConnInfo->td))
+                                           *ConnInfo->td->auxiliaryBuffer, ConnInfo->td))
                 return HttpDataHandler::RET_FAILURE;
             }
           /*! Save the headerSent status. */
@@ -846,8 +846,8 @@ int Isapi::send (HttpThreadContext* td,
       return td->http->raiseHTTPError (500);
     }
 
-  /* Store the environment string in the secondaryBuffer.  */
-  connTable[connIndex].envString=td->secondaryBuffer->getBuffer ();
+  /* Store the environment string in the auxiliaryBuffer.  */
+  connTable[connIndex].envString=td->auxiliaryBuffer->getBuffer ();
 
   /* Build the environment string.  */
   td->scriptPath.assign (scriptpath);
diff --git a/myserver/src/http_handler/mscgi/mscgi.cpp b/myserver/src/http_handler/mscgi/mscgi.cpp
index d27cdde..5bfeb6f 100644
--- a/myserver/src/http_handler/mscgi/mscgi.cpp
+++ b/myserver/src/http_handler/mscgi/mscgi.cpp
@@ -118,7 +118,7 @@ int MsCgi::send (HttpThreadContext* td, const char* exec, const char* cmdLine,
       return td->http->raiseHTTPError (500);
     }
 
-  td->secondaryBuffer->getAt (0) = '\0';
+  td->auxiliaryBuffer->getAt (0) = '\0';
 
   ProcMain = (CGIMAIN) hinstLib.getProc ( "myserver_main");
   if (ProcMain)
@@ -193,7 +193,7 @@ int MsCgi::sendHeader (MsCgiData* mcd)
     return 0;
 
   if (HttpHeaders::sendHeader (td->response, *td->connection->socket,
-                               *td->secondaryBuffer, td))
+                               *td->auxiliaryBuffer, td))
     return 1;
 
   mcd->headerSent = true;
diff --git a/myserver/src/http_handler/proxy/proxy.cpp b/myserver/src/http_handler/proxy/proxy.cpp
index 846aaed..48a4816 100644
--- a/myserver/src/http_handler/proxy/proxy.cpp
+++ b/myserver/src/http_handler/proxy/proxy.cpp
@@ -92,14 +92,14 @@ int Proxy::send (HttpThreadContext *td,
     return td->http->raiseHTTPError (500);
 
   if (HttpHeaders::sendHeader (td->response, *td->connection->socket,
-                               *td->secondaryBuffer, td))
+                               *td->auxiliaryBuffer, td))
     {
       chain.clearAllFilters ();
       return HttpDataHandler::RET_FAILURE;
     }
 
   if (td->request.uriOptsPtr &&
-      td->inputData.fastCopyToSocket (&sock, 0, td->secondaryBuffer, &nbw))
+      td->inputData.fastCopyToSocket (&sock, 0, td->auxiliaryBuffer, &nbw))
     {
       sock.close ();
       return td->http->raiseHTTPError (500);
@@ -143,15 +143,15 @@ int Proxy::flushToClient (HttpThreadContext* td, Socket& client,
 
   do
     {
-      if (client.recv (td->secondaryBuffer->getBuffer () + read,
-                       td->secondaryBuffer->getRealLength () - read,
+      if (client.recv (td->auxiliaryBuffer->getBuffer () + read,
+                       td->auxiliaryBuffer->getRealLength () - read,
                        0,
                        td->http->getTimeout () == 0))
         return td->http->raiseHTTPError (500);
 
       read += ret;
 
-      if (HttpHeaders::buildHTTPResponseHeaderStruct (td->secondaryBuffer->getBuffer (),
+      if (HttpHeaders::buildHTTPResponseHeaderStruct (td->auxiliaryBuffer->getBuffer (),
                                                       &td->response,
                                                       &headerLength))
       ret = HttpDataHandler::RET_FAILURE;
@@ -202,7 +202,7 @@ int Proxy::flushToClient (HttpThreadContext* td, Socket& client,
                      &td->response,
                      &out,
                      &client,
-                     td->secondaryBuffer->getBuffer () + headerLength,
+                     td->auxiliaryBuffer->getBuffer () + headerLength,
                      read - headerLength,
                      td->http->getTimeout (),
                      useChunks,
diff --git a/myserver/src/http_handler/scgi/scgi.cpp b/myserver/src/http_handler/scgi/scgi.cpp
index 5fe64a4..0a14904 100644
--- a/myserver/src/http_handler/scgi/scgi.cpp
+++ b/myserver/src/http_handler/scgi/scgi.cpp
@@ -89,7 +89,7 @@ int Scgi::send (HttpThreadContext* td, const char* scriptpath,
   }
 
   td->buffer->setLength (0);
-  td->secondaryBuffer->getAt (0) = '\0';
+  td->auxiliaryBuffer->getAt (0) = '\0';
 
   {
     /* Do not modify the text between " and ".  */
@@ -168,7 +168,7 @@ int Scgi::send (HttpThreadContext* td, const char* scriptpath,
 
   Env::buildEnvironmentString (td, td->buffer->getBuffer ());
   sizeEnvString = buildScgiEnvironmentString (td,td->buffer->getBuffer (),
-                                             td->secondaryBuffer->getBuffer ());
+                                             td->auxiliaryBuffer->getBuffer ());
   if (sizeEnvString == -1)
   {
     td->connection->host->warningsLogWrite (_("SCGI: internal error"));
@@ -194,7 +194,7 @@ int Scgi::send (HttpThreadContext* td, const char* scriptpath,
     chain.clearAllFilters ();
     return td->http->raiseHTTPError (500);
   }
-  ret = sendNetString (&con, td->secondaryBuffer->getBuffer (), sizeEnvString);
+  ret = sendNetString (&con, td->auxiliaryBuffer->getBuffer (), sizeEnvString);
 
   if (td->request.contentLength.size () &&
      !td->request.contentLength.compare ("0"))
@@ -246,8 +246,8 @@ int Scgi::sendResponse (ScgiContext* ctx, int onlyHeader, FiltersChain* chain)
       if (!ctx->sock.bytesToRead ())
         return HttpDataHandler::RET_FAILURE;
 
-      nbr = ctx->sock.recv (td->secondaryBuffer->getBuffer () + read,
-                            td->secondaryBuffer->getRealLength () - read,
+      nbr = ctx->sock.recv (td->auxiliaryBuffer->getBuffer () + read,
+                            td->auxiliaryBuffer->getRealLength () - read,
                             td->http->getTimeout ());
 
       read += nbr;
@@ -255,10 +255,10 @@ int Scgi::sendResponse (ScgiContext* ctx, int onlyHeader, FiltersChain* chain)
       for (tmpHeaderSize = (tmpHeaderSize > 3)
              ? tmpHeaderSize - 4 : tmpHeaderSize;
            tmpHeaderSize < read - 4; tmpHeaderSize++)
-        if ((td->secondaryBuffer->getBuffer ()[tmpHeaderSize] == '\r')
-            && (td->secondaryBuffer->getBuffer ()[tmpHeaderSize + 1] == '\n')
-            && (td->secondaryBuffer->getBuffer ()[tmpHeaderSize + 2] == '\r')
-            && (td->secondaryBuffer->getBuffer ()[tmpHeaderSize + 3] == '\n'))
+        if ((td->auxiliaryBuffer->getBuffer ()[tmpHeaderSize] == '\r')
+            && (td->auxiliaryBuffer->getBuffer ()[tmpHeaderSize + 1] == '\n')
+            && (td->auxiliaryBuffer->getBuffer ()[tmpHeaderSize + 2] == '\r')
+            && (td->auxiliaryBuffer->getBuffer ()[tmpHeaderSize + 3] == '\n'))
           {
             headerSize = tmpHeaderSize + 4;
             break;
@@ -269,19 +269,19 @@ int Scgi::sendResponse (ScgiContext* ctx, int onlyHeader, FiltersChain* chain)
     }
 
   if (headerSize)
-    HttpHeaders::buildHTTPResponseHeaderStruct (td->secondaryBuffer->getBuffer (),
+    HttpHeaders::buildHTTPResponseHeaderStruct (td->auxiliaryBuffer->getBuffer (),
                                                 &td->response,
                                                 &(td->nBytesToRead));
 
   if (HttpHeaders::sendHeader (td->response, *td->connection->socket,
-                               *td->secondaryBuffer, td))
+                               *td->auxiliaryBuffer, td))
     return HttpDataHandler::RET_FAILURE;
 
   if (onlyHeader)
     return HttpDataHandler::RET_OK;
 
   if (read - headerSize)
-    if (appendDataToHTTPChannel (td, td->secondaryBuffer->getBuffer () + headerSize,
+    if (appendDataToHTTPChannel (td, td->auxiliaryBuffer->getBuffer () + headerSize,
                                  read - headerSize,
                                  &(td->outputData),
                                  chain,
@@ -295,14 +295,14 @@ int Scgi::sendResponse (ScgiContext* ctx, int onlyHeader, FiltersChain* chain)
     {
       for (;;)
         {
-          nbr = ctx->sock.recv (td->secondaryBuffer->getBuffer (),
-                                td->secondaryBuffer->getRealLength (),
+          nbr = ctx->sock.recv (td->auxiliaryBuffer->getBuffer (),
+                                td->auxiliaryBuffer->getRealLength (),
                                 0);
 
           if (!nbr || (nbr == (u_long)-1))
             break;
 
-          if (appendDataToHTTPChannel (td, td->secondaryBuffer->getBuffer (),
+          if (appendDataToHTTPChannel (td, td->auxiliaryBuffer->getBuffer (),
                                        nbr,
                                        &(td->outputData),
                                        chain,
@@ -353,12 +353,12 @@ int Scgi::sendPostData (ScgiContext* ctx)
   u_long nbr;
   do
     {
-      if (ctx->td->inputData.read (ctx->td->secondaryBuffer->getBuffer (),
-                                   ctx->td->secondaryBuffer->getRealLength (),
+      if (ctx->td->inputData.read (ctx->td->auxiliaryBuffer->getBuffer (),
+                                   ctx->td->auxiliaryBuffer->getRealLength (),
                                    &nbr))
         return -1;
 
-      if (nbr && (ctx->sock.send (ctx->td->secondaryBuffer->getBuffer (), nbr, 0) == -1))
+      if (nbr && (ctx->sock.send (ctx->td->auxiliaryBuffer->getBuffer (), nbr, 0) == -1))
         return -1;
     }
   while (nbr);
diff --git a/myserver/src/http_handler/wincgi/wincgi.cpp b/myserver/src/http_handler/wincgi/wincgi.cpp
index cac7388..972add5 100644
--- a/myserver/src/http_handler/wincgi/wincgi.cpp
+++ b/myserver/src/http_handler/wincgi/wincgi.cpp
@@ -127,8 +127,8 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
       return td->http->raiseHTTPError (500);
     }
 
-  td->secondaryBuffer->setLength (0);
-  buffer = td->secondaryBuffer->getBuffer ();
+  td->auxiliaryBuffer->setLength (0);
+  buffer = td->auxiliaryBuffer->getBuffer ();
 
   strcpy (buffer, "[CGI]\r\n");
   DataFileHandle.writeToFile (buffer,7,&nbr);
@@ -136,10 +136,10 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
   strcpy (buffer, "CGI Version=CGI/1.3a WIN\r\n");
   DataFileHandle.writeToFile (buffer,26,&nbr);
 
-  *td->secondaryBuffer << "Server Admin=" <<
+  *td->auxiliaryBuffer << "Server Admin=" <<
     td->securityToken.getData ("server.admin", MYSERVER_VHOST_CONF |
                                      MYSERVER_SERVER_CONF, "")<< "\r\n";
-  DataFileHandle.writeToFile (buffer,td->secondaryBuffer->getLength (),&nbr);
+  DataFileHandle.writeToFile (buffer,td->auxiliaryBuffer->getLength (),&nbr);
 
   {
     if (td->request.isKeepAlive ())
@@ -154,17 +154,17 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
       }
   }
 
-  td->secondaryBuffer->setLength (0);
-  *td->secondaryBuffer << "Request Method=" << td->request.cmd << "\r\n";
-  DataFileHandle.writeToFile (buffer, td->secondaryBuffer->getLength (), &nbr);
+  td->auxiliaryBuffer->setLength (0);
+  *td->auxiliaryBuffer << "Request Method=" << td->request.cmd << "\r\n";
+  DataFileHandle.writeToFile (buffer, td->auxiliaryBuffer->getLength (), &nbr);
 
-  td->secondaryBuffer->setLength (0);
-  *td->secondaryBuffer << "Request Protocol=HTTP/" << td->request.ver << "\r\n";
-  DataFileHandle.writeToFile (buffer, td->secondaryBuffer->getLength (), &nbr);
+  td->auxiliaryBuffer->setLength (0);
+  *td->auxiliaryBuffer << "Request Protocol=HTTP/" << td->request.ver << "\r\n";
+  DataFileHandle.writeToFile (buffer, td->auxiliaryBuffer->getLength (), &nbr);
 
-  td->secondaryBuffer->setLength (0);
-  *td->secondaryBuffer << "Executable Path=" << execname << "\r\n";
-  DataFileHandle.writeToFile (buffer,td->secondaryBuffer->getLength (),&nbr);
+  td->auxiliaryBuffer->setLength (0);
+  *td->auxiliaryBuffer << "Executable Path=" << execname << "\r\n";
+  DataFileHandle.writeToFile (buffer,td->auxiliaryBuffer->getLength (),&nbr);
 
   if (td->request.uriOpts[0])
     {
@@ -302,7 +302,7 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
       chain.clearAllFilters ();
       return td->http->raiseHTTPError (500);
     }
-  OutFileHandle.read (buffer,td->secondaryBuffer->getRealLength (),&nBytesRead);
+  OutFileHandle.read (buffer,td->auxiliaryBuffer->getRealLength (),&nBytesRead);
   if (!nBytesRead)
     {
       ostringstream msg;
@@ -388,7 +388,7 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
       /* Flush the rest of the file.  */
       do
         {
-          OutFileHandle.read (buffer, td->secondaryBuffer->getLength (),
+          OutFileHandle.read (buffer, td->auxiliaryBuffer->getLength (),
                              &nBytesRead);
           if (nBytesRead)
             {
diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index 99ac809..a4572eb 100644
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -186,7 +186,7 @@ FtpThreadContext::FtpThreadContext ()
 {
   pConnection = NULL;
   buffer = NULL;
-  secondaryBuffer = NULL;
+  auxiliaryBuffer = NULL;
   buffersize = 0;
   m_nParseLength = 0;
   pProtocolInterpreter = NULL;
@@ -348,7 +348,7 @@ int Ftp::controlConnection (ConnectionPtr pConnection, char *request,
 
   td.pConnection = pConnection;
   td.buffer = pConnection->getActiveThread ()->getBuffer ();
-  td.secondaryBuffer = pConnection->getActiveThread ()->getSecondaryBuffer ();
+  td.auxiliaryBuffer = pConnection->getActiveThread ()->getSecondaryBuffer ();
   td.buffersize = pConnection->getActiveThread ()->getBufferSize ();
   td.nBytesToRead = reqLen;
   td.pProtocolInterpreter = this;
@@ -418,13 +418,13 @@ void Ftp::logAccess (int nReplyCode, const std::string & sCustomText)
   sprintf (msgCode, "%i", nReplyCode);
   getLocalLogFormatDate (time, 32);
 
-  td.secondaryBuffer->setLength (0);
-  *td.secondaryBuffer << time
+  td.auxiliaryBuffer->setLength (0);
+  *td.auxiliaryBuffer << time
                       << " " << td.pConnection->getIpAddr ()
                       << " " << msgCode << " " << sCustomText << end_str;
 
   if (td.pConnection->host)
-    td.pConnection->host->accessesLogWrite ("%s", td.secondaryBuffer->getBuffer ());
+    td.pConnection->host->accessesLogWrite ("%s", td.auxiliaryBuffer->getBuffer ());
 }
 
 int Ftp::closeDataConnection ()
@@ -742,7 +742,7 @@ DEFINE_THREAD (SendAsciiFile, pParam)
       char *pLine = NULL;
       int nLineLength = 0;
       std::string sLine;
-      MemBuf buffer, secondaryBuffer;
+      MemBuf buffer, auxiliaryBuffer;
       buffer.setRealLength (1024);
       while (filesize != 0)
         {
@@ -767,7 +767,7 @@ DEFINE_THREAD (SendAsciiFile, pParam)
           filesize -= nbr;
           pFtpuserData->m_nBytesSent += nbr;
 
-          secondaryBuffer.setLength (0);
+          auxiliaryBuffer.setLength (0);
           pLine = buffer.getBuffer ();
           if (pLine == NULL)
             {
@@ -790,13 +790,13 @@ DEFINE_THREAD (SendAsciiFile, pParam)
                 {
                   sLine.assign (pLine, strlen (pLine));
                   if (!sLine.empty ())
-                    secondaryBuffer << sLine;
+                    auxiliaryBuffer << sLine;
                   pLine += strlen (pLine);
                 }
               else
                 {
                   sLine.assign (pLine, nLineLength);
-                  secondaryBuffer << sLine << "\r\n";
+                  auxiliaryBuffer << sLine << "\r\n";
                   if (*(pLine + nLineLength) == '\r')
                     nLineLength++;
                   if (*(pLine + nLineLength) == '\n')
@@ -805,8 +805,8 @@ DEFINE_THREAD (SendAsciiFile, pParam)
                 }
             }
           if (pFtpuserData->m_pDataConnection->socket->
-              send (secondaryBuffer.getBuffer (),
-                    (u_long) secondaryBuffer.getLength (), 0) == SOCKET_ERROR)
+              send (auxiliaryBuffer.getBuffer (),
+                    (u_long) auxiliaryBuffer.getLength (), 0) == SOCKET_ERROR)
             {
               ftpReply (pConnection, 451);
               file->close ();
@@ -978,17 +978,17 @@ DEFINE_THREAD (SendImageFile, pParam)
       pFtpuserData->m_sCurrentFileName = pWt->m_sFilePath;
       pFtpuserData->m_nFileSize = filesize;
 
-      MemBuf secondaryBuffer;
-      secondaryBuffer.setRealLength (1024);
+      MemBuf auxiliaryBuffer;
+      auxiliaryBuffer.setRealLength (1024);
       while (filesize != 0)
         {
           nBufferSize =
             std::min (static_cast < u_long > (filesize),
                       static_cast < u_long >
-                      (secondaryBuffer.getRealLength () / 2));
+                      (auxiliaryBuffer.getRealLength () / 2));
 
-          if (file->read (secondaryBuffer.getBuffer (), nBufferSize, &nbr)
-              || pFtpuserData->m_pDataConnection->socket->send (secondaryBuffer.getBuffer (),
+          if (file->read (auxiliaryBuffer.getBuffer (), nBufferSize, &nbr)
+              || pFtpuserData->m_pDataConnection->socket->send (auxiliaryBuffer.getBuffer (),
                                                                 (u_long)nBufferSize, 0)
               == SOCKET_ERROR)
             {
@@ -1155,7 +1155,7 @@ DEFINE_THREAD (ReceiveAsciiFile, pParam)
 #endif
         }
 
-      MemBuf buffer, secondaryBuffer;
+      MemBuf buffer, auxiliaryBuffer;
       buffer.setRealLength (1024);
       memset (buffer.getBuffer (), 0, buffer.getRealLength ());
       char *pLine = NULL;
@@ -1166,9 +1166,9 @@ DEFINE_THREAD (ReceiveAsciiFile, pParam)
                                                             (u_long) buffer.getRealLength () - 1, &nbr)
              != SOCKET_ERROR && nbr != 0)
         {
-          memset (secondaryBuffer.getBuffer (), 0,
-                  secondaryBuffer.getRealLength ());
-          secondaryBuffer.setLength (0);
+          memset (auxiliaryBuffer.getBuffer (), 0,
+                  auxiliaryBuffer.getRealLength ());
+          auxiliaryBuffer.setLength (0);
           pLine = buffer.getBuffer ();
           if (pLine == NULL)
             {
@@ -1190,16 +1190,16 @@ DEFINE_THREAD (ReceiveAsciiFile, pParam)
                 {
                   sLine.assign (pLine, strlen (pLine));
                   if (!sLine.empty ())
-                    secondaryBuffer << sLine;
+                    auxiliaryBuffer << sLine;
                   pLine += strlen (pLine);
                 }
               else
                 {
                   sLine.assign (pLine, nLineLength);
 #ifdef WIN32
-                  secondaryBuffer << sLine << "\r\n";
+                  auxiliaryBuffer << sLine << "\r\n";
 #else
-                  secondaryBuffer << sLine << "\n";
+                  auxiliaryBuffer << sLine << "\n";
 #endif
                   if (*(pLine + nLineLength) == '\r')
                     nLineLength++;
@@ -1208,8 +1208,8 @@ DEFINE_THREAD (ReceiveAsciiFile, pParam)
                   pLine += nLineLength;
                 }
             }
-          file.write (secondaryBuffer.getBuffer (),
-                      (u_long) secondaryBuffer.getLength (), &nbr);
+          file.write (auxiliaryBuffer.getBuffer (),
+                      (u_long) auxiliaryBuffer.getLength (), &nbr);
 
           if (pFtpuserData->m_bBreakDataConnection)
             {
@@ -1695,8 +1695,8 @@ Ftp::list (const std::string & sParam /*= ""*/ )
   time_t now;
   time (&now);
 
-  MemBuf & secondaryBuffer = *td.secondaryBuffer;
-  secondaryBuffer.setLength (0);
+  MemBuf & auxiliaryBuffer = *td.auxiliaryBuffer;
+  auxiliaryBuffer.setLength (0);
 
   char perm[11];
   if (FilesUtility::isDirectory (sPath))
@@ -1782,7 +1782,7 @@ Ftp::list (const std::string & sParam /*= ""*/ )
           char fdSizeStr[12];
           sprintf (fdSizeStr, "%li", fd.size);
 
-          secondaryBuffer << (const char *) perm << " " << nlinkStr << " "
+          auxiliaryBuffer << (const char *) perm << " " << nlinkStr << " "
                           << username << " " << username << " " << fdSizeStr
                           << " " << (const char *) dateFtpFormat << " "
                           << fd.name << "\r\n";
@@ -1873,7 +1873,7 @@ Ftp::list (const std::string & sParam /*= ""*/ )
           char fdSizeStr[12];
           sprintf (fdSizeStr, "%li", fd.size);
 
-          secondaryBuffer << (const char *) perm << " " << nlinkStr << " "
+          auxiliaryBuffer << (const char *) perm << " " << nlinkStr << " "
                           << username << " " << username << " " << fdSizeStr
                           << " " << (const char *) dateFtpFormat << " "
                           << fd.name << "\r\n";
@@ -1883,8 +1883,8 @@ Ftp::list (const std::string & sParam /*= ""*/ )
     }
 
   if (pFtpuserData->m_pDataConnection->socket->
-      send (td.secondaryBuffer->getBuffer (),
-            (u_long) td.secondaryBuffer->getLength (), 0) == SOCKET_ERROR)
+      send (td.auxiliaryBuffer->getBuffer (),
+            (u_long) td.auxiliaryBuffer->getLength (), 0) == SOCKET_ERROR)
     {
       ftpReply (451);
     }
@@ -1934,8 +1934,8 @@ Ftp::nlst (const std::string & sParam /* = "" */ )
       return;
     }
 
-  MemBuf & secondaryBuffer = *td.secondaryBuffer;
-  secondaryBuffer.setLength (0);
+  MemBuf & auxiliaryBuffer = *td.auxiliaryBuffer;
+  auxiliaryBuffer.setLength (0);
 
   const char *secName = td.st.getData ("security.filename",
                                        MYSERVER_VHOST_CONF |
@@ -1947,15 +1947,15 @@ Ftp::nlst (const std::string & sParam /* = "" */ )
         continue;
 
       if (!sParam.empty ())
-        secondaryBuffer << sParam << "/";
-      secondaryBuffer << fd.name << "\r\n";
+        auxiliaryBuffer << sParam << "/";
+      auxiliaryBuffer << fd.name << "\r\n";
     }
   while (!fd.findnext ());
   fd.findclose ();
 
   if (pFtpuserData->m_pDataConnection->socket->
-      send (td.secondaryBuffer->getBuffer (),
-            (u_long) td.secondaryBuffer->getLength (), 0) == SOCKET_ERROR)
+      send (td.auxiliaryBuffer->getBuffer (),
+            (u_long) td.auxiliaryBuffer->getLength (), 0) == SOCKET_ERROR)
     {
       ftpReply (451);
     }
diff --git a/myserver/src/protocol/http/env/env.cpp b/myserver/src/protocol/http/env/env.cpp
index dc15dc1..c5c155f 100644
--- a/myserver/src/protocol/http/env/env.cpp
+++ b/myserver/src/protocol/http/env/env.cpp
@@ -53,7 +53,7 @@ void Env::buildEnvironmentString (HttpThreadContext* td, char *cgiEnv,
   char strTmp[32];
   HttpRequestHeader::Entry* reqEntry = NULL;
 
-  memCgi.setExternalBuffer (cgiEnv, td->secondaryBuffer->getRealLength ());
+  memCgi.setExternalBuffer (cgiEnv, td->auxiliaryBuffer->getRealLength ());
   memCgi << "SERVER_SOFTWARE=GNU MyServer " << MYSERVER_VERSION;
 
 #ifdef WIN32
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index cf0423c..d704f8a 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -132,18 +132,18 @@ int Http::optionsHTTPRESOURCE (string& filename, int yetmapped)
         return raiseHTTPError (ret);
 
       getRFC822GMTTime (time, 32);
-      td->secondaryBuffer->setLength (0);
-      *td->secondaryBuffer << "HTTP/1.1 200 OK\r\n";
-      *td->secondaryBuffer << "Date: " << time;
-      *td->secondaryBuffer << "\r\nServer: GNU MyServer " << MYSERVER_VERSION;
+      td->auxiliaryBuffer->setLength (0);
+      *td->auxiliaryBuffer << "HTTP/1.1 200 OK\r\n";
+      *td->auxiliaryBuffer << "Date: " << time;
+      *td->auxiliaryBuffer << "\r\nServer: GNU MyServer " << MYSERVER_VERSION;
       if (connection && connection->value->length ())
-        *td->secondaryBuffer << "\r\nConnection:" << connection->value->c_str () << "\r\n";
-      *td->secondaryBuffer << "Content-length: 0\r\nAccept-Ranges: bytes\r\n";
-      *td->secondaryBuffer << "Allow: " << methods << "\r\n\r\n";
+        *td->auxiliaryBuffer << "\r\nConnection:" << connection->value->c_str () << "\r\n";
+      *td->auxiliaryBuffer << "Content-length: 0\r\nAccept-Ranges: bytes\r\n";
+      *td->auxiliaryBuffer << "Allow: " << methods << "\r\n\r\n";
 
       /* Send the HTTP header. */
-      ret = td->connection->socket->send (td->secondaryBuffer->getBuffer (),
-                                          td->secondaryBuffer->getLength (), 0);
+      ret = td->connection->socket->send (td->auxiliaryBuffer->getBuffer (),
+                                          td->auxiliaryBuffer->getLength (), 0);
       if (ret == SOCKET_ERROR)
         {
           td->connection->host->warningsLogWrite (_("HTTP: socket error"));
@@ -180,21 +180,21 @@ int Http::traceHTTPRESOURCE (string& filename, int yetmapped)
       tmp.intToStr (contentLength, tmpStr, 12);
       getRFC822GMTTime (time, 32);
 
-      td->secondaryBuffer->setLength (0);
-      *td->secondaryBuffer << "HTTP/1.1 200 OK\r\n";
-      *td->secondaryBuffer << "Date: " << time << "\r\n";
-      *td->secondaryBuffer << "Server: GNU MyServer " << MYSERVER_VERSION << "\r\n";
+      td->auxiliaryBuffer->setLength (0);
+      *td->auxiliaryBuffer << "HTTP/1.1 200 OK\r\n";
+      *td->auxiliaryBuffer << "Date: " << time << "\r\n";
+      *td->auxiliaryBuffer << "Server: GNU MyServer " << MYSERVER_VERSION << "\r\n";
       connection = td->request.other.get ("Connection");
       if (connection && connection->value->length ())
-        *td->secondaryBuffer << "Connection:" << connection->value->c_str () << "\r\n";
+        *td->auxiliaryBuffer << "Connection:" << connection->value->c_str () << "\r\n";
 
-      *td->secondaryBuffer << "Content-length:" << tmp << "\r\n"
+      *td->auxiliaryBuffer << "Content-length:" << tmp << "\r\n"
               << "Content-type: message/http\r\n"
               << "Accept-Ranges: bytes\r\n\r\n";
 
       /* Send our HTTP header.  */
-      ret = td->connection->socket->send (td->secondaryBuffer->getBuffer (),
-                                          (u_long) td->secondaryBuffer->getLength (), 0);
+      ret = td->connection->socket->send (td->auxiliaryBuffer->getBuffer (),
+                                          (u_long) td->auxiliaryBuffer->getLength (), 0);
       if (ret == SOCKET_ERROR)
         {
           td->connection->host->warningsLogWrite (_("HTTP: socket error"));
@@ -569,13 +569,13 @@ u_long Http::checkDigest ()
     ((HttpUserData*) td->connection->protocolBuffer)->nc++;
 
   md5.init ();
-  td->secondaryBuffer->setLength (0);
-  *td->secondaryBuffer << td->request.digestUsername << ":"
+  td->auxiliaryBuffer->setLength (0);
+  *td->auxiliaryBuffer << td->request.digestUsername << ":"
                        << td->request.digestRealm
                        << ":" << td->securityToken.getNeededPassword ();
 
-  md5.update ((char const*) td->secondaryBuffer->getBuffer (),
-              (unsigned int) td->secondaryBuffer->getLength ());
+  md5.update ((char const*) td->auxiliaryBuffer->getBuffer (),
+              (unsigned int) td->auxiliaryBuffer->getLength ());
   md5.end (A1);
 
   md5.init ();
@@ -585,20 +585,20 @@ u_long Http::checkDigest ()
   else
     uri = (char*) td->request.uriOpts.c_str ();
 
-  td->secondaryBuffer->setLength (0);
-  *td->secondaryBuffer << td->request.cmd.c_str () << ":" << uri;
-  md5.update ((char const*) td->secondaryBuffer->getBuffer (),
-              (unsigned int) td->secondaryBuffer->getLength ());
+  td->auxiliaryBuffer->setLength (0);
+  *td->auxiliaryBuffer << td->request.cmd.c_str () << ":" << uri;
+  md5.update ((char const*) td->auxiliaryBuffer->getBuffer (),
+              (unsigned int) td->auxiliaryBuffer->getLength ());
   md5.end (A2);
 
   md5.init ();
-  td->secondaryBuffer->setLength (0);
-  *td->secondaryBuffer << A1 << ":"
+  td->auxiliaryBuffer->setLength (0);
+  *td->auxiliaryBuffer << A1 << ":"
           << ((HttpUserData*) td->connection->protocolBuffer)->nonce << ":"
           << td->request.digestNc << ":" << td->request.digestCnonce << ":"
           << td->request.digestQop << ":" << A2;
-  md5.update ((char const*) td->secondaryBuffer->getBuffer (),
-              (unsigned int) td->secondaryBuffer->getLength ());
+  md5.update ((char const*) td->auxiliaryBuffer->getBuffer (),
+              (unsigned int) td->auxiliaryBuffer->getLength ());
   md5.end (response);
 
   return strcmp (response, td->request.digestResponse) ? 0 : 1;
@@ -715,50 +715,50 @@ int Http::logHTTPaccess ()
 
   try
     {
-      td->secondaryBuffer->setLength (0);
-      *td->secondaryBuffer << td->connection->getIpAddr ();
-      *td->secondaryBuffer << " ";
+      td->auxiliaryBuffer->setLength (0);
+      *td->auxiliaryBuffer << td->connection->getIpAddr ();
+      *td->auxiliaryBuffer << " ";
 
       if (td->connection->getLogin ()[0])
-        *td->secondaryBuffer << td->connection->getLogin ();
+        *td->auxiliaryBuffer << td->connection->getLogin ();
       else
-        *td->secondaryBuffer << "-";
+        *td->auxiliaryBuffer << "-";
 
-      *td->secondaryBuffer << " ";
+      *td->auxiliaryBuffer << " ";
 
       if (td->connection->getLogin ()[0])
-        *td->secondaryBuffer << td->connection->getLogin ();
+        *td->auxiliaryBuffer << td->connection->getLogin ();
       else
-        *td->secondaryBuffer << "-";
+        *td->auxiliaryBuffer << "-";
 
-      *td->secondaryBuffer << " [";
+      *td->auxiliaryBuffer << " [";
 
       getLocalLogFormatDate (time, 32);
-      *td->secondaryBuffer << time << "] \"";
+      *td->auxiliaryBuffer << time << "] \"";
 
       if (td->request.cmd.length ())
-        *td->secondaryBuffer << td->request.cmd.c_str () << "";
+        *td->auxiliaryBuffer << td->request.cmd.c_str () << "";
 
       if (td->request.cmd.length () || td->request.uri.length ())
-        *td->secondaryBuffer << " ";
+        *td->auxiliaryBuffer << " ";
 
       if (td->request.uri.length () == '\0')
-        *td->secondaryBuffer << "/";
+        *td->auxiliaryBuffer << "/";
       else
-        *td->secondaryBuffer << td->request.uri.c_str ();
+        *td->auxiliaryBuffer << td->request.uri.c_str ();
 
       if (td->request.uriOpts.length ())
-        *td->secondaryBuffer << "?" << td->request.uriOpts.c_str ();
+        *td->auxiliaryBuffer << "?" << td->request.uriOpts.c_str ();
 
       sprintf (tmpStrInt, "%u ", td->response.httpStatus);
 
       if (td->request.ver.length ())
-        *td->secondaryBuffer << " " << td->request.ver.c_str ();
+        *td->auxiliaryBuffer << " " << td->request.ver.c_str ();
 
-      *td->secondaryBuffer << "\" " << tmpStrInt << " ";
+      *td->auxiliaryBuffer << "\" " << tmpStrInt << " ";
 
       sprintf (tmpStrInt, "%u", td->sentData);
-      *td->secondaryBuffer << tmpStrInt;
+      *td->auxiliaryBuffer << tmpStrInt;
 
       if (td->connection->host)
         {
@@ -766,19 +766,19 @@ int Http::logHTTPaccess ()
           HttpRequestHeader::Entry *referer = td->request.other.get ("Refer");
 
           if (strstr ((td->connection->host)->getAccessLogOpt (), "type=combined"))
-            *td->secondaryBuffer << " " << (referer ? referer->value->c_str () : "")
+            *td->auxiliaryBuffer << " " << (referer ? referer->value->c_str () : "")
             << " " << (userAgent ? userAgent->value->c_str () : "");
         }
 
-      *td->secondaryBuffer << end_str;
+      *td->auxiliaryBuffer << end_str;
 
       /*
        * Request the access to the log file then append the message.
        */
       if (td->connection->host)
-        td->connection->host->accessesLogWrite ("%s", td->secondaryBuffer->getBuffer ());
+        td->connection->host->accessesLogWrite ("%s", td->auxiliaryBuffer->getBuffer ());
 
-      td->secondaryBuffer->setLength (0);
+      td->auxiliaryBuffer->setLength (0);
     }
   catch (...)
     {
@@ -803,7 +803,7 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
   try
     {
       td->buffer = a->getActiveThread ()->getBuffer ();
-      td->secondaryBuffer = a->getActiveThread ()->getSecondaryBuffer ();
+      td->auxiliaryBuffer = a->getActiveThread ()->getSecondaryBuffer ();
       td->buffersize = a->getActiveThread ()->getBufferSize ();
       td->nBytesToRead = nbtr;
       td->connection = a;
@@ -1227,18 +1227,18 @@ int Http::requestAuthorization ()
   HttpRequestHeader::Entry *connection = td->request.other.get ("Connection");
   HttpRequestHeader::Entry *host = td->request.other.get ("Host");
   td->response.httpStatus = 401;
-  td->secondaryBuffer->setLength (0);
-  *td->secondaryBuffer << "HTTP/1.1 401 Unauthorized\r\n"
+  td->auxiliaryBuffer->setLength (0);
+  *td->auxiliaryBuffer << "HTTP/1.1 401 Unauthorized\r\n"
           << "Accept-Ranges: bytes\r\n";
-  *td->secondaryBuffer << "Server: GNU MyServer " << MYSERVER_VERSION << "\r\n";
-  *td->secondaryBuffer << "Content-type: text/html\r\n"
+  *td->auxiliaryBuffer << "Server: GNU MyServer " << MYSERVER_VERSION << "\r\n";
+  *td->auxiliaryBuffer << "Content-type: text/html\r\n"
           << "Connection: ";
-  *td->secondaryBuffer << (connection ? connection->value->c_str () : "");
-  *td->secondaryBuffer << "\r\nContent-length: 0\r\n";
+  *td->auxiliaryBuffer << (connection ? connection->value->c_str () : "");
+  *td->auxiliaryBuffer << "\r\nContent-length: 0\r\n";
 
   if (td->authScheme == HTTP_AUTH_SCHEME_BASIC)
     {
-      *td->secondaryBuffer << "WWW-Authenticate: Basic realm=\""
+      *td->auxiliaryBuffer << "WWW-Authenticate: Basic realm=\""
                            << (host ? host->value->c_str () : "")
                            << "\"\r\n";
     }
@@ -1277,15 +1277,15 @@ int Http::requestAuthorization ()
           hud->nc = 0;
         }
 
-      *td->secondaryBuffer << "WWW-Authenticate: digest "
+      *td->auxiliaryBuffer << "WWW-Authenticate: digest "
                            << " qop=\"auth\", algorithm =\"MD5\", realm =\""
                            << hud->realm << "\",  opaque =\"" << hud->opaque
                            << "\",  nonce =\"" << hud->nonce << "\" ";
 
       if (hud->cnonce[0])
-        *td->secondaryBuffer << ", cnonce =\"" << hud->cnonce << "\" ";
+        *td->auxiliaryBuffer << ", cnonce =\"" << hud->cnonce << "\" ";
 
-      *td->secondaryBuffer << "\r\n";
+      *td->auxiliaryBuffer << "\r\n";
     }
   else
     {
@@ -1293,12 +1293,12 @@ int Http::requestAuthorization ()
       return raiseHTTPError (501);
     }
 
-  *td->secondaryBuffer << "Date: ";
+  *td->auxiliaryBuffer << "Date: ";
   getRFC822GMTTime (time, 32);
-  *td->secondaryBuffer << time << "\r\n\r\n";
+  *td->auxiliaryBuffer << time << "\r\n\r\n";
 
-  if (td->connection->socket->send (td->secondaryBuffer->getBuffer (),
-                                    td->secondaryBuffer->getLength (), 0) < 0)
+  if (td->connection->socket->send (td->auxiliaryBuffer->getBuffer (),
+                                    td->auxiliaryBuffer->getLength (), 0) < 0)
     {
       td->connection->host->warningsLogWrite (_("HTTP: socket error"));
       return HttpDataHandler::RET_FAILURE;
@@ -1484,20 +1484,20 @@ Internal Server Error\n\
   *td->buffer << " from: ";
   *td->buffer << td->connection->getIpAddr ();
   *td->buffer << "\r\n";
-  td->secondaryBuffer->setLength (0);
-  *td->secondaryBuffer << "HTTP/1.1 500 System Error\r\n";
-  *td->secondaryBuffer << "Server: GNU MyServer " << MYSERVER_VERSION << "\r\n";
-  *td->secondaryBuffer << " Content-type: text/html\r\nContent-length: ";
+  td->auxiliaryBuffer->setLength (0);
+  *td->auxiliaryBuffer << "HTTP/1.1 500 System Error\r\n";
+  *td->auxiliaryBuffer << "Server: GNU MyServer " << MYSERVER_VERSION << "\r\n";
+  *td->auxiliaryBuffer << " Content-type: text/html\r\nContent-length: ";
   tmp.intToStr ((int) strlen (hardHTML), tmpStr, 12);
-  *td->secondaryBuffer << tmp;
-  *td->secondaryBuffer << "\r\n";
-  *td->secondaryBuffer << "Date: ";
+  *td->auxiliaryBuffer << tmp;
+  *td->auxiliaryBuffer << "\r\n";
+  *td->auxiliaryBuffer << "Date: ";
   getRFC822GMTTime (time, 32);
-  *td->secondaryBuffer << time;
-  *td->secondaryBuffer << "\r\n\r\n";
+  *td->auxiliaryBuffer << time;
+  *td->auxiliaryBuffer << "\r\n\r\n";
 
-  if (td->connection->socket->send (td->secondaryBuffer->getBuffer (),
-                                    (u_long) td->secondaryBuffer->getLength (),
+  if (td->connection->socket->send (td->auxiliaryBuffer->getBuffer (),
+                                    (u_long) td->auxiliaryBuffer->getLength (),
                                     0) < 0)
     return HttpDataHandler::RET_FAILURE;
 
@@ -1666,24 +1666,24 @@ int Http::sendHTTPRedirect (const char *newURL)
   HttpRequestHeader::Entry *connection = td->request.other.get ("Connection");
 
   td->response.httpStatus = 302;
-  td->secondaryBuffer->setLength (0);
-  *td->secondaryBuffer << "HTTP/1.1 302 Moved\r\nAccept-Ranges: bytes\r\n"
+  td->auxiliaryBuffer->setLength (0);
+  *td->auxiliaryBuffer << "HTTP/1.1 302 Moved\r\nAccept-Ranges: bytes\r\n"
           << "Server: GNU MyServer " << MYSERVER_VERSION << "\r\n"
           << "Content-type: text/html\r\n"
           << "Location: " << newURL << "\r\n"
           << "Content-length: 0\r\n";
 
   if (connection && !stringcmpi (connection->value->c_str (), "keep-alive"))
-    *td->secondaryBuffer << "Connection: keep-alive\r\n";
+    *td->auxiliaryBuffer << "Connection: keep-alive\r\n";
   else
-    *td->secondaryBuffer << "Connection: close\r\n";
+    *td->auxiliaryBuffer << "Connection: close\r\n";
 
-  *td->secondaryBuffer << "Date: ";
+  *td->auxiliaryBuffer << "Date: ";
   getRFC822GMTTime (time, 32);
-  *td->secondaryBuffer << time
+  *td->auxiliaryBuffer << time
           << "\r\n\r\n";
-  if (td->connection->socket->send (td->secondaryBuffer->getBuffer (),
-                                    (int) td->secondaryBuffer->getLength (), 0) < 0)
+  if (td->connection->socket->send (td->auxiliaryBuffer->getBuffer (),
+                                    (int) td->auxiliaryBuffer->getLength (), 0) < 0)
     {
       td->connection->host->warningsLogWrite (_("HTTP: socket error"));
       return HttpDataHandler::RET_FAILURE;
@@ -1701,21 +1701,21 @@ int Http::sendHTTPNonModified ()
   HttpRequestHeader::Entry *connection = td->request.other.get ("Connection");
 
   td->response.httpStatus = 304;
-  td->secondaryBuffer->setLength (0);
-  *td->secondaryBuffer << "HTTP/1.1 304 Not Modified\r\nAccept-Ranges: bytes\r\n"
+  td->auxiliaryBuffer->setLength (0);
+  *td->auxiliaryBuffer << "HTTP/1.1 304 Not Modified\r\nAccept-Ranges: bytes\r\n"
           << "Server: GNU MyServer " << MYSERVER_VERSION << "\r\n";
 
   if (connection && !stringcmpi (connection->value->c_str (), "keep-alive"))
-    *td->secondaryBuffer << "Connection: keep-alive\r\n";
+    *td->auxiliaryBuffer << "Connection: keep-alive\r\n";
   else
-    *td->secondaryBuffer << "Connection: close\r\n";
+    *td->auxiliaryBuffer << "Connection: close\r\n";
 
   getRFC822GMTTime (time, 32);
 
-  *td->secondaryBuffer << "Date: " << time << "\r\n\r\n";
+  *td->auxiliaryBuffer << "Date: " << time << "\r\n\r\n";
 
-  if (td->connection->socket->send (td->secondaryBuffer->getBuffer (),
-                                    (int) td->secondaryBuffer->getLength (), 0) < 0)
+  if (td->connection->socket->send (td->auxiliaryBuffer->getBuffer (),
+                                    (int) td->auxiliaryBuffer->getLength (), 0) < 0)
     {
       td->connection->host->warningsLogWrite (_("HTTP: socket error"));
       return HttpDataHandler::RET_FAILURE;
diff --git a/myserver/src/protocol/http/http_data_read.cpp b/myserver/src/protocol/http/http_data_read.cpp
index ad406c0..be8a52f 100644
--- a/myserver/src/protocol/http/http_data_read.cpp
+++ b/myserver/src/protocol/http/http_data_read.cpp
@@ -320,8 +320,8 @@ int HttpDataRead::readPostData (HttpThreadContext* td, int* httpRetCode)
                                      &inPos,
                                      bufferDataSize,
                                      td->connection->socket,
-                                     td->secondaryBuffer->getBuffer (),
-                                     td->secondaryBuffer->getRealLength () - 1,
+                                     td->auxiliaryBuffer->getBuffer (),
+                                     td->auxiliaryBuffer->getRealLength () - 1,
                                      &nbr,
                                      timeout,
                                      &(td->inputData),
@@ -360,14 +360,14 @@ int HttpDataRead::readPostData (HttpThreadContext* td, int* httpRetCode)
         {
 
           /* Do not try to read more than what we expect.  */
-          u_long dimBuffer = std::min (td->secondaryBuffer->getRealLength () - 1ul,
+          u_long dimBuffer = std::min (td->auxiliaryBuffer->getRealLength () - 1ul,
                                        length);
 
           if (readContiguousPrimitivePostData (td->request.uriOptsPtr,
                                                &inPos,
                                                bufferDataSize,
                                                td->connection->socket,
-                                               td->secondaryBuffer->getBuffer (),
+                                               td->auxiliaryBuffer->getBuffer (),
                                                dimBuffer,
                                                &nbr,
                                                timeout))
@@ -388,9 +388,9 @@ int HttpDataRead::readPostData (HttpThreadContext* td, int* httpRetCode)
               return 1;
             }
 
-          td->secondaryBuffer->getBuffer ()[nbr] = '\0';
+          td->auxiliaryBuffer->getBuffer ()[nbr] = '\0';
 
-          if (nbr && td->inputData.writeToFile (td->secondaryBuffer->getBuffer (),
+          if (nbr && td->inputData.writeToFile (td->auxiliaryBuffer->getBuffer (),
                                                 nbr, &nbw))
             {
               td->inputDataPath.assign ("");
diff --git a/myserver/src/protocol/http/http_headers.cpp b/myserver/src/protocol/http/http_headers.cpp
index c1031b6..3b13868 100644
--- a/myserver/src/protocol/http/http_headers.cpp
+++ b/myserver/src/protocol/http/http_headers.cpp
@@ -78,9 +78,10 @@ u_long HttpHeaders::buildHTTPResponseHeader (char *str,
 
       if (!e || (e && e->value->find ("chunked", 0) == string::npos ))
         {
-          pos += myserver_strlcpy (pos, "Content-length: ", MAX-(long)(pos-str));
-          pos += myserver_strlcpy (pos, response->contentLength.c_str (), MAX-(long)(pos-str));
-          pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
+          pos += myserver_strlcpy (pos, "Content-length: ", MAX - (long)(pos - str));
+          pos += myserver_strlcpy (pos, response->contentLength.c_str (),
+                                   MAX - (long)(pos - str));
+          pos += myserver_strlcpy (pos, "\r\n", MAX - (long)(pos - str));
         }
     }
 
@@ -89,15 +90,16 @@ u_long HttpHeaders::buildHTTPResponseHeader (char *str,
   for (; it != response->other.end (); it++)
     {
       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));
+      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, "Accept-Ranges: bytes\r\n",
+                           MAX - (long)(pos - str));
 
-  pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
+  pos += myserver_strlcpy (pos, "\r\n", MAX - (long)(pos - str));
 
   return (pos - str);
 }
@@ -109,60 +111,65 @@ u_long HttpHeaders::buildHTTPResponseHeader (char *str,
  *
  * \return The number of bytes written to STR.
  */
-u_long HttpHeaders::buildHTTPRequestHeader (char * str,HttpRequestHeader* request)
+u_long HttpHeaders::buildHTTPRequestHeader (char * str,
+                                            HttpRequestHeader* request)
 {
   char *pos = str;
   const int MAX = MYSERVER_KB (8);
 
   /* First line.  */
-  pos += myserver_strlcpy (pos, request->cmd.c_str (), MAX-(long)(pos-str));
-  pos += myserver_strlcpy (pos, " ", MAX-(long)(pos-str));
-  pos += myserver_strlcpy (pos, request->uri.c_str (), MAX-(long)(pos-str));
-  pos += myserver_strlcpy (pos, " ", MAX-(long)(pos-str));
+  pos += myserver_strlcpy (pos, request->cmd.c_str (), MAX - (long)(pos - str));
+  pos += myserver_strlcpy (pos, " ", MAX - (long)(pos - str));
+  pos += myserver_strlcpy (pos, request->uri.c_str (), MAX - (long)(pos - str));
+  pos += myserver_strlcpy (pos, " ", MAX - (long)(pos - str));
   if (request->uriOpts.length () > 0)
     {
-      pos += myserver_strlcpy (pos, "?", MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, request->uriOpts.c_str (), MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, " ", MAX-(long)(pos-str));
+      pos += myserver_strlcpy (pos, "?", MAX - (long)(pos - str));
+      pos += myserver_strlcpy (pos, request->uriOpts.c_str (),
+                               MAX - (long)(pos - str));
+      pos += myserver_strlcpy (pos, " ", MAX - (long)(pos - str));
     }
 
-  pos += myserver_strlcpy (pos, request->ver.c_str (), MAX-(long)(pos-str));
-  pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
+  pos += myserver_strlcpy (pos, request->ver.c_str (), MAX - (long)(pos - str));
+  pos += myserver_strlcpy (pos, "\r\n", MAX - (long)(pos - str));
 
   if (request->auth.length () > 0)
     {
-      pos += myserver_strlcpy (pos, "Authorization: ", MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, request->auth.c_str (), MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
+      pos += myserver_strlcpy (pos, "Authorization: ", MAX - (long)(pos - str));
+      pos += myserver_strlcpy (pos, request->auth.c_str (),
+                               MAX - (long)(pos - str));
+      pos += myserver_strlcpy (pos, "\r\n", MAX - (long)(pos - str));
     }
 
   if (request->contentLength.length () > 0)
     {
-      pos += myserver_strlcpy (pos, "Content-length: ", MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, request->contentLength.c_str (), MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
+      pos += myserver_strlcpy (pos, "Content-length: ", MAX - (long)(pos - str));
+      pos += myserver_strlcpy (pos, request->contentLength.c_str (),
+                               MAX - (long)(pos - str));
+      pos += myserver_strlcpy (pos, "\r\n", MAX - (long)(pos - str));
     }
 
   if (request->rangeType.length () > 0)
     {
       char buffer[12];
-      pos += myserver_strlcpy (pos, "Range: ", MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, request->rangeType.c_str (), MAX-(long)(pos-str));
-      pos += myserver_strlcpy (pos, " ", MAX-(long)(pos-str));
+      pos += myserver_strlcpy (pos, "Range: ", MAX - (long)(pos - str));
+      pos += myserver_strlcpy (pos, request->rangeType.c_str (),
+                               MAX - (long)(pos - str));
+      pos += myserver_strlcpy (pos, " ", MAX - (long)(pos - str));
 
       if (request->rangeByteBegin != (u_long)-1)
         {
           sprintf (buffer, "%lu", request->rangeByteBegin);
-          pos += myserver_strlcpy (pos, buffer, MAX-(long)(pos-str));
+          pos += myserver_strlcpy (pos, buffer, MAX - (long)(pos - str));
         }
 
-      pos += myserver_strlcpy (pos, "-", MAX-(long)(pos-str));
+      pos += myserver_strlcpy (pos, "-", MAX - (long)(pos - str));
       if (request->rangeByteEnd != (u_long)-1)
         {
           sprintf (buffer, "%lu", request->rangeByteEnd);
-          pos += myserver_strlcpy (pos, buffer, MAX-(long)(pos-str));
+          pos += myserver_strlcpy (pos, buffer, MAX - (long)(pos - str));
         }
-      pos += myserver_strlcpy (pos, "\r\n", MAX-(long)(pos-str));
+      pos += myserver_strlcpy (pos, "\r\n", MAX - (long)(pos - str));
   }
 
   if (request->other.size ())
@@ -175,14 +182,16 @@ u_long HttpHeaders::buildHTTPRequestHeader (char * str,HttpRequestHeader* reques
         HttpRequestHeader::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, 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, "\r\n", MAX-(long)(pos-str));
+  pos += myserver_strlcpy (pos, "\r\n", MAX - (long)(pos - str));
   return (pos - str);
 }
 
@@ -243,7 +252,8 @@ void HttpHeaders::resetHTTPResponse (HttpResponseHeader *response)
  * \param nLinesptr is a value of the lines number in the HEADER.
  * \param ncharsptr is a value of the characters number in the HEADER.
  */
-int HttpHeaders::validHTTPResponse (const char *res, u_long* nLinesptr, u_long* ncharsptr)
+int HttpHeaders::validHTTPResponse (const char *res, u_long *nLinesptr,
+                                    u_long *ncharsptr)
 {
   u_long i;
   u_long nLinechars = 0;
@@ -299,11 +309,11 @@ int HttpHeaders::validHTTPResponse (const char *res, u_long* nLinesptr, u_long*
  * \param request HTTP request structure to fullfill with data.
  * \param connection The current connection.
  */
-int HttpHeaders::buildHTTPRequestHeaderStruct (const char* input,
+int HttpHeaders::buildHTTPRequestHeaderStruct (const char *input,
                                               u_long inputSize,
-                                              u_long* nHeaderChars,
+                                              u_long *nHeaderChars,
                                               HttpRequestHeader *request,
-                                              Connection* connection)
+                                              Connection *connection)
 {
   /*
    *In this function there is the HTTP protocol parse.
@@ -374,8 +384,8 @@ int HttpHeaders::buildHTTPRequestHeaderStruct (const char* input,
       if (tokenOff== -1 )
         return 400;
 
-      /* Copy the HTTP field (this is the command if we are on the first line).  */
-      myserver_strlcpy (command, token, min (commandSize, tokenOff + 1) );
+      /* Copy the HTTP command (it is on the first line).  */
+      myserver_strlcpy (command, token, min (commandSize, tokenOff + 1));
 
       token += tokenOff;
 
@@ -460,7 +470,8 @@ int HttpHeaders::buildHTTPRequestHeaderStruct (const char* input,
           if (containOpts)
             {
               j = getEndLine (&token[i], HTTP_REQUEST_URI_DIM);
-              for (j = 0; ((int)(i + j + 1) < max) && (j < HTTP_REQUEST_URI_OPTS_DIM-1); j++)
+              for (j = 0; ((int)(i + j + 1) < max)
+                     && (j < HTTP_REQUEST_URI_OPTS_DIM-1); j++)
                 ++j;
             }
 
@@ -492,7 +503,7 @@ int HttpHeaders::buildHTTPRequestHeaderStruct (const char* input,
               request->cmd.clear ();
               tokenOff = getEndLine (input, HTTP_REQUEST_URI_DIM);
               if (tokenOff > 0)
-                request->uri.assign (input, min (HTTP_REQUEST_URI_DIM, tokenOff) );
+                request->uri.assign (input, min (HTTP_REQUEST_URI_DIM, tokenOff));
               else
                 request->uri.assign (input, HTTP_REQUEST_URI_DIM);
               return 400;
@@ -518,14 +529,16 @@ int HttpHeaders::buildHTTPRequestHeaderStruct (const char* input,
               request->cmd.clear ();
               tokenOff = getEndLine (input, HTTP_REQUEST_URI_DIM);
               if (tokenOff > 0)
-                request->uri.assign (input, min (HTTP_REQUEST_URI_DIM, tokenOff) );
+                request->uri.assign (input,
+                                     min (HTTP_REQUEST_URI_DIM, tokenOff));
               else
                 request->uri.assign (input, HTTP_REQUEST_URI_DIM );
               return 400;
             }
 
           /* Store if the requested uri terminates with a slash character. */
-          request->uriEndsWithSlash = request->uri[(request->uri.length ())-1] == '/';
+          request->uriEndsWithSlash =
+            request->uri[(request->uri.length ())-1] == '/';
 
           /*
            * Do not maintain any slash character if the uri has them at
@@ -568,9 +581,9 @@ int HttpHeaders::buildHTTPRequestHeaderStruct (const char* input,
             {
               old->value->append (", ");
               old->value->append (token,
-                                 std::min (static_cast<int>(HTTP_RESPONSE_OTHER_DIM
-                                                           - old->value->length ()),
-                                          static_cast<int>(tokenOff)));
+                             std::min (static_cast<int>(HTTP_RESPONSE_OTHER_DIM
+                                                        - old->value->length ()),
+                                       static_cast<int>(tokenOff)));
             }
           else
             {
@@ -579,7 +592,7 @@ int HttpHeaders::buildHTTPRequestHeaderStruct (const char* input,
                 {
                   e->name->assign (command, HTTP_RESPONSE_OTHER_DIM);
                   e->value->assign (token,
-                                   std::min (HTTP_RESPONSE_OTHER_DIM, tokenOff));
+                               std::min (HTTP_RESPONSE_OTHER_DIM, tokenOff));
                   request->other.put (cmdStr, e);
                 }
             }
@@ -705,8 +718,8 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
       const char *base64 = &token[6];
       int len = getEndLine (base64, 64);
       const char *tmp = base64 + len - 1;
-      const char* lsecondaryBuffer;
-      const char* lsecondaryBufferOr;
+      const char* decodedPw;
+      const char* decodedPwBuf;
       char login[32];
       char password[32];
       CBase64Utils base64Utils;
@@ -724,22 +737,21 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
       if (len <= 1)
         return 400;
 
-      lsecondaryBuffer = base64Utils.decode (base64, &len);
-      lsecondaryBufferOr = lsecondaryBuffer;
+      decodedPwBuf = decodedPw = base64Utils.decode (base64, &len);
 
-      for (i = 0; (*lsecondaryBuffer != ':') && (i < 32);i++)
-        login[i] = *lsecondaryBuffer++;
+      for (i = 0; (*decodedPw != ':') && (i < 32);i++)
+        login[i] = *decodedPw++;
 
       login[i] = '\0';
 
-      lsecondaryBuffer++;
-      for (i = 0; (*lsecondaryBuffer) && (i < 31); i++)
-        password[i] = *lsecondaryBuffer++;
+      decodedPw++;
+      for (i = 0; (*decodedPw) && (i < 31); i++)
+        password[i] = *decodedPw++;
 
       password[i] = '\0';
       connection->setLogin (login);
       connection->setPassword (password);
-      delete lsecondaryBufferOr;
+      delete decodedPwBuf;
       *lenOut = tokenOff = getEndLine (token, 100);
     }
   else if (!request->auth.compare ("Digest"))
@@ -1032,7 +1044,7 @@ int HttpHeaders::buildHTTPResponseHeaderStruct (const char *input,
 
         if (token)
           {
-            
+
             if (strlen (command) > HTTP_RESPONSE_OTHER_DIM ||
                 strlen (token) > HTTP_RESPONSE_OTHER_DIM)
               {
diff --git a/myserver/src/server/clients_thread.cpp b/myserver/src/server/clients_thread.cpp
index 0ba0b08..fb07752 100644
--- a/myserver/src/server/clients_thread.cpp
+++ b/myserver/src/server/clients_thread.cpp
@@ -71,7 +71,7 @@ ClientsThread::~ClientsThread ()
   threadIsRunning = false;
 
   buffer.free ();
-  secondaryBuffer.free ();
+  auxiliaryBuffer.free ();
 }
 
 /*!
@@ -125,8 +125,8 @@ DEFINE_THREAD (clients_thread, pParam)
   ct->buffer.setRealLength (ct->bufferSize);
   ct->buffer.setSizeLimit (ct->bufferSize);
 
-  ct->secondaryBuffer.setRealLength (ct->bufferSize);
-  ct->secondaryBuffer.setSizeLimit (ct->bufferSize);
+  ct->auxiliaryBuffer.setRealLength (ct->bufferSize);
+  ct->auxiliaryBuffer.setSizeLimit (ct->bufferSize);
 
   /* Built-in protocols will be initialized at the first use.  */
   ct->initialized = true;
@@ -297,9 +297,9 @@ int ClientsThread::controlConnections ()
     if (c->hasContinuation ())
       {
         retcode = c->getContinuation ()(c, (char*)buffer.getBuffer (),
-                                   (char*)secondaryBuffer.getBuffer (),
+                                   (char*)auxiliaryBuffer.getBuffer (),
                                    buffer.getRealLength (),
-                                   secondaryBuffer.getRealLength (),
+                                   auxiliaryBuffer.getRealLength (),
                                    nBytesToRead, id);
         c->setContinuation (NULL);
       }
@@ -308,9 +308,9 @@ int ClientsThread::controlConnections ()
         protocol = server->getProtocol (c->host->getProtocolName ());
         if (protocol)
           retcode = protocol->controlConnection (c, (char*)buffer.getBuffer (),
-                                           (char*)secondaryBuffer.getBuffer (),
+                                           (char*)auxiliaryBuffer.getBuffer (),
                                            buffer.getRealLength (),
-                                           secondaryBuffer.getRealLength (),
+                                           auxiliaryBuffer.getRealLength (),
                                            nBytesToRead, id);
         else
           retcode = ClientsThread::DELETE_CONNECTION;
@@ -398,7 +398,7 @@ MemBuf* ClientsThread::getBuffer ()
  */
 MemBuf *ClientsThread::getSecondaryBuffer ()
 {
-  return &secondaryBuffer;
+  return &auxiliaryBuffer;
 }
 
 /*!



commit 643175177b8348828d281cbb6268c11a0a74a122
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Nov 7 02:00:39 2009 +0100

    Avoid several casts using directly an object of the desired type.

diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index a098074..cf0423c 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -1237,12 +1237,15 @@ int Http::requestAuthorization ()
   *td->secondaryBuffer << "\r\nContent-length: 0\r\n";
 
   if (td->authScheme == HTTP_AUTH_SCHEME_BASIC)
-    *td->secondaryBuffer << "WWW-Authenticate: Basic realm=\""
-                         << (host ? host->value->c_str () : "")
-                         << "\"\r\n";
+    {
+      *td->secondaryBuffer << "WWW-Authenticate: Basic realm=\""
+                           << (host ? host->value->c_str () : "")
+                           << "\"\r\n";
+    }
   else if (td->authScheme == HTTP_AUTH_SCHEME_DIGEST)
     {
       char md5Str[256];
+      HttpUserData *hud = (HttpUserData*) td->connection->protocolBuffer;
       if (td->connection->protocolBuffer == 0)
         {
           td->connection->protocolBuffer = new HttpUserData;
@@ -1251,11 +1254,10 @@ int Http::requestAuthorization ()
               sendHTTPhardError500 ();
               return HttpDataHandler::RET_FAILURE;
             }
-          ((HttpUserData*) (td->connection->protocolBuffer))->reset ();
+          hud->reset ();
         }
 
-      myserver_strlcpy (((HttpUserData*) td->connection->protocolBuffer)->realm,
-                        host ? host->value->c_str () : "", 48);
+      myserver_strlcpy (hud->realm, host ? host->value->c_str () : "", 48);
 
       /* Just a random string.  */
       md5Str[0] = (char) td->id;
@@ -1265,34 +1267,24 @@ int Http::requestAuthorization ()
       md5Str[4] = (char) (clock () & 0xFF);
       strncpy (&(md5Str[5]), td->request.uri.c_str (), 256 - 5);
       md5.init ();
-      md5.update ((char const*) md5Str,
-                  (unsigned int) strlen (md5Str));
-      md5.end (((HttpUserData*) td->connection->protocolBuffer)->opaque);
+      md5.update (md5Str, strlen (md5Str));
+      md5.end (hud->opaque);
 
       if (td->connection->protocolBuffer &&
-          ((!(((HttpUserData*) td->connection->protocolBuffer)->digest)) ||
-           (((HttpUserData*) td->connection->protocolBuffer)->nonce[0] == '\0')))
+          ((!(hud->digest)) || (hud->nonce[0] == '\0')))
         {
-          computeDigest (((HttpUserData*) td->connection->protocolBuffer)->nonce,
-                         md5Str);
-          ((HttpUserData*) td->connection->protocolBuffer)->nc = 0;
+          computeDigest (hud->nonce, md5Str);
+          hud->nc = 0;
         }
 
       *td->secondaryBuffer << "WWW-Authenticate: digest "
-              << " qop=\"auth\", algorithm =\"MD5\", realm =\""
-              << ((HttpUserData*) td->connection->protocolBuffer)->realm
-              << "\",  opaque =\""
-              << ((HttpUserData*) td->connection->protocolBuffer)->opaque
-              << "\",  nonce =\""
-              << ((HttpUserData*) td->connection->protocolBuffer)->nonce
-              << "\" ";
-
-      if (((HttpUserData*) td->connection->protocolBuffer)->cnonce[0])
-        {
-          *td->secondaryBuffer << ", cnonce =\""
-                  << ((HttpUserData*) td->connection->protocolBuffer)->cnonce
-                  << "\" ";
-        }
+                           << " qop=\"auth\", algorithm =\"MD5\", realm =\""
+                           << hud->realm << "\",  opaque =\"" << hud->opaque
+                           << "\",  nonce =\"" << hud->nonce << "\" ";
+
+      if (hud->cnonce[0])
+        *td->secondaryBuffer << ", cnonce =\"" << hud->cnonce << "\" ";
+
       *td->secondaryBuffer << "\r\n";
     }
   else
@@ -1300,12 +1292,13 @@ int Http::requestAuthorization ()
       /* Send a non implemented error page if the auth scheme is not known.  */
       return raiseHTTPError (501);
     }
+
   *td->secondaryBuffer << "Date: ";
   getRFC822GMTTime (time, 32);
-  *td->secondaryBuffer << time
-          << "\r\n\r\n";
+  *td->secondaryBuffer << time << "\r\n\r\n";
+
   if (td->connection->socket->send (td->secondaryBuffer->getBuffer (),
-                                    td->secondaryBuffer->getLength (), 0) == -1)
+                                    td->secondaryBuffer->getLength (), 0) < 0)
     {
       td->connection->host->warningsLogWrite (_("HTTP: socket error"));
       return HttpDataHandler::RET_FAILURE;

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

Summary of changes:
 myserver/include/protocol/ftp/ftp.h                |    2 +-
 .../include/protocol/http/http_thread_context.h    |    2 +-
 myserver/include/server/clients_thread.h           |    2 +-
 myserver/src/http_handler/cgi/cgi.cpp              |   32 ++--
 myserver/src/http_handler/fastcgi/fastcgi.cpp      |    8 +-
 myserver/src/http_handler/http_dir/http_dir.cpp    |   96 ++++----
 myserver/src/http_handler/http_file/http_file.cpp  |    2 +-
 myserver/src/http_handler/isapi/isapi.cpp          |    6 +-
 myserver/src/http_handler/mscgi/mscgi.cpp          |    4 +-
 myserver/src/http_handler/proxy/proxy.cpp          |   12 +-
 myserver/src/http_handler/scgi/scgi.cpp            |   36 ++--
 myserver/src/http_handler/wincgi/wincgi.cpp        |   30 ++--
 myserver/src/protocol/ftp/ftp.cpp                  |   74 ++++----
 myserver/src/protocol/http/env/env.cpp             |    2 +-
 myserver/src/protocol/http/http.cpp                |  229 ++++++++++----------
 myserver/src/protocol/http/http_data_read.cpp      |   12 +-
 myserver/src/protocol/http/http_headers.cpp        |  136 +++++++------
 myserver/src/server/clients_thread.cpp             |   16 +-
 18 files changed, 353 insertions(+), 348 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sat Nov 07 06:42:06 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N6jgE-0007Dz-6Y
	for mharc-myserver-commit@gnu.org; Sat, 07 Nov 2009 06:42:06 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N6jgB-0007CM-8O
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 06:42:03 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N6jg9-0007B6-LE
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 06:42:02 -0500
Received: from [199.232.76.173] (port=59396 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N6jg7-0007Ai-1p
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 06:42:00 -0500
Received: from savannah.gnu.org ([199.232.41.3]:34203 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 1N6jg6-0000At-Je
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 06:41:58 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N6jg5-0000Sz-RR
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 11:41:58 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N6jg4-0000SJ-GT
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 11:41:57 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 2061dc519cc864c8da2ff425b2733b71722eaa93
X-Git-Newrev: 6cb5a344f7ef0a0442c0f971e7604b8c2eb21052
Message-Id: <E1N6jg4-0000SJ-GT@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sat, 07 Nov 2009 11:41:57 +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. 0_9-378-g6cb5a34
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, 07 Nov 2009 11:42:03 -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  6cb5a344f7ef0a0442c0f971e7604b8c2eb21052 (commit)
       via  a5d4dc72d5344aa3963c64af8161c4e5c8c8a5ed (commit)
       via  7d47d6449df0b097ecf70a49fae400b91d6caa13 (commit)
       via  028267f1c50dbe873452eb5f0a05cfabf95bbb51 (commit)
       via  a41aea1526d286654a16cd193257b38af85d4781 (commit)
      from  2061dc519cc864c8da2ff425b2733b71722eaa93 (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 6cb5a344f7ef0a0442c0f971e7604b8c2eb21052
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Nov 7 12:39:03 2009 +0100

    Rename getSecondaryBuffer to getAuxiliaryBuffer.

diff --git a/myserver/include/server/clients_thread.h b/myserver/include/server/clients_thread.h
index 64755e6..954115d 100644
--- a/myserver/include/server/clients_thread.h
+++ b/myserver/include/server/clients_thread.h
@@ -55,7 +55,7 @@ public:
   };
 
   MemBuf *getBuffer ();
-  MemBuf *getSecondaryBuffer ();
+  MemBuf *getAuxiliaryBuffer ();
 
   ClientsThread (Server* server);
   ~ClientsThread ();
diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index a4572eb..7596b44 100644
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -348,7 +348,7 @@ int Ftp::controlConnection (ConnectionPtr pConnection, char *request,
 
   td.pConnection = pConnection;
   td.buffer = pConnection->getActiveThread ()->getBuffer ();
-  td.auxiliaryBuffer = pConnection->getActiveThread ()->getSecondaryBuffer ();
+  td.auxiliaryBuffer = pConnection->getActiveThread ()->getAuxiliaryBuffer ();
   td.buffersize = pConnection->getActiveThread ()->getBufferSize ();
   td.nBytesToRead = reqLen;
   td.pProtocolInterpreter = this;
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 182ad32..7ca11a2 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -800,7 +800,7 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
   try
     {
       td->buffer = a->getActiveThread ()->getBuffer ();
-      td->auxiliaryBuffer = a->getActiveThread ()->getSecondaryBuffer ();
+      td->auxiliaryBuffer = a->getActiveThread ()->getAuxiliaryBuffer ();
       td->buffersize = a->getActiveThread ()->getBufferSize ();
       td->nBytesToRead = nbtr;
       td->connection = a;
diff --git a/myserver/src/server/clients_thread.cpp b/myserver/src/server/clients_thread.cpp
index fb07752..ad4d629 100644
--- a/myserver/src/server/clients_thread.cpp
+++ b/myserver/src/server/clients_thread.cpp
@@ -396,7 +396,7 @@ MemBuf* ClientsThread::getBuffer ()
 /*!
  * Get a pointer to the secondary buffer.
  */
-MemBuf *ClientsThread::getSecondaryBuffer ()
+MemBuf *ClientsThread::getAuxiliaryBuffer ()
 {
   return &auxiliaryBuffer;
 }



commit a5d4dc72d5344aa3963c64af8161c4e5c8c8a5ed
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Nov 7 12:33:40 2009 +0100

    Drop connections limit check from the HTTP code.

diff --git a/myserver/documentation/virtual_hosts.texi b/myserver/documentation/virtual_hosts.texi
index 51b2ebe..5637bf0 100644
--- a/myserver/documentation/virtual_hosts.texi
+++ b/myserver/documentation/virtual_hosts.texi
@@ -117,7 +117,8 @@ Any other element passed after the location will be part of the
 @code{PATH_INFO} variable.
 
 @example
-    <LOCATION path="foo/bar" mime="text/html" handler="CGI" param="/usr/local/bin/handler" />
+    <LOCATION path="foo/bar" mime="text/html" handler="CGI"
+              param="/usr/local/bin/handler" />
 @end example
 
 In the previous example, the CGI process @file{/usr/local/bin/handler}
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index d704f8a..182ad32 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -318,7 +318,7 @@ int Http::getFilePermissions (string& filename, string& directory, string& file,
       else
         FilesUtility::splitPath (filenamePath, directory, file);
 
-      if (td->connection->protocolBuffer == 0)
+      if (td->connection->protocolBuffer == NULL)
         {
           td->connection->protocolBuffer = new HttpUserData;
           if (!td->connection->protocolBuffer)
@@ -326,7 +326,7 @@ int Http::getFilePermissions (string& filename, string& directory, string& file,
               td->connection->host->warningsLogWrite (_("HTTP: internal error"));
               return 500;
             }
-          ((HttpUserData*) (td->connection->protocolBuffer))->reset ();
+          static_cast<HttpUserData*> (td->connection->protocolBuffer)->reset ();
         }
 
       string user;
@@ -360,8 +360,6 @@ int Http::getFilePermissions (string& filename, string& directory, string& file,
                                                          | MYSERVER_SERVER_CONF, "xml"));
       string authMethod (td->securityToken.getData ("sec.auth_method", MYSERVER_VHOST_CONF
                                                          | MYSERVER_SERVER_CONF, "xml"));
-
-
       SecurityDomain * domains[] = {&auth, &httpReqSecDom, NULL};
 
       Server::getInstance ()->getSecurityManager ()->getPermissionMask (&(td->securityToken),
@@ -383,7 +381,6 @@ int Http::getFilePermissions (string& filename, string& directory, string& file,
                 hud->digest = checkDigest ();
 
               hud->digestChecked = 1;
-
               if (hud->digest == 1)
                 {
                   string &pwd = td->securityToken.getNeededPassword ();
@@ -393,7 +390,7 @@ int Http::getFilePermissions (string& filename, string& directory, string& file,
             }
           td->authScheme = HTTP_AUTH_SCHEME_DIGEST;
         }
-        /* By default use the Basic authentication scheme. */
+      /* By default use the Basic authentication scheme. */
       else
         td->authScheme = HTTP_AUTH_SCHEME_BASIC;
     }
@@ -825,18 +822,14 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
         delete (*it);
       td->other.clear ();
 
-      /*
-       * Reset the request and response structures.
-       */
       HttpHeaders::resetHTTPRequest (&td->request);
       HttpHeaders::resetHTTPResponse (&td->response);
 
       /* Reset the HTTP status once per request. */
       td->response.httpStatus = 200;
 
-      /*
-       * The connection should be removed.
-       */
+      /* The connection must be removed in a soft-way.  The connections
+         scheduler sets this flag.  */
       if (td->connection->getToRemove ())
         {
           switch (td->connection->getToRemove ())
@@ -860,7 +853,7 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
                                                    &(td->request),
                                                    td->connection);
 
-      /* -1 means the request is not complete yet. */
+      /* -1 means the request is not complete yet.  */
       if (validRequest == -1)
         return ClientsThread::INCOMPLETE_REQUEST;
 
@@ -935,9 +928,7 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
               return ClientsThread::DELETE_CONNECTION;
             }
           else if (ret)
-            {
-              ret = raiseHTTPError (httpErrorCode);
-            }
+            ret = raiseHTTPError (httpErrorCode);
         }
       else
         {
@@ -1021,6 +1012,7 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
               while (pos < td->request.uri.length ())
                 if (td->request.uri[++pos] == '/')
                   break;
+
               user.assign (td->request.uri.substr (2, pos - 2));
               Server::getInstance ()->getHomeDir ()->getHomeDir (user,
                                                                  documentRoot);
@@ -1057,21 +1049,6 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
                 }
             }
 
-          /*
-           *Check if there is a limit for the number of connections in the
-           *virtual host A value of zero means no limit.
-           */
-          const char* val = td->securityToken.getData ("MAX_CONNECTIONS",
-                                                       MYSERVER_VHOST_CONF
-                                                       | MYSERVER_SERVER_CONF,
-                                                       NULL);
-          if (val)
-            {
-              u_long limit = (u_long) atoi (val);
-              if (limit && (u_long) a->host->getRef () >= limit)
-                ret = raiseHTTPError (500);
-            }
-
           /* Support for HTTP pipelining.  */
           if (contentLength == 0)
             {
@@ -1187,6 +1164,8 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
 
       logHTTPaccess ();
 
+      /* Map the HttpDataHandler return value to codes understood by
+         ClientsThread.  */
       if (ret == HttpDataHandler::RET_OK && keepalive)
         return ClientsThread::KEEP_CONNECTION;
       else
@@ -1210,8 +1189,10 @@ void Http::computeDigest (char* out, char* buffer)
   Md5 md5;
   if (!out)
     return;
+
   sprintf (buffer, "%i-%u-%s", (int) clock (), (u_int) td->id,
            td->connection->getIpAddr ());
+
   md5.init ();
   md5.update ((char const*) buffer, (unsigned int) strlen (buffer));
   md5.end (out);



commit 7d47d6449df0b097ecf70a49fae400b91d6caa13
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Nov 7 12:28:10 2009 +0100

    ClientsThread return codes start counting from 1.
    
    It leaves room for a NOP retcode that can be used by protocols specific
    handlers.

diff --git a/myserver/include/server/clients_thread.h b/myserver/include/server/clients_thread.h
index 9b44f81..64755e6 100644
--- a/myserver/include/server/clients_thread.h
+++ b/myserver/include/server/clients_thread.h
@@ -35,26 +35,28 @@ public:
   enum RETURN_CODE
   {
     /*!
-     *Delete the current connection from the connections pool.
-     */
-    DELETE_CONNECTION = 0,
+      Delete the current connection from the connections pool.
+    */
+    DELETE_CONNECTION = 1,
     /*!
-     *Keep the connection in the connections pool waiting for new data.
-     */
-    KEEP_CONNECTION = 1,
+      Keep the connection in the connections pool waiting for new data.
+    */
+    KEEP_CONNECTION,
     /*!
-     *The request present in the connection buffer is not complete, keep
-     *data in the buffer and append to it.
-     */
-    INCOMPLETE_REQUEST = 2,
+      The request present in the connection buffer is not complete, keep
+      data in the buffer and append to it.
+    */
+    INCOMPLETE_REQUEST,
     /*!
-    *The request present in the buffer is not complete, append to the buffer
-    *and check before new data is present.
+      The request present in the buffer is not complete, append to the buffer
+      and check before new data is present.
     */
-    INCOMPLETE_REQUEST_NO_WAIT = 3
+    INCOMPLETE_REQUEST_NO_WAIT
   };
+
   MemBuf *getBuffer ();
   MemBuf *getSecondaryBuffer ();
+
   ClientsThread (Server* server);
   ~ClientsThread ();
   void stop ();



commit 028267f1c50dbe873452eb5f0a05cfabf95bbb51
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Nov 7 12:17:06 2009 +0100

    Fix a compiling error on W32 introduced by recent changes.

diff --git a/myserver/src/http_handler/isapi/isapi.cpp b/myserver/src/http_handler/isapi/isapi.cpp
index ce5f352..6a12702 100644
--- a/myserver/src/http_handler/isapi/isapi.cpp
+++ b/myserver/src/http_handler/isapi/isapi.cpp
@@ -290,9 +290,10 @@ BOOL WINAPI ISAPI_WriteClientExport (HCONN hConn, LPVOID Buffer, LPDWORD lpdwByt
               else
                 ConnInfo->td->response.setValue ("Connection", "Close");
 
-
-              if (HttpHeaders::sendHeader (ConnInfo->td->response, *td->connection->socket,
-                                           *ConnInfo->td->auxiliaryBuffer, ConnInfo->td))
+              if (HttpHeaders::sendHeader (ConnInfo->td->response,
+                                           *ConnInfo->td->connection->socket,
+                                           *ConnInfo->td->auxiliaryBuffer,
+                                           ConnInfo->td))
                 return HttpDataHandler::RET_FAILURE;
             }
           /*! Save the headerSent status. */
diff --git a/myserver/src/http_handler/wincgi/wincgi.cpp b/myserver/src/http_handler/wincgi/wincgi.cpp
index 972add5..3e1e5ef 100644
--- a/myserver/src/http_handler/wincgi/wincgi.cpp
+++ b/myserver/src/http_handler/wincgi/wincgi.cpp
@@ -362,9 +362,10 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
           return HttpDataHandler::RET_OK;
         }
 
+      u_long written;
       chain.write ((char*)(buffer + headerSize), nBytesRead - headerSize,
-                   &nbw2);
-      nbw += nbw2;
+                   &written);
+      nbw += written;
     }
   else
     {



commit a41aea1526d286654a16cd193257b38af85d4781
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Nov 7 12:12:54 2009 +0100

    Fix a problem in the texinfo documentation: use @code, not @value.

diff --git a/myserver/documentation/basic_configuration.texi b/myserver/documentation/basic_configuration.texi
index 8f0b235..7bbd236 100644
--- a/myserver/documentation/basic_configuration.texi
+++ b/myserver/documentation/basic_configuration.texi
@@ -34,7 +34,7 @@ Plugins are allowed to install new handlers to read the configuration
 from other sources.  It is done changing the value of the variables
 @code{server.vhost_handler} and @code{server.server.mime_handler},
 respectively to use a different handler for the virtual hosts and for
-the MIME types.  If no value is specified then the value @value{xml}
+the MIME types.  If no value is specified then the value @code{xml}
 is used.
 
 @section Server administrator

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

Summary of changes:
 myserver/documentation/basic_configuration.texi |    2 +-
 myserver/documentation/virtual_hosts.texi       |    3 +-
 myserver/include/server/clients_thread.h        |   30 ++++++++-------
 myserver/src/http_handler/isapi/isapi.cpp       |    7 ++--
 myserver/src/http_handler/wincgi/wincgi.cpp     |    5 ++-
 myserver/src/protocol/ftp/ftp.cpp               |    2 +-
 myserver/src/protocol/http/http.cpp             |   45 +++++++----------------
 myserver/src/server/clients_thread.cpp          |    2 +-
 8 files changed, 41 insertions(+), 55 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sat Nov 07 09:23:15 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N6mCB-0007ve-EK
	for mharc-myserver-commit@gnu.org; Sat, 07 Nov 2009 09:23:15 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N6mC9-0007tF-Cb
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 09:23:13 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N6mC8-0007sB-7e
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 09:23:13 -0500
Received: from [199.232.76.173] (port=37012 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N6mC8-0007s5-4o
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 09:23:12 -0500
Received: from savannah.gnu.org ([199.232.41.3]:33407 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 1N6mC7-0001Ah-PC
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 09:23:12 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N6mC6-0000vE-V7
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 14:23:11 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N6mC5-0000uh-Nu
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 14:23:10 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 6cb5a344f7ef0a0442c0f971e7604b8c2eb21052
X-Git-Newrev: 4aaf51b6ef376b9ee6fa24280a7efe7bf7a9a435
Message-Id: <E1N6mC5-0000uh-Nu@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sat, 07 Nov 2009 14:23:10 +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. 0_9-380-g4aaf51b
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, 07 Nov 2009 14:23:13 -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  4aaf51b6ef376b9ee6fa24280a7efe7bf7a9a435 (commit)
       via  bf96684668e208e5b9d2c2b441180e756230a2a4 (commit)
      from  6cb5a344f7ef0a0442c0f971e7604b8c2eb21052 (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 4aaf51b6ef376b9ee6fa24280a7efe7bf7a9a435
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Nov 7 15:21:47 2009 +0100

    Remove any dependency to the Protocol class from FiltersChain.

diff --git a/myserver/include/filter/filters_chain.h b/myserver/include/filter/filters_chain.h
index 02552ad..588f4f4 100644
--- a/myserver/include/filter/filters_chain.h
+++ b/myserver/include/filter/filters_chain.h
@@ -22,7 +22,6 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 # include "stdafx.h"
 # include <include/filter/stream.h>
 # include <include/filter/filter.h>
-# include <include/protocol/protocol.h>
 # include <list>
 
 using namespace std;
@@ -30,22 +29,6 @@ using namespace std;
 class FiltersChain : public Stream
 {
 public:
-  Protocol* getProtocol ()
-  {
-    return protocol;
-  }
-  void setProtocol (Protocol* pr)
-  {
-    protocol = pr;
-  }
-  void* getProtocolData ()
-  {
-    return protocolData;
-  }
-  void setProtocolData (void* prd)
-  {
-    protocolData = prd;
-  }
   void setAcceptDuplicates (int);
   int getAcceptDuplicates ();
   void setStream (Stream*);
@@ -67,8 +50,6 @@ public:
   FiltersChain ();
   ~FiltersChain ();
 protected:
-  Protocol *protocol;
-  void *protocolData;
   list <Filter*> filters;
   Filter* firstFilter;
   Stream *stream;
diff --git a/myserver/src/filter/filters_chain.cpp b/myserver/src/filter/filters_chain.cpp
index da447eb..1bf7fbe 100644
--- a/myserver/src/filter/filters_chain.cpp
+++ b/myserver/src/filter/filters_chain.cpp
@@ -83,7 +83,6 @@ FiltersChain::FiltersChain ()
   acceptDuplicates = 1;
   stream = NULL;
   firstFilter = NULL;
-  protocol = NULL;
 }
 
 /*!
@@ -131,7 +130,8 @@ int FiltersChain::addFilter (Filter* f, u_long *nbw, int sendData)
     f->setParent (firstFilter);
   }
 
-  /*! If the chain doesn't support duplicates check if the filter is already present.*/
+  /* If the chain doesn't support duplicates check if the filter is already
+     present.  */
   if (!acceptDuplicates)
   {
     if (isFilterPresent (f))
@@ -159,8 +159,6 @@ int FiltersChain::addFilter (Filter* f, u_long *nbw, int sendData)
    */
   firstFilter = f;
 
-  f->setProtocol (protocol);
-
   /*! Add the filters in the list in the same order they are used. */
   filters.push_front (f);
   return ret;
diff --git a/myserver/src/http_handler/cgi/cgi.cpp b/myserver/src/http_handler/cgi/cgi.cpp
index 79dbe14..0e3db3c 100644
--- a/myserver/src/http_handler/cgi/cgi.cpp
+++ b/myserver/src/http_handler/cgi/cgi.cpp
@@ -125,8 +125,6 @@ int Cgi::send (HttpThreadContext* td, const char* scriptpath,
   tmpScriptPath.assign (scriptpath);
   FilesUtility::splitPath (tmpScriptPath, td->scriptDir, td->scriptFile);
 
-  chain.setProtocol (td->http);
-  chain.setProtocolData (td);
   chain.setStream (td->connection->socket);
 
   if (execute)
diff --git a/myserver/src/http_handler/fastcgi/fastcgi.cpp b/myserver/src/http_handler/fastcgi/fastcgi.cpp
index 194bd71..9a882f7 100644
--- a/myserver/src/http_handler/fastcgi/fastcgi.cpp
+++ b/myserver/src/http_handler/fastcgi/fastcgi.cpp
@@ -96,9 +96,6 @@ int FastCgi::send (HttpThreadContext* td, const char* scriptpath,
   FilesUtility::splitPath (tmp, td->cgiRoot, td->cgiFile);
   tmp.assign (scriptpath);
   FilesUtility::splitPath (tmp, td->scriptDir, td->scriptFile);
-
-  chain.setProtocol (td->http);
-  chain.setProtocolData (td);
   chain.setStream (td->connection->socket);
 
   if (td->mime
diff --git a/myserver/src/http_handler/http_dir/http_dir.cpp b/myserver/src/http_handler/http_dir/http_dir.cpp
index 9a53ee1..26d5331 100644
--- a/myserver/src/http_handler/http_dir/http_dir.cpp
+++ b/myserver/src/http_handler/http_dir/http_dir.cpp
@@ -317,11 +317,7 @@ int HttpDir::send (HttpThreadContext* td,
 
   HttpRequestHeader::Entry *host = td->request.other.get ("Host");
 
-
-  chain.setProtocol (td->http);
-  chain.setProtocolData (td);
   chain.setStream (td->connection->socket);
-
   if ( !(td->permissions & MYSERVER_PERMISSION_BROWSE))
     return td->http->sendAuth ();
 
diff --git a/myserver/src/http_handler/http_file/http_file.cpp b/myserver/src/http_handler/http_file/http_file.cpp
index 0488ab6..ee56185 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -342,8 +342,6 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
 
         useChunks = true;
       }
-    chain.setProtocol (td->http);
-    chain.setProtocolData (td);
     chain.setStream (&memStream);
     if (td->mime)
       {
diff --git a/myserver/src/http_handler/isapi/isapi.cpp b/myserver/src/http_handler/isapi/isapi.cpp
index 6a12702..14355a7 100644
--- a/myserver/src/http_handler/isapi/isapi.cpp
+++ b/myserver/src/http_handler/isapi/isapi.cpp
@@ -792,8 +792,6 @@ int Isapi::send (HttpThreadContext* td,
       return td->http->raiseHTTPError (500);
     }
 
-  connTable[connIndex].chain.setProtocol (td->http);
-  connTable[connIndex].chain.setProtocolData (td);
   connTable[connIndex].chain.setStream (td->connection->socket);
   if (td->mime)
     {
diff --git a/myserver/src/http_handler/mscgi/mscgi.cpp b/myserver/src/http_handler/mscgi/mscgi.cpp
index 5bfeb6f..95d22fe 100644
--- a/myserver/src/http_handler/mscgi/mscgi.cpp
+++ b/myserver/src/http_handler/mscgi/mscgi.cpp
@@ -90,9 +90,6 @@ int MsCgi::send (HttpThreadContext* td, const char* exec, const char* cmdLine,
   }
 
   Env::buildEnvironmentString (td,data.envString);
-
-  chain.setProtocol (td->http);
-  chain.setProtocolData (td);
   chain.setStream (td->connection->socket);
 
   if (td->mime && Server::getInstance ()->getFiltersFactory ()->chain (&chain,
diff --git a/myserver/src/http_handler/proxy/proxy.cpp b/myserver/src/http_handler/proxy/proxy.cpp
index 48a4816..bb4cc54 100644
--- a/myserver/src/http_handler/proxy/proxy.cpp
+++ b/myserver/src/http_handler/proxy/proxy.cpp
@@ -105,8 +105,6 @@ int Proxy::send (HttpThreadContext *td,
       return td->http->raiseHTTPError (500);
     }
 
-  chain.setProtocol (td->http);
-  chain.setProtocolData (td);
   chain.setStream (td->connection->socket);
 
   if (td->mime && Server::getInstance ()->getFiltersFactory ()->chain (&chain,
diff --git a/myserver/src/http_handler/scgi/scgi.cpp b/myserver/src/http_handler/scgi/scgi.cpp
index 0a14904..65feed9 100644
--- a/myserver/src/http_handler/scgi/scgi.cpp
+++ b/myserver/src/http_handler/scgi/scgi.cpp
@@ -70,8 +70,6 @@ int Scgi::send (HttpThreadContext* td, const char* scriptpath,
     FilesUtility::splitPath (tmp, td->scriptDir, td->scriptFile);
   }
 
-  chain.setProtocol (td->http);
-  chain.setProtocolData (td);
   chain.setStream (td->connection->socket);
   if (td->mime)
   {
diff --git a/myserver/src/http_handler/wincgi/wincgi.cpp b/myserver/src/http_handler/wincgi/wincgi.cpp
index 3e1e5ef..b806d31 100644
--- a/myserver/src/http_handler/wincgi/wincgi.cpp
+++ b/myserver/src/http_handler/wincgi/wincgi.cpp
@@ -100,9 +100,6 @@ int WinCgi::send (HttpThreadContext* td, const char* scriptpath,
   strcpy (outFilePath,td->outputDataPath.c_str ());
   strcat (outFilePath,"WC");
   td->inputData.seek (0);
-
-  chain.setProtocol (td->http);
-  chain.setProtocolData (td);
   chain.setStream (td->connection->socket);
   if (td->mime)
     {
diff --git a/myserver/tests/test_filter_chain.cpp b/myserver/tests/test_filter_chain.cpp
index 6d039f6..e5eb923 100644
--- a/myserver/tests/test_filter_chain.cpp
+++ b/myserver/tests/test_filter_chain.cpp
@@ -24,21 +24,13 @@
 #include <cppunit/extensions/TestFactoryRegistry.h>
 #include <cppunit/ui/text/TestRunner.h>
 #include <cppunit/extensions/HelperMacros.h>
-#include <include/protocol/protocol.h>
 #include <include/filter/memory_stream.h>
 
-class MyProtocol : public Protocol
-{
-
-};
-
 class TestFilterChain : public CppUnit::TestFixture
 {
   CPPUNIT_TEST_SUITE ( TestFilterChain );
   CPPUNIT_TEST ( testGzipChain );
-  CPPUNIT_TEST ( testProtocol );
   CPPUNIT_TEST ( testIsEmpty );
-  CPPUNIT_TEST ( testProtocolData );
   CPPUNIT_TEST ( testAcceptDuplicates );
   CPPUNIT_TEST ( testStream );
   CPPUNIT_TEST ( testIsFilterPresent );
@@ -87,14 +79,6 @@ public:
     CPPUNIT_ASSERT (strncmp (szTest, szExpected, nbw) == 0);
   }
 
-
-  void testProtocol ()
-  {
-    MyProtocol mp;
-    fc->setProtocol (&mp);
-    CPPUNIT_ASSERT_EQUAL ((Protocol*)&mp, fc->getProtocol ());
-  }
-
   void testAcceptDuplicates ()
   {
     fc->setAcceptDuplicates (0);
@@ -115,14 +99,6 @@ public:
     CPPUNIT_ASSERT_EQUAL ((Stream*)&ms, fc->getStream ());
   }
 
-  void testProtocolData ()
-  {
-    char *data = new char[2];
-    fc->setProtocolData (data);
-    CPPUNIT_ASSERT_EQUAL (data, (char*)fc->getProtocolData ());
-    delete [] data;
-  }
-
   void testIsEmpty ()
   {
     u_long nbw;



commit bf96684668e208e5b9d2c2b441180e756230a2a4
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Nov 7 15:20:30 2009 +0100

    Make the Protocol::controlConnection a pure virtual method.

diff --git a/myserver/include/protocol/protocol.h b/myserver/include/protocol/protocol.h
index 6be5ce0..bb00f47 100644
--- a/myserver/include/protocol/protocol.h
+++ b/myserver/include/protocol/protocol.h
@@ -40,10 +40,24 @@ public:
   virtual ~Protocol ();
   virtual const char* getName ();
 
+  /*!
+    Entry point to check new data available from a client.
+
+    \param con Connection structure with all data relative to the connection.
+    \param request Request body ready from the client (it may be incomplete and
+    it is protocol responsibility to check if it is complete or not.  This buffer
+    can be used for other purposes too by the protocol, it is not required to be
+    unchanged.
+    \param auxBuf Auxiliary buffer available to the current thread.
+    \param reqBufLen Length in bytes of the buffer containing the request.
+    \param auxBufLen Length in bytes of the auxiliary buffer.
+    \param reqLen Number of bytes read from the client in REQUEST.
+    \param tid current thread id.
+  */
   virtual int controlConnection (ConnectionPtr con, char *request,
                                  char *auxBuf, u_long reqBufLen,
                                  u_long auxBufLen, u_long reqLen,
-                                 u_long tid);
+                                 u_long tid) = 0;
 
   virtual int loadProtocol ();
   virtual int unLoadProtocol ();
diff --git a/myserver/src/protocol/protocol.cpp b/myserver/src/protocol/protocol.cpp
index f03ec3b..fac51e5 100644
--- a/myserver/src/protocol/protocol.cpp
+++ b/myserver/src/protocol/protocol.cpp
@@ -37,30 +37,6 @@ int Protocol::unLoadProtocol ()
 }
 
 /*!
- * Entry point to check new data available from a client.
- *
- * \param con Connection structure with all data relative to the connection.
- * \param request Request body ready from the client (it may be incomplete and
- * it is protocol responsibility to check if it is complete or not.  This buffer
- * can be used for other purposes too by the protocol, it is not required to be
- * unchanged.
- * \param auxBuf Auxiliary buffer available to the current thread.
- * \param reqBufLen Length in bytes of the buffer containing the request.
- * \param auxBufLen Length in bytes of the auxiliary buffer.
- * \param reqLen Number of bytes read from the client in REQUEST.
- * \param tid current thread id.
- */
-int Protocol::controlConnection (ConnectionPtr con, char *request,
-                                 char *auxBuf, u_long reqBufLen,
-                                 u_long auxBufLen, u_long reqLen,
-                                 u_long tid)
-{
-  Server::getInstance ()->log (MYSERVER_LOG_MSG_ERROR,
-                               _("Using Protocol::controlConnection"));
-  return ClientsThread::DELETE_CONNECTION;
-}
-
-/*!
  * Returns the name of the protocol. If an out buffer is
  * defined fullfill it with the name too.
  */

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

Summary of changes:
 myserver/include/filter/filters_chain.h           |   19 ----------------
 myserver/include/protocol/protocol.h              |   16 +++++++++++++-
 myserver/src/filter/filters_chain.cpp             |    6 +---
 myserver/src/http_handler/cgi/cgi.cpp             |    2 -
 myserver/src/http_handler/fastcgi/fastcgi.cpp     |    3 --
 myserver/src/http_handler/http_dir/http_dir.cpp   |    4 ---
 myserver/src/http_handler/http_file/http_file.cpp |    2 -
 myserver/src/http_handler/isapi/isapi.cpp         |    2 -
 myserver/src/http_handler/mscgi/mscgi.cpp         |    3 --
 myserver/src/http_handler/proxy/proxy.cpp         |    2 -
 myserver/src/http_handler/scgi/scgi.cpp           |    2 -
 myserver/src/http_handler/wincgi/wincgi.cpp       |    3 --
 myserver/src/protocol/protocol.cpp                |   24 ---------------------
 myserver/tests/test_filter_chain.cpp              |   24 ---------------------
 14 files changed, 17 insertions(+), 95 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sat Nov 07 19:44:53 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N6vtl-0006Rw-Km
	for mharc-myserver-commit@gnu.org; Sat, 07 Nov 2009 19:44:53 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N6vti-0006RC-VX
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 19:44:51 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N6vtg-0006Qq-Dk
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 19:44:49 -0500
Received: from [199.232.76.173] (port=50922 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N6vtg-0006Qn-6r
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 19:44:48 -0500
Received: from savannah.gnu.org ([199.232.41.3]:44155 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 1N6vtf-00035l-8X
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 19:44:47 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N6vte-0005oX-Dj
	for myserver-commit@gnu.org; Sun, 08 Nov 2009 00:44:46 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N6vta-0005mJ-N3
	for myserver-commit@gnu.org; Sun, 08 Nov 2009 00:44:46 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 4aaf51b6ef376b9ee6fa24280a7efe7bf7a9a435
X-Git-Newrev: fc3226b3ee89ae7c6fd61d61fe492912dd1b9a72
Message-Id: <E1N6vta-0005mJ-N3@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 08 Nov 2009 00:44:43 +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. 0_9-383-gfc3226b
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, 08 Nov 2009 00:44:51 -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  fc3226b3ee89ae7c6fd61d61fe492912dd1b9a72 (commit)
       via  83a01c053761e91c8b86f9445edeab39e08f3592 (commit)
       via  3be85b8fb86945bf494ee7859f334635806ea6aa (commit)
      from  4aaf51b6ef376b9ee6fa24280a7efe7bf7a9a435 (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 fc3226b3ee89ae7c6fd61d61fe492912dd1b9a72
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Nov 8 01:43:47 2009 +0100

    Http digest authorization can be used only with clear-text or digest a1 passwords.

diff --git a/myserver/include/conf/security/security_token.h b/myserver/include/conf/security/security_token.h
index 13c0fd3..eab199e 100644
--- a/myserver/include/conf/security/security_token.h
+++ b/myserver/include/conf/security/security_token.h
@@ -97,6 +97,11 @@ public:
     return providedMask;
   }
 
+  string &getAlgorithm ()
+  {
+    return algorithm;
+  }
+
   string &getNeededPassword ()
   {
     return neededPassword;
@@ -158,11 +163,26 @@ public:
     providedMask = p;
   }
 
-  void setNeededPassword (string &pw)
+  void setNeededPassword (const char *pw)
   {
     neededPassword.assign (pw);
   }
 
+  void setNeededPassword (string &pw)
+  {
+    neededPassword = pw;
+  }
+
+  void setAlgorithm (string &a)
+  {
+    algorithm = a;
+  }
+
+  void setAlgorithm (const char *pw)
+  {
+    algorithm = pw;
+  }
+
   void setDone (bool d)
   {
     done = d;
@@ -212,6 +232,9 @@ private:
   /*! Permission mask.  */
   int mask;
 
+  /*! Hash algorithm used to crypt the neededPassword.  */
+  string algorithm;
+
   /*!
     Password that the user should provide to have access.
     This is used in authorization schemes like the HTTP digest,
diff --git a/myserver/src/conf/security/xml_validator.cpp b/myserver/src/conf/security/xml_validator.cpp
index f749429..ab99bfb 100644
--- a/myserver/src/conf/security/xml_validator.cpp
+++ b/myserver/src/conf/security/xml_validator.cpp
@@ -122,6 +122,12 @@ int XmlValidator::getPermissionMask (SecurityToken* st)
 
       st->setProvidedMask (permissions);
 
+      if (algorithm)
+        st->setAlgorithm ((const char*)algorithm);
+
+      if (password)
+        st->setNeededPassword ((const char*)password);
+
       if (AuthMethod::comparePassword ((const char *)password,
                                        st->getPassword ().c_str (),
                                        (const char *)algorithm))
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 7ca11a2..eab482d 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -547,33 +547,51 @@ u_long Http::checkDigest ()
   char response[48];
   char *uri;
   u_long digestCount;
+  HttpUserData *hud =
+    static_cast<HttpUserData*>(td->connection->protocolBuffer);
+
 
   /* Return 0 if the password is different.  */
   if (td->request.digestOpaque[0]
-      && strcmp (td->request.digestOpaque,
-                 ((HttpUserData*) td->connection->protocolBuffer)->opaque))
+      && strcmp (td->request.digestOpaque, hud->opaque))
     return 0;
 
   /*! If is not equal return 0.  */
-  if (strcmp (td->request.digestRealm,
-              ((HttpUserData*) td->connection->protocolBuffer)->realm))
+  if (strcmp (td->request.digestRealm, hud->realm))
     return 0;
 
   digestCount = hexToInt (td->request.digestNc);
-  if (digestCount != ((HttpUserData*) td->connection->protocolBuffer)->nc + 1)
+  if (digestCount != hud->nc + 1)
     return 0;
   else
-    ((HttpUserData*) td->connection->protocolBuffer)->nc++;
+    hud->nc++;
 
-  md5.init ();
-  td->auxiliaryBuffer->setLength (0);
-  *td->auxiliaryBuffer << td->request.digestUsername << ":"
-                       << td->request.digestRealm
-                       << ":" << td->securityToken.getNeededPassword ();
 
-  md5.update ((char const*) td->auxiliaryBuffer->getBuffer (),
-              (unsigned int) td->auxiliaryBuffer->getLength ());
-  md5.end (A1);
+  string &algorithm = td->securityToken.getAlgorithm ();
+
+  if (algorithm.length () == 0)
+    {
+      md5.init ();
+      td->auxiliaryBuffer->setLength (0);
+      *td->auxiliaryBuffer << td->request.digestUsername << ":"
+                           << td->request.digestRealm
+                           << ":" << td->securityToken.getNeededPassword ();
+
+      md5.update ((char const*) td->auxiliaryBuffer->getBuffer (),
+                  (unsigned int) td->auxiliaryBuffer->getLength ());
+      md5.end (A1);
+    }
+  else if (algorithm.compare ("a1") == 0)
+    {
+      strcpy (A1, td->securityToken.getNeededPassword ().c_str ());
+    }
+  else
+    {
+      td->connection->host->warningsLogWrite
+        (_("HTTP: internal error, when using digest auth only a1 and cleartext " \
+           "passwords can be used"));
+      return 0;
+    }
 
   md5.init ();
 
@@ -591,7 +609,7 @@ u_long Http::checkDigest ()
   md5.init ();
   td->auxiliaryBuffer->setLength (0);
   *td->auxiliaryBuffer << A1 << ":"
-          << ((HttpUserData*) td->connection->protocolBuffer)->nonce << ":"
+          << hud->nonce << ":"
           << td->request.digestNc << ":" << td->request.digestCnonce << ":"
           << td->request.digestQop << ":" << A2;
   md5.update ((char const*) td->auxiliaryBuffer->getBuffer (),



commit 83a01c053761e91c8b86f9445edeab39e08f3592
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Nov 8 00:33:34 2009 +0100

    Security configuration file passwords can be specified using a hash function.

diff --git a/myserver/documentation/security.texi b/myserver/documentation/security.texi
index 1994e3f..cf1087f 100644
--- a/myserver/documentation/security.texi
+++ b/myserver/documentation/security.texi
@@ -74,6 +74,20 @@ denied.
 As no other information beside username:password is used, this first
 phase is the same for any protocol supported by MyServer.
 
+To improve security it is possible to use in place of the clear-text
+password a crypted version of it.  It is done using the
+@code{algorithm} variable.  It specifies the function F to apply to
+the client specified password before compare it with the
+@code{password} value.
+
+@example
+<SECURITY>
+  <USER name="admin" password="8ee0f7b66d1ab05714573fc556fbd7ff"
+               algorithm="md5" READ="YES" EXECUTE="YES"
+               BROWSE="YES" DELETE="NO" WRITE="NO"/>
+</SECURITY>
+@end example
+
 @subsection FTP Anonymous user
 To allow the @file{.security.xml} re-use, the FTP ``Anonymous'' user
 is mapped internally by MyServer to the ``Guest'' user.
diff --git a/myserver/include/conf/security/auth_method.h b/myserver/include/conf/security/auth_method.h
index c6d284d..18b85a8 100644
--- a/myserver/include/conf/security/auth_method.h
+++ b/myserver/include/conf/security/auth_method.h
@@ -23,6 +23,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 # include "stdafx.h"
 # include <include/conf/security/security_manager.h>
 
+# include <include/base/crypt/crypt_algo_manager.h>
+
 using namespace std;
 
 class AuthMethod
@@ -32,6 +34,16 @@ public:
   virtual ~AuthMethod ();
 
   virtual int getPermissionMask (SecurityToken* st);
+
+  CryptAlgoManager *getCryptAlgoManager () {return cryptAlgoManager;}
+  void setCryptAlgoManager (CryptAlgoManager *cam){cryptAlgoManager = cam;}
+  
+
+protected:
+  bool comparePassword (const char *password, const char *savedPassword,
+                        const char *algorithm);
+
+  CryptAlgoManager *cryptAlgoManager;
 };
 
 #endif
diff --git a/myserver/include/conf/security/auth_method_factory.h b/myserver/include/conf/security/auth_method_factory.h
index c326999..7758fc0 100644
--- a/myserver/include/conf/security/auth_method_factory.h
+++ b/myserver/include/conf/security/auth_method_factory.h
@@ -22,6 +22,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 # include "stdafx.h"
 # include <include/base/hash_map/hash_map.h>
 # include <string>
+# include <include/base/crypt/crypt_algo_manager.h>
 
 using namespace std;
 
@@ -31,12 +32,14 @@ class AuthMethod;
 class AuthMethodFactory
 {
 public:
-  AuthMethodFactory ();
+  AuthMethodFactory (CryptAlgoManager *cryptAlgoManager);
   virtual ~AuthMethodFactory ();
   AuthMethod* getAuthMethod (string &name);
   AuthMethod* addAuthMethod (string &name, AuthMethod* authMethod);
   bool isAuthMethodPresent (string &name);
+
 private:
+  CryptAlgoManager *cryptAlgoManager;
 	HashMap<string, AuthMethod*> authMethods;
 };
 #endif
diff --git a/myserver/include/conf/security/security_token.h b/myserver/include/conf/security/security_token.h
index f986170..13c0fd3 100644
--- a/myserver/include/conf/security/security_token.h
+++ b/myserver/include/conf/security/security_token.h
@@ -213,10 +213,10 @@ private:
   int mask;
 
   /*!
-   *Password that the user should provide to have access.
-   *This is used in authorization schemes like the HTTP digest,
-   *where the password is not sent in clear on the network.
-   */
+    Password that the user should provide to have access.
+    This is used in authorization schemes like the HTTP digest,
+    where the password is not sent in clear on the network.
+  */
   string neededPassword;
 
   /*! The provided password is correct.  */
diff --git a/myserver/include/conf/security/validator.h b/myserver/include/conf/security/validator.h
index 02962f2..ba7343d 100644
--- a/myserver/include/conf/security/validator.h
+++ b/myserver/include/conf/security/validator.h
@@ -30,6 +30,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 using namespace std;
 
 
+
 class Validator
 {
 public:
@@ -45,19 +46,22 @@ public:
                          AuthMethod* authMethod);
 
   virtual int getPermissionMaskImpl (SecurityToken* st,
-                                     HashMap<string, SecurityDomain*> *hashedDomains,
+                               HashMap<string, SecurityDomain*> *hashedDomains,
                                      AuthMethod* authMethod);
 
 
   string *getValue (HashMap<string, SecurityDomain*> *hashedDomains,
                     string &name);
 protected:
+  bool comparePassword (const char *password, const char *savedPassword,
+                        const char *algorithm);
+
   inline void addDomain (HashMap<string, SecurityDomain*> *hashedDomains,
                          SecurityDomain *domain)
-                        {
-                          string &name = domain->getName ();
-                          hashedDomains->put (name, domain);
-                        }
+  {
+    string &name = domain->getName ();
+    hashedDomains->put (name, domain);
+  }
 
   int getPermissionMaskInt (SecurityToken* st,
                             HashMap<string, SecurityDomain*> *hashedDomains,
diff --git a/myserver/include/conf/security/xml_validator.h b/myserver/include/conf/security/xml_validator.h
index 67400ce..0f83c88 100644
--- a/myserver/include/conf/security/xml_validator.h
+++ b/myserver/include/conf/security/xml_validator.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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, 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_VALIDATOR_H
@@ -29,6 +29,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 # include <include/conf/security/validator.h>
 # include <include/base/xml/xml_parser.h>
 
+# include <include/base/crypt/crypt_algo_manager.h>
+
 class SecurityCache;
 
 class XmlValidator : public Validator, public AuthMethod
@@ -41,10 +43,10 @@ public:
 
   virtual int getPermissionMask (SecurityToken* st);
 
-  virtual int getPermissionMaskImpl (SecurityToken* st,
-                                     HashMap<string, SecurityDomain*> *hashedDomains,
-                                     AuthMethod* authMethod);
-
+  virtual int
+  getPermissionMaskImpl (SecurityToken* st,
+                         HashMap<string, SecurityDomain*> *hashedDomains,
+                         AuthMethod* authMethod);
 private:
   XmlParser* getParser (SecurityToken* st);
   bool doCondition (xmlNodePtr node,
@@ -67,7 +69,8 @@ private:
                       int *cmd,
                       HashMap<string, SecurityDomain*> *hashedDomains);
 
-  int getPermissions (xmlAttr* attrs, xmlChar** user = NULL, xmlChar** password = NULL);
+  int getPermissions (xmlAttr *attrs, xmlChar **user = NULL,
+                      xmlChar **password = NULL, xmlChar **algorithm = NULL);
 
   SecurityCache *getCache (SecurityToken*);
   SecurityCache *secCache;
diff --git a/myserver/include/server/server.h b/myserver/include/server/server.h
index 0ebbf8a..518f79d 100644
--- a/myserver/include/server/server.h
+++ b/myserver/include/server/server.h
@@ -60,21 +60,18 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 using namespace std;
 
-/*!
- *Definition for new threads entry-point.
- */
-# ifdef WIN32
-unsigned int __stdcall listenServer (void* pParam);
-# else
-void* listenServer (void* pParam);
-# endif
-
 class XmlValidator;
 
 class Server : public MulticastRegistry<string, void*, int>
 {
 public:
-  ProcessServerManager* getProcessServerManager ()
+
+  static inline Server* getInstance ()
+  {
+    return instance;
+  }
+
+  ProcessServerManager *getProcessServerManager ()
   {
     return &processServerManager;
   }
@@ -82,15 +79,11 @@ public:
   bool stopServer (){return mustEndServer;}
   HomeDir* getHomeDir ();
   static void createInstance ();
-  static inline Server* getInstance ()
-  {
-    return instance;
-  }
 
   int loadLibraries ();
 
   CachedFileFactory* getCachedFiles ();
-  const char* getData (const char *name, const char *defValue = NULL);
+  const char *getData (const char *name, const char *defValue = NULL);
 
   FiltersFactory* getFiltersFactory ();
   int getMaxThreads ();
@@ -146,7 +139,9 @@ public:
   MimeManager *getMimeManager (){return &mimeManager;}
 
   void setProcessPermissions ();
-  ConnectionsScheduler* getConnectionsScheduler (){return &connectionsScheduler;}
+  ConnectionsScheduler* getConnectionsScheduler ()
+  {return &connectionsScheduler;}
+
   int deleteConnection (ConnectionPtr);
 
   int notifyDeleteConnection (ConnectionPtr);
@@ -174,9 +169,9 @@ private:
   int loadVHostConf ();
 
   /*!
-   *When the flag mustEndServer is 1 all the threads are
-   *stopped and the application stop its execution.
-   */
+    When the flag mustEndServer is 1 all the threads are
+    stopped and the application stop its execution.
+  */
   int mustEndServer;
 
   Mutex connectionsPoolLock;
@@ -227,8 +222,8 @@ private:
   int initialize ();
   int addThread (bool staticThread = false);
   ConnectionPtr addConnectionToList (Socket* s, MYSERVER_SOCKADDRIN *asock_in,
-                                    char *ipAddr, char *localIpAddr,
-                                    u_short port, u_short localPort, int);
+                                     char *ipAddr, char *localIpAddr,
+                                     u_short port, u_short localPort, int);
   u_long maxConnections;
   u_long maxConnectionsToAccept;
   void clearAllConnections ();
diff --git a/myserver/src/conf/security/auth_method.cpp b/myserver/src/conf/security/auth_method.cpp
index a4d81e0..2b2ff51 100644
--- a/myserver/src/conf/security/auth_method.cpp
+++ b/myserver/src/conf/security/auth_method.cpp
@@ -22,7 +22,7 @@
 
 AuthMethod::AuthMethod ()
 {
-
+  cryptAlgoManager = NULL;
 }
 
 AuthMethod::~AuthMethod ()
@@ -37,3 +37,26 @@ int AuthMethod::getPermissionMask (SecurityToken* st)
 {
   return 0;
 }
+
+
+/*!
+ * Check if ALGORITHM (SAVED_PASSWORD) = PASSWORD.
+ */
+bool AuthMethod::comparePassword (const char *password,
+                                  const char *savedPassword,
+                                  const char *algorithm)
+{
+  if (!algorithm)
+    return  strcmpi (password, savedPassword) == 0;
+
+  if (cryptAlgoManager)
+    {
+      string pwStr (password);
+      string savedpwStr (savedPassword);
+      string algorithmStr (algorithm);
+
+      return cryptAlgoManager->check (savedpwStr, pwStr, algorithmStr);
+    }
+
+  return false;
+}
diff --git a/myserver/src/conf/security/auth_method_factory.cpp b/myserver/src/conf/security/auth_method_factory.cpp
index e014cc4..4092622 100644
--- a/myserver/src/conf/security/auth_method_factory.cpp
+++ b/myserver/src/conf/security/auth_method_factory.cpp
@@ -25,9 +25,9 @@
 
 using namespace std;
 
-AuthMethodFactory::AuthMethodFactory ()
+AuthMethodFactory::AuthMethodFactory (CryptAlgoManager *cryptAlgoManager)
 {
-
+  this->cryptAlgoManager = cryptAlgoManager;
 }
 
 AuthMethodFactory::~AuthMethodFactory ()
@@ -36,30 +36,31 @@ AuthMethodFactory::~AuthMethodFactory ()
 }
 
 /*!
- *Return an AuthMethod given its name.
- */
+  Return an AuthMethod given its name.
+*/
 AuthMethod* AuthMethodFactory::getAuthMethod (string &name)
 {
   return authMethods.get (name);
 }
 
 /*!
- *Add a new AuthMethod to the factory.
- *\param name AuthMethod name.
- *\param authMethod The authMethod to add.
- *\return The old authMethod registered with [name], in any.
- */
-AuthMethod* AuthMethodFactory::addAuthMethod (string &name, AuthMethod* authMethod)
+  Add a new AuthMethod to the factory.
+  \param name AuthMethod name.
+  \param authMethod The authMethod to add.
+  \return The old authMethod registered with [name], in any.
+*/
+AuthMethod* AuthMethodFactory::addAuthMethod (string &name,
+                                              AuthMethod* authMethod)
 {
+  authMethod->setCryptAlgoManager (cryptAlgoManager);
   return authMethods.put (name, authMethod);
-
 }
 
 /*!
- *Check if the specified authMethod is present in the factory.
- *\param name The authMethod name.
- *\return a bool value to indicate if it is present or not.
- */
+  Check if the specified authMethod is present in the factory.
+  \param name The authMethod name.
+  \return a bool value to indicate if it is present or not.
+*/
 bool AuthMethodFactory::isAuthMethodPresent (string &name)
 {
   return getAuthMethod (name) != NULL;
diff --git a/myserver/src/conf/security/xml_validator.cpp b/myserver/src/conf/security/xml_validator.cpp
index 78830ab..f749429 100644
--- a/myserver/src/conf/security/xml_validator.cpp
+++ b/myserver/src/conf/security/xml_validator.cpp
@@ -111,10 +111,10 @@ int XmlValidator::getPermissionMask (SecurityToken* st)
 
       xmlAttr *attrs = cur->properties;
 
-      xmlChar* name = NULL;
-      xmlChar* password = NULL;
-
-      int permissions =  getPermissions (attrs, &name, &password);
+      xmlChar *name = NULL;
+      xmlChar *password = NULL;
+      xmlChar *algorithm = NULL; 
+      int permissions =  getPermissions (attrs, &name, &password, &algorithm);
 
       if (!name || !password
           || xmlStrcmp (name, (const xmlChar *)st->getUser ().c_str ()))
@@ -122,15 +122,17 @@ int XmlValidator::getPermissionMask (SecurityToken* st)
 
       st->setProvidedMask (permissions);
 
-      if (xmlStrcmp (password, (const xmlChar *)st->getPassword ().c_str ()))
+      if (AuthMethod::comparePassword ((const char *)password,
+                                       st->getPassword ().c_str (),
+                                       (const char *)algorithm))
         {
-          st->setAuthenticated (false);
-          st->setMask (0);
+          st->setAuthenticated (true);
+          st->setMask (permissions);
         }
       else
         {
-          st->setAuthenticated (true);
-          st->setMask (permissions);
+          st->setAuthenticated (false);
+          st->setMask (0);
         }
 
       return st->getMask ();
@@ -140,14 +142,16 @@ int XmlValidator::getPermissionMask (SecurityToken* st)
 }
 
 /*!
- *Get a permission mask from the attributes.
- *\param attrs Attributes list.
- *\param user The found user name.
- *\param password The found password.
- *\return the permissions mask.
+  Get a permission mask from the attributes.
+  \param attrs Attributes list.
+  \param user The found user name.
+  \param password The found password.
+  \param the crypt algorithm used on password.
+  \return the permissions mask.
  */
-int XmlValidator::getPermissions (xmlAttr* attrs, xmlChar** user,
-                                  xmlChar** password)
+int
+XmlValidator::getPermissions (xmlAttr* attrs, xmlChar** user,
+                              xmlChar** password, xmlChar **algorithm)
 {
   int permissions = 0;
 
@@ -157,13 +161,20 @@ int XmlValidator::getPermissions (xmlAttr* attrs, xmlChar** user,
           && attrs->children && attrs->children->content)
         *user = attrs->children->content;
 
-      else if (password && !xmlStrcmp (attrs->name, (const xmlChar *)"password")
+      else if (password
+               && !xmlStrcmp (attrs->name, (const xmlChar *)"password")
                && attrs->children && attrs->children->content)
         *password = attrs->children->content;
 
-      else if (!xmlStrcmp (attrs->name, (const xmlChar *)"READ") &&
-               attrs->children && attrs->children->content &&
-               !xmlStrcmp (attrs->children->content, (const xmlChar *) "YES"))
+      else if (algorithm
+               && !xmlStrcmp (attrs->name, (const xmlChar *)"algorithm")
+               && attrs->children && attrs->children->content)
+        *algorithm = attrs->children->content;
+
+      else if (!xmlStrcmp (attrs->name, (const xmlChar *)"READ")
+               && attrs->children && attrs->children->content
+               && !xmlStrcmp (attrs->children->content,
+                              (const xmlChar *) "YES"))
         permissions |= MYSERVER_PERMISSION_READ;
 
       else if (!xmlStrcmp (attrs->name, (const xmlChar *)"WRITE")
@@ -192,9 +203,10 @@ int XmlValidator::getPermissions (xmlAttr* attrs, xmlChar** user,
 /*!
  \see XmlValidator#getPermissionMaskImpl.
 */
-int XmlValidator::getPermissionMaskImpl (SecurityToken* st,
-                                HashMap<string, SecurityDomain*> *hashedDomains,
-                                         AuthMethod* authMethod)
+int
+XmlValidator::getPermissionMaskImpl (SecurityToken* st,
+                               HashMap<string, SecurityDomain*> *hashedDomains,
+                                     AuthMethod* authMethod)
 {
   XmlParser* xmlFile = getParser (st);
 
@@ -229,10 +241,11 @@ int XmlValidator::getPermissionMaskImpl (SecurityToken* st,
 /*!
  *Compute the current XML node.
  */
-int XmlValidator::computeXmlNode (xmlNodePtr node,
-                                  SecurityToken *st,
-                                  int *cmd,
-                                HashMap<string, SecurityDomain*> *hashedDomains)
+int
+XmlValidator::computeXmlNode (xmlNodePtr node,
+                              SecurityToken *st,
+                              int *cmd,
+                              HashMap<string, SecurityDomain*> *hashedDomains)
 {
   if (!node)
     return 0;
@@ -269,13 +282,9 @@ int XmlValidator::computeXmlNode (xmlNodePtr node,
           return 1;
         }
       else if (!xmlStrcmp (cur->name, (const xmlChar *) "DEFINE"))
-        {
-          doDefine (cur, st, hashedDomains);
-        }
+        doDefine (cur, st, hashedDomains);
       else if (!xmlStrcmp (cur->name, (const xmlChar *) "PERMISSION"))
-        {
-          doPermission (cur, st, hashedDomains);
-        }
+        doPermission (cur, st, hashedDomains);
     }
 
   return 0;
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 690a9a9..943b0b3 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -65,7 +65,7 @@ Server* Server::instance = NULL;
 
 Server::Server () : connectionsScheduler (this),
                    listenThreads (&connectionsScheduler, this),
-                   authMethodFactory (),
+                   authMethodFactory (&cryptAlgoManager),
                    validatorFactory (),
                    securityManager (&validatorFactory, &authMethodFactory),
                    connectionsPool (100)
diff --git a/myserver/tests/Makefile.am b/myserver/tests/Makefile.am
index 96e049e..da07db4 100644
--- a/myserver/tests/Makefile.am
+++ b/myserver/tests/Makefile.am
@@ -2,11 +2,11 @@
 #
 
 bin_PROGRAMS = tests_suite
-tests_suite_SOURCES = main.cpp test_auth_domain.cpp test_base64.cpp \
-	test_bitvec.cpp test_cached_file_buffer.cpp test_cached_file.cpp \
-	test_cached_file_factory.cpp test_crypt_algo_manager.cpp test_connection.cpp \
-	test_connections_scheduler.cpp test_file.cpp test_file_stream.cpp \
-	test_file_stream_creator.cpp test_files_utility.cpp \
+tests_suite_SOURCES = main.cpp test_auth_domain.cpp test_auth_method.cpp \
+  test_base64.cpp test_bitvec.cpp test_cached_file_buffer.cpp \
+	test_cached_file.cpp test_cached_file_factory.cpp test_crypt_algo_manager.cpp \
+	test_connection.cpp test_connections_scheduler.cpp test_file.cpp \
+	test_file_stream.cpp test_file_stream_creator.cpp test_files_utility.cpp \
 	test_filter_chain.cpp test_fork_server.cpp test_ftp.cpp test_gzip.cpp \
 	test_hashmap.cpp test_homedir.cpp test_http_req_security_domain.cpp \
 	test_http_request.cpp test_http_response.cpp test_ip.cpp \
diff --git a/myserver/tests/test_auth_method.cpp b/myserver/tests/test_auth_method.cpp
new file mode 100644
index 0000000..65d2e25
--- /dev/null
+++ b/myserver/tests/test_auth_method.cpp
@@ -0,0 +1,106 @@
+/*
+  MyServer
+  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
+  (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"
+#include <include/base/crypt/crypt_algo_manager.h>
+#include <include/base/crypt/md5.h>
+
+#include <include/conf/security/auth_method.h>
+
+#include <ctype.h>
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <string.h>
+
+#include <typeinfo>
+using namespace std;
+
+
+class TestAuthMethodImpl : public AuthMethod
+{
+public:
+  bool exposeComparePassword (const char *password, const char *savedPassword,
+                              const char *algorithm)
+  {
+    return AuthMethod::comparePassword (password, savedPassword, algorithm);
+  }
+};
+
+
+class TestAuthMethod : public CppUnit::TestFixture
+{
+  CPPUNIT_TEST_SUITE ( TestAuthMethod );
+  CPPUNIT_TEST (testCryptAlgoManager);
+  CPPUNIT_TEST (testGetPermissionMask);
+  CPPUNIT_TEST (testComparePassword);
+  CPPUNIT_TEST_SUITE_END ();
+
+public:
+  void setUp ()
+  {
+
+  }
+
+  void tearDown ()
+  {
+  }
+
+  void testCryptAlgoManager ()
+  {
+    CryptAlgoManager cam;
+    TestAuthMethodImpl tam;
+
+    tam.setCryptAlgoManager (&cam);
+
+    CPPUNIT_ASSERT_EQUAL (&cam, tam.getCryptAlgoManager ());
+  }
+
+  void testGetPermissionMask ()
+  {
+    TestAuthMethodImpl tam;
+    SecurityToken st;
+    CPPUNIT_ASSERT (tam.getPermissionMask (&st) >= 0);
+  }
+
+  void testComparePassword ()
+  {
+    TestAuthMethodImpl tam;
+    CryptAlgoManager cam;
+    Md5::initialize (&cam);
+
+    CPPUNIT_ASSERT (!tam.exposeComparePassword
+                    ("d5aa1729c8c253e5d917a5264855eab8", "freedom",
+                     "md5"));
+
+    tam.setCryptAlgoManager (&cam);
+
+
+    CPPUNIT_ASSERT (tam.exposeComparePassword
+                    ("d5aa1729c8c253e5d917a5264855eab8", "freedom",
+                     "md5"));
+
+
+    CPPUNIT_ASSERT (!tam.exposeComparePassword
+                    ("d5aa1729c8c253e5d917a5264855ea8b", "freedom",
+                     "md5"));
+  }
+};
+
+
+CPPUNIT_TEST_SUITE_REGISTRATION (TestAuthMethod);
diff --git a/myserver/tests/test_crypt_algo_manager.cpp b/myserver/tests/test_crypt_algo_manager.cpp
index a3f508a..d67f5a9 100644
--- a/myserver/tests/test_crypt_algo_manager.cpp
+++ b/myserver/tests/test_crypt_algo_manager.cpp
@@ -1,19 +1,19 @@
 /*
- MyServer
- 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
- (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, 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"
 #include <include/base/crypt/crypt_algo_manager.h>
diff --git a/myserver/tests/test_security_manager.cpp b/myserver/tests/test_security_manager.cpp
index 6574958..c40dc3e 100644
--- a/myserver/tests/test_security_manager.cpp
+++ b/myserver/tests/test_security_manager.cpp
@@ -42,6 +42,11 @@ class TestSecurityManager : public CppUnit::TestFixture
   ValidatorFactory validatorFactory;
   SecurityManager* securityManager;
 public:
+
+  TestSecurityManager () : authMethodFactory (NULL)
+  {
+  }
+
   void setUp ()
   {
     securityManager = new SecurityManager (&validatorFactory, &authMethodFactory);



commit 3be85b8fb86945bf494ee7859f334635806ea6aa
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sat Nov 7 22:24:08 2009 +0100

    Remove some unneeded `friend' declarations.

diff --git a/myserver/include/conf/security/security_token.h b/myserver/include/conf/security/security_token.h
index e5a0241..f986170 100644
--- a/myserver/include/conf/security/security_token.h
+++ b/myserver/include/conf/security/security_token.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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) 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
+  (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 SECURITY_TOKEN_H
@@ -31,19 +31,19 @@ class Vhost;
 struct MimeRecord;
 
 enum SECURITY_RING
-{
-  /*! Security file configuration.  */
-  MYSERVER_SECURITY_CONF = (1 << 0),
+  {
+    /*! Security file configuration.  */
+    MYSERVER_SECURITY_CONF = (1 << 1),
 
-  /*! Virtual host configuration.  */
-  MYSERVER_VHOST_CONF = (1 << 1),
+    /*! Virtual host configuration.  */
+    MYSERVER_VHOST_CONF = (1 << 2),
 
-  /*! Mime type.  */
-  MYSERVER_MIME_CONF = (1 << 2),
+    /*! Mime type.  */
+    MYSERVER_MIME_CONF = (1 << 3),
 
-  /*! Global server configuration. */
-  MYSERVER_SERVER_CONF = (1 << 3),
-};
+    /*! Global server configuration. */
+    MYSERVER_SERVER_CONF = (1 << 4),
+  };
 
 class SecurityToken
 {
@@ -51,10 +51,13 @@ public:
   SecurityToken ();
   void reset ();
 
-  const char* getData (const char* name, int domains, const char *def = NULL);
-  NodeTree<string>* getNodeTree (string& key, int domains, NodeTree<string>* def = NULL);
+  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 ()
+  string &getUser ()
   {
     return user;
   }
@@ -64,7 +67,7 @@ public:
     return password;
   }
 
-  HashMap<string, NodeTree<string>*>* getValues ()
+  HashMap<string, NodeTree<string>*> *getValues ()
   {
     return &values;
   }
@@ -94,7 +97,7 @@ public:
     return providedMask;
   }
 
-  string& getNeededPassword ()
+  string &getNeededPassword ()
   {
     return neededPassword;
   }
@@ -110,32 +113,32 @@ public:
   }
 
 
-  Server* getServer ()
+  Server *getServer ()
   {
     return server;
   }
 
-  Vhost* getVhost ()
+  Vhost *getVhost ()
   {
     return vhost;
   }
 
-  void setUser (string& u)
+  void setUser (string &u)
   {
     user.assign (u);
   }
 
-  void setPassword (string& pw)
+  void setPassword (string &pw)
   {
     password.assign (pw);
   }
 
-  void setDirectory (string * d)
+  void setDirectory (string *d)
   {
     directory = d;
   }
 
-  void setSysDirectory (string * sd)
+  void setSysDirectory (string *sd)
   {
     sysdirectory = sd;
   }
@@ -155,7 +158,7 @@ public:
     providedMask = p;
   }
 
-  void setNeededPassword (string& pw)
+  void setNeededPassword (string &pw)
   {
     neededPassword.assign (pw);
   }
@@ -170,12 +173,12 @@ public:
     authenticated = a;
   }
 
-  void setServer (Server* s)
+  void setServer (Server *s)
   {
     server = s;
   }
 
-  void  setVhost (Vhost* v)
+  void  setVhost (Vhost *v)
   {
     vhost = v;
   }
diff --git a/myserver/include/filter/filters_chain.h b/myserver/include/filter/filters_chain.h
index 588f4f4..3eb0bad 100644
--- a/myserver/include/filter/filters_chain.h
+++ b/myserver/include/filter/filters_chain.h
@@ -1,20 +1,20 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2007, 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.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2007, 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.
+  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/>.
+  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 FILTERS_CHAIN_H
@@ -46,7 +46,7 @@ public:
   list<string> getFilters ();
   virtual int read (char* buffer, u_long len, u_long*);
   virtual int write (const char* buffer, u_long len, u_long*);
-        virtual int flush (u_long*);
+  virtual int flush (u_long*);
   FiltersChain ();
   ~FiltersChain ();
 protected:
diff --git a/myserver/include/protocol/protocol.h b/myserver/include/protocol/protocol.h
index bb00f47..974094d 100644
--- a/myserver/include/protocol/protocol.h
+++ b/myserver/include/protocol/protocol.h
@@ -23,8 +23,8 @@
 # include <include/connection/connection.h>
 
 /*!
- *This is the base class to derive other protocols implementations for the server.
- */
+  This is the base class to derive other protocols implementations for
+  the server.  */
 class Protocol
 {
 public:
diff --git a/myserver/include/server/server.h b/myserver/include/server/server.h
index 9740482..0ebbf8a 100644
--- a/myserver/include/server/server.h
+++ b/myserver/include/server/server.h
@@ -166,7 +166,6 @@ public:
   CryptAlgoManager *getCryptAlgoManager () {return &cryptAlgoManager;}
 
 private:
-  friend class ClientsThread;
   XmlValidator *xmlValidator;
   VhostManagerHandler *vhostHandler;
 
@@ -174,12 +173,6 @@ private:
   MainConfiguration* (*genMainConf) (Server *server, const char *arg);
   int loadVHostConf ();
 
-# ifdef WIN32
-  friend int __stdcall control_handler (u_long control_type);
-# endif
-# ifdef NOT_WIN
-  friend int control_handler (u_long control_type);
-# endif
   /*!
    *When the flag mustEndServer is 1 all the threads are
    *stopped and the application stop its execution.
diff --git a/myserver/src/conf/security/auth_method_factory.cpp b/myserver/src/conf/security/auth_method_factory.cpp
index 04960a0..e014cc4 100644
--- a/myserver/src/conf/security/auth_method_factory.cpp
+++ b/myserver/src/conf/security/auth_method_factory.cpp
@@ -27,10 +27,7 @@ using namespace std;
 
 AuthMethodFactory::AuthMethodFactory ()
 {
-  //  XmlAuthMethod* xmlAuthMethod = new XmlAuthMethod;
-  //  string xml ("xml");
 
-  //  authMethods.put (xml, xmlAuthMethod);
 }
 
 AuthMethodFactory::~AuthMethodFactory ()
diff --git a/myserver/src/conf/security/security_cache.cpp b/myserver/src/conf/security/security_cache.cpp
index ee41360..5bd6cc0 100644
--- a/myserver/src/conf/security/security_cache.cpp
+++ b/myserver/src/conf/security/security_cache.cpp
@@ -27,14 +27,14 @@
 
 using namespace std;
 
-/*!
- *Constructor for the SecurityCache object.
+/*
+  Constructor for the SecurityCache object.
  */
 SecurityCache::SecurityCache ()
 {
-  /*!
-   *By default do not store more than 25 nodes.
-   */
+  /*
+    By default do not store more than 25 nodes.
+  */
   limit = 25;
 }
 
@@ -47,25 +47,23 @@ SecurityCache::~SecurityCache ()
 }
 
 /*!
- *free the memory used by the SecurityCache object.
- */
+  Free the memory used by the SecurityCache object.
+*/
 void SecurityCache::free ()
 {
   HashMap<string, XmlParser*>::Iterator it = dictionary.begin ();
 
   for (;it != dictionary.end (); it++)
-  {
     delete (*it);
-  }
 
   dictionary.clear ();
 }
 
 /*!
- *Set a new limit on the nodes to keep in memory.
- *\param newLimit Number of files to cache.  it is adjusted
- *to be >= 1.
- */
+  Set a new limit on the nodes to keep in memory.
+  \param newLimit Number of files to cache.  it is adjusted
+  to be >= 1.
+*/
 void SecurityCache::setMaxNodes (int newLimit)
 {
   if (newLimit <= 0)
@@ -82,13 +80,13 @@ void SecurityCache::setMaxNodes (int newLimit)
 }
 
 /*!
- *Get the security file to use starting from the file location, returns
- *zero on success.
- *\param dir The directory we need a security parser for.
- *\param sys The system directory.
- *\param out Output string where put the security file path.
- *\param secFileName The security file name.
- */
+  Get the security file to use starting from the file location, returns
+  zero on success.
+  \param dir The directory we need a security parser for.
+  \param sys The system directory.
+  \param out Output string where put the security file path.
+  \param secFileName The security file name.
+*/
 int SecurityCache::getSecurityFile (const string& dir,
                                     const string& sys,
                                     string& out,
@@ -129,9 +127,9 @@ int SecurityCache::getSecurityFile (const string& dir,
       }
 
     /*
-     *Top of the tree, check if the security file is present in the
-     *system directory.  Return an error if it is not.
-     */
+      Top of the tree, check if the security file is present in the
+      system directory.  Return an error if it is not.
+    */
     if (i == 0)
     {
       out.assign (sys);
@@ -153,21 +151,21 @@ int SecurityCache::getSecurityFile (const string& dir,
 
 
 /*!
- *Get the actual limit of open nodes.
- */
+  Get the actual limit of open nodes.
+*/
 int SecurityCache::getMaxNodes ()
 {
   return limit;
 }
 
 /*!
- *Open the XML parser associated to the file.
- *\param dir The path where start looking.
- *\param sys The system directory.
- *\param useXpath Specify if XPath will be used on the file.
- *\param secFileName The security file name.
- *\param maxSize The maximum file size allowed for the security file.
- */
+  Open the XML parser associated to the file.
+  \param dir The path where start looking.
+  \param sys The system directory.
+  \param useXpath Specify if XPath will be used on the file.
+  \param secFileName The security file name.
+  \param maxSize The maximum file size allowed for the security file.
+*/
 XmlParser* SecurityCache::getParser (const string &dir,
                                      const string &sys,
                                      bool useXpath,
@@ -182,13 +180,10 @@ XmlParser* SecurityCache::getParser (const string &dir,
 
   parser = dictionary.get (file);
 
-  /*!
-   *If the parser is already present and satisfy XPath then use it.
-   */
+  /* If the parser is already present and satisfy XPath then use it.  */
   if (parser && (!useXpath || parser->isXpathEnabled ()))
   {
     time_t fileModTime;
-    /*! If the file was modified reload it. */
     fileModTime = FilesUtility::getLastModTime (file.c_str ());
 
     if ((fileModTime != static_cast<time_t>(-1))  &&
@@ -220,16 +215,12 @@ XmlParser* SecurityCache::getParser (const string &dir,
   }
   else
   {
-    /*!
-     *Create the parser and add it to the dictionary.
-     */
+    /* Create the parser and add it to the dictionary.  */
     XmlParser* old;
     parser = new XmlParser ();
 
     if (parser == NULL)
-    {
       return NULL;
-    }
 
     if (dictionary.size () >= limit)
     {
diff --git a/myserver/src/conf/security/security_token.cpp b/myserver/src/conf/security/security_token.cpp
index c976edf..443921e 100644
--- a/myserver/src/conf/security/security_token.cpp
+++ b/myserver/src/conf/security/security_token.cpp
@@ -17,7 +17,6 @@
 
 #include "stdafx.h"
 
-
 #include <include/conf/security/security_token.h>
 #include <include/conf/vhost/vhost.h>
 #include <include/server/server.h>
@@ -37,8 +36,8 @@ SecurityToken::SecurityToken ()
 }
 
 /*!
- *Reset every structure member.
- */
+  Reset every structure member.
+*/
 void SecurityToken::reset ()
 {
   mask = 0;
@@ -56,100 +55,102 @@ void SecurityToken::reset ()
 }
 
 /*!
- *Get the value for the variable using the specified domains.
- *\param key Variable name.
- *\param def Default value.
- *\param domains Domains where to look.  They are looked in this order:
- *\li Security configuration file.
- *\li Virtual host configuration file.
- *\li Global security file.
- *\li Default value.
- */
-NodeTree<string>* SecurityToken::getNodeTree (string& key, int domains, NodeTree<string>* def)
+  Get the value for the variable using the specified domains.
+  \param key Variable name.
+  \param def Default value.
+  \param domains Domains where to look.  They are looked in this order:
+  \li Security configuration file.
+  \li Virtual host configuration file.
+  \li Global security file.
+  \li Default value.
+*/
+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);
+    {
+      string strName (key);
+      NodeTree<string>* ret = values.get (strName);
 
-    if (ret)
-      return ret;
-  }
+      if (ret)
+        return ret;
+    }
 
   if (mimeRecord && (domains & MYSERVER_MIME_CONF))
-  {
-    string strName (key);
-    NodeTree<string>* ret = mimeRecord->getNodeTree (strName);
+    {
+      string strName (key);
+      NodeTree<string>* ret = mimeRecord->getNodeTree (strName);
 
-    if (ret)
-      return ret;
-  }
+      if (ret)
+        return ret;
+    }
 
   if (vhost && (domains & MYSERVER_VHOST_CONF))
-  {
-    NodeTree<string>* ret = vhost->getNodeTree (key);
+    {
+      NodeTree<string>* ret = vhost->getNodeTree (key);
 
-    if (ret)
-      return ret;
-  }
+      if (ret)
+        return ret;
+    }
 
   if (server && (domains & MYSERVER_SERVER_CONF))
-  {
-    NodeTree<string>* ret = server->getNodeTree (key);
+    {
+      NodeTree<string>* ret = server->getNodeTree (key);
 
-    if (ret)
-      return ret;
-  }
+      if (ret)
+        return ret;
+    }
 
   return def;
 }
 
 
 /*!
- *Get the value for the variable using the specified domains.
- *\param name Variable name.
- *\param def Default value.
- *\param domains Domains where to look.  They are looked in this order:
- *\li Security configuration file.
- *\li Virtual host configuration file.
- *\li Global security file.
- *\li Default value.
- */
-const char* SecurityToken::getData (const char* name, int domains, const char *def)
+  Get the value for the variable using the specified domains.
+  \param name Variable name.
+  \param def Default value.
+  \param domains Domains where to look.  They are looked in this order:
+  \li Security configuration file.
+  \li Virtual host configuration file.
+  \li Global security file.
+  \li Default value.
+*/
+const char* SecurityToken::getData (const char* name, int domains,
+                                    const char *def)
 {
   if (domains & MYSERVER_SECURITY_CONF)
-  {
-    string strName (name);
-    NodeTree<string> *ret = values.get (strName);
+    {
+      string strName (name);
+      NodeTree<string> *ret = values.get (strName);
 
-    if (ret)
-      return ret->getValue ()->c_str ();
-  }
+      if (ret)
+        return ret->getValue ()->c_str ();
+    }
 
   if (mimeRecord && (domains & MYSERVER_MIME_CONF))
-  {
-    string strName (name);
-    const char *ret = mimeRecord->getData (strName);
+    {
+      string strName (name);
+      const char *ret = mimeRecord->getData (strName);
 
-    if (ret)
-      return ret;
-  }
+      if (ret)
+        return ret;
+    }
 
   if (vhost && (domains & MYSERVER_VHOST_CONF))
-  {
-    const char* ret = vhost->getData (name);
+    {
+      const char* ret = vhost->getData (name);
 
-    if (ret)
-      return ret;
-  }
+      if (ret)
+        return ret;
+    }
 
   if (server && (domains & MYSERVER_SERVER_CONF))
-  {
-    const char* ret = server->getData (name);
+    {
+      const char* ret = server->getData (name);
 
-    if (ret)
-      return ret;
-  }
+      if (ret)
+        return ret;
+    }
 
   return def;
 }
diff --git a/myserver/src/conf/security/xml_validator.cpp b/myserver/src/conf/security/xml_validator.cpp
index 6f28b22..78830ab 100644
--- a/myserver/src/conf/security/xml_validator.cpp
+++ b/myserver/src/conf/security/xml_validator.cpp
@@ -31,10 +31,10 @@ XmlValidator::XmlValidator ()
 XmlValidator::~XmlValidator ()
 {
   if (secCache != NULL)
-  {
-    secCache->free ();
-    delete secCache;
-  }
+    {
+      secCache->free ();
+      delete secCache;
+    }
 }
 
 /*!
@@ -43,24 +43,25 @@ XmlValidator::~XmlValidator ()
 SecurityCache* XmlValidator::getCache (SecurityToken *st)
 {
   if (!secCache)
-  {
-    const char *data = st->getData ("SECURITY_CACHE_NODES", MYSERVER_SERVER_CONF, NULL);
+    {
+      const char *data = st->getData ("SECURITY_CACHE_NODES",
+                                      MYSERVER_SERVER_CONF, NULL);
 
-    secCache = new SecurityCache ();
+      secCache = new SecurityCache ();
 
-    if (data)
-    {
-      int nodes = atoi (data);
-      secCache->setMaxNodes (nodes);
+      if (data)
+        {
+          int nodes = atoi (data);
+          secCache->setMaxNodes (nodes);
+        }
     }
-  }
 
   return secCache;
 }
 
 /*!
- *Get the XML parser to use.
- */
+  Get the XML parser to use.
+*/
 XmlParser* XmlValidator::getParser (SecurityToken* st)
 {
   const char *secName;
@@ -70,16 +71,19 @@ XmlParser* XmlValidator::getParser (SecurityToken* st)
   if (!cache)
     return NULL;
 
-  secName = st->getData ("security.filename", MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF, ".security.xml");
+  secName = st->getData ("security.filename", MYSERVER_VHOST_CONF
+                         | MYSERVER_SERVER_CONF, ".security.xml");
 
-  u_long maxSize = atol (st->getData ("security.max_size", MYSERVER_VHOST_CONF | MYSERVER_SERVER_CONF, "0"));
+  u_long maxSize = atol (st->getData ("security.max_size", MYSERVER_VHOST_CONF
+                                      | MYSERVER_SERVER_CONF, "0"));
 
-  return cache->getParser (*(st->getDirectory ()), *(st->getSysDirectory ()), false, secName);
+  return cache->getParser (*(st->getDirectory ()), *(st->getSysDirectory ()),
+                           false, secName);
 }
 
 /*!
- *\see AuthMethod#getPermissionMask.
- */
+  \see AuthMethod#getPermissionMask.
+*/
 int XmlValidator::getPermissionMask (SecurityToken* st)
 {
   xmlNodePtr root;
@@ -90,46 +94,47 @@ int XmlValidator::getPermissionMask (SecurityToken* st)
 
   for (xmlNodePtr cur = xmlFile->getDoc ()->children; cur; cur = cur->next)
     if (cur->type == XML_ELEMENT_NODE)
-    {
-      for (xmlNodePtr curChild = cur->children; curChild; curChild = curChild->next)
-        if (curChild->type == XML_ELEMENT_NODE)
-        {
-          root = curChild;
-          break;
-        }
-    }
+      {
+        for (xmlNodePtr curChild = cur->children; curChild;
+             curChild = curChild->next)
+          if (curChild->type == XML_ELEMENT_NODE)
+            {
+              root = curChild;
+              break;
+            }
+      }
 
   for (xmlNodePtr cur = root; cur; cur = cur->next)
-  {
-    if (xmlStrcmp (cur->name, (const xmlChar *) "USER"))
-      continue;
+    {
+      if (xmlStrcmp (cur->name, (const xmlChar *) "USER"))
+        continue;
 
-    xmlAttr *attrs = cur->properties;
+      xmlAttr *attrs = cur->properties;
 
-    xmlChar* name = NULL;
-    xmlChar* password = NULL;
+      xmlChar* name = NULL;
+      xmlChar* password = NULL;
 
-    int permissions =  getPermissions (attrs, &name, &password);
+      int permissions =  getPermissions (attrs, &name, &password);
 
-    if (!name || !password ||
-        xmlStrcmp (name, (const xmlChar *)st->getUser ().c_str ()))
-      continue;
+      if (!name || !password
+          || xmlStrcmp (name, (const xmlChar *)st->getUser ().c_str ()))
+        continue;
 
-    st->setProvidedMask (permissions);
+      st->setProvidedMask (permissions);
 
-    if (xmlStrcmp (password, (const xmlChar *)st->getPassword ().c_str ()))
-    {
-      st->setAuthenticated (false);
-      st->setMask (0);
-    }
-    else
-    {
-      st->setAuthenticated (true);
-      st->setMask (permissions);
-    }
+      if (xmlStrcmp (password, (const xmlChar *)st->getPassword ().c_str ()))
+        {
+          st->setAuthenticated (false);
+          st->setMask (0);
+        }
+      else
+        {
+          st->setAuthenticated (true);
+          st->setMask (permissions);
+        }
 
-    return st->getMask ();
-  }
+      return st->getMask ();
+    }
 
   return 0;
 }
@@ -141,52 +146,54 @@ int XmlValidator::getPermissionMask (SecurityToken* st)
  *\param password The found password.
  *\return the permissions mask.
  */
-int XmlValidator::getPermissions (xmlAttr* attrs, xmlChar** user, xmlChar** password )
+int XmlValidator::getPermissions (xmlAttr* attrs, xmlChar** user,
+                                  xmlChar** password)
 {
-    int permissions = 0;
+  int permissions = 0;
 
-    while (attrs)
+  while (attrs)
     {
-      if (user && !xmlStrcmp (attrs->name, (const xmlChar *)"name") &&
-          attrs->children && attrs->children->content)
+      if (user && !xmlStrcmp (attrs->name, (const xmlChar *)"name")
+          && attrs->children && attrs->children->content)
         *user = attrs->children->content;
 
-      else if (password && !xmlStrcmp (attrs->name, (const xmlChar *)"password") &&
-          attrs->children && attrs->children->content)
+      else if (password && !xmlStrcmp (attrs->name, (const xmlChar *)"password")
+               && attrs->children && attrs->children->content)
         *password = attrs->children->content;
 
       else if (!xmlStrcmp (attrs->name, (const xmlChar *)"READ") &&
-          attrs->children && attrs->children->content &&
-          !xmlStrcmp (attrs->children->content, (const xmlChar *) "YES"))
+               attrs->children && attrs->children->content &&
+               !xmlStrcmp (attrs->children->content, (const xmlChar *) "YES"))
         permissions |= MYSERVER_PERMISSION_READ;
 
-      else if (!xmlStrcmp (attrs->name, (const xmlChar *)"WRITE") &&
-          attrs->children && attrs->children->content &&
-          !xmlStrcmp (attrs->children->content, (const xmlChar *) "YES"))
+      else if (!xmlStrcmp (attrs->name, (const xmlChar *)"WRITE")
+               && attrs->children && attrs->children->content &&
+               !xmlStrcmp (attrs->children->content, (const xmlChar *) "YES"))
         permissions |= MYSERVER_PERMISSION_WRITE;
 
-      else if (!xmlStrcmp (attrs->name, (const xmlChar *)"EXECUTE") &&
-          attrs->children && attrs->children->content &&
-          !xmlStrcmp (attrs->children->content, (const xmlChar *) "YES"))
+      else if (!xmlStrcmp (attrs->name, (const xmlChar *)"EXECUTE")
+               && attrs->children && attrs->children->content &&
+               !xmlStrcmp (attrs->children->content, (const xmlChar *) "YES"))
         permissions |= MYSERVER_PERMISSION_EXECUTE;
 
-      else if (!xmlStrcmp (attrs->name, (const xmlChar *)"BROWSE") &&
-          attrs->children && attrs->children->content &&
-          !xmlStrcmp (attrs->children->content, (const xmlChar *) "YES"))
+      else if (!xmlStrcmp (attrs->name, (const xmlChar *)"BROWSE")
+               && attrs->children && attrs->children->content
+               && !xmlStrcmp (attrs->children->content,
+                              (const xmlChar *) "YES"))
         permissions |= MYSERVER_PERMISSION_BROWSE;
 
       attrs = attrs->next;
     }
 
-    return permissions;
+  return permissions;
 }
 
 
 /*!
- *\see XmlValidator#getPermissionMaskImpl.
- */
+ \see XmlValidator#getPermissionMaskImpl.
+*/
 int XmlValidator::getPermissionMaskImpl (SecurityToken* st,
-                                         HashMap<string, SecurityDomain*> *hashedDomains,
+                                HashMap<string, SecurityDomain*> *hashedDomains,
                                          AuthMethod* authMethod)
 {
   XmlParser* xmlFile = getParser (st);
@@ -196,25 +203,25 @@ int XmlValidator::getPermissionMaskImpl (SecurityToken* st,
 
   for (xmlNodePtr cur = xmlFile->getDoc ()->children; cur; cur = cur->next)
     if (cur->type == XML_ELEMENT_NODE)
-    {
-      int cmd = -1;
+      {
+        int cmd = -1;
 
-      computeXmlNode (cur, st, &cmd, hashedDomains);
+        computeXmlNode (cur, st, &cmd, hashedDomains);
 
-      /* By default return ALLOW.  */
-      if (cmd == -1)
-        return 1;
+        /* By default return ALLOW.  */
+        if (cmd == -1)
+          return 1;
 
-      if (cmd == 0)
-        return 0;
+        if (cmd == 0)
+          return 0;
 
-      if (cmd == 1)
-      {
-        st->setMask (MYSERVER_PERMISSION_ALL);
-        return 1;
-      }
+        if (cmd == 1)
+          {
+            st->setMask (MYSERVER_PERMISSION_ALL);
+            return 1;
+          }
 
-    }
+      }
 
   return 0;
 }
@@ -225,59 +232,60 @@ int XmlValidator::getPermissionMaskImpl (SecurityToken* st,
 int XmlValidator::computeXmlNode (xmlNodePtr node,
                                   SecurityToken *st,
                                   int *cmd,
-                                  HashMap<string, SecurityDomain*> *hashedDomains)
+                                HashMap<string, SecurityDomain*> *hashedDomains)
 {
   if (!node)
     return 0;
 
   xmlNodePtr cur = node->children;
   for (;;)
-  {
-    if (cur->next == NULL)
     {
-      cur = cur->parent;
+      if (cur->next == NULL)
+        {
+          cur = cur->parent;
 
-      /* The root is reached.  */
-      if (cur == node)
-        return 1;
+          /* The root is reached.  */
+          if (cur == node)
+            return 1;
 
-      /* This should never happen.  */
-      if (cur == NULL)
-        return 0;
-    }
-    else
-      cur = cur->next;
+          /* This should never happen.  */
+          if (cur == NULL)
+            return 0;
+        }
+      else
+        cur = cur->next;
 
-    if (cur->type != XML_ELEMENT_NODE)
-      continue;
+      if (cur->type != XML_ELEMENT_NODE)
+        continue;
 
-    if (!xmlStrcmp (cur->name, (const xmlChar *) "CONDITION"))
-    {
-      if (doCondition (cur, hashedDomains))
-        cur = cur->children;
-    }
-    else if (!xmlStrcmp (cur->name, (const xmlChar *) "RETURN"))
-    {
-      doReturn (cur, cmd, hashedDomains);
-      return 1;
-    }
-    else if (!xmlStrcmp (cur->name, (const xmlChar *) "DEFINE"))
-    {
-      doDefine (cur, st, hashedDomains);
-    }
-    else if (!xmlStrcmp (cur->name, (const xmlChar *) "PERMISSION"))
-    {
-      doPermission (cur, st, hashedDomains);
+      if (!xmlStrcmp (cur->name, (const xmlChar *) "CONDITION"))
+        {
+          if (doCondition (cur, hashedDomains))
+            cur = cur->children;
+        }
+      else if (!xmlStrcmp (cur->name, (const xmlChar *) "RETURN"))
+        {
+          doReturn (cur, cmd, hashedDomains);
+          return 1;
+        }
+      else if (!xmlStrcmp (cur->name, (const xmlChar *) "DEFINE"))
+        {
+          doDefine (cur, st, hashedDomains);
+        }
+      else if (!xmlStrcmp (cur->name, (const xmlChar *) "PERMISSION"))
+        {
+          doPermission (cur, st, hashedDomains);
+        }
     }
-  }
 
   return 0;
 }
 
 /*!
- *Handle a CONDITION.
- */
-bool XmlValidator::doCondition (xmlNodePtr node, HashMap<string, SecurityDomain*> *hashedDomains)
+  Handle a CONDITION.
+*/
+bool XmlValidator::doCondition (xmlNodePtr node,
+                                HashMap<string, SecurityDomain*> *hashedDomains)
 {
   string name;
   const xmlChar *isNot = (const xmlChar*)"";
@@ -286,25 +294,25 @@ bool XmlValidator::doCondition (xmlNodePtr node, HashMap<string, SecurityDomain*
   xmlAttr *attrs = node->properties;
 
   while (attrs)
-  {
-    if (!xmlStrcmp (attrs->name, (const xmlChar *)"name") &&
-       attrs->children && attrs->children->content)
-      name.assign ((const char*)attrs->children->content);
+    {
+      if (!xmlStrcmp (attrs->name, (const xmlChar *)"name") &&
+          attrs->children && attrs->children->content)
+        name.assign ((const char*)attrs->children->content);
 
-    if (!xmlStrcmp (attrs->name, (const xmlChar *)"value") &&
-       attrs->children && attrs->children->content)
-      value = attrs->children->content;
+      if (!xmlStrcmp (attrs->name, (const xmlChar *)"value") &&
+          attrs->children && attrs->children->content)
+        value = attrs->children->content;
 
-    if (!xmlStrcmp (attrs->name, (const xmlChar *)"not") &&
-       attrs->children && attrs->children->content)
-      isNot = attrs->children->content;
+      if (!xmlStrcmp (attrs->name, (const xmlChar *)"not") &&
+          attrs->children && attrs->children->content)
+        isNot = attrs->children->content;
 
-    if (!xmlStrcmp (attrs->name, (const xmlChar *)"regex") &&
-       attrs->children && attrs->children->content)
-      regex = attrs->children->content;
+      if (!xmlStrcmp (attrs->name, (const xmlChar *)"regex") &&
+          attrs->children && attrs->children->content)
+        regex = attrs->children->content;
 
-    attrs = attrs->next;
-  }
+      attrs = attrs->next;
+    }
 
   string *storedValue = getValue (hashedDomains, name);
 
@@ -314,16 +322,16 @@ bool XmlValidator::doCondition (xmlNodePtr node, HashMap<string, SecurityDomain*
   bool eq;
 
   if (!xmlStrcmp (regex, (const xmlChar *) "yes"))
-  {
-    Regex regex;
+    {
+      Regex regex;
 
-    if (regex.compile ((const char*)value, REG_EXTENDED))
-      return false;
+      if (regex.compile ((const char*)value, REG_EXTENDED))
+        return false;
 
-    regmatch_t pm;
+      regmatch_t pm;
 
-    eq = regex.exec (storedValue->c_str (), 1, &pm, 0) == 0;
-  }
+      eq = regex.exec (storedValue->c_str (), 1, &pm, 0) == 0;
+    }
   else
     eq = storedValue->compare ((const char*)value) == 0;
 
@@ -336,7 +344,8 @@ bool XmlValidator::doCondition (xmlNodePtr node, HashMap<string, SecurityDomain*
 /*!
  *Handle a PERMISSION.
  */
-void XmlValidator::doPermission (xmlNodePtr node, SecurityToken *st, HashMap<string, SecurityDomain*> *hashedDomains)
+void XmlValidator::doPermission (xmlNodePtr node, SecurityToken *st,
+                               HashMap<string, SecurityDomain*> *hashedDomains)
 {
   string name;
   xmlAttr *attrs = node->properties;
@@ -351,24 +360,25 @@ void XmlValidator::doPermission (xmlNodePtr node, SecurityToken *st, HashMap<str
 /*!
  *Handle a DEFINE.
  */
-void XmlValidator::doDefine (xmlNodePtr node, SecurityToken *st, HashMap<string, SecurityDomain*> *hashedDomains)
+void XmlValidator::doDefine (xmlNodePtr node, SecurityToken *st,
+                             HashMap<string, SecurityDomain*> *hashedDomains)
 {
   string name;
   const xmlChar *value = (const xmlChar*)"";
   xmlAttr *attrs = node->properties;
 
   while (attrs)
-  {
-    if (!xmlStrcmp (attrs->name, (const xmlChar *)"name") &&
-       attrs->children && attrs->children->content)
-      name.assign ((const char*)attrs->children->content);
+    {
+      if (!xmlStrcmp (attrs->name, (const xmlChar *)"name") &&
+          attrs->children && attrs->children->content)
+        name.assign ((const char*)attrs->children->content);
 
-    if (!xmlStrcmp (attrs->name, (const xmlChar *)"value") &&
-       attrs->children && attrs->children->content)
-      value = attrs->children->content;
+      if (!xmlStrcmp (attrs->name, (const xmlChar *)"value") &&
+          attrs->children && attrs->children->content)
+        value = attrs->children->content;
 
-    attrs = attrs->next;
-  }
+      attrs = attrs->next;
+    }
 
   if (!value)
     return;
@@ -384,20 +394,19 @@ void XmlValidator::doDefine (xmlNodePtr node, SecurityToken *st, HashMap<string,
 /*!
  *Handle a RETURN.
  */
-void XmlValidator::doReturn (xmlNodePtr node, int *cmd, HashMap<string, SecurityDomain*> *hashedDomains)
+void XmlValidator::doReturn (xmlNodePtr node, int *cmd,
+                             HashMap<string, SecurityDomain*> *hashedDomains)
 {
   xmlAttr *attrs = node->properties;
-
   xmlChar *value = NULL;
-
   while (attrs)
-  {
-    if (!xmlStrcmp (attrs->name, (const xmlChar *)"value") &&
-        attrs->children && attrs->children->content)
-      value = attrs->children->content;
+    {
+      if (!xmlStrcmp (attrs->name, (const xmlChar *)"value") &&
+          attrs->children && attrs->children->content)
+        value = attrs->children->content;
 
-    attrs = attrs->next;
-  }
+      attrs = attrs->next;
+    }
 
   if (value && !xmlStrcmp (value, (const xmlChar *) "ALLOW"))
     *cmd = 1;
diff --git a/myserver/tests/test_crypt_algo_manager.cpp b/myserver/tests/test_crypt_algo_manager.cpp
index 6c8dc47..a3f508a 100644
--- a/myserver/tests/test_crypt_algo_manager.cpp
+++ b/myserver/tests/test_crypt_algo_manager.cpp
@@ -82,7 +82,7 @@ public:
     try
       {
         /* Using an algorithm that is not registered causes an
-         * exception.  */
+           exception.  */
         cam.check (value, result, wrong);
       }
     catch (...)

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

Summary of changes:
 myserver/documentation/security.texi               |   14 +
 myserver/include/conf/security/auth_method.h       |   12 +
 .../include/conf/security/auth_method_factory.h    |    5 +-
 myserver/include/conf/security/security_token.h    |  110 ++++---
 myserver/include/conf/security/validator.h         |   14 +-
 myserver/include/conf/security/xml_validator.h     |   41 ++-
 myserver/include/filter/filters_chain.h            |   28 +-
 myserver/include/protocol/protocol.h               |    4 +-
 myserver/include/server/server.h                   |   44 +--
 myserver/src/conf/security/auth_method.cpp         |   25 ++-
 myserver/src/conf/security/auth_method_factory.cpp |   34 +-
 myserver/src/conf/security/security_cache.cpp      |   73 ++---
 myserver/src/conf/security/security_token.cpp      |  135 ++++----
 myserver/src/conf/security/xml_validator.cpp       |  374 +++++++++++---------
 myserver/src/protocol/http/http.cpp                |   48 ++-
 myserver/src/server/server.cpp                     |    2 +-
 myserver/tests/Makefile.am                         |   10 +-
 myserver/tests/test_auth_method.cpp                |  106 ++++++
 myserver/tests/test_crypt_algo_manager.cpp         |   32 +-
 myserver/tests/test_security_manager.cpp           |    5 +
 20 files changed, 666 insertions(+), 450 deletions(-)
 create mode 100644 myserver/tests/test_auth_method.cpp


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sat Nov 07 20:31:39 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N6wd1-0001x9-Fg
	for mharc-myserver-commit@gnu.org; Sat, 07 Nov 2009 20:31:39 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N6wcz-0001wX-EH
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 20:31:37 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N6wcx-0001wC-SY
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 20:31:36 -0500
Received: from [199.232.76.173] (port=49059 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N6wcx-0001w9-Pw
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 20:31:35 -0500
Received: from savannah.gnu.org ([199.232.41.3]:39535 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 1N6wcw-0001cL-Uo
	for myserver-commit@gnu.org; Sat, 07 Nov 2009 20:31:35 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N6wcw-0000Lz-51
	for myserver-commit@gnu.org; Sun, 08 Nov 2009 01:31:34 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N6wct-0000LS-RP
	for myserver-commit@gnu.org; Sun, 08 Nov 2009 01:31:34 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: fc3226b3ee89ae7c6fd61d61fe492912dd1b9a72
X-Git-Newrev: 3391c897eab91cee315af98ca0b7390be80626af
Message-Id: <E1N6wct-0000LS-RP@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 08 Nov 2009 01:31:32 +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. 0_9-384-g3391c89
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, 08 Nov 2009 01:31: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  3391c897eab91cee315af98ca0b7390be80626af (commit)
      from  fc3226b3ee89ae7c6fd61d61fe492912dd1b9a72 (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 3391c897eab91cee315af98ca0b7390be80626af
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Nov 8 02:29:16 2009 +0100

    Fix copyright notice.

diff --git a/plugins/src/php/php.cpp b/plugins/src/php/php.cpp
index ab17b3c..1e64904 100644
--- a/plugins/src/php/php.cpp
+++ b/plugins/src/php/php.cpp
@@ -1,18 +1,18 @@
 /*
-MyServer
-Copyright (C) 2007, 2009 The 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) 2007, 2009 The 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 "php.h"
 #include <include/base/thread/thread.h>
@@ -68,13 +68,14 @@ int modifyHeader(HttpResponseHeader *response, char* name, char* value)
 	if(val)
 		val->assign(value);
 	else
-	{
-		string field(name);
-		string valString(value);
-		HttpResponseHeader::Entry* entry = new HttpResponseHeader::Entry(field, valString);
-
-		response->other.put(field, entry);
-	}
+    {
+      string field(name);
+      string valString(value);
+      HttpResponseHeader::Entry* entry =
+        new HttpResponseHeader::Entry(field, valString);
+
+      response->other.put(field, entry);
+    }
 	return 0;
 }
 
@@ -106,10 +107,10 @@ int sendHeader(PhpData* data)
 	 *send a redirect to xxx.
 	 */
 	if(location && location->length())
-	{
-		data->td->http->sendHTTPRedirect(location->c_str());
-		return 0;
-	}
+    {
+      data->td->http->sendHTTPRedirect(location->c_str());
+      return 0;
+    }
 
 	data->headerSent = true;
 	return data->td->connection->socket->send( buffer,
@@ -121,7 +122,8 @@ int sendHeader(PhpData* data)
 
 }
 
-int myphp_header_handler(sapi_header_struct *sapi_header, sapi_headers_struct *sapi_headers TSRMLS_DC)
+int myphp_header_handler(sapi_header_struct *sapi_header,
+                         sapi_headers_struct *sapi_headers TSRMLS_DC)
 {
 	PhpData* data = getPhpData();
 	char* valInit;
@@ -229,65 +231,67 @@ void myphp_register_variables(zval *track_vars_array TSRMLS_DC)
 	ptr = data->td->buffer->getBuffer();
 
 	while(ptr)
-	{
-		char* name = ptr;
-		char* value = strchr(name, '=') + 1;
-		if(name >= value)
-			break;
+    {
+      char* name = ptr;
+      char* value = strchr(name, '=') + 1;
+      if(name >= value)
+        break;
 
-		ptr += strlen(name) + 1;
+      ptr += strlen(name) + 1;
 
-		value[-1] = '\0';
+      value[-1] = '\0';
 
-		php_register_variable(name, value, track_vars_array TSRMLS_CC);
+      php_register_variable(name, value, track_vars_array TSRMLS_CC);
 
-		value[-1] = '=';
+      value[-1] = '=';
 
-	}
-	php_register_variable("env", (char*)data->td->request.uriOpts.c_str(), track_vars_array TSRMLS_CC);
-	php_register_variable("PHP_SELF", (char*)data->td->request.uri.c_str(), track_vars_array TSRMLS_CC);
+    }
+	php_register_variable("env", (char*)data->td->request.uriOpts.c_str(),
+                        track_vars_array TSRMLS_CC);
+	php_register_variable("PHP_SELF", (char*)data->td->request.uri.c_str(),
+                        track_vars_array TSRMLS_CC);
 }
 
 int	myphp_startup(struct _sapi_module_struct *sapi_module)
 {
 	if(php_module_startup(sapi_module, entries, loadedEntries) == FAILURE)
-	{
-		return FAILURE;
-	}
+    {
+      return FAILURE;
+    }
 
 	return 0;
 }
 
 static sapi_module_struct myphp_module =
-{
-	"myphp",
-	"MyServer PHP Module",
+  {
+    "myphp",
+    "MyServer PHP Module",
 
-	myphp_startup,                            /* startup */
-	php_module_shutdown_wrapper,                    /* shutdown */
-	NULL,                                           /* activate */
-	NULL,                                           /* deactivate */
+    myphp_startup,                            /* startup */
+    php_module_shutdown_wrapper,                    /* shutdown */
+    NULL,                                           /* activate */
+    NULL,                                           /* deactivate */
 
-	myphp_ub_write,                       /* unbuffered write */
-	myphp_flush,                          /* flush */
-	NULL, //myphp_get_stat,                       /* get uid */
-	NULL, //myphp_getenv,                         /* getenv */
+    myphp_ub_write,                       /* unbuffered write */
+    myphp_flush,                          /* flush */
+    NULL, //myphp_get_stat,                       /* get uid */
+    NULL, //myphp_getenv,                         /* getenv */
 
-	php_error,                                      /* error handler */
+    php_error,                                      /* error handler */
 
-	myphp_header_handler,                 /* header handler */
-	myphp_send_headers,                   /* send headers handler */
-	NULL,                                           /* send header handler */
+    myphp_header_handler,                 /* header handler */
+    myphp_send_headers,                   /* send headers handler */
+    NULL,                                           /* send header handler */
 
-	myphp_read_post,                      /* read POST data */
-	myphp_read_cookies,                   /* read Cookies */
+    myphp_read_post,                      /* read POST data */
+    myphp_read_cookies,                   /* read Cookies */
 
-	myphp_register_variables,
-	myphp_log_message,                    /* Log message */
-	NULL,//myphp_sapi_get_request_time,               /* Request Time */
+    myphp_register_variables,
+    myphp_log_message,                    /* Log message */
+    NULL,//myphp_sapi_get_request_time,               /* Request Time */
 
-	STANDARD_SAPI_MODULE_PROPERTIES
-};
+    STANDARD_SAPI_MODULE_PROPERTIES
+  };
 
 int load(void* server)
 {
@@ -296,19 +300,19 @@ int load(void* server)
 	data = ::server->getData("PHP_NO_REBOOT");
 
 	if(!(::server->isRebooting() && !(data && !strcmpi(data, "YES"))))
-	{
-		data = ::server->getData("PHP_SAFE_MODE");
+    {
+      data = ::server->getData("PHP_SAFE_MODE");
 
-		if(data && !strcmpi(data, "YES"))
-			singleRequest = 1;
-		else
-			singleRequest = 0;
+      if(data && !strcmpi(data, "YES"))
+        singleRequest = 1;
+      else
+        singleRequest = 0;
 
-		loadedEntries = 0;
+      loadedEntries = 0;
 
-		if(singleRequest)
-			requestMutex.init();
-	}
+      if(singleRequest)
+        requestMutex.init();
+    }
 	return 0;
 }
 
@@ -320,14 +324,14 @@ int postLoad(void* server)
 	data = ::server->getData("PHP_NO_REBOOT");
 
 	if(!(::server->isRebooting() && !(data && !strcmpi(data, "YES"))))
-	{
+    {
 #ifdef ZTS
-		tsrm_startup(((Server*)server)->getMaxThreads(), 1, 0, NULL);
+      tsrm_startup(((Server*)server)->getMaxThreads(), 1, 0, NULL);
 #endif
 
-		sapi_startup(&myphp_module);
-		myphp_module.startup(&myphp_module);
-	}
+      sapi_startup(&myphp_module);
+      myphp_module.startup(&myphp_module);
+    }
 	return 0;
 }
 
@@ -339,20 +343,20 @@ int unLoad(void* p)
 	data = ::server->getData("PHP_NO_REBOOT");
 
 	if(!(::server->isRebooting() && !(data && !strcmpi(data, "YES"))))
-	{
-		myphp_module.shutdown(&myphp_module);
+    {
+      myphp_module.shutdown(&myphp_module);
 
-		sapi_shutdown();
+      sapi_shutdown();
 
-		if(singleRequest)
-			requestMutex.destroy();
+      if(singleRequest)
+        requestMutex.destroy();
 
 #ifdef ZTS
-    tsrm_shutdown();
+      tsrm_shutdown();
 #endif
 
-		loadedEntries = 0;
-	}
+      loadedEntries = 0;
+    }
 	return 0;
 }
 
@@ -374,8 +378,9 @@ PhpManager::~PhpManager()
 }
 
 
-int PhpManager::send(HttpThreadContext*, ConnectionPtr s, const char *filenamePath,
-                   const char* cgi, int selfExecuted, int onlyHeader = 0)
+int
+PhpManager::send(HttpThreadContext*, ConnectionPtr s, const char *filenamePath,
+                 const char* cgi, int selfExecuted, int onlyHeader = 0)
 {
 	PhpData* data;
 	zend_file_handle script;
@@ -432,10 +437,12 @@ int PhpManager::send(HttpThreadContext*, ConnectionPtr s, const char *filenamePa
 		char limit[15];
 		char *name = "memory_limit";
  		sprintf(limit, "%d", 1 << 30);
-		zend_alter_ini_entry(name, strlen(name), limit, strlen(limit), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
+		zend_alter_ini_entry(name, strlen(name), limit, strlen(limit),
+                         PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
 
 		name = "html_errors";
-		zend_alter_ini_entry(name, strlen(name), "0", 1, PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
+		zend_alter_ini_entry(name, strlen(name), "0", 1, PHP_INI_SYSTEM,
+                         PHP_INI_STAGE_ACTIVATE);
 
 	}
 
@@ -447,28 +454,28 @@ int PhpManager::send(HttpThreadContext*, ConnectionPtr s, const char *filenamePa
 	script.free_filename = 0;
 
 	zend_first_try
-	{
+    {
 
-		if (php_request_startup(TSRMLS_C) == FAILURE)
-		{
-			return FAILURE;
-		}
+      if (php_request_startup(TSRMLS_C) == FAILURE)
+        {
+          return FAILURE;
+        }
 
-		php_execute_script(&script TSRMLS_CC);
+      php_execute_script(&script TSRMLS_CC);
 
-		if(data->useChunks)
-			HttpDataHandler::appendDataToHTTPChannel(data->td,
-																							 0,
-																							 0,
-																							 &(data->td->outputData),
-																							 &(data->chain),
-																							 (bool)data->td->appendOutputs,
-																							 data->useChunks);
+      if(data->useChunks)
+        HttpDataHandler::appendDataToHTTPChannel(data->td,
+                                                 0,
+                                                 0,
+                                                 &(data->td->outputData),
+                                                 &(data->chain),
+                                                 (bool)data->td->appendOutputs,
+                                                 data->useChunks);
 
-		php_request_shutdown(NULL);
+      php_request_shutdown(NULL);
 
 
-	}
+    }
 	zend_end_try();
 
 
diff --git a/plugins/src/python/python.cpp b/plugins/src/python/python.cpp
index 9fc6ec7..f1db8c3 100644
--- a/plugins/src/python/python.cpp
+++ b/plugins/src/python/python.cpp
@@ -1,18 +1,18 @@
 /*
-MyServer
-Copyright (C) 2007, 2008, 2009 The MyServer Team
-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) 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 "python.h"
@@ -34,12 +34,12 @@ char* name (char* name, u_long len)
 
 
 PyInterpreterState* PythonData::getInterpreter ()
-	{
-		if(interp == 0)
-			interp = Py_NewInterpreter ();
-		PyThreadState_Swap (NULL);
-		return interp->interp;
-	}
+{
+  if(interp == 0)
+    interp = Py_NewInterpreter ();
+  PyThreadState_Swap (NULL);
+  return interp->interp;
+}
 
 PythonData::PythonData ()
 {
@@ -59,19 +59,19 @@ int load (void* server)
 	const char* pathData = serverInstance->getData("PYTHON_PATH");
 	PyThreadState * mainThreadState;
 	if (pathData)
-	{
-		string path (pathData);
-		FilesUtility::completePath (path);
+    {
+      string path (pathData);
+      FilesUtility::completePath (path);
 
-		setenv ("PYTHONPATH", path.c_str(), 1);
-	}
+      setenv ("PYTHONPATH", path.c_str(), 1);
+    }
 	else
-	{
-		string path (".");
-		FilesUtility::completePath (path);
+    {
+      string path (".");
+      FilesUtility::completePath (path);
 
-		setenv ("PYTHONPATH", path.c_str(), 1);
-	}
+      setenv ("PYTHONPATH", path.c_str(), 1);
+    }
 
   Py_SetProgramName ((char *)("python"));
 	Py_Initialize ();
@@ -99,10 +99,10 @@ int unLoad (void* p)
 
 	data = pythonThreadData.get (tid);
 	if(data == 0)
-	{
-		data = new PythonData ();
-		pythonThreadData.put (tid, data);
-	}
+    {
+      data = new PythonData ();
+      pythonThreadData.put (tid, data);
+    }
 
 	interpreter = data->getInterpreter ();
 	threadState = PyThreadState_New (interpreter);
@@ -129,7 +129,8 @@ int execute (char* code, u_long length)
   return executeImpl (code, length, NULL, 1);
 }
 
-int executeImpl (char* code, u_long length, PyThreadState *threadState, int newThreadState)
+int executeImpl (char* code, u_long length, PyThreadState *threadState,
+                 int newThreadState)
 {
 	PyInterpreterState *interpreter = NULL;
 	PythonData* data = NULL;
@@ -139,10 +140,10 @@ int executeImpl (char* code, u_long length, PyThreadState *threadState, int newT
 
 	data = pythonThreadData.get (tid);
 	if (data == 0)
-	{
-		data = new PythonData();
-		pythonThreadData.put(tid, data);
-	}
+    {
+      data = new PythonData();
+      pythonThreadData.put(tid, data);
+    }
 
 	interpreter = data->getInterpreter ();
 
@@ -157,10 +158,10 @@ int executeImpl (char* code, u_long length, PyThreadState *threadState, int newT
 	PyThreadState_Swap (NULL);
 
   if (newThreadState)
-  {
-    PyThreadState_Clear (threadState);
-    PyThreadState_Delete (threadState);
-  }
+    {
+      PyThreadState_Clear (threadState);
+      PyThreadState_Delete (threadState);
+    }
 
 	PyEval_ReleaseLock ();
 
@@ -174,7 +175,8 @@ int executeFromFile (char* filename)
   return executeFromFileImpl (filename, NULL, 1);
 }
 
-int executeFromFileImpl(char* filename, PyThreadState *threadState, int newThreadState)
+int executeFromFileImpl(char* filename, PyThreadState *threadState,
+                        int newThreadState)
 {
 	PyInterpreterState *interpreter = NULL;
 	int ret = 0;
@@ -186,10 +188,10 @@ int executeFromFileImpl(char* filename, PyThreadState *threadState, int newThrea
 
 	data = pythonThreadData.get (tid);
 	if(data == 0)
-	{
-		data = new PythonData ();
-		pythonThreadData.put (tid, data);
-	}
+    {
+      data = new PythonData ();
+      pythonThreadData.put (tid, data);
+    }
 
 	interpreter = data->getInterpreter ();
 
@@ -201,10 +203,11 @@ int executeFromFileImpl(char* filename, PyThreadState *threadState, int newThrea
 	file = fopen (filename, "r");
 
 	if(file == 0)
-	{
-    serverInstance->log (MYSERVER_LOG_MSG_ERROR, _("Python: cannot load file %s"), filename);
-		ret = -1;
-	}
+    {
+      serverInstance->log (MYSERVER_LOG_MSG_ERROR,
+                           _("Python: cannot load file %s"), filename);
+      ret = -1;
+    }
 	else
 		ret = PyRun_AnyFileEx (file, filename, 1);
 
@@ -212,10 +215,10 @@ int executeFromFileImpl(char* filename, PyThreadState *threadState, int newThrea
 	PyThreadState_Swap (NULL);
 
   if (newThreadState)
-  {
-    PyThreadState_Clear (threadState);
-    PyThreadState_Delete(threadState);
-  }
+    {
+      PyThreadState_Clear (threadState);
+      PyThreadState_Delete(threadState);
+    }
 
 	PyEval_ReleaseLock ();
 
@@ -229,7 +232,8 @@ PyObject* callObject(PyObject *obj, PyObject *args)
 }
 
 
-PyObject* callObjectImpl(PyObject *obj, PyObject *args, PyThreadState *threadState, int newThreadState)
+PyObject* callObjectImpl(PyObject *obj, PyObject *args,
+                         PyThreadState *threadState, int newThreadState)
 {
 	PyInterpreterState *interpreter = NULL;
 	PythonData* data = NULL;
@@ -240,10 +244,10 @@ PyObject* callObjectImpl(PyObject *obj, PyObject *args, PyThreadState *threadSta
 
 	data = pythonThreadData.get (tid);
 	if(data == 0)
-	{
-		data = new PythonData ();
-		pythonThreadData.put (tid, data);
-	}
+    {
+      data = new PythonData ();
+      pythonThreadData.put (tid, data);
+    }
 
 	interpreter = data->getInterpreter();
 
@@ -259,10 +263,10 @@ PyObject* callObjectImpl(PyObject *obj, PyObject *args, PyThreadState *threadSta
 	PyThreadState_Swap (NULL);
 
   if (newThreadState)
-  {
-    PyThreadState_Clear (threadState);
-    PyThreadState_Delete (threadState);
-  }
+    {
+      PyThreadState_Clear (threadState);
+      PyThreadState_Delete (threadState);
+    }
 
 	PyEval_ReleaseLock ();
 
@@ -281,10 +285,10 @@ int initModule (char* name, PyMethodDef methods[])
 
 	data = pythonThreadData.get (tid);
 	if (data == 0)
-	{
-		data = new PythonData ();
-		pythonThreadData.put (tid, data);
-	}
+    {
+      data = new PythonData ();
+      pythonThreadData.put (tid, data);
+    }
 
 	interpreter = data->getInterpreter ();
 	threadState = PyThreadState_New (interpreter);

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

Summary of changes:
 plugins/src/php/php.cpp       |  219 +++++++++++++++++++++--------------------
 plugins/src/python/python.cpp |  142 ++++++++++++++-------------
 2 files changed, 186 insertions(+), 175 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Nov 08 13:27:59 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N7CUZ-00083O-4h
	for mharc-myserver-commit@gnu.org; Sun, 08 Nov 2009 13:27:59 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N7CUW-000837-VL
	for myserver-commit@gnu.org; Sun, 08 Nov 2009 13:27:57 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N7CUW-00082v-38
	for myserver-commit@gnu.org; Sun, 08 Nov 2009 13:27:56 -0500
Received: from [199.232.76.173] (port=51438 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N7CUV-00082s-Rn
	for myserver-commit@gnu.org; Sun, 08 Nov 2009 13:27:55 -0500
Received: from savannah.gnu.org ([199.232.41.3]:56347 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 1N7CUV-0002z2-9F
	for myserver-commit@gnu.org; Sun, 08 Nov 2009 13:27:55 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N7CUU-0007oQ-Ea
	for myserver-commit@gnu.org; Sun, 08 Nov 2009 18:27:54 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N7CUS-0007nr-PA
	for myserver-commit@gnu.org; Sun, 08 Nov 2009 18:27:54 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 3391c897eab91cee315af98ca0b7390be80626af
X-Git-Newrev: 223894195e5151fa6533dfe9905c39c814f74e42
Message-Id: <E1N7CUS-0007nr-PA@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 08 Nov 2009 18:27:53 +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. 0_9-386-g2238941
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, 08 Nov 2009 18:27: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  223894195e5151fa6533dfe9905c39c814f74e42 (commit)
       via  da718a2dc3c571cce3cb63eb340b9acee4148d46 (commit)
      from  3391c897eab91cee315af98ca0b7390be80626af (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 223894195e5151fa6533dfe9905c39c814f74e42
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Nov 8 19:21:47 2009 +0100

    The AuthMethod::comparePassword method does not raise exceptions.
    
    Now AuthMethod::comparePassword catches any exception that
    CryptAlgoManager::check throws.  It is required in order to don't fail
    when an algorithm non present in the CryptAlgoManager collection is
    used.  This is the case of HTTP Digest A1.

diff --git a/myserver/documentation/security.texi b/myserver/documentation/security.texi
index cf1087f..3280c7a 100644
--- a/myserver/documentation/security.texi
+++ b/myserver/documentation/security.texi
@@ -88,6 +88,29 @@ the client specified password before compare it with the
 </SECURITY>
 @end example
 
+@subsubsection Http Digest
+If the HTTP digest authorization scheme is used, it is not possible to
+use any password hash but the original clear-text password.  The only
+exception to this rule is to specify the A1 part in the Digest
+scheme.
+
+It is computed by the function: MD5 (username:realm:password).
+
+@example
+  <DEFINE name="http.auth" value="digest" />
+  <USER name="user" algorithm="a1" password="c2deada0bcb64f99e65be0d33bb92d54"
+        READ="YES" EXECUTE="YES" BROWSE="YES" WRITE="NO"/>
+@end example
+
+The realm value used by MyServer is the virtual host name, including
+the port number, i.e. @example{localhost:8080}.
+The A1 password can be computed using the following shell command, be
+sure to use the right user, realm and password values.
+
+@example
+  printf "%s:%s:%s" user realm password | md5sum
+@end example
+
 @subsection FTP Anonymous user
 To allow the @file{.security.xml} re-use, the FTP ``Anonymous'' user
 is mapped internally by MyServer to the ``Guest'' user.
diff --git a/myserver/src/conf/security/auth_method.cpp b/myserver/src/conf/security/auth_method.cpp
index 2b2ff51..94bda0d 100644
--- a/myserver/src/conf/security/auth_method.cpp
+++ b/myserver/src/conf/security/auth_method.cpp
@@ -55,7 +55,14 @@ bool AuthMethod::comparePassword (const char *password,
       string savedpwStr (savedPassword);
       string algorithmStr (algorithm);
 
-      return cryptAlgoManager->check (savedpwStr, pwStr, algorithmStr);
+      try
+        {
+          return cryptAlgoManager->check (savedpwStr, pwStr, algorithmStr);
+        }
+      catch (...)
+        {
+          return false;
+        }
     }
 
   return false;
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 27bd947..0348e6f 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -62,6 +62,25 @@ extern "C"
 #endif
 }
 
+/*FIXME: Move somewhere else.  */
+class HttpInternalException : public exception
+{
+public:
+  virtual const char *what () const throw ()
+  {
+    return message;
+  }
+
+  HttpInternalException (string & str)
+  {
+    this->message = str.c_str ();
+  }
+
+private:
+  const char *message;
+};
+
+
 int HttpProtocol::loadProtocol ()
 {
   const char *data = NULL;
@@ -378,7 +397,17 @@ int Http::getFilePermissions (string& filename, string& directory, string& file,
           if (!td->request.auth.compare ("Digest"))
             {
               if (!hud->digestChecked)
-                hud->digest = checkDigest ();
+                {
+                  try
+                    {
+                      hud->digest = checkDigest ();
+                    }
+                  catch (exception & e)
+                    {
+                      td->connection->host->warningsLogWrite (e.what ());
+                      return raiseHTTPError (500);
+                    }
+                }
 
               hud->digestChecked = 1;
               if (hud->digest == 1)
@@ -388,6 +417,9 @@ int Http::getFilePermissions (string& filename, string& directory, string& file,
                   *permissions = td->securityToken.getProvidedMask ();
                 }
             }
+          else
+            *permissions = 0;
+
           td->authScheme = HTTP_AUTH_SCHEME_DIGEST;
         }
       /* By default use the Basic authentication scheme. */
@@ -538,6 +570,9 @@ int Http::deleteHTTPRESOURCE (string& filename, int sysReq, int onlyHeader,
 
 /*!
  * Check the Digest authorization
+ *
+ * \return 1 if the client credentials are OK.
+ * \return 0 if the credentials are wrong.
  */
 u_long Http::checkDigest ()
 {
@@ -582,10 +617,10 @@ u_long Http::checkDigest ()
     }
   else
     {
-      td->connection->host->warningsLogWrite
-        (_("HTTP: internal error, when using digest auth only a1 and "  \
-           "cleartext passwords can be used"));
-      return 0;
+      string err (_("HTTP: internal error, when using digest auth only "\
+                    "a1 and cleartext passwords can be used"));
+
+      throw HttpInternalException (err);
     }
 
   md5.init ();
@@ -603,9 +638,10 @@ u_long Http::checkDigest ()
   md5.init ();
   td->auxiliaryBuffer->setLength (0);
   *td->auxiliaryBuffer << A1 << ":"
-          << hud->nonce << ":"
-          << td->request.digestNc << ":" << td->request.digestCnonce << ":"
-          << td->request.digestQop << ":" << A2;
+                       << hud->nonce << ":"
+                       << td->request.digestNc << ":"
+                       << td->request.digestCnonce << ":"
+                       << td->request.digestQop << ":" << A2;
   md5.update (*td->auxiliaryBuffer);
   md5.end (response);
 
@@ -1270,12 +1306,12 @@ int Http::requestAuthorization ()
         }
 
       *td->auxiliaryBuffer << "WWW-Authenticate: digest "
-                           << " qop=\"auth\", algorithm =\"MD5\", realm =\""
-                           << hud->realm << "\",  opaque =\"" << hud->opaque
-                           << "\",  nonce =\"" << hud->nonce << "\" ";
+                           << " qop=\"auth\", algorithm=\"MD5\", realm=\""
+                           << hud->realm << "\", opaque=\"" << hud->opaque
+                           << "\",  nonce=\"" << hud->nonce << "\" ";
 
       if (hud->cnonce[0])
-        *td->auxiliaryBuffer << ", cnonce =\"" << hud->cnonce << "\" ";
+        *td->auxiliaryBuffer << ", cnonce=\"" << hud->cnonce << "\" ";
 
       *td->auxiliaryBuffer << "\r\n";
     }
diff --git a/myserver/src/protocol/http/http_headers.cpp b/myserver/src/protocol/http/http_headers.cpp
index 3b13868..d5e5dac 100644
--- a/myserver/src/protocol/http/http_headers.cpp
+++ b/myserver/src/protocol/http/http_headers.cpp
@@ -693,7 +693,7 @@ int HttpHeaders::readReqRangeLine (HttpRequestHeader *request,
  * \param request HttpRequest object to fill.
  * \param connection Pointer to a connection structure.
  * \param token Pointer to the beginning of the authorization line.
- * \param lenOut Pointer to an itneger to keep the line length.
+ * \param lenOut Pointer to an integer to keep the line length.
  * \return 0 on success, any other value is the HTTP error.
  */
 int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
@@ -701,6 +701,8 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
                                   const char *token,
                                   int *lenOut)
 {
+  const char *origToken = token;
+
   while (*token==' ')
     token++;
   int tokenOff = getCharInString (token, " ", HTTP_REQUEST_AUTH_DIM);
@@ -752,7 +754,11 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
       connection->setLogin (login);
       connection->setPassword (password);
       delete decodedPwBuf;
+
       *lenOut = tokenOff = getEndLine (token, 100);
+      if (tokenOff == -1)
+        return 400;
+      *lenOut += token - origToken;
     }
   else if (!request->auth.compare ("Digest"))
     {
@@ -766,9 +772,12 @@ int HttpHeaders::readReqAuthLine (HttpRequestHeader *request,
       if (tokenOff == -1)
         return 400;
 
+      *lenOut += token - origToken;
+
+
       digestBuff = new char[tokenOff + 1];
       if (!digestBuff)
-        return 400;
+        return 500;
 
       memcpy (digestBuff, token, tokenOff);
       digestBuff[tokenOff] = '\0';
diff --git a/myserver/tests/test_auth_method.cpp b/myserver/tests/test_auth_method.cpp
index 65d2e25..3e9bf09 100644
--- a/myserver/tests/test_auth_method.cpp
+++ b/myserver/tests/test_auth_method.cpp
@@ -49,6 +49,7 @@ class TestAuthMethod : public CppUnit::TestFixture
   CPPUNIT_TEST (testCryptAlgoManager);
   CPPUNIT_TEST (testGetPermissionMask);
   CPPUNIT_TEST (testComparePassword);
+  CPPUNIT_TEST (testNoException);
   CPPUNIT_TEST_SUITE_END ();
 
 public:
@@ -78,6 +79,24 @@ public:
     CPPUNIT_ASSERT (tam.getPermissionMask (&st) >= 0);
   }
 
+  void testNoException ()
+  {
+    TestAuthMethodImpl tam;
+    CryptAlgoManager cam;
+    Md5::initialize (&cam);
+
+    try
+      {
+        tam.exposeComparePassword ("d5aa1729c8c253e5d917a5264855eab8",
+                                   "freedom",
+                                   "md5555");
+      }
+    catch (...)
+      {
+        CPPUNIT_FAIL ("exception raised!");
+      }
+  }
+
   void testComparePassword ()
   {
     TestAuthMethodImpl tam;
diff --git a/myserver/tests/test_http_request.cpp b/myserver/tests/test_http_request.cpp
index 5c70416..5ab9a3c 100644
--- a/myserver/tests/test_http_request.cpp
+++ b/myserver/tests/test_http_request.cpp
@@ -34,13 +34,15 @@ using namespace std;
 
 class TestHttpRequest : public CppUnit::TestFixture
 {
-  CPPUNIT_TEST_SUITE ( TestHttpRequest );
-  CPPUNIT_TEST ( testSimpleHeader );
-  CPPUNIT_TEST ( testRange );
-  CPPUNIT_TEST ( testIncompleteHeader );
-  CPPUNIT_TEST ( testDefaultHttpRequest );
-  CPPUNIT_TEST ( testValidRequest );
-  CPPUNIT_TEST ( testResetHttpRequest );
+  CPPUNIT_TEST_SUITE (TestHttpRequest);
+  CPPUNIT_TEST (testSimpleHeader);
+  CPPUNIT_TEST (testAuthBasic);
+  CPPUNIT_TEST (testAuthDigest);
+  CPPUNIT_TEST (testRange);
+  CPPUNIT_TEST (testIncompleteHeader);
+  CPPUNIT_TEST (testDefaultHttpRequest);
+  CPPUNIT_TEST (testValidRequest);
+  CPPUNIT_TEST (testResetHttpRequest);
   CPPUNIT_TEST_SUITE_END ();
 
 public:
@@ -147,6 +149,66 @@ public:
   }
 
 
+  void testAuthDigest ()
+  {
+    HttpRequestHeader header;
+    Connection connection;
+    const char *requestStr;
+    u_long  bufferLength;
+    u_long requestLength;
+    int ret;
+
+    requestStr = "GET /resource HTTP/1.1\r\nHost: localhost\r\n" \
+      "Authorization: Digest username=\"user\", realm=\"localhost:8080\", "\
+      "nonce=\"88b29c4b136e2efee059647dbac10427\", uri=\"/res/\", " \
+      "algorithm=MD5, response=\"e979c020b57cc0e86e46d5c8cad8497e\", " \
+      "opaque=\"8666683506aacd900bbd5a74ac4edf68\", qop=auth, nc=00000001, " \
+      "cnonce=\"c40dc807904a2357\"\r\n\r\n";
+    bufferLength = strlen (requestStr);
+
+    ret = HttpHeaders::buildHTTPRequestHeaderStruct (requestStr,
+                                                    bufferLength,
+                                                    &requestLength,
+                                                    &header,
+                                                    &connection);
+    CPPUNIT_ASSERT (ret == 200);
+    CPPUNIT_ASSERT (!strcmp (header.digestRealm, "localhost:8080"));
+    CPPUNIT_ASSERT (!strcmp (header.digestOpaque,
+                             "8666683506aacd900bbd5a74ac4edf68"));
+    CPPUNIT_ASSERT (!strcmp (header.digestNonce,
+                             "88b29c4b136e2efee059647dbac10427"));
+    CPPUNIT_ASSERT (!strcmp (header.digestUri, "/res/"));
+    CPPUNIT_ASSERT (!strcmp (header.digestUsername, "user")); 
+    CPPUNIT_ASSERT (!strcmp (header.digestNc, "00000001")); 
+    CPPUNIT_ASSERT (!strcmp (header.digestQop, "auth")); 
+    CPPUNIT_ASSERT (!strcmp (header.digestResponse,
+                             "e979c020b57cc0e86e46d5c8cad8497e")); 
+    CPPUNIT_ASSERT (!strcmp (header.digestCnonce, "c40dc807904a2357")); 
+
+  }
+
+  void testAuthBasic ()
+  {
+    HttpRequestHeader header;
+    Connection connection;
+    const char *requestStr;
+    u_long  bufferLength;
+    u_long requestLength;
+    int ret;
+
+    requestStr = "GET /resource HTTP/1.1\r\nHost: localhost\r\n" \
+      "Authorization: Basic dXNlcjpmcmVlZG9t\r\n\r\n";
+
+    bufferLength = strlen (requestStr);
+
+    ret = HttpHeaders::buildHTTPRequestHeaderStruct (requestStr,
+                                                    bufferLength,
+                                                    &requestLength,
+                                                    &header,
+                                                    &connection);
+    CPPUNIT_ASSERT (ret == 200);
+  }
+
   void testDefaultHttpRequest ()
   {
     HttpRequestHeader header;



commit da718a2dc3c571cce3cb63eb340b9acee4148d46
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Nov 8 13:05:41 2009 +0100

    Add a facility method to the CryptAlgo class.

diff --git a/myserver/include/base/crypt/crypt_algo.h b/myserver/include/base/crypt/crypt_algo.h
index fc1e1e0..9bcabf5 100644
--- a/myserver/include/base/crypt/crypt_algo.h
+++ b/myserver/include/base/crypt/crypt_algo.h
@@ -21,6 +21,7 @@
 
 # include "stdafx.h"
 # include <include/base/hash_map/hash_map.h>
+# include <include/base/mem_buff/mem_buff.h>
 
 class CryptAlgo
 {
@@ -28,7 +29,8 @@ public:
   CryptAlgo ();
   ~CryptAlgo ();
   virtual void init ();
-  virtual void update (char const *buf, unsigned long len);
+  void update (MemBuf &buf) {update (buf.getBuffer (), buf.getLength ());}
+  virtual void update (char const *buf, u_long len);
   virtual char* end (char *buf);
 };
 
diff --git a/myserver/include/base/crypt/md5.h b/myserver/include/base/crypt/md5.h
index cdae047..0cdb079 100644
--- a/myserver/include/base/crypt/md5.h
+++ b/myserver/include/base/crypt/md5.h
@@ -27,10 +27,12 @@
 class Md5 : public CryptAlgo
 {
 public:
+  using CryptAlgo::update;
+
   Md5 ();
   virtual ~Md5 ();
   virtual void init ();
-  virtual void update (char const *buf, unsigned long len);
+  virtual void update (char const *buf, u_long len);
   virtual char* end (char *buf);
   static void initialize (CryptAlgoManager *manager);
   static CryptAlgo *md5Builder ();
diff --git a/myserver/include/base/crypt/sha1.h b/myserver/include/base/crypt/sha1.h
index 4829bef..b33ef54 100644
--- a/myserver/include/base/crypt/sha1.h
+++ b/myserver/include/base/crypt/sha1.h
@@ -33,10 +33,12 @@ extern "C"
 class Sha1 : public CryptAlgo
 {
 public:
+  using CryptAlgo::update;
+
   Sha1 ();
   virtual ~Sha1 ();
   virtual void init ();
-  virtual void update (char const *buf, unsigned long len);
+  virtual void update (char const *buf, u_long len);
   virtual char* end (char *buf);
   static void initialize (CryptAlgoManager *manager);
   static CryptAlgo *sha1Builder ();
diff --git a/myserver/src/base/crypt/crypt_algo.cpp b/myserver/src/base/crypt/crypt_algo.cpp
index 939554f..a0212c4 100644
--- a/myserver/src/base/crypt/crypt_algo.cpp
+++ b/myserver/src/base/crypt/crypt_algo.cpp
@@ -29,7 +29,7 @@ void CryptAlgo::init ()
 /*!
  * Write new data.
  */
-void CryptAlgo::update (char const *buf, unsigned long len)
+void CryptAlgo::update (char const *buf, u_long len)
 {
 
 }
diff --git a/myserver/src/base/crypt/md5.cpp b/myserver/src/base/crypt/md5.cpp
index f68361f..79da992 100644
--- a/myserver/src/base/crypt/md5.cpp
+++ b/myserver/src/base/crypt/md5.cpp
@@ -31,7 +31,7 @@ void Md5::init ()
  * Update context to reflect the concatenation of another buffer full
  * of bytes.
  */
-void Md5::update (char const *buf, unsigned long len)
+void Md5::update (char const *buf, u_long len)
 {
   md5_process_bytes (buf, len, &ctx);
 }
diff --git a/myserver/src/base/crypt/sha1.cpp b/myserver/src/base/crypt/sha1.cpp
index 34fe3df..a522657 100644
--- a/myserver/src/base/crypt/sha1.cpp
+++ b/myserver/src/base/crypt/sha1.cpp
@@ -31,7 +31,7 @@ void Sha1::init ()
  * Update context to reflect the concatenation of another buffer full
  * of bytes.
  */
-void Sha1::update (char const *buf, unsigned long len)
+void Sha1::update (char const *buf, u_long len)
 {
   sha1_process_bytes (buf, len, &ctx);
 }
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index eab482d..27bd947 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -545,18 +545,15 @@ u_long Http::checkDigest ()
   char A1[48];
   char A2[48];
   char response[48];
-  char *uri;
+  const char *uri;
   u_long digestCount;
   HttpUserData *hud =
     static_cast<HttpUserData*>(td->connection->protocolBuffer);
 
-
-  /* Return 0 if the password is different.  */
   if (td->request.digestOpaque[0]
       && strcmp (td->request.digestOpaque, hud->opaque))
     return 0;
 
-  /*! If is not equal return 0.  */
   if (strcmp (td->request.digestRealm, hud->realm))
     return 0;
 
@@ -566,7 +563,6 @@ u_long Http::checkDigest ()
   else
     hud->nc++;
 
-
   string &algorithm = td->securityToken.getAlgorithm ();
 
   if (algorithm.length () == 0)
@@ -577,8 +573,7 @@ u_long Http::checkDigest ()
                            << td->request.digestRealm
                            << ":" << td->securityToken.getNeededPassword ();
 
-      md5.update ((char const*) td->auxiliaryBuffer->getBuffer (),
-                  (unsigned int) td->auxiliaryBuffer->getLength ());
+      md5.update (*td->auxiliaryBuffer);
       md5.end (A1);
     }
   else if (algorithm.compare ("a1") == 0)
@@ -588,8 +583,8 @@ u_long Http::checkDigest ()
   else
     {
       td->connection->host->warningsLogWrite
-        (_("HTTP: internal error, when using digest auth only a1 and cleartext " \
-           "passwords can be used"));
+        (_("HTTP: internal error, when using digest auth only a1 and "  \
+           "cleartext passwords can be used"));
       return 0;
     }
 
@@ -598,12 +593,11 @@ u_long Http::checkDigest ()
   if (td->request.digestUri[0])
     uri = td->request.digestUri;
   else
-    uri = (char*) td->request.uriOpts.c_str ();
+    uri = td->request.uriOpts.c_str ();
 
   td->auxiliaryBuffer->setLength (0);
   *td->auxiliaryBuffer << td->request.cmd.c_str () << ":" << uri;
-  md5.update ((char const*) td->auxiliaryBuffer->getBuffer (),
-              (unsigned int) td->auxiliaryBuffer->getLength ());
+  md5.update (*td->auxiliaryBuffer);
   md5.end (A2);
 
   md5.init ();
@@ -612,8 +606,7 @@ u_long Http::checkDigest ()
           << hud->nonce << ":"
           << td->request.digestNc << ":" << td->request.digestCnonce << ":"
           << td->request.digestQop << ":" << A2;
-  md5.update ((char const*) td->auxiliaryBuffer->getBuffer (),
-              (unsigned int) td->auxiliaryBuffer->getLength ());
+  md5.update (*td->auxiliaryBuffer);
   md5.end (response);
 
   return strcmp (response, td->request.digestResponse) ? 0 : 1;
diff --git a/myserver/tests/test_md5.cpp b/myserver/tests/test_md5.cpp
index 6de4e59..ca2491d 100644
--- a/myserver/tests/test_md5.cpp
+++ b/myserver/tests/test_md5.cpp
@@ -29,8 +29,12 @@ class TestMd5 : public CppUnit::TestFixture
 {
   CPPUNIT_TEST_SUITE ( TestMd5 );
   CPPUNIT_TEST ( testHash );
+  CPPUNIT_TEST ( testHashMemBuf );
   CPPUNIT_TEST_SUITE_END ();
 
+#define msg "hello world!\n"
+#define expected "c897d1410af8f2c74fba11b1db511e9e"
+
   Md5* md5;
 public:
   void setUp ()
@@ -47,19 +51,29 @@ public:
   void testHash ()
   {
     char out[33];
-    const char* msg = "hello world!\n";
-
-    char *expected = (char*) "c897d1410af8f2c74fba11b1db511e9e";
-
     md5->init ();
     md5->update (msg, strlen (msg));
     char *ret = md5->end (out);
 
     CPPUNIT_ASSERT_EQUAL (ret, &out[0]);
 
-    for (int i = 0; i < 32; i++)
-      CPPUNIT_ASSERT_EQUAL (tolower (expected[i]), tolower (out[i]));
+    CPPUNIT_ASSERT_EQUAL (memcmp (expected, out, 32), 0);
+  }
+
+
+  void testHashMemBuf ()
+  {
+    MemBuf buffer;
+    char out[33];
+    buffer << msg;
+
+    md5->init ();
+    md5->update (buffer);
+    char *ret = md5->end (out);
+
+    CPPUNIT_ASSERT_EQUAL (ret, &out[0]);
 
+    CPPUNIT_ASSERT_EQUAL (memcmp (expected, out, 32), 0);
   }
 };
 
diff --git a/myserver/tests/test_sha1.cpp b/myserver/tests/test_sha1.cpp
index 1cb0e7e..67e928e 100644
--- a/myserver/tests/test_sha1.cpp
+++ b/myserver/tests/test_sha1.cpp
@@ -28,9 +28,14 @@ class TestSha1 : public CppUnit::TestFixture
 {
   CPPUNIT_TEST_SUITE ( TestSha1 );
   CPPUNIT_TEST ( testHash );
+  CPPUNIT_TEST ( testHashMemBuf );
   CPPUNIT_TEST_SUITE_END ();
 
   Sha1* sha1;
+
+#define msg "GNU is not UNIX"
+#define expected "5ef99232e377af054b479eae19b1b06d688f2a7e"
+
 public:
   void setUp ()
   {
@@ -46,18 +51,29 @@ public:
   void testHash ()
   {
     char out[45];
-    const char* msg = "GNU is not UNIX";
+    sha1->init ();
+    sha1->update (msg, strlen (msg));
+    char *ret = sha1->end (out);
 
-    char *expected = (char*) "5ef99232e377af054b479eae19b1b06d688f2a7e";
+    CPPUNIT_ASSERT_EQUAL (ret, &out[0]);
+
+    CPPUNIT_ASSERT_EQUAL (memcmp (expected, out, 32), 0);
+  }
+
+  void testHashMemBuf ()
+  {
+    MemBuf buffer;
+    char out[45];
+
+    buffer << msg;
 
     sha1->init ();
-    sha1->update (msg, strlen (msg));
+    sha1->update (buffer);
     char *ret = sha1->end (out);
 
     CPPUNIT_ASSERT_EQUAL (ret, &out[0]);
 
-    for (int i = 0; i < 32; i++)
-      CPPUNIT_ASSERT_EQUAL (tolower (expected[i]), tolower (out[i]));
+    CPPUNIT_ASSERT_EQUAL (memcmp (expected, out, 32), 0);
   }
 };
 

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

Summary of changes:
 myserver/documentation/security.texi        |   23 ++++++++
 myserver/include/base/crypt/crypt_algo.h    |    4 +-
 myserver/include/base/crypt/md5.h           |    4 +-
 myserver/include/base/crypt/sha1.h          |    4 +-
 myserver/src/base/crypt/crypt_algo.cpp      |    2 +-
 myserver/src/base/crypt/md5.cpp             |    2 +-
 myserver/src/base/crypt/sha1.cpp            |    2 +-
 myserver/src/conf/security/auth_method.cpp  |    9 +++-
 myserver/src/protocol/http/http.cpp         |   77 ++++++++++++++++++--------
 myserver/src/protocol/http/http_headers.cpp |   13 ++++-
 myserver/tests/test_auth_method.cpp         |   19 +++++++
 myserver/tests/test_http_request.cpp        |   76 ++++++++++++++++++++++++---
 myserver/tests/test_md5.cpp                 |   26 +++++++--
 myserver/tests/test_sha1.cpp                |   26 +++++++--
 14 files changed, 236 insertions(+), 51 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Nov 08 16:37:10 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N7FRe-0002XR-NP
	for mharc-myserver-commit@gnu.org; Sun, 08 Nov 2009 16:37:10 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N7FRb-0002WA-FF
	for myserver-commit@gnu.org; Sun, 08 Nov 2009 16:37:07 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N7FRa-0002VM-HP
	for myserver-commit@gnu.org; Sun, 08 Nov 2009 16:37:06 -0500
Received: from [199.232.76.173] (port=33416 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N7FRa-0002VE-9f
	for myserver-commit@gnu.org; Sun, 08 Nov 2009 16:37:06 -0500
Received: from savannah.gnu.org ([199.232.41.3]:45970 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 1N7FRZ-00024X-Us
	for myserver-commit@gnu.org; Sun, 08 Nov 2009 16:37:06 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N7FRY-0001y5-P5
	for myserver-commit@gnu.org; Sun, 08 Nov 2009 21:37:04 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N7FRX-0001xW-UG
	for myserver-commit@gnu.org; Sun, 08 Nov 2009 21:37:04 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 223894195e5151fa6533dfe9905c39c814f74e42
X-Git-Newrev: 3219a6e85467821e68315666a67b987abe6af7cc
Message-Id: <E1N7FRX-0001xW-UG@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 08 Nov 2009 21:37:04 +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. 0_9-387-g3219a6e
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, 08 Nov 2009 21:37:07 -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  3219a6e85467821e68315666a67b987abe6af7cc (commit)
      from  223894195e5151fa6533dfe9905c39c814f74e42 (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 3219a6e85467821e68315666a67b987abe6af7cc
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Nov 8 22:36:13 2009 +0100

    Add two new wrapper methods to the CryptAlgoManager class.
    The CryptAlgoManager class can now be used both with C strings and
    with C++ stl strings.

diff --git a/myserver/include/base/crypt/crypt_algo_manager.h b/myserver/include/base/crypt/crypt_algo_manager.h
index 501db9e..79eefea 100644
--- a/myserver/include/base/crypt/crypt_algo_manager.h
+++ b/myserver/include/base/crypt/crypt_algo_manager.h
@@ -31,8 +31,14 @@ public:
   CryptAlgoManager ();
   ~CryptAlgoManager ();
   void registerAlgorithm (string &name, builder bld);
-  CryptAlgo *make (string &s);
-  bool check (string &value, string &result, string &algo);
+  CryptAlgo *make (const char *name);
+  CryptAlgo *make (string &s) {return make (s.c_str ());}
+
+  bool check (const char *value, size_t valueLen, const char *result,
+              const char * algo);
+  bool check (string &value, string &result, string &algo)
+  {return check (value.c_str (), value.length (), result.c_str (),
+                 algo.c_str ());}
 private:
   HashMap<string, builder> algorithms;
 };
diff --git a/myserver/src/base/crypt/crypt_algo_manager.cpp b/myserver/src/base/crypt/crypt_algo_manager.cpp
index 973f153..ef18430 100644
--- a/myserver/src/base/crypt/crypt_algo_manager.cpp
+++ b/myserver/src/base/crypt/crypt_algo_manager.cpp
@@ -58,7 +58,7 @@ void CryptAlgoManager::registerAlgorithm (string &name,
  * \return A new instance on success.
  * \return NULL on failure.
  */
-CryptAlgo *CryptAlgoManager::make (string &name)
+CryptAlgo *CryptAlgoManager::make (const char *name)
 {
   builder bdr = algorithms.get (name);
   if (bdr)
@@ -89,25 +89,29 @@ private:
  * Check if F(value)=result, using the F specified by the algorithm.
  *
  * \param value The value to convert.
+ * \param valueLen Length in bytes of value.
  * \param result The final result.
  * \param algo The name of the algorithm to use.
  * \return true if F(value)=result.
  * \throw If the algorithm is not registered, it throws an exception.
  */
-bool CryptAlgoManager::check (string &value, string &result, string &algo)
+/*bool CryptAlgoManager::check (string &value, string &result, string &algo)*/
+bool
+CryptAlgoManager::check (const char *value, size_t valueLen, const char *result,
+                         const char * algo)
 {
-  const size_t buffer_len = 256;
-  char buffer[buffer_len];
+  const size_t bufferLen = 256;
+  char buffer[bufferLen];
   CryptAlgo *f = make (algo);
   if (!f)
     {
-      snprintf (buffer, buffer_len, _("%s is not a registered algorithm"),
-                algo.c_str ());
+      snprintf (buffer, bufferLen, _("%s is not a registered algorithm"),
+                algo);
       throw CryptAlgoManagerException (buffer);
     }
   auto_ptr<CryptAlgo> keeper (f);
   f->init ();
-  f->update (value.c_str (), value.length ());
+  f->update (value, valueLen);
   f->end (buffer);
-  return !result.compare (buffer);
+  return !strcmp (result, buffer);
 }
diff --git a/myserver/src/conf/security/auth_method.cpp b/myserver/src/conf/security/auth_method.cpp
index 94bda0d..b9134be 100644
--- a/myserver/src/conf/security/auth_method.cpp
+++ b/myserver/src/conf/security/auth_method.cpp
@@ -51,13 +51,10 @@ bool AuthMethod::comparePassword (const char *password,
 
   if (cryptAlgoManager)
     {
-      string pwStr (password);
-      string savedpwStr (savedPassword);
-      string algorithmStr (algorithm);
-
       try
         {
-          return cryptAlgoManager->check (savedpwStr, pwStr, algorithmStr);
+          return cryptAlgoManager->check (savedPassword, strlen (savedPassword),
+                                          password, algorithm);
         }
       catch (...)
         {
diff --git a/myserver/tests/test_crypt_algo_manager.cpp b/myserver/tests/test_crypt_algo_manager.cpp
index d67f5a9..c60398d 100644
--- a/myserver/tests/test_crypt_algo_manager.cpp
+++ b/myserver/tests/test_crypt_algo_manager.cpp
@@ -34,6 +34,7 @@ class TestCryptAlgoManager : public CppUnit::TestFixture
   CPPUNIT_TEST_SUITE ( TestCryptAlgoManager );
   CPPUNIT_TEST (testRegister);
   CPPUNIT_TEST (testCheck);
+  CPPUNIT_TEST (testNoExists);
   CPPUNIT_TEST_SUITE_END ();
 
 public:
@@ -78,12 +79,30 @@ public:
 
     CPPUNIT_ASSERT (cam.check (value, result, name));
     CPPUNIT_ASSERT (!cam.check (value, wrong, name));
+
+
+    CPPUNIT_ASSERT (cam.check (value.c_str (), value.length (),
+                               result.c_str (), name.c_str ()));
+
+    CPPUNIT_ASSERT (!cam.check (value.c_str (), value.length (),
+                               wrong.c_str (), name.c_str ()));
+  }
+
+  void testNoExists ()
+  {
+    CryptAlgoManager cam;
     bool raised = false;
+    Md5::initialize (&cam);
+
+    string value ("freedom");
+    string result ("d5aa1729c8c253e5d917a5264855eab8");
+    string name  ("it_does_not_exist");
+
     try
       {
         /* Using an algorithm that is not registered causes an
            exception.  */
-        cam.check (value, result, wrong);
+        cam.check (value, result, name);
       }
     catch (...)
       {

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

Summary of changes:
 myserver/include/base/crypt/crypt_algo_manager.h |   10 ++++++++--
 myserver/src/base/crypt/crypt_algo_manager.cpp   |   20 ++++++++++++--------
 myserver/src/conf/security/auth_method.cpp       |    7 ++-----
 myserver/tests/test_crypt_algo_manager.cpp       |   21 ++++++++++++++++++++-
 4 files changed, 42 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sun Nov 08 19:38:35 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N7IHC-0005Fx-Vt
	for mharc-myserver-commit@gnu.org; Sun, 08 Nov 2009 19:38:35 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N7IHB-0005Fh-IN
	for myserver-commit@gnu.org; Sun, 08 Nov 2009 19:38:33 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N7IH9-0005Ez-4h
	for myserver-commit@gnu.org; Sun, 08 Nov 2009 19:38:31 -0500
Received: from [199.232.76.173] (port=52698 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N7IH9-0005Ep-0N
	for myserver-commit@gnu.org; Sun, 08 Nov 2009 19:38:31 -0500
Received: from savannah.gnu.org ([199.232.41.3]:55076 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 1N7HzY-0001R7-CN
	for myserver-commit@gnu.org; Sun, 08 Nov 2009 19:20:20 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N7HzX-00032V-Eh
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 00:20:19 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N7HzT-00031o-Qr
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 00:20:19 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 3219a6e85467821e68315666a67b987abe6af7cc
X-Git-Newrev: 2097cd7f32fbc307be958b8e3b154200fdbf230c
Message-Id: <E1N7HzT-00031o-Qr@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Mon, 09 Nov 2009 00:20:17 +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. 0_9-389-g2097cd7
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, 09 Nov 2009 00:38:33 -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  2097cd7f32fbc307be958b8e3b154200fdbf230c (commit)
       via  9f1188cfd7c8eb17c4f3a62410ea1473b1344b73 (commit)
      from  3219a6e85467821e68315666a67b987abe6af7cc (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 2097cd7f32fbc307be958b8e3b154200fdbf230c
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Nov 9 01:01:29 2009 +0100

    Handle correctly HTTP headers facilities return values in the Proxy handler.

diff --git a/myserver/documentation/security.texi b/myserver/documentation/security.texi
index 3280c7a..4246dc9 100644
--- a/myserver/documentation/security.texi
+++ b/myserver/documentation/security.texi
@@ -103,7 +103,7 @@ It is computed by the function: MD5 (username:realm:password).
 @end example
 
 The realm value used by MyServer is the virtual host name, including
-the port number, i.e. @example{localhost:8080}.
+the port number, i.e. @code{localhost:8080}.
 The A1 password can be computed using the following shell command, be
 sure to use the right user, realm and password values.
 
diff --git a/myserver/documentation/virtual_hosts.texi b/myserver/documentation/virtual_hosts.texi
index 5637bf0..33c8351 100644
--- a/myserver/documentation/virtual_hosts.texi
+++ b/myserver/documentation/virtual_hosts.texi
@@ -97,7 +97,7 @@ The following line, for example, set the maximum transfer rate to 1
 KByte/second:
 
 @example
-    <DEFINE name="connection.throttling" value="1024"/>
+<DEFINE name="connection.throttling" value="1024"/>
 @end example
 
 @subsection Connections data pool
@@ -117,8 +117,8 @@ Any other element passed after the location will be part of the
 @code{PATH_INFO} variable.
 
 @example
-    <LOCATION path="foo/bar" mime="text/html" handler="CGI"
-              param="/usr/local/bin/handler" />
+<LOCATION path="foo/bar" mime="text/html" handler="CGI"
+          param="/usr/local/bin/handler" />
 @end example
 
 In the previous example, the CGI process @file{/usr/local/bin/handler}
diff --git a/myserver/src/http_handler/proxy/proxy.cpp b/myserver/src/http_handler/proxy/proxy.cpp
index bb4cc54..9166e5b 100644
--- a/myserver/src/http_handler/proxy/proxy.cpp
+++ b/myserver/src/http_handler/proxy/proxy.cpp
@@ -52,18 +52,19 @@ int Proxy::send (HttpThreadContext *td,
   HttpRequestHeader req;
   u_long nbw;
 
-  for (HashMap<string, HttpRequestHeader::Entry*>::Iterator it = td->request.begin ();
-       it != td->request.end ();
-       it++)
+  for (HashMap<string, HttpRequestHeader::Entry*>::Iterator it =
+         td->request.begin (); it != td->request.end (); it++)
     {
       HttpRequestHeader::Entry *e = *it;
       req.setValue (e->name->c_str (), e->value->c_str ());
     }
 
-  if (destUrl.getProtocol ().compare ("http") && destUrl.getProtocol ().compare ("HTTP"))
+  if (destUrl.getProtocol ().compare ("http")
+      && destUrl.getProtocol ().compare ("HTTP"))
     {
-      td->connection->host->warningsLogWrite ("Proxy: %s is not a known protocol",
-                                              destUrl.getProtocol ().c_str ());
+      td->connection->host->warningsLogWrite
+        ("Proxy: %s is not a supported protocol",
+         destUrl.getProtocol ().c_str ());
       return td->http->raiseHTTPError (500);
     }
 
@@ -91,8 +92,12 @@ int Proxy::send (HttpThreadContext *td,
   if (sock.connect (destUrl.getHost ().c_str (), destUrl.getPort ()))
     return td->http->raiseHTTPError (500);
 
-  if (HttpHeaders::sendHeader (td->response, *td->connection->socket,
-                               *td->auxiliaryBuffer, td))
+  u_long hdrLen =
+    HttpHeaders::buildHTTPRequestHeader (td->auxiliaryBuffer->getBuffer (),
+                                         &req);
+
+
+  if (sock.write (td->auxiliaryBuffer->getBuffer (), hdrLen, &nbw))
     {
       chain.clearAllFilters ();
       return HttpDataHandler::RET_FAILURE;
@@ -107,11 +112,12 @@ int Proxy::send (HttpThreadContext *td,
 
   chain.setStream (td->connection->socket);
 
-  if (td->mime && Server::getInstance ()->getFiltersFactory ()->chain (&chain,
-                                                            td->mime->filters,
-                                                       td->connection->socket,
-                                                                       &nbw,
-                                                                       1))
+  if (td->mime
+      && Server::getInstance ()->getFiltersFactory ()->chain (&chain,
+                                                              td->mime->filters,
+                                                         td->connection->socket,
+                                                              &nbw,
+                                                              1))
     {
       sock.close ();
       return td->http->raiseHTTPError (500);
@@ -144,17 +150,16 @@ int Proxy::flushToClient (HttpThreadContext* td, Socket& client,
       if (client.recv (td->auxiliaryBuffer->getBuffer () + read,
                        td->auxiliaryBuffer->getRealLength () - read,
                        0,
-                       td->http->getTimeout () == 0))
+                       td->http->getTimeout ()) < 0)
         return td->http->raiseHTTPError (500);
 
       read += ret;
 
-      if (HttpHeaders::buildHTTPResponseHeaderStruct (td->auxiliaryBuffer->getBuffer (),
-                                                      &td->response,
-                                                      &headerLength))
-      ret = HttpDataHandler::RET_FAILURE;
+      if (HttpHeaders::buildHTTPResponseHeaderStruct
+          (td->auxiliaryBuffer->getBuffer (), &td->response, &headerLength))
+        break;
     }
-  while (ret == -1);
+  while (ret);
 
   checkDataChunks (td, &keepalive, &useChunks);
 
@@ -180,7 +185,6 @@ int Proxy::flushToClient (HttpThreadContext* td, Socket& client,
       transferEncoding.assign (*tmp);
     }
 
-
   if (useChunks)
     td->response.setValue ("Transfer-Encoding", "chunked");
 
@@ -191,10 +195,10 @@ int Proxy::flushToClient (HttpThreadContext* td, Socket& client,
   if (out.getStream ()->write (td->buffer->getBuffer (),
                                hdrLen,
                                &nbw))
-    return 0;
+    return HttpDataHandler::RET_FAILURE;
 
   if (onlyHeader)
-    ret = HttpDataHandler::RET_OK;
+    return HttpDataHandler::RET_OK;
 
   ret = readPayLoad (td,
                      &td->response,
diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index 0348e6f..b0df006 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -519,7 +519,8 @@ int Http::preprocessHttpRequest (string& filename, int yetmapped, int* permissio
           if (next >= filenamePathLen)
             break;
 
-          if (mimeLoc || !FilesUtility::isDirectory (curr.c_str ()))
+          if (mimeLoc || (FilesUtility::fileExists (curr.c_str ())
+                          && !FilesUtility::isDirectory (curr.c_str ())))
             {
               td->pathInfo.assign (&(td->filenamePath.c_str ()[next]));
               td->filenamePath.erase (next);



commit 9f1188cfd7c8eb17c4f3a62410ea1473b1344b73
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Nov 9 00:08:50 2009 +0100

    Remove a not used variable plus re-indentation.

diff --git a/myserver/src/http_handler/http_file/http_file.cpp b/myserver/src/http_handler/http_file/http_file.cpp
index ee56185..7bc4be4 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -41,20 +41,15 @@ extern "C"
 /*!
   Main function to handle the HTTP PUT command.
  */
-int HttpFile::putFile (HttpThreadContext* td,
-                       string& filename)
+int HttpFile::putFile (HttpThreadContext* td, string& filename)
 {
   u_long firstByte = td->request.rangeByteBegin;
-  int keepalive = 0;
   int ret;
 
   try
   {
     if (td->request.isKeepAlive ())
-      {
-        td->response.setValue ("Connection", "keep-alive");
-        keepalive = 1;
-      }
+      td->response.setValue ("Connection", "keep-alive");
 
     if (!(td->permissions & MYSERVER_PERMISSION_WRITE))
       return td->http->sendAuth ();
@@ -62,8 +57,8 @@ int HttpFile::putFile (HttpThreadContext* td,
     if (FilesUtility::fileExists (td->filenamePath.c_str ()))
       {
         File file;
-        if (file.openFile (td->filenamePath.c_str (), File::OPEN_IF_EXISTS |
-                           File::WRITE))
+        if (file.openFile (td->filenamePath.c_str (), File::OPEN_IF_EXISTS
+                           | File::WRITE))
           return td->http->raiseHTTPError (500);
 
         file.seek (firstByte);
@@ -105,8 +100,8 @@ int HttpFile::putFile (HttpThreadContext* td,
         /* The file doesn't exist.  */
         File file;
         if (file.openFile (td->filenamePath.c_str (),
-                         File::FILE_CREATE_ALWAYS |
-                         File::WRITE))
+                           File::FILE_CREATE_ALWAYS
+                           | File::WRITE))
           return td->http->raiseHTTPError (500);
 
         for (;;)
@@ -190,7 +185,6 @@ void HttpFile::generateEtag (string & etag, u_long mtime, u_long fsize)
 #define ROL(x, y) ((x << y) | (x >> (32 - y)))
   /* Do a bit rotation to have less significative bits in the middle.  */
   u_long x = ROL (mtime, 16) | fsize;
-
   char buf[16];
   sprintf (buf, "%u", x);
   etag.assign (buf);
@@ -230,38 +224,38 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
   u_long dataSent = 0;
 
   try
-  {
+    {
 
-    if (!td->request.cmd.compare ("PUT"))
-      return putFile (td, td->filenamePath);
+      if (!td->request.cmd.compare ("PUT"))
+        return putFile (td, td->filenamePath);
 
-    if (!td->request.cmd.compare ("DELETE"))
-      return deleteFile (td, td->filenamePath);
+      if (!td->request.cmd.compare ("DELETE"))
+        return deleteFile (td, td->filenamePath);
 
-    if (!(td->permissions & MYSERVER_PERMISSION_READ))
-      return td->http->sendAuth ();
+      if (!(td->permissions & MYSERVER_PERMISSION_READ))
+        return td->http->sendAuth ();
 
-    if (!FilesUtility::fileExists (filenamePath))
-      return td->http->raiseHTTPError (404);
+      if (!FilesUtility::fileExists (filenamePath))
+        return td->http->raiseHTTPError (404);
 
-    lastMT = FilesUtility::getLastModTime (td->filenamePath.c_str ());
+      lastMT = FilesUtility::getLastModTime (td->filenamePath.c_str ());
 
-    if (lastMT == -1)
-      return td->http->raiseHTTPError (500);
+      if (lastMT == -1)
+        return td->http->raiseHTTPError (500);
 
-    getRFC822GMTTime (lastMT, tmpTime, 32);
-    td->response.setValue ("Last-Modified", tmpTime.c_str ());
+      getRFC822GMTTime (lastMT, tmpTime, 32);
+      td->response.setValue ("Last-Modified", tmpTime.c_str ());
 
-    HttpRequestHeader::Entry *ifModifiedSince =
-      td->request.other.get ("Last-Modified");
+      HttpRequestHeader::Entry *ifModifiedSince =
+        td->request.other.get ("Last-Modified");
 
-    if (ifModifiedSince && ifModifiedSince->value->length () &&
-        !ifModifiedSince->value->compare (tmpTime))
-      return td->http->sendHTTPNonModified ();
+      if (ifModifiedSince && ifModifiedSince->value->length () &&
+          !ifModifiedSince->value->compare (tmpTime))
+        return td->http->sendHTTPNonModified ();
 
-    file = Server::getInstance ()->getCachedFiles ()->open (filenamePath);
-    if (!file)
-      return td->http->raiseHTTPError (500);
+      file = Server::getInstance ()->getCachedFiles ()->open (filenamePath);
+      if (!file)
+        return td->http->raiseHTTPError (500);
 
     /*
      * Check how many bytes are ready to be send.
@@ -276,16 +270,16 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
       return td->http->sendHTTPNonModified ();
     else
       {
-      HttpResponseHeader::Entry *e = td->response.other.get ("Etag");
-      if (e)
-        e->value->assign (etag);
-      else
-        {
-          e = new HttpResponseHeader::Entry ();
-          e->name->assign ("Etag");
+        HttpResponseHeader::Entry *e = td->response.other.get ("Etag");
+        if (e)
           e->value->assign (etag);
-          td->response.other.put (*(e->name), e);
-        }
+        else
+          {
+            e = new HttpResponseHeader::Entry ();
+            e->name->assign ("Etag");
+            e->value->assign (etag);
+            td->response.other.put (*(e->name), e);
+          }
       }
 
     bytesToSend = filesize;
@@ -348,10 +342,10 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
         HttpRequestHeader::Entry* e = td->request.other.get ("Accept-encoding");
         if (td->mime &&
             Server::getInstance ()->getFiltersFactory ()->chain (&chain,
-                                                            td->mime->filters,
-                                                            &memStream,
+                                                                 td->mime->filters,
+                                                                 &memStream,
                                                                  &nbw, 0,
-                                                     e ? e->value : NULL))
+                                                                 e ? e->value : NULL))
           {
             file->close ();
             delete file;
@@ -394,28 +388,28 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
           }
         /* Do not use chunked transfer with old HTTP/1.0 clients.  */
         if (keepalive)
-	  useChunks = true;
+          useChunks = true;
       }
 
     if (useChunks)
       {
-	HttpResponseHeader::Entry *e;
-	e = td->response.other.get ("Transfer-encoding");
-	if (e)
-	  e->value->assign ("chunked");
-	else
-	  {
-	    e = new HttpResponseHeader::Entry ();
-	    e->name->assign ("Transfer-encoding");
-	    e->value->assign ("chunked");
-	    td->response.other.put (*(e->name), e);
-	  }
+        HttpResponseHeader::Entry *e;
+        e = td->response.other.get ("Transfer-encoding");
+        if (e)
+          e->value->assign ("chunked");
+        else
+          {
+            e = new HttpResponseHeader::Entry ();
+            e->name->assign ("Transfer-encoding");
+            e->value->assign ("chunked");
+            td->response.other.put (*(e->name), e);
+          }
       }
     else
       {	HttpResponseHeader::Entry *e;
-	e = td->response.other.remove ("Transfer-encoding");
-	if (e)
-	  delete e;
+        e = td->response.other.remove ("Transfer-encoding");
+        if (e)
+          delete e;
       }
 
     if (HttpHeaders::sendHeader (td->response, *td->connection->socket,
@@ -476,7 +470,7 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
     if (memStream.availableToRead ())
       {
         if (memStream.read (td->buffer->getBuffer (),
-			    td->buffer->getRealLength (), &nbr))
+                            td->buffer->getRealLength (), &nbr))
           {
             file->close ();
             delete file;
@@ -485,11 +479,12 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
           }
 
         memStream.refresh ();
-	if (nbr && HttpDataHandler::appendDataToHTTPChannel (td,
-                                       td->buffer->getBuffer (),
-                                       nbr, &(td->outputData),
-                                       &chain, td->appendOutputs,
-                                       useChunks))
+        if (nbr
+            && HttpDataHandler::appendDataToHTTPChannel (td,
+                                                      td->buffer->getBuffer (),
+                                                     nbr, &(td->outputData),
+                                                     &chain, td->appendOutputs,
+                                                         useChunks))
           {
             file->close ();
             delete file;
@@ -510,9 +505,9 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
           {
             /* Read from the file the bytes to send.  */
             if (ret = file->read (td->buffer->getBuffer (),
-                  std::min (static_cast<u_long> (bytesToSend),
-                  static_cast<u_long> (td->buffer->getRealLength () / 2)),
-                  &nbr))
+                                  std::min (static_cast<u_long> (bytesToSend),
+                      static_cast<u_long> (td->buffer->getRealLength () / 2)),
+                                  &nbr))
               break;
 
             if (nbr == 0)
@@ -524,8 +519,8 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
             bytesToSend -= nbr;
 
             if (ret = appendDataToHTTPChannel (td, td->buffer->getBuffer (),
-                     nbr, &(td->outputData), &chain, td->appendOutputs,
-                     useChunks, td->buffer->getRealLength (), &memStream))
+                           nbr, &(td->outputData), &chain, td->appendOutputs,
+                          useChunks, td->buffer->getRealLength (), &memStream))
               break;
 
             dataSent += nbr;
@@ -554,22 +549,22 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
 
                 chain.setStream (tmpStream);
                 if (ret = memStream.read (td->buffer->getBuffer (),
-                    td->buffer->getRealLength (), &nbr))
+                                          td->buffer->getRealLength (), &nbr))
                   break;
 
                 if (ret = HttpDataHandler::appendDataToHTTPChannel (td,
-                    td->buffer->getBuffer (), nbr, &(td->outputData),
-                    &chain, td->appendOutputs, useChunks))
+                        td->buffer->getBuffer (), nbr, &(td->outputData),
+                                   &chain, td->appendOutputs, useChunks))
                   break;
 
                 ret = HttpDataHandler::appendDataToHTTPChannel (td, 0, 0,
-                                         &(td->outputData), &chain,
-                                         td->appendOutputs, useChunks);
+                                               &(td->outputData), &chain,
+                                            td->appendOutputs, useChunks);
                 break;
               }
           }
         memStream.refresh ();
-    }/* End for loop.  */
+      }/* End for loop.  */
 
     file->close ();
     delete file;
@@ -588,7 +583,7 @@ int HttpFile::send (HttpThreadContext* td, const char *filenamePath,
   chain.clearAllFilters ();
 
   if (ret)
-  return HttpDataHandler::RET_FAILURE;
+    return HttpDataHandler::RET_FAILURE;
   else
     return HttpDataHandler::RET_OK;
 }
@@ -620,7 +615,7 @@ int HttpFile::load ()
 
 /*!
   Unload the static elements.
- */
+*/
 int HttpFile::unLoad ()
 {
   return 0;

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

Summary of changes:
 myserver/documentation/security.texi              |    2 +-
 myserver/documentation/virtual_hosts.texi         |    6 +-
 myserver/src/http_handler/http_file/http_file.cpp |  155 ++++++++++-----------
 myserver/src/http_handler/proxy/proxy.cpp         |   48 ++++---
 myserver/src/protocol/http/http.cpp               |    3 +-
 5 files changed, 107 insertions(+), 107 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Mon Nov 09 05:40:19 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N7RfX-00086h-1X
	for mharc-myserver-commit@gnu.org; Mon, 09 Nov 2009 05:40:19 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N7RfT-00085l-Cy
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 05:40:15 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N7RfQ-000853-So
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 05:40:14 -0500
Received: from [199.232.76.173] (port=43476 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N7RfQ-00084x-MG
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 05:40:12 -0500
Received: from savannah.gnu.org ([199.232.41.3]:48339 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 1N7RfP-0006v4-Rx
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 05:40:12 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N7RfO-0004Cx-GF
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 10:40:10 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N7RfE-00047a-L7
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 10:40:09 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 2097cd7f32fbc307be958b8e3b154200fdbf230c
X-Git-Newrev: 5d7ee855ce1a420c81922e9d6c53ed479fcdef5c
Message-Id: <E1N7RfE-00047a-L7@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Mon, 09 Nov 2009 10:40:01 +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. 0_9-391-g5d7ee85
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, 09 Nov 2009 10:40: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  5d7ee855ce1a420c81922e9d6c53ed479fcdef5c (commit)
       via  ecf366a65e3c2c49a9731bb99b82d70e72aecfb2 (commit)
      from  2097cd7f32fbc307be958b8e3b154200fdbf230c (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 5d7ee855ce1a420c81922e9d6c53ed479fcdef5c
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Nov 9 11:38:37 2009 +0100

    Refactoring: divide a big test case in smaller tests.

diff --git a/myserver/tests/test_file.cpp b/myserver/tests/test_file.cpp
index 716191c..4a3fb43 100644
--- a/myserver/tests/test_file.cpp
+++ b/myserver/tests/test_file.cpp
@@ -1,19 +1,19 @@
 /*
- MyServer
- 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
- (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, 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"
 #include <cppunit/CompilerOutputter.h>
@@ -37,14 +37,23 @@ class TestFile : public CppUnit::TestFixture
   File *tfile;
   string fname;
 
-  CPPUNIT_TEST_SUITE ( TestFile );
-
-  CPPUNIT_TEST ( testCreateTemporaryFile );
-  CPPUNIT_TEST ( testOnFile );
-  CPPUNIT_TEST ( testTruncate );
+  CPPUNIT_TEST_SUITE (TestFile);
 
+  CPPUNIT_TEST (testCreateTemporaryFile);
+  CPPUNIT_TEST (testOnFile);
+  CPPUNIT_TEST (testTruncate);
+  CPPUNIT_TEST (testCreationTime);
+  CPPUNIT_TEST (testLastAccessTime);
+  CPPUNIT_TEST (testLastModTime);
+  CPPUNIT_TEST (testSeek);
   CPPUNIT_TEST_SUITE_END ();
 
+  int openHelper ()
+  {
+   return  tfile->openFile (fname.c_str (), File::WRITE
+                            | File::READ
+                            | File::FILE_CREATE_ALWAYS);
+  }
 public:
   void setUp ()
   {
@@ -66,40 +75,56 @@ public:
 
   void testOnFile ()
   {
-    char buf[] = { 'H', 'e', 'l', 'l', 'o', ',', ' ', 'm', 'y', 'W', 'o', 'r', 'l', 'd', 0 };
-    const int bufLen = sizeof (buf) / sizeof (char);
+    const char *buf = "HELLO myWORLD";
+    char readbuf[512];
+    size_t bufLen = strlen (buf);
     u_long nbw;
     u_long nbr;
 
-    CPPUNIT_ASSERT_EQUAL (tfile->openFile (fname.c_str (), File::WRITE |
-                                           File::READ |
-                                           File::FILE_CREATE_ALWAYS), 0);
+    CPPUNIT_ASSERT_EQUAL (openHelper (), 0);
 
     CPPUNIT_ASSERT_EQUAL (tfile->writeToFile (buf, bufLen, &nbw), 0);
 
-    memset (buf, 0, bufLen);
+    memset (readbuf, 0, bufLen);
 
     CPPUNIT_ASSERT_EQUAL (tfile->seek (0), 0);
 
-    CPPUNIT_ASSERT_EQUAL (tfile->read (buf, bufLen, &nbr), 0);
+    CPPUNIT_ASSERT_EQUAL (tfile->read (readbuf, bufLen, &nbr), 0);
 
     CPPUNIT_ASSERT (nbr > 0);
 
-    CPPUNIT_ASSERT (tfile->getCreationTime () != -1);
-
-    CPPUNIT_ASSERT (tfile->getLastAccTime () != -1);
+    for (size_t i = 0; i < bufLen; i++)
+      CPPUNIT_ASSERT_EQUAL (buf[i], readbuf[i]);
 
-    CPPUNIT_ASSERT (tfile->getLastModTime () != -1);
+    CPPUNIT_ASSERT_EQUAL (tfile->getFileSize (), nbr);
+    CPPUNIT_ASSERT_EQUAL (tfile->close (), 0);
 
-    CPPUNIT_ASSERT (tfile->getFileSize () != -1);
+    FilesUtility::deleteFile (fname.c_str ());
+  }
 
-    CPPUNIT_ASSERT_EQUAL (tfile->seek (1), 0);
+  void testCreationTime ()
+  {
+    CPPUNIT_ASSERT_EQUAL (openHelper (), 0);
+    CPPUNIT_ASSERT (tfile->getCreationTime () != -1);
+  }
 
-    CPPUNIT_ASSERT_EQUAL (tfile->getSeek (), 1ul);
+  void testLastAccessTime ()
+  {
+    CPPUNIT_ASSERT_EQUAL (openHelper (), 0);
+    CPPUNIT_ASSERT (tfile->getCreationTime () != -1);
+  }
 
-    CPPUNIT_ASSERT_EQUAL (tfile->close (), 0);
+  void testLastModTime ()
+  {
+    CPPUNIT_ASSERT_EQUAL (openHelper (), 0);
+    CPPUNIT_ASSERT (tfile->getCreationTime () != -1);
+  }
 
-    FilesUtility::deleteFile (fname.c_str ());
+  void testSeek ()
+  {
+    CPPUNIT_ASSERT_EQUAL (openHelper (), 0);
+    CPPUNIT_ASSERT_EQUAL (tfile->seek (1), 0);
+    CPPUNIT_ASSERT_EQUAL (tfile->getSeek (), 1ul);
   }
 
   void testTruncate ()
@@ -108,9 +133,7 @@ public:
 
     CPPUNIT_ASSERT_EQUAL (FilesUtility::deleteFile (fname.c_str ()), 0);
 
-    CPPUNIT_ASSERT_EQUAL (tfile->openFile (fname.c_str (), File::WRITE |
-                                           File::READ |
-                                           File::FILE_CREATE_ALWAYS), 0);
+    CPPUNIT_ASSERT_EQUAL (openHelper (), 0);
 
     CPPUNIT_ASSERT_EQUAL (tfile->getFileSize (), 0ul);
 



commit ecf366a65e3c2c49a9731bb99b82d70e72aecfb2
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Nov 9 11:22:34 2009 +0100

    Add new class MemBufFile and relative tests.
    
    It wraps the File interface around a MemBuf object.

diff --git a/myserver/include/base/files_cache/Makefile.am b/myserver/include/base/files_cache/Makefile.am
index fb3abf4..9b53545 100644
--- a/myserver/include/base/files_cache/Makefile.am
+++ b/myserver/include/base/files_cache/Makefile.am
@@ -1,4 +1,5 @@
 files_cacheincludedir=$(includedir)/myserver/include/base/files_cache
-files_cacheinclude_HEADERS = cached_file_buffer.h cached_file_factory.h cached_file.h
+files_cacheinclude_HEADERS = cached_file_buffer.h cached_file_factory.h \
+			     cached_file.h membuf_file.h
 SUBDIRS =
 
diff --git a/myserver/include/base/files_cache/cached_file.h b/myserver/include/base/files_cache/cached_file.h
index 8530d02..596e6e0 100644
--- a/myserver/include/base/files_cache/cached_file.h
+++ b/myserver/include/base/files_cache/cached_file.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2006, 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/>.
+  MyServer
+  Copyright (C) 2006, 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/>.
 */
 
 #ifndef CACHED_FILE_H
@@ -30,29 +30,29 @@ using namespace std;
 class CachedFile : public File
 {
 public:
-	CachedFile (CachedFileBuffer* buffer);
-	virtual Handle getHandle ();
-	virtual int setHandle (Handle);
-	virtual int read (char* ,u_long ,u_long* );
-	virtual int writeToFile (const char* ,u_long ,u_long* );
-	virtual int createTemporaryFile (const char* );
-
-	virtual int openFile (const char*, u_long );
+  CachedFile (CachedFileBuffer* buffer);
+  virtual Handle getHandle ();
+  virtual int setHandle (Handle);
+  virtual int read (char* ,u_long ,u_long* );
+  virtual int writeToFile (const char* ,u_long ,u_long* );
+  virtual int createTemporaryFile (const char* );
+
+  virtual int openFile (const char*, u_long );
   virtual int openFile (string const &file, u_long opt)
-    {return openFile (file.c_str (), opt);}
+  {return openFile (file.c_str (), opt);}
 
-	virtual u_long getFileSize ();
-	virtual int seek (u_long);
+  virtual u_long getFileSize ();
+  virtual int seek (u_long);
 
-	virtual int operator =(CachedFile);
-	virtual int close ();
+  virtual int operator =(CachedFile);
+  virtual int close ();
 
   virtual int fastCopyToSocket (Socket *dest, u_long offset,
                                 MemBuf *buf, u_long *nbw);
 
   virtual int write (const char* buffer, u_long len, u_long *nbw);
 protected:
-	u_long fseek;
-	CachedFileBuffer* buffer;
+  u_long fseek;
+  CachedFileBuffer* buffer;
 };
 #endif
diff --git a/myserver/include/base/files_cache/membuf_file.h b/myserver/include/base/files_cache/membuf_file.h
new file mode 100644
index 0000000..6fc4a27
--- /dev/null
+++ b/myserver/include/base/files_cache/membuf_file.h
@@ -0,0 +1,59 @@
+/* -*- mode: c++ -*- */
+/*
+  MyServer
+  Copyright (C) 2006, 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/>.
+*/
+
+#ifndef MEMBUF_FILE_H
+# define MEMBUF_FILE_H
+
+# include "stdafx.h"
+# include <include/filter/stream.h>
+# include <include/base/file/file.h>
+# include <string>
+
+# include <include/base/mem_buff/mem_buff.h>
+
+using namespace std;
+
+class MemBufFile : public File
+{
+public:
+  MemBufFile (MemBuf* buffer);
+  virtual Handle getHandle ();
+  virtual int setHandle (Handle);
+  virtual int read (char* ,u_long ,u_long*);
+  virtual int writeToFile (const char* ,u_long ,u_long*);
+  virtual int createTemporaryFile (const char*);
+
+  virtual int openFile (const char*, u_long);
+  virtual int openFile (string const &file, u_long opt)
+  {return openFile (file.c_str (), opt);}
+
+  virtual u_long getFileSize ();
+  virtual int seek (u_long);
+
+  virtual int close ();
+
+  virtual int fastCopyToSocket (Socket *dest, u_long offset,
+                                MemBuf *buf, u_long *nbw);
+
+  virtual u_long getSeek ();
+  virtual int write (const char* buffer, u_long len, u_long *nbw);
+protected:
+  u_long fseek;
+  MemBuf *buffer;
+};
+#endif
diff --git a/myserver/src/base/files_cache/Makefile.am b/myserver/src/base/files_cache/Makefile.am
index 0e78be2..10e9526 100644
--- a/myserver/src/base/files_cache/Makefile.am
+++ b/myserver/src/base/files_cache/Makefile.am
@@ -1,5 +1,6 @@
 lib_LIBRARIES = libfiles_cache.a
-libfiles_cache_a_SOURCES = cached_file_buffer.cpp cached_file.cpp cached_file_factory.cpp
+libfiles_cache_a_SOURCES = cached_file_buffer.cpp cached_file.cpp \
+			   cached_file_factory.cpp membuf_file.cpp
 SUBDIRS =
 AM_CPPFLAGS = $(all_includes)
 
diff --git a/myserver/src/base/files_cache/cached_file.cpp b/myserver/src/base/files_cache/cached_file.cpp
index c640298..70fa57f 100644
--- a/myserver/src/base/files_cache/cached_file.cpp
+++ b/myserver/src/base/files_cache/cached_file.cpp
@@ -1,18 +1,18 @@
 /*
-MyServer
-Copyright (C) 2006, 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/>.
+  MyServer
+  Copyright (C) 2006, 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/>.
 */
 
 
diff --git a/myserver/src/base/files_cache/membuf_file.cpp b/myserver/src/base/files_cache/membuf_file.cpp
new file mode 100644
index 0000000..560ac39
--- /dev/null
+++ b/myserver/src/base/files_cache/membuf_file.cpp
@@ -0,0 +1,165 @@
+/*
+  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 "stdafx.h"
+#include <include/base/utility.h>
+#include <include/base/string/stringutils.h>
+#include <include/base/file/files_utility.h>
+#include <include/base/files_cache/membuf_file.h>
+
+#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>
+}
+#endif
+
+#include <string>
+#include <sstream>
+
+using namespace std;
+
+MemBufFile::MemBufFile (MemBuf* buffer)
+{
+  this->buffer = buffer;
+  fseek = 0;
+}
+
+/*!
+  \see File#getHandle.
+*/
+Handle MemBufFile::getHandle ()
+{
+  return (Handle) -1;
+}
+
+/*!
+  \see File#setHandle.
+*/
+int MemBufFile::setHandle (Handle)
+{
+  return -1;
+}
+
+/*!
+  \see File#read.
+*/
+int MemBufFile::read (char *data, u_long len, u_long *nbr)
+{
+  const char *buf = buffer->getBuffer ();
+
+  *nbr = min (len, buffer->getLength () - fseek);
+  if (*nbr)
+    memcpy (data, buf, *nbr);
+
+  fseek += *nbr;
+
+  return 0;
+}
+
+/*!
+  \see File#writeToFile.
+*/
+int MemBufFile::writeToFile (const char *data, u_long len, u_long *nbw)
+{
+  u_long initialSize = buffer->getLength ();
+  buffer->addBuffer (data, len);
+
+  fseek += *nbw = buffer->getLength () - initialSize;
+  return 0;
+}
+
+/*!
+  \see File#createTemporaryFile.
+*/
+int MemBufFile::createTemporaryFile (const char*)
+{
+  return -1;
+}
+
+
+/*!
+  \see File#openFile.
+*/
+int MemBufFile::openFile (const char*, u_long)
+{
+  return -1;
+}
+
+/*!
+  \see File#getFileSize.
+*/
+u_long MemBufFile::getFileSize ()
+{
+  return buffer->getLength ();
+}
+
+/*!
+  \see File#seek.
+*/
+int MemBufFile::seek (u_long newSeek)
+{
+  fseek = newSeek;
+  return 0;
+}
+
+/*!
+  \see File#close.
+*/
+int MemBufFile::close ()
+{
+  return 0;
+}
+
+/*!
+  \see File#fastCopyToSocket.
+*/
+int MemBufFile::fastCopyToSocket (Socket *dest, u_long offset,
+                                  MemBuf *buf, u_long *nbw)
+{
+  const char *data = buffer->getBuffer ();
+  u_long toWrite = buffer->getLength () - offset;
+
+  return dest->write (data, toWrite, nbw);
+}
+
+/*!
+  \see File#write.
+*/
+int MemBufFile::write (const char* buffer, u_long len, u_long *nbw)
+{
+  return writeToFile (buffer, len, nbw);
+}
+
+/*!
+  \see File#getSeek.
+*/
+u_long MemBufFile::getSeek ()
+{
+  return fseek;
+}
diff --git a/myserver/tests/Makefile.am b/myserver/tests/Makefile.am
index da07db4..50c05a3 100644
--- a/myserver/tests/Makefile.am
+++ b/myserver/tests/Makefile.am
@@ -1,26 +1,65 @@
-# makefile for MyServer tests suite driver program
-#
-
 bin_PROGRAMS = tests_suite
-tests_suite_SOURCES = main.cpp test_auth_domain.cpp test_auth_method.cpp \
-  test_base64.cpp test_bitvec.cpp test_cached_file_buffer.cpp \
-	test_cached_file.cpp test_cached_file_factory.cpp test_crypt_algo_manager.cpp \
-	test_connection.cpp test_connections_scheduler.cpp test_file.cpp \
-	test_file_stream.cpp test_file_stream_creator.cpp test_files_utility.cpp \
-	test_filter_chain.cpp test_fork_server.cpp test_ftp.cpp test_gzip.cpp \
-	test_hashmap.cpp test_homedir.cpp test_http_req_security_domain.cpp \
-	test_http_request.cpp test_http_response.cpp test_ip.cpp \
-	test_log_manager.cpp test_log_stream_factory.cpp test_md5.cpp \
-	test_mem_buff.cpp test_mem_stream.cpp test_mime_manager.cpp \
-	test_multicast.cpp test_mutex.cpp test_nodetree.cpp test_pipe.cpp \
-	test_plugin_info.cpp test_read_directory.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_sha1.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_main_configuration.cpp test_xml_validator.cpp 
+tests_suite_SOURCES =  	main.cpp				\
+			test_auth_domain.cpp			\
+			test_auth_method.cpp			\
+			test_base64.cpp				\
+			test_bitvec.cpp				\
+			test_cached_file.cpp			\
+			test_cached_file_buffer.cpp		\
+			test_cached_file_factory.cpp		\
+			test_connection.cpp			\
+			test_connections_scheduler.cpp		\
+			test_crypt_algo_manager.cpp		\
+			test_file.cpp				\
+			test_file_stream.cpp			\
+			test_file_stream_creator.cpp		\
+			test_files_utility.cpp			\
+			test_filter_chain.cpp			\
+			test_fork_server.cpp			\
+			test_ftp.cpp				\
+			test_gzip.cpp				\
+			test_hashmap.cpp			\
+			test_homedir.cpp			\
+			test_http_req_security_domain.cpp	\
+			test_http_request.cpp			\
+			test_http_response.cpp			\
+			test_ip.cpp				\
+			test_log_manager.cpp			\
+			test_log_stream_factory.cpp		\
+			test_md5.cpp				\
+			test_mem_buff.cpp			\
+			test_mem_stream.cpp			\
+			test_membuf_file.cpp			\
+			test_mime_manager.cpp			\
+			test_multicast.cpp			\
+			test_mutex.cpp				\
+			test_nodetree.cpp			\
+			test_pipe.cpp				\
+			test_plugin_info.cpp			\
+			test_read_directory.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_sha1.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_main_configuration.cpp		\
+			test_xml_validator.cpp
 
 tests_suite_LDADD = ../src/libmyserver.a  ../lib/libgnu.a $(CPPUNIT_LDFLAGS) \
 	$(PTHREAD_LIB) 	$(IDN_LIB) $(XNET_LIB) $(EVENT_LIB) $(DL_LIB) $(SSL_LIB) \
diff --git a/myserver/tests/test_membuf_file.cpp b/myserver/tests/test_membuf_file.cpp
new file mode 100644
index 0000000..922b721
--- /dev/null
+++ b/myserver/tests/test_membuf_file.cpp
@@ -0,0 +1,129 @@
+/*
+ MyServer
+ 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
+ (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"
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+
+#include "../include/base/utility.h"
+#include "../include/base/file/file.h"
+#include "../include/base/file/files_utility.h"
+#include "include/base/files_cache/membuf_file.h"
+
+#include <string.h>
+#include <unistd.h>
+#include <string>
+
+using namespace std;
+
+class TestMembufFile : public CppUnit::TestFixture
+{
+  MemBuf *memBuf;
+  MemBufFile *tfile;
+
+  CPPUNIT_TEST_SUITE ( TestMembufFile );
+  CPPUNIT_TEST (testCreateTemporaryMembufFile);
+  CPPUNIT_TEST (testClose);
+  CPPUNIT_TEST (testOpenFile);
+  CPPUNIT_TEST (testWrite);
+  CPPUNIT_TEST (testRead);
+  CPPUNIT_TEST (testHandle);
+  CPPUNIT_TEST (testSeek);
+  CPPUNIT_TEST_SUITE_END ();
+
+public:
+  void setUp ()
+  {
+    memBuf = new MemBuf ();
+    tfile = new MemBufFile (memBuf);
+  }
+
+  void tearDown ()
+  {
+    delete tfile;
+    delete memBuf;
+  }
+
+  void testHandle ()
+  {
+    Handle handle = (Handle) 1;
+    CPPUNIT_ASSERT_EQUAL (tfile->getHandle (), -1);
+    CPPUNIT_ASSERT_EQUAL (tfile->setHandle (handle), -1);
+    CPPUNIT_ASSERT_EQUAL (tfile->getHandle (), -1);
+  }
+
+  void testCreateTemporaryMembufFile ()
+  {
+    CPPUNIT_ASSERT_EQUAL (tfile->createTemporaryFile ("foo.dat"), -1);
+  }
+
+  void testClose ()
+  {
+    CPPUNIT_ASSERT_EQUAL (tfile->close (), 0);
+  }
+
+  void testOpenFile ()
+  {
+    const char *file = "tmp.dat";
+    CPPUNIT_ASSERT_EQUAL (tfile->openFile (file, File::WRITE
+                                           | File::READ
+                                           | File::FILE_CREATE_ALWAYS), -1);
+  }
+
+  void testWrite ()
+  {
+    const char *data = "hello dudes";
+    u_long len = strlen (data);
+    u_long nbw;
+
+    CPPUNIT_ASSERT_EQUAL (tfile->getSeek (), 0UL);
+    CPPUNIT_ASSERT_EQUAL (tfile->write (data, len, &nbw), 0);
+    CPPUNIT_ASSERT_EQUAL (len, nbw);
+    CPPUNIT_ASSERT_EQUAL (tfile->getSeek (), nbw);
+  }
+
+  void testRead ()
+  {
+    char buffer[512];
+    const char *data = "hello dudes";
+    u_long len = strlen (data);
+    u_long nbw, nbr;
+
+    tfile->read (buffer, len, &nbr);
+    CPPUNIT_ASSERT_EQUAL (nbr, 0UL);
+    CPPUNIT_ASSERT_EQUAL (tfile->write (data, len, &nbw), 0);
+    CPPUNIT_ASSERT_EQUAL (tfile->getSeek (), nbw);
+
+    CPPUNIT_ASSERT_EQUAL (tfile->seek (0), 0);
+    CPPUNIT_ASSERT_EQUAL (tfile->read (buffer, 512, &nbr), 0);
+    CPPUNIT_ASSERT_EQUAL (nbr, nbw);
+  }
+
+  void testSeek ()
+  {
+    u_long seek = 12L;
+    CPPUNIT_ASSERT_EQUAL (tfile->getSeek (), 0UL);
+    CPPUNIT_ASSERT_EQUAL (tfile->seek (seek), 0);
+    CPPUNIT_ASSERT_EQUAL (tfile->getSeek (), seek);
+  }
+
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION (TestMembufFile);

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

Summary of changes:
 myserver/include/base/files_cache/Makefile.am   |    3 +-
 myserver/include/base/files_cache/cached_file.h |   58 ++++----
 myserver/include/base/files_cache/membuf_file.h |   59 ++++++++
 myserver/src/base/files_cache/Makefile.am       |    3 +-
 myserver/src/base/files_cache/cached_file.cpp   |   28 ++--
 myserver/src/base/files_cache/membuf_file.cpp   |  165 +++++++++++++++++++++++
 myserver/tests/Makefile.am                      |   83 +++++++++---
 myserver/tests/test_file.cpp                    |  101 +++++++++------
 myserver/tests/test_membuf_file.cpp             |  129 ++++++++++++++++++
 9 files changed, 523 insertions(+), 106 deletions(-)
 create mode 100644 myserver/include/base/files_cache/membuf_file.h
 create mode 100644 myserver/src/base/files_cache/membuf_file.cpp
 create mode 100644 myserver/tests/test_membuf_file.cpp


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Mon Nov 09 06:56:39 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N7SrO-0001YD-UO
	for mharc-myserver-commit@gnu.org; Mon, 09 Nov 2009 06:56:38 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N7SrN-0001Wb-5R
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 06:56:37 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N7SrK-0001Vf-Sy
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 06:56:36 -0500
Received: from [199.232.76.173] (port=52263 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N7SrK-0001Vc-MF
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 06:56:34 -0500
Received: from savannah.gnu.org ([199.232.41.3]:45862 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 1N7SrK-0003Lq-2Z
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 06:56:34 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N7SrJ-0000pO-7h
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 11:56:33 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N7SrI-0000ov-JN
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 11:56:33 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 5d7ee855ce1a420c81922e9d6c53ed479fcdef5c
X-Git-Newrev: 0230b189f7ef5e8b8869c756f3648b081a017816
Message-Id: <E1N7SrI-0000ov-JN@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Mon, 09 Nov 2009 11:56:32 +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. 0_9-392-g0230b18
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, 09 Nov 2009 11:56: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  0230b189f7ef5e8b8869c756f3648b081a017816 (commit)
      from  5d7ee855ce1a420c81922e9d6c53ed479fcdef5c (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 0230b189f7ef5e8b8869c756f3648b081a017816
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Nov 9 12:56:26 2009 +0100

    Add test case for `File::fastCopyToSocket'.

diff --git a/myserver/include/base/socket_pair/socket_pair.h b/myserver/include/base/socket_pair/socket_pair.h
index 68d7703..94e5e86 100644
--- a/myserver/include/base/socket_pair/socket_pair.h
+++ b/myserver/include/base/socket_pair/socket_pair.h
@@ -1,19 +1,19 @@
 /* -*- 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/>.
+  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 SOCKET_PAIR_H
@@ -30,21 +30,21 @@ using namespace std;
 class SocketPair : public Socket
 {
 public:
-	SocketPair ();
-	int create ();
-	SocketHandle getFirstHandle ();
-	SocketHandle getSecondHandle ();
-
-	void inverted (SocketPair&);
-	virtual int close ();
-	void closeFirstHandle ();
-	void closeSecondHandle ();
+  SocketPair ();
+  int create ();
+  SocketHandle getFirstHandle ();
+  SocketHandle getSecondHandle ();
+
+  void inverted (SocketPair&);
+  virtual int close ();
+  void closeFirstHandle ();
+  void closeSecondHandle ();
   void setNonBlocking (bool blocking);
 
   int readHandle (Handle*);
   int writeHandle (Handle);
 
 protected:
-	SocketHandle handles[2];
+  SocketHandle handles[2];
 };
 #endif
diff --git a/myserver/tests/test_socket_pair.cpp b/myserver/tests/test_socket_pair.cpp
index fbde66b..fbae256 100644
--- a/myserver/tests/test_socket_pair.cpp
+++ b/myserver/tests/test_socket_pair.cpp
@@ -23,8 +23,13 @@
 #include <cppunit/ui/text/TestRunner.h>
 #include <cppunit/extensions/HelperMacros.h>
 
+#include "../include/base/file/file.h"
+#include "../include/base/file/files_utility.h"
+
 #include <string.h>
 
+using namespace std;
+
 class TestSocketPair : public CppUnit::TestFixture
 {
   CPPUNIT_TEST_SUITE ( TestSocketPair );
@@ -55,6 +60,47 @@ public:
 
     sp.close ();
   }
+  /* FIXME: generalize for other classes that inherit from File.  */
+  void testFastCopyToSocket ()
+  {
+    const u_long bsize = 512UL;
+    SocketPair sp;
+    SocketPair inverted;
+    sp.create ();
+    sp.inverted (inverted);
+
+    char inputBuffer[bsize];
+    char outputBuffer[bsize];
+    File file;
+    string fname;
+    u_long nbw;
+
+    for (int i = 0; i < bsize; i++)
+      {
+        inputBuffer[i] = '\0';
+        outputBuffer[i] = i + 1;
+      }
+
+    FilesUtility::temporaryFileName (0, fname);
+    file.openFile (fname.c_str (), File::WRITE | File::READ
+                   | File::FILE_CREATE_ALWAYS);
+    file.writeToFile (outputBuffer, bsize, &nbw);
+    file.seek (0);
+
+    MemBuf buf;
+    CPPUNIT_ASSERT_EQUAL (file.fastCopyToSocket (&sp, 0, &buf, &nbw), 0);
+    CPPUNIT_ASSERT_EQUAL (nbw, bsize);
+
+    u_long nbr;
+    inverted.read (inputBuffer, bsize, &nbr);
+    CPPUNIT_ASSERT_EQUAL (nbr, bsize);
+
+    for (int i = 0; i < bsize; i++)
+      CPPUNIT_ASSERT_EQUAL (inputBuffer[i], outputBuffer[i]);
+
+    file.close ();
+    sp.close ();
+  }
 
   void testCreateClose ()
   {

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

Summary of changes:
 myserver/include/base/socket_pair/socket_pair.h |   48 +++++++++++-----------
 myserver/tests/test_socket_pair.cpp             |   46 ++++++++++++++++++++++
 2 files changed, 70 insertions(+), 24 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Mon Nov 09 07:20:49 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N7TEn-0001rG-PY
	for mharc-myserver-commit@gnu.org; Mon, 09 Nov 2009 07:20:49 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N7TEl-0001r3-Fg
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 07:20:47 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N7TEk-0001qj-Oa
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 07:20:46 -0500
Received: from [199.232.76.173] (port=39159 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N7TEk-0001qg-Jv
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 07:20:46 -0500
Received: from savannah.gnu.org ([199.232.41.3]:46221 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 1N7TEk-00076n-AY
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 07:20:46 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N7TEi-0002Cy-74
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 12:20:44 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N7TEb-0002CO-U6
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 12:20:42 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 0230b189f7ef5e8b8869c756f3648b081a017816
X-Git-Newrev: b3ce811ebb6c7fbaa1a32e992aed2fcbf525ca0f
Message-Id: <E1N7TEb-0002CO-U6@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Mon, 09 Nov 2009 12:20:39 +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. 0_9-394-gb3ce811
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, 09 Nov 2009 12:20:48 -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  b3ce811ebb6c7fbaa1a32e992aed2fcbf525ca0f (commit)
       via  7cf367d44af806b6ffb46d5b9931be7738674161 (commit)
      from  0230b189f7ef5e8b8869c756f3648b081a017816 (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 b3ce811ebb6c7fbaa1a32e992aed2fcbf525ca0f
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Nov 9 13:19:35 2009 +0100

    The ReadDirectory class does not expose the inner stat struct.

diff --git a/myserver/include/base/read_directory/read_directory.h b/myserver/include/base/read_directory/read_directory.h
index 794cc61..e8552a4 100644
--- a/myserver/include/base/read_directory/read_directory.h
+++ b/myserver/include/base/read_directory/read_directory.h
@@ -63,32 +63,29 @@ public:
   int attrib;
   time_t time_write;
   off_t size;
+# ifdef WIN32
+  u_long st_nlink;
+# else
+  nlink_t st_nlink;
+#endif
+
   int findfirst (const char *directory);
-  int findfirst (string &directory){return findfirst (directory.c_str ());};
+  int findfirst (string &directory) {return findfirst (directory.c_str ());};
   int findnext ();
   int findclose ();
   ReadDirectory ();
   ~ReadDirectory ();
 
-  struct stat* getStatStruct ()
-  {
-# ifndef WIN32
-    return &stats;
-# else
-    return NULL;
-# endif
-  }
-
 private:
   int find (const char *filename);
   string dirName;
+
 # ifdef WIN32
-	_finddata_t fd;
+  _finddata_t fd;
   intptr_t  ff;
 # else
   DIR *dh;
   struct stat stats;
-
 #  ifdef HAVE_READDIR_R
   struct dirent entry;
 #  else
diff --git a/myserver/src/base/read_directory/read_directory.cpp b/myserver/src/base/read_directory/read_directory.cpp
index 8b4d984..20d41eb 100644
--- a/myserver/src/base/read_directory/read_directory.cpp
+++ b/myserver/src/base/read_directory/read_directory.cpp
@@ -118,11 +118,13 @@ int ReadDirectory::find (const char *filename)
       name = fd.name;
       attrib = fd.attrib;
       time_write = fd.time_write;
-      size = fd.size ;
+      size = fd.size;
+      st_nlink = 1UL;
     }
-
   return 0;
+
 #else
+
    struct dirent * dirInfo;
 
    if (filename)
@@ -136,7 +138,6 @@ int ReadDirectory::find (const char *filename)
        if (dh == NULL)
          return -1;
      }
-
    errno = 0;
 # ifdef HAVE_READDIR_R
    if (readdir_r (dh, &entry, &dirInfo) || !dirInfo)
@@ -174,6 +175,7 @@ int ReadDirectory::find (const char *filename)
 
    time_write = stats.st_mtime;
    size = stats.st_size;
+   st_nlink = stats.st_nlink;
    return 0;
 #endif
 }
diff --git a/myserver/src/protocol/ftp/ftp.cpp b/myserver/src/protocol/ftp/ftp.cpp
index 7596b44..20665ed 100644
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -1772,12 +1772,7 @@ Ftp::list (const std::string & sParam /*= ""*/ )
             }
 
           char nlinkStr[12];
-          memset (nlinkStr, 0, sizeof (char) * 12);
-#ifndef WIN32
-          nlink_t nlink = 1;
-          nlink = fd.getStatStruct ()->st_nlink;
-          sprintf (nlinkStr, "%lu", (u_long) nlink);
-#endif
+          sprintf (nlinkStr, "%lu", fd.st_nlink);
 
           char fdSizeStr[12];
           sprintf (fdSizeStr, "%li", fd.size);
@@ -1863,12 +1858,7 @@ Ftp::list (const std::string & sParam /*= ""*/ )
             }
 
           char nlinkStr[12];
-          memset (nlinkStr, 0, sizeof (char) * 12);
-#ifndef WIN32
-          nlink_t nlink = 1;
-          nlink = fd.getStatStruct ()->st_nlink;
-          sprintf (nlinkStr, "%lu", (u_long) nlink);
-#endif
+          sprintf (nlinkStr, "%lu", fd.st_nlink);
 
           char fdSizeStr[12];
           sprintf (fdSizeStr, "%li", fd.size);
diff --git a/myserver/src/protocol/protocol.cpp b/myserver/src/protocol/protocol.cpp
index fac51e5..e8e79c0 100644
--- a/myserver/src/protocol/protocol.cpp
+++ b/myserver/src/protocol/protocol.cpp
@@ -1,18 +1,18 @@
 /*
-MyServer
-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
-(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) 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
+  (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"
diff --git a/myserver/tests/test_read_directory.cpp b/myserver/tests/test_read_directory.cpp
index ec1209d..c38d805 100644
--- a/myserver/tests/test_read_directory.cpp
+++ b/myserver/tests/test_read_directory.cpp
@@ -48,6 +48,7 @@ public:
       {
         CPPUNIT_ASSERT (rd.name.length ());
         CPPUNIT_ASSERT (rd.attrib >= 0);
+        CPPUNIT_ASSERT (rd.st_nlink >= 1);
         CPPUNIT_ASSERT (rd.size >= 0);
         CPPUNIT_ASSERT (rd.time_write);
       }



commit 7cf367d44af806b6ffb46d5b9931be7738674161
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Nov 9 13:18:31 2009 +0100

    Add a comment.

diff --git a/myserver/src/protocol/ftp/ftp_lexer.cpp b/myserver/src/protocol/ftp/ftp_lexer.cpp
index d34da81..505ffe3 100644
--- a/myserver/src/protocol/ftp/ftp_lexer.cpp
+++ b/myserver/src/protocol/ftp/ftp_lexer.cpp
@@ -1,2 +1,3 @@
+/* We need this hack to ensure stdafx.h is include before any other file.  */
 #include "stdafx.h"
 #include "ftp_lexer.out.cpp"

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

Summary of changes:
 .../include/base/read_directory/read_directory.h   |   21 ++++++--------
 .../src/base/read_directory/read_directory.cpp     |    8 +++--
 myserver/src/protocol/ftp/ftp.cpp                  |   14 +--------
 myserver/src/protocol/ftp/ftp_lexer.cpp            |    1 +
 myserver/src/protocol/protocol.cpp                 |   28 ++++++++++----------
 myserver/tests/test_read_directory.cpp             |    1 +
 6 files changed, 32 insertions(+), 41 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Mon Nov 09 10:02:42 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N7VlS-0006US-Ko
	for mharc-myserver-commit@gnu.org; Mon, 09 Nov 2009 10:02:42 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N7VlR-0006Tz-C3
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 10:02:41 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N7VlQ-0006Tn-Ax
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 10:02:41 -0500
Received: from [199.232.76.173] (port=45413 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N7VlQ-0006Tj-6R
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 10:02:40 -0500
Received: from savannah.gnu.org ([199.232.41.3]:55672 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 1N7VlP-00034D-LN
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 10:02:39 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N7VlO-0003wd-To
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 15:02:39 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N7VlO-0003wB-CK
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 15:02:38 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: b3ce811ebb6c7fbaa1a32e992aed2fcbf525ca0f
X-Git-Newrev: d8308f65925f11a9acdaa822e625c4f833fda2af
Message-Id: <E1N7VlO-0003wB-CK@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Mon, 09 Nov 2009 15:02:38 +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. 0_9-395-gd8308f6
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, 09 Nov 2009 15:02: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  d8308f65925f11a9acdaa822e625c4f833fda2af (commit)
      from  b3ce811ebb6c7fbaa1a32e992aed2fcbf525ca0f (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 d8308f65925f11a9acdaa822e625c4f833fda2af
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Nov 9 16:02:02 2009 +0100

    Ensure the XML node child exists before try to read its value.

diff --git a/myserver/src/conf/vhost/xml_vhost_handler.cpp b/myserver/src/conf/vhost/xml_vhost_handler.cpp
index f9a5134..9d9af35 100644
--- a/myserver/src/conf/vhost/xml_vhost_handler.cpp
+++ b/myserver/src/conf/vhost/xml_vhost_handler.cpp
@@ -354,6 +354,12 @@ int XmlVhostHandler::load (const char *filename)
           XmlConf::build (lcur, vh->getHashedDataTrees (),
                           vh->getHashedData ());
 
+          if (!lcur->children || !lcur->children->content)
+            {
+              lcur = lcur->next;
+              continue;
+            }
+
           if (!xmlStrcmp (lcur->name, (const xmlChar *)"HOST"))
             {
               int useRegex = 0;
@@ -376,11 +382,10 @@ int XmlVhostHandler::load (const char *filename)
             {
               string loc (vh->getDocumentRoot ());
               loc.append ("/");
+
               for (xmlAttr *attrs = lcur->properties; attrs; attrs = attrs->next)
-                {
-                  if (!xmlStrcmp (attrs->name, (const xmlChar *)"path"))
-                    loc.append ((const char*) attrs->children->content);
-                }
+                if (!xmlStrcmp (attrs->name, (const xmlChar *)"path"))
+                  loc.append ((const char*) attrs->children->content);
 
               MimeRecord *record = XmlMimeHandler::readRecord (lcur);
               MimeRecord *prev = vh->addLocationMime (loc, record);
@@ -408,16 +413,10 @@ int XmlVhostHandler::load (const char *filename)
           else if (!xmlStrcmp (lcur->name, (const xmlChar *)"CONNECTIONS_PRIORITY"))
             {
               vh->setDefaultPriority (atoi ((const char*)lcur->children->content));
-
             }
           else if (!xmlStrcmp (lcur->name, (const xmlChar *)"SSL_PASSWORD"))
             {
-              string pw;
-              if (lcur->children)
-                pw.assign ((char*)lcur->children->content);
-              else
-                pw.assign ("");
-
+              string pw ((char*)lcur->children->content);
               sslContext->setPassword (pw);
             }
           else if (!xmlStrcmp (lcur->name, (const xmlChar *)"IP"))
@@ -427,23 +426,22 @@ int XmlVhostHandler::load (const char *filename)
 
               while (attrs)
                 {
-                  if (!xmlStrcmp (attrs->name, (const xmlChar *)"isRegex"))
-                    {
-                      if (attrs->children && attrs->children->content &&
-                          (!xmlStrcmp (attrs->children->content,
-                                      (const xmlChar *)"YES")))
-                        useRegex = 1;
-                    }
+                  if (!xmlStrcmp (attrs->name, (const xmlChar *)"isRegex")
+                      && !xmlStrcmp (attrs->children->content,
+                                     (const xmlChar *)"YES"))
+                    useRegex = 1;
+
                   attrs = attrs->next;
                 }
+
               vh->addIP ((char*)lcur->children->content, useRegex);
             }
           else if (!xmlStrcmp (lcur->name, (const xmlChar *)"PORT"))
             {
               int val = atoi ((char*)lcur->children->content);
-              if (val > (1 << 16) || strlen ((const char*)lcur->children->content) > 6)
+              if (val > (1 << 16) || val <= 0)
                 Server::getInstance ()->log (MYSERVER_LOG_MSG_ERROR,
-                       _("Specified invalid port %s"), lcur->children->content);
+                      _("Specified invalid port %s"), lcur->children->content);
               vh->setPort ((u_short)val);
             }
           else if (!xmlStrcmp (lcur->name, (const xmlChar *)"PROTOCOL"))
@@ -458,36 +456,26 @@ int XmlVhostHandler::load (const char *filename)
             }
           else if (!xmlStrcmp (lcur->name, (const xmlChar *)"DOCROOT"))
             {
-              if (lcur->children && lcur->children->content)
-                {
-                  char* lastChar = (char*)lcur->children->content;
-                  while (*(lastChar+1) != '\0')
-                    lastChar++;
+              char* lastChar = (char*)lcur->children->content;
+              while (*(lastChar+1) != '\0')
+                lastChar++;
 
-                  if (*lastChar == '\\' || *lastChar == '/')
-                    *lastChar = '\0';
+              if (*lastChar == '\\' || *lastChar == '/')
+                *lastChar = '\0';
 
-                  vh->setDocumentRoot ((const char*)lcur->children->content);
-                }
-              else
-                vh->setDocumentRoot ("");
+              vh->setDocumentRoot ((const char*)lcur->children->content);
             }
           else if (!xmlStrcmp (lcur->name, (const xmlChar *)"SYSROOT"))
             {
-              if (lcur->children && lcur->children->content)
-                {
-                  char* lastChar = (char*)lcur->children->content;
+              char* lastChar = (char*)lcur->children->content;
 
-                  while (*(lastChar+1) != '\0')
-                    lastChar++;
+              while (*(lastChar+1) != '\0')
+                lastChar++;
 
-                  if (*lastChar == '\\' || *lastChar == '/')
-                    *lastChar = '\0';
+              if (*lastChar == '\\' || *lastChar == '/')
+                *lastChar = '\0';
 
-                  vh->setSystemRoot ((const char*)lcur->children->content);
-                }
-              else
-                vh->setSystemRoot ("");
+              vh->setSystemRoot ((const char*)lcur->children->content);
             }
           else if (!xmlStrcmp (lcur->name, (const xmlChar *)"ACCESSLOG"))
             {
@@ -507,35 +495,33 @@ int XmlVhostHandler::load (const char *filename)
                     hnd.assign((const char*) attrs->children->content);
                 }
 
-              if (lcur->children)
-                {
-                  const char *filename = (const char*)lcur->children->content;
-                  MimeManagerHandler *handler =
-                    Server::getInstance ()->getMimeManager ()->buildHandler (hnd);
+              const char *filename = (const char*)lcur->children->content;
+              MimeManagerHandler *handler =
+                Server::getInstance ()->getMimeManager ()->buildHandler (hnd);
 
-                  try
-                    {
-                      handler->load (filename);
-                    }
-                  catch (...)
-                    {
-                      delete handler;
-                      handler = NULL;
-                      Server::getInstance ()->log (MYSERVER_LOG_MSG_ERROR,
-                                       _("Error loading mime types file: %s"),
-                                                   filename);
+              try
+                {
+                  handler->load (filename);
+                }
+              catch (...)
+                {
+                  delete handler;
+                  handler = NULL;
+                  Server::getInstance ()->log (MYSERVER_LOG_MSG_ERROR,
+                                         _("Error loading mime types file: %s"),
+                                               filename);
 
-                    }
-                  vh->setMimeHandler (handler);
                 }
+              vh->setMimeHandler (handler);
             }
           else if (!xmlStrcmp (lcur->name, (const xmlChar *)"THROTTLING_RATE"))
             {
-              vh->setThrottlingRate ((u_long)atoi ((char*)lcur->children->content));
+              u_long rate = (u_long)atoi ((char*)lcur->children->content);
+              vh->setThrottlingRate (rate);
             }
 
           lcur = lcur->next;
-        }// while (lcur)
+        }/* while (lcur)  */
 
       if (vh->openLogFiles ())
         {

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

Summary of changes:
 myserver/src/conf/vhost/xml_vhost_handler.cpp |  110 +++++++++++--------------
 1 files changed, 48 insertions(+), 62 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Mon Nov 09 10:50:09 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N7WVN-0000Xa-8m
	for mharc-myserver-commit@gnu.org; Mon, 09 Nov 2009 10:50:09 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N7WVL-0000Wg-GO
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 10:50:07 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N7WVC-0000Sc-GD
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 10:50:06 -0500
Received: from [199.232.76.173] (port=54919 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N7WVC-0000SN-7T
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 10:49:58 -0500
Received: from savannah.gnu.org ([199.232.41.3]:38216 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 1N7WV6-0004KQ-DO
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 10:49:55 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N7WV5-0006tD-1F
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 15:49:51 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N7WV4-0006sg-NG
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 15:49:50 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: d8308f65925f11a9acdaa822e625c4f833fda2af
X-Git-Newrev: f4d8d8a3011332a400b96629f8fdec658377b2a9
Message-Id: <E1N7WV4-0006sg-NG@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Mon, 09 Nov 2009 15:49:50 +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. 0_9-397-gf4d8d8a
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, 09 Nov 2009 15:50:07 -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  f4d8d8a3011332a400b96629f8fdec658377b2a9 (commit)
       via  1fc0de47e41cada1092798f9ea87ea7925ec5642 (commit)
      from  d8308f65925f11a9acdaa822e625c4f833fda2af (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 f4d8d8a3011332a400b96629f8fdec658377b2a9
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Nov 9 16:49:09 2009 +0100

    Remove a not-used method.

diff --git a/myserver/include/conf/security/security_cache.h b/myserver/include/conf/security/security_cache.h
index cfde7a1..332c75d 100644
--- a/myserver/include/conf/security/security_cache.h
+++ b/myserver/include/conf/security/security_cache.h
@@ -47,14 +47,11 @@ public:
                         const char* secName = ".security.xml", u_long maxSize = 0);
   int getSecurityFile (const string &file, const string &sys,
                        string &out, const char* secName = ".security.xml");
-
-  /////////OLD NASTY AND DISGUSTING.  TEMPORARY SOLUTION TO DON'T BREAK APIs////////////////////////////////////
-  int getPermissionMask (SecurityToken* st){return 0;}
   int getErrorFileName (const char *root, int error,
                         const char* sysdirectory, string& out){return 0;}
 private:
 
-  /*! Store a list of opened files using a hash dictionary.  */
+  /* Store a list of opened files using a hash dictionary.  */
   HashMap<string, XmlParser*> dictionary;
   int limit;
 };



commit 1fc0de47e41cada1092798f9ea87ea7925ec5642
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Nov 9 16:42:46 2009 +0100

    Mass update: reindent .h files.

diff --git a/myserver/include/base/base64/mime_utils.h b/myserver/include/base/base64/mime_utils.h
index a4be1f7..885cd21 100644
--- a/myserver/include/base/base64/mime_utils.h
+++ b/myserver/include/base/base64/mime_utils.h
@@ -25,27 +25,27 @@
 class CBase64Utils
 {
 private:
-	int ErrorCode;
+  int ErrorCode;
 public:
-	int GetLastError () {return ErrorCode;};
-	CBase64Utils ();
-	~CBase64Utils ();
-	char* decode (const char *in, int *bufsize);
-	char* encode (const char *in, int bufsize);
+  int GetLastError () {return ErrorCode;};
+  CBase64Utils ();
+  ~CBase64Utils ();
+  char* decode (const char *in, int *bufsize);
+  char* encode (const char *in, int bufsize);
   char* mimeDecodeMailHeaderField (char *s);
 };
 
 class CQPUtils
 {
 private:
-	char* expandBuffer (char *buffer, int UsedSize, int *BufSize, int SingleChar = 1);
-	int ErrorCode;
+  char* expandBuffer (char *buffer, int UsedSize, int *BufSize, int SingleChar = 1);
+  int ErrorCode;
 public:
-	int getLastError () {return ErrorCode;};
-	char* encode (char*in);
-	char* decode (char*in);
-	CQPUtils ();
-	~CQPUtils ();
+  int getLastError () {return ErrorCode;};
+  char* encode (char*in);
+  char* decode (char*in);
+  CQPUtils ();
+  ~CQPUtils ();
 };
 
 #endif
diff --git a/myserver/include/base/bitvec/bitvec.h b/myserver/include/base/bitvec/bitvec.h
index f382802..97c9298 100644
--- a/myserver/include/base/bitvec/bitvec.h
+++ b/myserver/include/base/bitvec/bitvec.h
@@ -1,19 +1,19 @@
 /* -*- 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/>.
+  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 BITVEC_H
diff --git a/myserver/include/base/dynamic_lib/dynamiclib.h b/myserver/include/base/dynamic_lib/dynamiclib.h
index 3574175..65c5cf8 100644
--- a/myserver/include/base/dynamic_lib/dynamiclib.h
+++ b/myserver/include/base/dynamic_lib/dynamiclib.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2005, 2007, 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/>.
+  MyServer
+  Copyright (C) 2005, 2007, 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 DYNAMICLIBRARY_H
@@ -43,9 +43,9 @@ public:
   int loadLibrary (const char* filename, int globally=0);
   void* getProc (const char*);
   int close ();
-	const char* getFileName (){return fileName.c_str ();}
+  const char* getFileName (){return fileName.c_str ();}
 private:
-	string fileName;
+  string fileName;
   void *handle;
 
 };
diff --git a/myserver/include/base/file/file.h b/myserver/include/base/file/file.h
index 1463c25..861130a 100644
--- a/myserver/include/base/file/file.h
+++ b/myserver/include/base/file/file.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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) 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
+  (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 FILE_H
@@ -52,7 +52,7 @@ public:
 
   virtual int openFile (const char*, u_long );
   virtual int openFile (string const &file, u_long opt)
-    {return openFile (file.c_str (), opt);}
+  {return openFile (file.c_str (), opt);}
 
   virtual u_long getFileSize ();
   virtual int seek (u_long);
@@ -64,7 +64,7 @@ public:
   virtual const char *getFilename ();
   virtual int setFilename (const char*);
   virtual int setFilename (string const &name)
-    {return setFilename (name.c_str ());}
+  {return setFilename (name.c_str ());}
 
   virtual int operator =(File);
   virtual int close ();
diff --git a/myserver/include/base/file/files_utility.h b/myserver/include/base/file/files_utility.h
index 9b28de0..82866a5 100644
--- a/myserver/include/base/file/files_utility.h
+++ b/myserver/include/base/file/files_utility.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2006, 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/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2006, 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/>.
 */
 
 #ifndef FILES_UTILITY_H
@@ -39,19 +39,19 @@ public:
 
   static time_t getLastModTime (const char *filename);
   static time_t getLastModTime (string const &filename)
-    {return getLastModTime (filename.c_str ());}
+  {return getLastModTime (filename.c_str ());}
 
   static time_t getCreationTime (const char *filename);
   static time_t getCreationTime (string const &filename)
-    {return getCreationTime (filename.c_str ());}
+  {return getCreationTime (filename.c_str ());}
 
   static time_t getLastAccTime (const char *filename);
   static time_t getLastAccTime (string const &filename)
-    {return getLastAccTime (filename.c_str ());}
+  {return getLastAccTime (filename.c_str ());}
 
   static int chown (const char* filename, string &uid, string &gid);
   static int chown (string const &filename, string &uid, string &gid)
-    {return chown (filename.c_str (), uid, gid);}
+  {return chown (filename.c_str (), uid, gid);}
 
   static int completePath (char**, int *size, int dontRealloc=0);
   static int completePath (string &fileName);
@@ -66,15 +66,15 @@ public:
 
   static int fileExists (const char * );
   static int fileExists (string const &file)
-    {return fileExists (file.c_str ());}
+  {return fileExists (file.c_str ());}
 
   static int deleteFile (const char * );
   static int deleteFile (string const &file)
-    {return deleteFile (file.c_str ());}
+  {return deleteFile (file.c_str ());}
 
-    static int renameFile (const char*, const char*);
+  static int renameFile (const char*, const char*);
   static int renameFile (string const &before, string const &after)
-    {return renameFile (before.c_str (), after.c_str ());}
+  {return renameFile (before.c_str (), after.c_str ());}
 
   static int copyFile (const char*, const char*, int overwrite);
   static int copyFile (File&, File&);
@@ -106,6 +106,6 @@ public:
   static void setTmpPath (string & path){tmpPath.assign (path);}
 
 private:
-	static string tmpPath;
+  static string tmpPath;
 };
 #endif
diff --git a/myserver/include/base/files_cache/cached_file_buffer.h b/myserver/include/base/files_cache/cached_file_buffer.h
index 4e9de07..4d2484c 100644
--- a/myserver/include/base/files_cache/cached_file_buffer.h
+++ b/myserver/include/base/files_cache/cached_file_buffer.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2006, 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/>.
+  MyServer
+  Copyright (C) 2006, 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/>.
 */
 
 #ifndef CACHED_FILE_BUFFER_H
diff --git a/myserver/include/base/files_cache/cached_file_factory.h b/myserver/include/base/files_cache/cached_file_factory.h
index 9c0e98e..a00a93e 100644
--- a/myserver/include/base/files_cache/cached_file_factory.h
+++ b/myserver/include/base/files_cache/cached_file_factory.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2006, 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/>.
+  MyServer
+  Copyright (C) 2006, 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/>.
 */
 
 #ifndef CACHED_FILE_FACTORY_H
diff --git a/myserver/include/base/hash_map/hash_map.h b/myserver/include/base/hash_map/hash_map.h
index fe9b7f9..e8d7a06 100644
--- a/myserver/include/base/hash_map/hash_map.h
+++ b/myserver/include/base/hash_map/hash_map.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-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/>.
+  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/>.
 */
 
 //valueType putList ( const list <keyType>&, const list <valueType>&);
@@ -35,18 +35,18 @@ using namespace std;
 template <typename KeyType, typename ValueType>
 struct Shkv
 {
-	unsigned int hash;
-	KeyType key;
-	ValueType value;
+  unsigned int hash;
+  KeyType key;
+  ValueType value;
 };
 
 //hashmap Hash-Key-Value Struct
 template <typename ValueType>
 struct Shkv <char*, ValueType>
 {
-	unsigned int hash;
-	string key;
-	ValueType value;
+  unsigned int hash;
+  string key;
+  ValueType value;
 };
 
 template <typename KeyType, typename ValueType>
@@ -55,190 +55,190 @@ class HashMap;
 template <typename KeyType, typename ValueType>
 class MyIterator
 {
-	public:
-
-	template <typename KType, typename VType>
-	friend class HashMap;
-
-	MyIterator ();
-	inline KeyType getKey () const;
-
-	inline bool operator==(const MyIterator&) const;
-	inline bool operator!=(const MyIterator&) const;
-	inline ValueType& operator*() const;
-	inline MyIterator& operator++();	//prefix
-	inline MyIterator operator++(int);	//postfix
-	inline MyIterator& operator--();	//prefix
-	inline MyIterator operator--(int);	//postfix
-	//inline MyIterator operator delete (void*);
-
-	private:
-
-	unsigned int offset;
-	vector< list< Shkv<KeyType, ValueType> > > *vectorPtr;
-	typename vector <unsigned int>::iterator mapIter;
-	typename vector< list< Shkv<KeyType, ValueType> > >::iterator vectorIter;
-	typename list< Shkv<KeyType, ValueType> >::iterator listIter;
+public:
+
+  template <typename KType, typename VType>
+  friend class HashMap;
+
+  MyIterator ();
+  inline KeyType getKey () const;
+
+  inline bool operator==(const MyIterator&) const;
+  inline bool operator!=(const MyIterator&) const;
+  inline ValueType& operator*() const;
+  inline MyIterator& operator++();      //prefix
+  inline MyIterator operator++(int);    //postfix
+  inline MyIterator& operator--();      //prefix
+  inline MyIterator operator--(int);    //postfix
+  //inline MyIterator operator delete (void*);
+
+private:
+
+  unsigned int offset;
+  vector< list< Shkv<KeyType, ValueType> > > *vectorPtr;
+  typename vector <unsigned int>::iterator mapIter;
+  typename vector< list< Shkv<KeyType, ValueType> > >::iterator vectorIter;
+  typename list< Shkv<KeyType, ValueType> >::iterator listIter;
 };
 
 template <typename KeyType, typename ValueType>
 class HashMap
 {
-	public:
-
-    typedef MyIterator<KeyType, ValueType> Iterator;
-
-	HashMap ();
-	HashMap (int);
-	HashMap (const float);
-	HashMap (int, const float);
-	inline bool empty (void) const;
-	inline void clear (void);
-	inline int size (void) const;
-	inline Iterator begin (void);
-	inline Iterator back (void);
-	inline Iterator end (void);
-	ValueType remove (const Iterator&);
-	bool containsKey (const KeyType&);
-	ValueType get (const KeyType&);
-	Iterator getI (const KeyType&);
-	ValueType put (KeyType&, const ValueType&);
-	ValueType remove (const KeyType&);
-
-	private:
-
-	Iterator tempIterator;
-	Shkv<KeyType, ValueType> tempShkv;
-	vector < list < Shkv<KeyType, ValueType> > > data;
-	typename list < Shkv<KeyType, ValueType> >::iterator dataIter, tempdataIter;
-	vector <unsigned int> map;
-	unsigned int offset, tempHash;
-	int capacity, power, mask, load;
-	float highLoadFactor, lowLoadFactor;
-
-	void increaseSize (const int);
-	void decreaseSize (const int);
-	unsigned int hash (const char *, int);
+public:
+
+  typedef MyIterator<KeyType, ValueType> Iterator;
+
+  HashMap ();
+  HashMap (int);
+  HashMap (const float);
+  HashMap (int, const float);
+  inline bool empty (void) const;
+  inline void clear (void);
+  inline int size (void) const;
+  inline Iterator begin (void);
+  inline Iterator back (void);
+  inline Iterator end (void);
+  ValueType remove (const Iterator&);
+  bool containsKey (const KeyType&);
+  ValueType get (const KeyType&);
+  Iterator getI (const KeyType&);
+  ValueType put (KeyType&, const ValueType&);
+  ValueType remove (const KeyType&);
+
+private:
+
+  Iterator tempIterator;
+  Shkv<KeyType, ValueType> tempShkv;
+  vector < list < Shkv<KeyType, ValueType> > > data;
+  typename list < Shkv<KeyType, ValueType> >::iterator dataIter, tempdataIter;
+  vector <unsigned int> map;
+  unsigned int offset, tempHash;
+  int capacity, power, mask, load;
+  float highLoadFactor, lowLoadFactor;
+
+  void increaseSize (const int);
+  void decreaseSize (const int);
+  unsigned int hash (const char *, int);
 };
 
 template <typename ValueType>
 class HashMap <string, ValueType>
 {
-	public:
-
-    typedef MyIterator<string, ValueType> Iterator;
-
-	HashMap ();
-	HashMap (int);
-	HashMap (const float);
-	HashMap (int, const float);
-	inline bool empty (void) const;
-	inline void clear (void);
-	inline int size (void) const;
-	inline Iterator begin (void);
-	inline Iterator back (void);
-	inline Iterator end (void);
-	ValueType remove (const Iterator&);
-	bool containsKey (const string&);
-	ValueType get (const string&);
-	Iterator getI (const string&);
-	ValueType put (string&, const ValueType&);
-	ValueType remove (const string&);
-
-	private:
-
-	Iterator tempIterator;
-	Shkv<string, ValueType> tempShkv;
-	vector < list < Shkv<string, ValueType> > > data;
-	typename list < Shkv<string, ValueType> >::iterator dataIter, tempdataIter;
-	vector <unsigned int> map;
-	unsigned int offset, tempHash;
-	int capacity, power, mask, load;
-	float highLoadFactor, lowLoadFactor;
-
-	void increaseSize (const int);
-	void decreaseSize (const int);
-	unsigned int hash (const char *, int);
+public:
+
+  typedef MyIterator<string, ValueType> Iterator;
+
+  HashMap ();
+  HashMap (int);
+  HashMap (const float);
+  HashMap (int, const float);
+  inline bool empty (void) const;
+  inline void clear (void);
+  inline int size (void) const;
+  inline Iterator begin (void);
+  inline Iterator back (void);
+  inline Iterator end (void);
+  ValueType remove (const Iterator&);
+  bool containsKey (const string&);
+  ValueType get (const string&);
+  Iterator getI (const string&);
+  ValueType put (string&, const ValueType&);
+  ValueType remove (const string&);
+
+private:
+
+  Iterator tempIterator;
+  Shkv<string, ValueType> tempShkv;
+  vector < list < Shkv<string, ValueType> > > data;
+  typename list < Shkv<string, ValueType> >::iterator dataIter, tempdataIter;
+  vector <unsigned int> map;
+  unsigned int offset, tempHash;
+  int capacity, power, mask, load;
+  float highLoadFactor, lowLoadFactor;
+
+  void increaseSize (const int);
+  void decreaseSize (const int);
+  unsigned int hash (const char *, int);
 };
 
 template <typename ValueType>
 class HashMap <char*, ValueType>
 {
-	public:
-
-    typedef MyIterator<char*, ValueType> Iterator;
-
-	HashMap ();
-	HashMap (int);
-	HashMap (const float);
-	HashMap (int, const float);
-	inline bool empty (void) const;
-	inline void clear (void);
-	inline int size (void) const;
-	inline Iterator begin (void);
-	inline Iterator back (void);
-	inline Iterator end (void);
-	ValueType remove (const Iterator&);
-	bool containsKey (const char* const);
-	ValueType get (const char* const);
-	Iterator getI (const char* const);
-	ValueType put (char* const, const ValueType&);
-	ValueType remove (const char* const);
-
-	private:
-
-	Iterator tempIterator;
-	Shkv<char*, ValueType> tempShkv;
-	vector < list < Shkv<char*, ValueType> > > data;
-	typename list < Shkv<char*, ValueType> >::iterator dataIter, tempdataIter;
-	vector <unsigned int> map;
-	unsigned int offset, tempHash;
-	int capacity, power, mask, load;
-	float highLoadFactor, lowLoadFactor;
-
-	void increaseSize (const int);
-	void decreaseSize (const int);
-	unsigned int hash (const char *, int);
+public:
+
+  typedef MyIterator<char*, ValueType> Iterator;
+
+  HashMap ();
+  HashMap (int);
+  HashMap (const float);
+  HashMap (int, const float);
+  inline bool empty (void) const;
+  inline void clear (void);
+  inline int size (void) const;
+  inline Iterator begin (void);
+  inline Iterator back (void);
+  inline Iterator end (void);
+  ValueType remove (const Iterator&);
+  bool containsKey (const char* const);
+  ValueType get (const char* const);
+  Iterator getI (const char* const);
+  ValueType put (char* const, const ValueType&);
+  ValueType remove (const char* const);
+
+private:
+
+  Iterator tempIterator;
+  Shkv<char*, ValueType> tempShkv;
+  vector < list < Shkv<char*, ValueType> > > data;
+  typename list < Shkv<char*, ValueType> >::iterator dataIter, tempdataIter;
+  vector <unsigned int> map;
+  unsigned int offset, tempHash;
+  int capacity, power, mask, load;
+  float highLoadFactor, lowLoadFactor;
+
+  void increaseSize (const int);
+  void decreaseSize (const int);
+  unsigned int hash (const char *, int);
 };
 
 template <typename ValueType>
 class HashMap <void*, ValueType>
 {
-	public:
-
-    typedef MyIterator<void*, ValueType> Iterator;
-
-	HashMap ();
-	HashMap (int);
-	HashMap (const float);
-	HashMap (int, const float);
-	inline bool empty (void) const;
-	inline void clear (void);
-	inline int size (void) const;
-	inline Iterator begin (void);
-	inline Iterator back (void);
-	inline Iterator end (void);
-	ValueType remove (const Iterator&);
-	bool containsKey (const void* const);
-	ValueType get (const void* const);
-	Iterator getI (const void* const);
-	ValueType put (void* const, const ValueType&);
-	ValueType remove (const void* const);
-
-	private:
-
-	Iterator tempIterator;
-	Shkv<void*, ValueType> tempShkv;
-	vector < list < Shkv<void*, ValueType> > > data;
-	typename list < Shkv<void*, ValueType> >::iterator dataIter, tempdataIter;
-	vector <unsigned int> map;
-	unsigned int offset, tempHash;
-	int capacity, power, mask, load;
-	float highLoadFactor, lowLoadFactor;
-
-	void increaseSize (const int);
-	void decreaseSize (const int);
-	unsigned int hash (const char *, int);
+public:
+
+  typedef MyIterator<void*, ValueType> Iterator;
+
+  HashMap ();
+  HashMap (int);
+  HashMap (const float);
+  HashMap (int, const float);
+  inline bool empty (void) const;
+  inline void clear (void);
+  inline int size (void) const;
+  inline Iterator begin (void);
+  inline Iterator back (void);
+  inline Iterator end (void);
+  ValueType remove (const Iterator&);
+  bool containsKey (const void* const);
+  ValueType get (const void* const);
+  Iterator getI (const void* const);
+  ValueType put (void* const, const ValueType&);
+  ValueType remove (const void* const);
+
+private:
+
+  Iterator tempIterator;
+  Shkv<void*, ValueType> tempShkv;
+  vector < list < Shkv<void*, ValueType> > > data;
+  typename list < Shkv<void*, ValueType> >::iterator dataIter, tempdataIter;
+  vector <unsigned int> map;
+  unsigned int offset, tempHash;
+  int capacity, power, mask, load;
+  float highLoadFactor, lowLoadFactor;
+
+  void increaseSize (const int);
+  void decreaseSize (const int);
+  unsigned int hash (const char *, int);
 };
 
 # ifndef HASHMAP_CPP
diff --git a/myserver/include/base/home_dir/home_dir.h b/myserver/include/base/home_dir/home_dir.h
index b288f4d..0b5d13b 100644
--- a/myserver/include/base/home_dir/home_dir.h
+++ b/myserver/include/base/home_dir/home_dir.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2006, 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/>.
+  MyServer
+  Copyright (C) 2006, 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/>.
 */
 
 #ifndef HOME_DIR_H
@@ -31,13 +31,13 @@ using namespace std;
 class HomeDir
 {
 public:
-	HomeDir ();
-	~HomeDir ();
+  HomeDir ();
+  ~HomeDir ();
 
-	void clear ();
-	int load ();
+  void clear ();
+  int load ();
 
-	int getHomeDir (string& userName, string& out);
+  int getHomeDir (string& userName, string& out);
 
   int isLoaded (){return loaded;}
 
@@ -48,9 +48,9 @@ private:
 # ifdef WIN32
   string data;
 # elif !GETPWNAM
-	HashMap<string, string*> data;
+  HashMap<string, string*> data;
 # endif
-	time_t timestamp;
-	int loaded;
+  time_t timestamp;
+  int loaded;
 };
 #endif
diff --git a/myserver/include/base/multicast/multicast.h b/myserver/include/base/multicast/multicast.h
index 87a6a4c..37bfdd8 100644
--- a/myserver/include/base/multicast/multicast.h
+++ b/myserver/include/base/multicast/multicast.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 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/>.
+  MyServer
+  Copyright (C) 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/>.
 */
 
 #ifndef MULTICAST_H
@@ -33,23 +33,23 @@ template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE>
 class Multicast
 {
 public:
-	virtual RET_TYPE updateMulticast (MulticastRegistry<MSG_TYPE, ARG_TYPE, RET_TYPE>*, MSG_TYPE&, ARG_TYPE) = 0;
-	virtual ~Multicast (){}
+  virtual RET_TYPE updateMulticast (MulticastRegistry<MSG_TYPE, ARG_TYPE, RET_TYPE>*, MSG_TYPE&, ARG_TYPE) = 0;
+  virtual ~Multicast (){}
 };
 
 template<typename MSG_TYPE, typename ARG_TYPE, typename RET_TYPE>
 class MulticastRegistry
 {
 public:
-	void addMulticast (MSG_TYPE, Multicast<MSG_TYPE, ARG_TYPE, RET_TYPE>*);
-	void removeMulticast (MSG_TYPE, Multicast<MSG_TYPE, ARG_TYPE, RET_TYPE>*);
-	void notifyMulticast (MSG_TYPE&, ARG_TYPE);
+  void addMulticast (MSG_TYPE, Multicast<MSG_TYPE, ARG_TYPE, RET_TYPE>*);
+  void removeMulticast (MSG_TYPE, Multicast<MSG_TYPE, ARG_TYPE, RET_TYPE>*);
+  void notifyMulticast (MSG_TYPE&, ARG_TYPE);
 protected:
-	void removeMulticasts (MSG_TYPE);
-	vector<Multicast<MSG_TYPE, ARG_TYPE, RET_TYPE>*>* getHandlers (MSG_TYPE&);
-	void clearMulticastRegistry ();
+  void removeMulticasts (MSG_TYPE);
+  vector<Multicast<MSG_TYPE, ARG_TYPE, RET_TYPE>*>* getHandlers (MSG_TYPE&);
+  void clearMulticastRegistry ();
 private:
-	HashMap<MSG_TYPE, vector<Multicast<MSG_TYPE, ARG_TYPE, RET_TYPE>*>*> handlers;
+  HashMap<MSG_TYPE, vector<Multicast<MSG_TYPE, ARG_TYPE, RET_TYPE>*>*> handlers;
 };
 
 
diff --git a/myserver/include/base/pipe/pipe.h b/myserver/include/base/pipe/pipe.h
index 7268b00..5095e3a 100644
--- a/myserver/include/base/pipe/pipe.h
+++ b/myserver/include/base/pipe/pipe.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(at your option) any later version.
+  MyServer
+  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
+  (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.
+  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/>.
+  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 PIPE_H
diff --git a/myserver/include/base/process/process.h b/myserver/include/base/process/process.h
index e7e1ad6..1cf3fc9 100644
--- a/myserver/include/base/process/process.h
+++ b/myserver/include/base/process/process.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2006, 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/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2006, 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/>.
 */
 
 #ifndef PROCESS_H
@@ -39,21 +39,21 @@ struct StartProcInfo
     handlesToClose = NULL;
   }
 
-	/*! STDIN file for new process.  */
-	FileHandle stdIn;
+  /*! STDIN file for new process.  */
+  FileHandle stdIn;
 
-	/*! STDOUT file for new process.  */
-	FileHandle stdOut;
+  /*! STDOUT file for new process.  */
+  FileHandle stdOut;
 
-	/*! STDERR file for new process.  */
-	FileHandle stdError;
+  /*! STDERR file for new process.  */
+  FileHandle stdError;
 
-	string cmdLine;
-	string cwd;
+  string cmdLine;
+  string cwd;
 
-	/*! added for unix support.  */
-	string cmd;
-	string arg;
+  /*! added for unix support.  */
+  string cmd;
+  string arg;
 
   /*! Group id for the new process.  */
   string gid;
@@ -61,7 +61,7 @@ struct StartProcInfo
   /*! User id for the new process.  */
   string uid;
 
-	void *envString;
+  void *envString;
 
   /*! Pointer to a NULL terminated array of
    *  file pointers to close.  */
@@ -77,19 +77,19 @@ class Process
 {
 public:
 # ifdef HAVE_PTHREAD
-	static Mutex forkMutex;
-	static void forkPrepare ();
-	static void forkParent ();
-	static void forkChild ();
+  static Mutex forkMutex;
+  static void forkPrepare ();
+  static void forkParent ();
+  static void forkChild ();
 # endif
-	static void initialize ();
+  static void initialize ();
   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);
+  static int setAdditionalGroups (u_long len, u_long *groups);
   Process ();
   ~Process ();
 
diff --git a/myserver/include/base/process/process_server_manager.h b/myserver/include/base/process/process_server_manager.h
index cbcaa98..83f9086 100644
--- a/myserver/include/base/process/process_server_manager.h
+++ b/myserver/include/base/process/process_server_manager.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 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.
+  MyServer
+  Copyright (C) 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.
+  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/>.
+  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 PROCESS_SERVER_MANAGER_H
@@ -36,71 +36,71 @@ using namespace std;
 class ProcessServerManager
 {
 public:
-	struct Server
-	{
-		/* Server executable path.  */
-		string path;
+  struct Server
+  {
+    /* Server executable path.  */
+    string path;
 
-		union
-		{
-			unsigned long fileHandle;
-			SocketHandle sock;
-			unsigned int value;
-		}DESCRIPTOR;
+    union
+    {
+      unsigned long fileHandle;
+      SocketHandle sock;
+      unsigned int value;
+    }DESCRIPTOR;
 
-		Socket socket;
-		string host;
-		Process process;
-		u_short port;
-		struct ServerDomain *sd;
-		bool isLocal;
+    Socket socket;
+    string host;
+    Process process;
+    u_short port;
+    struct ServerDomain *sd;
+    bool isLocal;
 
-		void terminate ()
-		{
-			if (isLocal)
-			{
-				socket.close ();
-				process.terminateProcess ();
-			}
-		}
-	};
+    void terminate ()
+    {
+      if (isLocal)
+        {
+          socket.close ();
+          process.terminateProcess ();
+        }
+    }
+  };
 
-	struct ServerDomain
-	{
-		string domainName;
-		HashMap<string, vector<Server*> *> servers;
-		void (*clear)(Server*);
-		ServerDomain ()
-		{
-			clear = 0;
-		}
-	};
+  struct ServerDomain
+  {
+    string domainName;
+    HashMap<string, vector<Server*> *> servers;
+    void (*clear)(Server*);
+    ServerDomain ()
+    {
+      clear = 0;
+    }
+  };
 
-	ServerDomain *createDomain (const char *name);
-	ServerDomain *getDomain (const char *name);
-	void clear ();
-	Server *getServer (const char *domain, const char *name, int seed = 0);
-	ProcessServerManager ();
-	~ProcessServerManager ();
-	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 load ();
-	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);
+  ServerDomain *createDomain (const char *name);
+  ServerDomain *getDomain (const char *name);
+  void clear ();
+  Server *getServer (const char *domain, const char *name, int seed = 0);
+  ProcessServerManager ();
+  ~ProcessServerManager ();
+  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 load ();
+  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;
+  int maxServers;
+  int nServers;
   Mutex mutex;
-	HashMap<string, ServerDomain*> domains;
+  HashMap<string, ServerDomain*> domains;
   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);
+  void addServer (Server *server, const char *domain, const char *name);
 };
 
 #endif
diff --git a/myserver/include/base/read_directory/read_directory.h b/myserver/include/base/read_directory/read_directory.h
index e8552a4..6a2931a 100644
--- a/myserver/include/base/read_directory/read_directory.h
+++ b/myserver/include/base/read_directory/read_directory.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002, 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/>.
+  MyServer
+  Copyright (C) 2002, 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/>.
 */
 
 #ifndef FIND_DATA_H
diff --git a/myserver/include/base/regex/myserver_regex.h b/myserver/include/base/regex/myserver_regex.h
index bacce75..5f07fd1 100644
--- a/myserver/include/base/regex/myserver_regex.h
+++ b/myserver/include/base/regex/myserver_regex.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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) 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
+  (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 MYSERVER_REGEX_H
@@ -44,15 +44,15 @@ public:
   int isCompiled ();
   int compile (const char *pattern, int flags);
   int exec (const char *string, size_t nmatch, regmatch_t matchptr [],
-					 int eflags);
+            int eflags);
   void free ();
 
   Regex (string const &pattern, int flags){Regex (pattern.c_str (), flags);}
   int compile (string const &str, int flags){
-		return compile (str.c_str (), flags );}
+    return compile (str.c_str (), flags );}
   int exec (string const &str, size_t nmatch, regmatch_t matchptr [],
-					 int eflags)
-    {return exec (str.c_str (), nmatch, matchptr, eflags);}
+            int eflags)
+  {return exec (str.c_str (), nmatch, matchptr, eflags);}
 private:
   regex_t compiledRegex;
   regmatch_t match;
diff --git a/myserver/include/base/safetime/safetime.h b/myserver/include/base/safetime/safetime.h
index 67ad34c..e3e3e66 100644
--- a/myserver/include/base/safetime/safetime.h
+++ b/myserver/include/base/safetime/safetime.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2007, 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/>.
+  MyServer
+  Copyright (C) 2007, 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 SAFETIME_H
diff --git a/myserver/include/base/slab/slab.h b/myserver/include/base/slab/slab.h
index 459b6a1..0be95a8 100644
--- a/myserver/include/base/slab/slab.h
+++ b/myserver/include/base/slab/slab.h
@@ -1,19 +1,19 @@
 /* -*- 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/>.
+  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 SLAB_H
diff --git a/myserver/include/base/socket/socket.h b/myserver/include/base/socket/socket.h
index 4f1e495..8f79913 100644
--- a/myserver/include/base/socket/socket.h
+++ b/myserver/include/base/socket/socket.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2006, 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/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2006, 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/>.
 */
 
 #ifndef SOCKET_H
diff --git a/myserver/include/base/socket/ssl_socket.h b/myserver/include/base/socket/ssl_socket.h
index ae9b59c..24405c7 100644
--- a/myserver/include/base/socket/ssl_socket.h
+++ b/myserver/include/base/socket/ssl_socket.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2006, 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/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2006, 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/>.
 */
 
 #ifndef SSL_SOCKET_H
@@ -45,34 +45,34 @@ class SslSocket : public Socket
 {
 public:
 
-	int setSSLContext (SSL_CTX*);
-	int sslAccept ();
+  int setSSLContext (SSL_CTX*);
+  int sslAccept ();
 
-	int freeSSL ();
-	SSL* getSSLConnection ();
+  int freeSSL ();
+  SSL* getSSLConnection ();
 
-	virtual int close ();
-	virtual int shutdown (int how);
-	virtual int connect (MYSERVER_SOCKADDR* sa, int na);
-	virtual int recv (char* buffer,int len,int flags);
-	virtual int rawSend (const char* buffer, int len, int flags);
-	virtual u_long bytesToRead ();
+  virtual int close ();
+  virtual int shutdown (int how);
+  virtual int connect (MYSERVER_SOCKADDR* sa, int na);
+  virtual int recv (char* buffer,int len,int flags);
+  virtual int rawSend (const char* buffer, int len, int flags);
+  virtual u_long bytesToRead ();
 
 # ifdef __HURD__
-	virtual int dataOnRead (int sec = 1, int usec = 500);
+  virtual int dataOnRead (int sec = 1, int usec = 500);
 # else
-	virtual int dataOnRead (int sec = 0, int usec = 500);
+  virtual int dataOnRead (int sec = 0, int usec = 500);
 # endif
 
-	SslSocket (Socket*);
-	virtual ~SslSocket ();
+  SslSocket (Socket*);
+  virtual ~SslSocket ();
 
 protected:
-	bool externalContext;
-	Socket* socket;
-	SSL *sslConnection;
-	SSL_CTX *sslContext;
-	const X509 *clientCert;
+  bool externalContext;
+  Socket* socket;
+  SSL *sslConnection;
+  SSL_CTX *sslContext;
+  const X509 *clientCert;
 
   /*! This is used only by clients sockets.  */
   SSL_METHOD* sslMethod;
diff --git a/myserver/include/base/ssl/ssl.h b/myserver/include/base/ssl/ssl.h
index 34480f4..01c3c78 100644
--- a/myserver/include/base/ssl/ssl.h
+++ b/myserver/include/base/ssl/ssl.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 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/>.
+  MyServer
+  Copyright (C) 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/>.
 */
 
 #ifndef SSL_H
@@ -29,29 +29,29 @@ using namespace std;
 class SslContext
 {
 public:
-	SslContext ();
+  SslContext ();
 
-	int initialize ();
-	int free ();
+  int initialize ();
+  int free ();
 
-	SSL_CTX* getContext (){return context;}
-	SSL_METHOD* getMethod (){return method;}
+  SSL_CTX* getContext (){return context;}
+  SSL_METHOD* getMethod (){return method;}
 
-	string& getCertificateFile (){return certificateFile;}
-	string& getPrivateKeyFile (){return privateKeyFile;}
-	string& getPassword (){return password;}
+  string& getCertificateFile (){return certificateFile;}
+  string& getPrivateKeyFile (){return privateKeyFile;}
+  string& getPassword (){return password;}
 
-	void setCertificateFile (string& c){certificateFile.assign (c);}
-	void setPrivateKeyFile (string& pk){privateKeyFile.assign (pk);}
-	void setPassword (string& p){password.assign (p);}
+  void setCertificateFile (string& c){certificateFile.assign (c);}
+  void setPrivateKeyFile (string& pk){privateKeyFile.assign (pk);}
+  void setPassword (string& p){password.assign (p);}
 
 private:
-	SSL_CTX* context;
-	SSL_METHOD* method;
+  SSL_CTX* context;
+  SSL_METHOD* method;
 
-	string certificateFile;
-	string privateKeyFile;
-	string password;
+  string certificateFile;
+  string privateKeyFile;
+  string password;
 };
 
 void initializeSSL ();
diff --git a/myserver/include/base/string/securestr.h b/myserver/include/base/string/securestr.h
index 110ad30..ce84278 100644
--- a/myserver/include/base/string/securestr.h
+++ b/myserver/include/base/string/securestr.h
@@ -1,21 +1,21 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-* strlcpy and strlcat by codingmaster
-Copyright (C) 2002, 2003, 2004, 2009 Free Software Foundation, Inc.
-Copyright (C) 2004 by codingmaster
-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.
+  MyServer
+  * strlcpy and strlcat by codingmaster
+  Copyright (C) 2002, 2003, 2004, 2009 Free Software Foundation, Inc.
+  Copyright (C) 2004 by codingmaster
+  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.
+  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/>.
+  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"
 #ifndef SECURESTR_H
diff --git a/myserver/include/base/string/stringutils.h b/myserver/include/base/string/stringutils.h
index 6455c4c..dfff3b4 100644
--- a/myserver/include/base/string/stringutils.h
+++ b/myserver/include/base/string/stringutils.h
@@ -78,7 +78,7 @@ int stringcmp (string const &a, const char* b);
 # ifndef WIN32
 extern "C"
 {
-char* strupr (char * string);
+  char* strupr (char * string);
 #  include <string.h>
 }
 # endif
diff --git a/myserver/include/base/sync/event.h b/myserver/include/base/sync/event.h
index 7f0eed9..7c94601 100644
--- a/myserver/include/base/sync/event.h
+++ b/myserver/include/base/sync/event.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2006, 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.
+  MyServer
+  Copyright (C) 2006, 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.
+  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/>.
+  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 EVENT_H
@@ -23,29 +23,29 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 # include <include/base/sync/mutex.h>
 
 # ifdef HAVE_PTHREAD
-	typedef pthread_cond_t EventHandle;
+typedef pthread_cond_t EventHandle;
 # else
-	typedef HANDLE EventHandle;
+typedef HANDLE EventHandle;
 # endif
 
 class Event
 {
 private:
-	bool initialized;
-	bool broadcast;
+  bool initialized;
+  bool broadcast;
 # ifdef HAVE_PTHREAD
-	/*!
-	 *Under pthread a condition is associated with a mutex.
-	 */
-	pthread_mutex_t mutex;
+  /*!
+   *Under pthread a condition is associated with a mutex.
+   */
+  pthread_mutex_t mutex;
 # endif
-	EventHandle event;
+  EventHandle event;
 public:
-	Event (bool broadcast);
-	~Event ();
-	int init (bool broadcast);
-	int destroy ();
-	int wait (u_long id = 0, u_long timeout = 0);
-	int signal (u_long id = 0);
+  Event (bool broadcast);
+  ~Event ();
+  int init (bool broadcast);
+  int destroy ();
+  int wait (u_long id = 0, u_long timeout = 0);
+  int signal (u_long id = 0);
 };
 #endif
diff --git a/myserver/include/base/sync/mutex.h b/myserver/include/base/sync/mutex.h
index 8e63cfb..9c44fa8 100644
--- a/myserver/include/base/sync/mutex.h
+++ b/myserver/include/base/sync/mutex.h
@@ -1,20 +1,20 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(at your option) any later version.
+  MyServer
+  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
+  (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.
+  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/>.
+  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 MUTEX_H
@@ -25,25 +25,25 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 # include <include/base/string/stringutils.h>
 
 # ifdef HAVE_PTHREAD
-	typedef pthread_mutex_t MutexHandle;
+typedef pthread_mutex_t MutexHandle;
 # else
-	typedef HANDLE MutexHandle;
+typedef HANDLE MutexHandle;
 # endif
 
 class Mutex
 {
 public:
-	Mutex ();
-	virtual ~Mutex ();
-	virtual int init ();
-	int destroy ();
-	int lock (u_long id = 0);
-	int unlock (u_long id = 0);
+  Mutex ();
+  virtual ~Mutex ();
+  virtual int init ();
+  int destroy ();
+  int lock (u_long id = 0);
+  int unlock (u_long id = 0);
   bool isLocked ();
   MutexHandle getHandle ();
 protected:
   bool locked;
-	int initialized;
-	MutexHandle mutex;
+  int initialized;
+  MutexHandle mutex;
 };
 #endif
diff --git a/myserver/include/base/sync/read_write_lock.h b/myserver/include/base/sync/read_write_lock.h
index 9d64038..3df349b 100644
--- a/myserver/include/base/sync/read_write_lock.h
+++ b/myserver/include/base/sync/read_write_lock.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2007, 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.
+  MyServer
+  Copyright (C) 2007, 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.
+  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/>.
+  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 READ_WRITE_LOCK_H
@@ -25,15 +25,15 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 class ReadWriteLock
 {
 public:
-	ReadWriteLock (int maxReaders);
-	~ReadWriteLock ();
-	void readLock ();
-	void readUnlock ();
+  ReadWriteLock (int maxReaders);
+  ~ReadWriteLock ();
+  void readLock ();
+  void readUnlock ();
 
-	void writeLock ();
-	void writeUnlock ();
+  void writeLock ();
+  void writeUnlock ();
 private:
-	int maxReaders;
-	Semaphore semaphore;
+  int maxReaders;
+  Semaphore semaphore;
 };
 #endif
diff --git a/myserver/include/base/sync/recursive_mutex.h b/myserver/include/base/sync/recursive_mutex.h
index 2d300c7..0febed1 100644
--- a/myserver/include/base/sync/recursive_mutex.h
+++ b/myserver/include/base/sync/recursive_mutex.h
@@ -1,20 +1,20 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(at your option) any later version.
+  MyServer
+  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
+  (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.
+  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/>.
+  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 RECURSIVE_MUTEX_H
@@ -27,8 +27,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 class RecursiveMutex : public Mutex
 {
 public:
-	RecursiveMutex ();
-	virtual ~RecursiveMutex ();
-	virtual int init ();
+  RecursiveMutex ();
+  virtual ~RecursiveMutex ();
+  virtual int init ();
 };
 #endif
diff --git a/myserver/include/base/sync/semaphore.h b/myserver/include/base/sync/semaphore.h
index 48e02c2..62f4b4b 100644
--- a/myserver/include/base/sync/semaphore.h
+++ b/myserver/include/base/sync/semaphore.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2006, 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.
+  MyServer
+  Copyright (C) 2006, 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.
+  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/>.
+  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 SEMAPHORE_H
@@ -31,16 +31,16 @@ typedef HANDLE SemaphoreHandle;
 class Semaphore
 {
 public:
-	Semaphore (int n);
-	~Semaphore ();
-	int init (int n);
-	int destroy ();
-	int lock (u_long id = 0);
-	int unlock (u_long id = 0);
+  Semaphore (int n);
+  ~Semaphore ();
+  int init (int n);
+  int destroy ();
+  int lock (u_long id = 0);
+  int unlock (u_long id = 0);
   SemaphoreHandle *getHandle (){return &semaphore;}
   int isInitialized (){return initialized;}
 private:
-	int initialized;
-	SemaphoreHandle semaphore;
+  int initialized;
+  SemaphoreHandle semaphore;
 };
 #endif
diff --git a/myserver/include/base/thread/thread.h b/myserver/include/base/thread/thread.h
index 2c45c47..dc03e7b 100644
--- a/myserver/include/base/thread/thread.h
+++ b/myserver/include/base/thread/thread.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2006, 2007, 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.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2006, 2007, 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.
+  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/>.
+  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 THREAD_H
@@ -24,11 +24,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 # include <include/base/string/stringutils.h>
 
 # ifdef WIN32
-	typedef unsigned int ThreadID;
+typedef unsigned int ThreadID;
 #  define DEFINE_THREAD(NAME,PARAM) unsigned int __stdcall NAME (void* PARAM)
 # endif
 # ifdef HAVE_PTHREAD
-	typedef pthread_t ThreadID;
+typedef pthread_t ThreadID;
 #  define DEFINE_THREAD(NAME,PARAM) void* NAME (void* PARAM)
 # endif
 
@@ -36,16 +36,16 @@ class Thread
 {
 public:
   static void wait (u_long);
-	static ThreadID threadID ();
+  static ThreadID threadID ();
 # ifdef WIN32
-	static int create (ThreadID*  thread,
-             unsigned int (_stdcall *start_routine)(void *), void * arg);
+  static int create (ThreadID*  thread,
+                     unsigned int (_stdcall *start_routine)(void *), void * arg);
 # endif
 # ifdef HAVE_PTHREAD
-	static int create (ThreadID*  thread, void * (*start_routine)(void *),
-                    void * arg);
+  static int create (ThreadID*  thread, void * (*start_routine)(void *),
+                     void * arg);
 # endif
-	static void terminate ();
-	static int join (ThreadID);
+  static void terminate ();
+  static int join (ThreadID);
 };
 #endif
diff --git a/myserver/include/base/unix_socket/unix_socket.h b/myserver/include/base/unix_socket/unix_socket.h
index 985aef9..66f5fe1 100644
--- a/myserver/include/base/unix_socket/unix_socket.h
+++ b/myserver/include/base/unix_socket/unix_socket.h
@@ -1,19 +1,19 @@
 /* -*- 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.
+  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.
+  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/>.
+  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 UNIX_SOCKET_H
diff --git a/myserver/include/base/utility.h b/myserver/include/base/utility.h
index 067023d..ea1d2d0 100644
--- a/myserver/include/base/utility.h
+++ b/myserver/include/base/utility.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2006, 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/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2006, 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/>.
 */
 
 #ifndef UTILITY_H
diff --git a/myserver/include/base/xml/xml_parser.h b/myserver/include/base/xml/xml_parser.h
index 77a038f..bd0382d 100644
--- a/myserver/include/base/xml/xml_parser.h
+++ b/myserver/include/base/xml/xml_parser.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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) 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
+  (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 CXMLPARSER_IN
diff --git a/myserver/include/conf/main/main_configuration.h b/myserver/include/conf/main/main_configuration.h
index 02ba8ca..3feee7e 100644
--- a/myserver/include/conf/main/main_configuration.h
+++ b/myserver/include/conf/main/main_configuration.h
@@ -1,19 +1,19 @@
 /* -*- 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/>.
+  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
diff --git a/myserver/include/conf/main/xml_main_configuration.h b/myserver/include/conf/main/xml_main_configuration.h
index 51d9d79..4baf3ff 100644
--- a/myserver/include/conf/main/xml_main_configuration.h
+++ b/myserver/include/conf/main/xml_main_configuration.h
@@ -1,19 +1,19 @@
 /* -*- 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.
+  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.
+  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/>.
+  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
diff --git a/myserver/include/conf/security/auth_domain.h b/myserver/include/conf/security/auth_domain.h
index 6959aa5..df372dd 100644
--- a/myserver/include/conf/security/auth_domain.h
+++ b/myserver/include/conf/security/auth_domain.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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, 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 AUTH_DOMAIN_H
diff --git a/myserver/include/conf/security/auth_method.h b/myserver/include/conf/security/auth_method.h
index 18b85a8..834ca57 100644
--- a/myserver/include/conf/security/auth_method.h
+++ b/myserver/include/conf/security/auth_method.h
@@ -1,20 +1,20 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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) 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
+  (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 AUTH_METHOD_H
diff --git a/myserver/include/conf/security/auth_method_factory.h b/myserver/include/conf/security/auth_method_factory.h
index 7758fc0..82d288e 100644
--- a/myserver/include/conf/security/auth_method_factory.h
+++ b/myserver/include/conf/security/auth_method_factory.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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, 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 AUTH_METHOD_FACTORY_H
@@ -40,6 +40,6 @@ public:
 
 private:
   CryptAlgoManager *cryptAlgoManager;
-	HashMap<string, AuthMethod*> authMethods;
+  HashMap<string, AuthMethod*> authMethods;
 };
 #endif
diff --git a/myserver/include/conf/security/security_cache.h b/myserver/include/conf/security/security_cache.h
index f6e361b..cfde7a1 100644
--- a/myserver/include/conf/security/security_cache.h
+++ b/myserver/include/conf/security/security_cache.h
@@ -45,12 +45,13 @@ public:
 
   XmlParser* getParser (const string &dir, const string &sys, bool useXpath = true,
                         const char* secName = ".security.xml", u_long maxSize = 0);
-	int getSecurityFile (const string &file, const string &sys, string &out, const char* secName = ".security.xml");
+  int getSecurityFile (const string &file, const string &sys,
+                       string &out, const char* secName = ".security.xml");
 
   /////////OLD NASTY AND DISGUSTING.  TEMPORARY SOLUTION TO DON'T BREAK APIs////////////////////////////////////
   int getPermissionMask (SecurityToken* st){return 0;}
   int getErrorFileName (const char *root, int error,
-                       const char* sysdirectory, string& out){return 0;}
+                        const char* sysdirectory, string& out){return 0;}
 private:
 
   /*! Store a list of opened files using a hash dictionary.  */
diff --git a/myserver/include/conf/security/security_domain.h b/myserver/include/conf/security/security_domain.h
index b0919a5..f143b72 100644
--- a/myserver/include/conf/security/security_domain.h
+++ b/myserver/include/conf/security/security_domain.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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, 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 SECURITY_DOMAIN_H
diff --git a/myserver/include/conf/security/security_manager.h b/myserver/include/conf/security/security_manager.h
index c646015..5f77f2f 100644
--- a/myserver/include/conf/security/security_manager.h
+++ b/myserver/include/conf/security/security_manager.h
@@ -1,20 +1,20 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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) 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
+  (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 SECURITY_MANAGER_H
@@ -43,28 +43,28 @@ class Server;
  *Define permissions flags.
  */
 enum PERMISSION_MASK
-{
- /*! No permissions.  */
-  MYSERVER_PERMISSION_NONE	  = 0,
+  {
+    /*! No permissions.  */
+    MYSERVER_PERMISSION_NONE      = 0,
 
-  /*! Current user can read the file.  */
-  MYSERVER_PERMISSION_READ     =	(1<<0),
+    /*! Current user can read the file.  */
+    MYSERVER_PERMISSION_READ     =      (1<<0),
 
-  /*! Current user can write to the file.  */
-  MYSERVER_PERMISSION_WRITE	  = (1<<1),
+    /*! Current user can write to the file.  */
+    MYSERVER_PERMISSION_WRITE     = (1<<1),
 
-  /*! Current user can execute the file.  */
-  MYSERVER_PERMISSION_EXECUTE  = (1<<2),
+    /*! Current user can execute the file.  */
+    MYSERVER_PERMISSION_EXECUTE  = (1<<2),
 
-  /*! Current user can remove the file.  */
-  MYSERVER_PERMISSION_DELETE	  = (1<<3),
+    /*! Current user can remove the file.  */
+    MYSERVER_PERMISSION_DELETE    = (1<<3),
 
-  /*! Current user can browse the directory content.  */
-  MYSERVER_PERMISSION_BROWSE	  = (1<<4),
+    /*! Current user can browse the directory content.  */
+    MYSERVER_PERMISSION_BROWSE    = (1<<4),
 
-  /*! All permissions.  */
-  MYSERVER_PERMISSION_ALL	  = -1
-};
+    /*! All permissions.  */
+    MYSERVER_PERMISSION_ALL       = -1
+  };
 
 class SecurityManager
 {
diff --git a/myserver/include/conf/security/validator.h b/myserver/include/conf/security/validator.h
index ba7343d..abaee15 100644
--- a/myserver/include/conf/security/validator.h
+++ b/myserver/include/conf/security/validator.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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, 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 VALIDATOR_H
@@ -46,7 +46,7 @@ public:
                          AuthMethod* authMethod);
 
   virtual int getPermissionMaskImpl (SecurityToken* st,
-                               HashMap<string, SecurityDomain*> *hashedDomains,
+                                     HashMap<string, SecurityDomain*> *hashedDomains,
                                      AuthMethod* authMethod);
 
 
diff --git a/myserver/include/conf/security/validator_factory.h b/myserver/include/conf/security/validator_factory.h
index 08033fd..687246f 100644
--- a/myserver/include/conf/security/validator_factory.h
+++ b/myserver/include/conf/security/validator_factory.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(at your option) any later version.
+  MyServer
+  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
+  (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.
+  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/>.
+  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 VALIDATOR_FACTORY_H
@@ -36,6 +36,6 @@ public:
   Validator* addValidator (string &name, Validator* validator);
   bool isValidatorPresent (string &name);
 private:
-	HashMap<string, Validator*> validators;
+  HashMap<string, Validator*> validators;
 };
 #endif
diff --git a/myserver/include/conf/vhost/ip.h b/myserver/include/conf/vhost/ip.h
index d1af85a..cd1d748 100644
--- a/myserver/include/conf/vhost/ip.h
+++ b/myserver/include/conf/vhost/ip.h
@@ -24,7 +24,7 @@
 
 class IpRange
 {
- public:
+public:
   virtual bool InRange (const std::string &ip) = 0;
   virtual bool InRange (const IpRange *pRange) = 0;
 
diff --git a/myserver/include/conf/xml_conf.h b/myserver/include/conf/xml_conf.h
index 38f659c..e3fd8b0 100644
--- a/myserver/include/conf/xml_conf.h
+++ b/myserver/include/conf/xml_conf.h
@@ -34,12 +34,12 @@ using namespace std;
  */
 class XmlConf
 {
- public:
+public:
   static int build (xmlNodePtr root,
                     list<NodeTree<string>*> *rootNodes,
                     HashMap<string, NodeTree<string>*> *hashedData);
 
- protected:
+protected:
   static void readNode (xmlNodePtr lcur,
                         NodeTree<string> *root,
                         list<NodeTree<string>*> *rootNodes,
diff --git a/myserver/include/connections_scheduler/connections_scheduler.h b/myserver/include/connections_scheduler/connections_scheduler.h
index 5fe13bd..fd93490 100644
--- a/myserver/include/connections_scheduler/connections_scheduler.h
+++ b/myserver/include/connections_scheduler/connections_scheduler.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 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/>.
+  MyServer
+  Copyright (C) 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/>.
 */
 
 #ifndef CONNECTIONS_SCHEDULER_H
@@ -77,7 +77,7 @@ public:
     ConnectionsScheduler* scheduler;
     SocketPair socketPair;
     Socket socketPairWrite;
-   };
+  };
 
   ConnectionsScheduler (Server* server = NULL);
   ~ConnectionsScheduler ();
diff --git a/myserver/include/connections_scheduler/listen_threads.h b/myserver/include/connections_scheduler/listen_threads.h
index 1b3af00..782f2b3 100644
--- a/myserver/include/connections_scheduler/listen_threads.h
+++ b/myserver/include/connections_scheduler/listen_threads.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2007, 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.
+  MyServer
+  Copyright (C) 2007, 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.
+  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/>.
+  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
@@ -27,37 +27,37 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 class ListenThreads
 {
 public:
-	void addListeningThread (u_short port);
-	int initialize ();
-	int terminate ();
-	/*! Initialize the shutdown phase.  */
-	void shutdown (){shutdownStatus = true;}
-	/*! Is it shutdown phase?  */
-	bool isShutdown (){return shutdownStatus;}
-	void commitFastReboot ();
-	void beginFastReboot ();
-	void rollbackFastReboot ();
-	ListenThreads (ConnectionsScheduler*, Server*);
+  void addListeningThread (u_short port);
+  int initialize ();
+  int terminate ();
+  /*! Initialize the shutdown phase.  */
+  void shutdown (){shutdownStatus = true;}
+  /*! Is it shutdown phase?  */
+  bool isShutdown (){return shutdownStatus;}
+  void commitFastReboot ();
+  void beginFastReboot ();
+  void rollbackFastReboot ();
+  ListenThreads (ConnectionsScheduler*, Server*);
 
 private:
-	struct SocketInformation
-	{
-		Socket *ipv4;
-		Socket *ipv6;
-		u_short port;
-		ConnectionsScheduler::ListenerArg laIpv4;
-		ConnectionsScheduler::ListenerArg laIpv6;
-	};
+  struct SocketInformation
+  {
+    Socket *ipv4;
+    Socket *ipv6;
+    u_short port;
+    ConnectionsScheduler::ListenerArg laIpv4;
+    ConnectionsScheduler::ListenerArg laIpv6;
+  };
 
-	bool fastRebooting;
-	bool committingFastReboot;
-	list<u_short> frPortsToAdd;
-	list <SocketInformation*> frPortsToRemove;
+  bool fastRebooting;
+  bool committingFastReboot;
+  list<u_short> frPortsToAdd;
+  list <SocketInformation*> frPortsToRemove;
 
-	bool shutdownStatus;
-	HashMap<u_short, SocketInformation*> usedPorts;
-	int createServerAndListener (u_short port);
-	void registerListener (SocketInformation*);
+  bool shutdownStatus;
+  HashMap<u_short, SocketInformation*> usedPorts;
+  int createServerAndListener (u_short port);
+  void registerListener (SocketInformation*);
 
   Server *server;
   ConnectionsScheduler *scheduler;
diff --git a/myserver/include/filter/filter.h b/myserver/include/filter/filter.h
index 403738b..8463aaa 100644
--- a/myserver/include/filter/filter.h
+++ b/myserver/include/filter/filter.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2005, 2007, 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.
+  MyServer
+  Copyright (C) 2005, 2007, 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.
+  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/>.
+  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 FILTER_H
@@ -40,8 +40,8 @@ public:
   virtual int getFooter (char* buffer, u_long len, u_long* nbw);
   virtual int read (char* buffer, u_long len, u_long*);
   virtual int write (const char* buffer, u_long len, u_long*);
-	virtual int flush (u_long*);
-	virtual int modifyData ();
+  virtual int flush (u_long*);
+  virtual int modifyData ();
   virtual const char* getName (char*, u_long);
   void setParent (Stream*);
   Stream* getParent ();
diff --git a/myserver/include/filter/filters_factory.h b/myserver/include/filter/filters_factory.h
index 6f55b63..c9f28ff 100644
--- a/myserver/include/filter/filters_factory.h
+++ b/myserver/include/filter/filters_factory.h
@@ -1,20 +1,20 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2007, 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/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2007, 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 FILTERS_FACTORY_H
@@ -47,7 +47,7 @@ public:
   int insert (const char*, FiltersSource* ptr);
   Filter *getFilter (const char*);
   FiltersChain* chain (list<string> &l, Stream* out, u_long *nbw,
-		       int onlyNotModifiers = 0);
+                       int onlyNotModifiers = 0);
   int chain (FiltersChain*, list<string> &l, Stream* out, u_long *nbw,
              int onlyNotModifiers = 0, string *accepted = NULL);
 
diff --git a/myserver/include/filter/gzip/gzip.h b/myserver/include/filter/gzip/gzip.h
index 0995039..4b926f0 100644
--- a/myserver/include/filter/gzip/gzip.h
+++ b/myserver/include/filter/gzip/gzip.h
@@ -27,8 +27,8 @@
 #  define z_stream (void*)
 # endif
 
-# define GZIP_HEADER_LENGTH		10
-# define GZIP_FOOTER_LENGTH		8
+# 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
index 92fe2dd..471229f 100644
--- a/myserver/include/filter/gzip/gzip_decompress.h
+++ b/myserver/include/filter/gzip/gzip_decompress.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 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.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 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.
+  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/>.
+  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 GZIP_DECOMPRESS_H
@@ -33,43 +33,43 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 class GzipDecompress : public Filter
 {
 public:
-	struct GzipData
-	{
-		z_stream stream;
-		u_long crc;
-		u_long data_size;
-		u_long initialized;
-	};
+  struct GzipData
+  {
+    z_stream stream;
+    u_long crc;
+    u_long data_size;
+    u_long initialized;
+  };
 
 
   GzipDecompress ();
   ~GzipDecompress ();
 
-	u_long updateCRC (char* buffer,int size);
-	u_long getFooter (char *str,int size);
-	u_long initialize ();
-	u_long decompress (const char* in, u_long sizeIn,
-										char *out,u_long sizeOut);
-	u_long free ();
-	u_long flush (char *out,u_long sizeOut);
-	u_long getHeader (char *buffer,u_long buffersize);
+  u_long updateCRC (char* buffer,int size);
+  u_long getFooter (char *str,int size);
+  u_long initialize ();
+  u_long decompress (const char* in, u_long sizeIn,
+                     char *out,u_long sizeOut);
+  u_long free ();
+  u_long flush (char *out,u_long sizeOut);
+  u_long getHeader (char *buffer,u_long buffersize);
 
   static Filter* factory (const char* name);
 
-	static u_long headerSize ();
-	static u_long footerSize ();
+  static u_long headerSize ();
+  static u_long footerSize ();
 
   /*! From Filter*/
   virtual int getHeader (char* buffer, u_long len, u_long* nbw);
   virtual int getFooter (char* buffer, u_long len, u_long* nbw);
   virtual int read (char* buffer, u_long len, u_long*);
   virtual int write (const char* buffer, u_long len, u_long*);
-	virtual int flush (u_long*);
-	virtual int modifyData ();
+  virtual int flush (u_long*);
+  virtual int modifyData ();
   virtual const char* getName (char* name, u_long len);
 private:
-	int active;
-	GzipData data;
+  int active;
+  GzipData data;
 
 };
 
diff --git a/myserver/include/filter/memory_stream.h b/myserver/include/filter/memory_stream.h
index a74e911..e38122e 100644
--- a/myserver/include/filter/memory_stream.h
+++ b/myserver/include/filter/memory_stream.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 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.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 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.
+  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/>.
+  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 MEMORY_STREAM_H
diff --git a/myserver/include/http_handler/cgi/cgi.h b/myserver/include/http_handler/cgi/cgi.h
index 50b1b3b..1d15eed 100644
--- a/myserver/include/http_handler/cgi/cgi.h
+++ b/myserver/include/http_handler/cgi/cgi.h
@@ -32,7 +32,7 @@ class FiltersChain;
 class Cgi : public HttpDataHandler
 {
 public:
-	virtual int send (HttpThreadContext*, const char* scriptpath,
+  virtual int send (HttpThreadContext*, const char* scriptpath,
                     const char* exec = 0, bool execute = false,
                     bool onlyHeader = false);
 private:
diff --git a/myserver/include/http_handler/fastcgi/fastcgi.h b/myserver/include/http_handler/fastcgi/fastcgi.h
index 5504f35..6747f68 100644
--- a/myserver/include/http_handler/fastcgi/fastcgi.h
+++ b/myserver/include/http_handler/fastcgi/fastcgi.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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) 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
+  (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 FASTCGI_H
@@ -38,14 +38,14 @@ using namespace std;
 
 typedef struct
 {
-    unsigned char version;
-    unsigned char type;
-    unsigned char requestIdB1;
-    unsigned char requestIdB0;
-    unsigned char contentLengthB1;
-    unsigned char contentLengthB0;
-    unsigned char paddingLength;
-    unsigned char reserved;
+  unsigned char version;
+  unsigned char type;
+  unsigned char requestIdB1;
+  unsigned char requestIdB0;
+  unsigned char contentLengthB1;
+  unsigned char contentLengthB0;
+  unsigned char paddingLength;
+  unsigned char reserved;
 } FcgiHeader;
 
 /*!
@@ -76,16 +76,16 @@ typedef struct
 
 typedef struct
 {
-    unsigned char roleB1;
-    unsigned char roleB0;
-    unsigned char flags;
-    unsigned char reserved[5];
+  unsigned char roleB1;
+  unsigned char roleB0;
+  unsigned char flags;
+  unsigned char reserved[5];
 } FcgiBeginRequestBody;
 
 typedef struct
 {
-    FcgiHeader header;
-    FcgiBeginRequestBody body;
+  FcgiHeader header;
+  FcgiBeginRequestBody body;
 } FcgiBeginRequestRecord;
 
 /*!
@@ -102,18 +102,18 @@ typedef struct
 
 typedef struct
 {
-    unsigned char appStatusB3;
-    unsigned char appStatusB2;
-    unsigned char appStatusB1;
-    unsigned char appStatusB0;
-    unsigned char protocolStatus;
-    unsigned char reserved[3];
+  unsigned char appStatusB3;
+  unsigned char appStatusB2;
+  unsigned char appStatusB1;
+  unsigned char appStatusB0;
+  unsigned char protocolStatus;
+  unsigned char reserved[3];
 } FcgiEndRequestBody;
 
 typedef struct
 {
-    FcgiHeader header;
-    FcgiEndRequestBody body;
+  FcgiHeader header;
+  FcgiEndRequestBody body;
 } FcgiEndRequestRecord;
 
 /*!
@@ -126,14 +126,14 @@ typedef struct
 
 typedef struct
 {
-    unsigned char type;
-    unsigned char reserved[7];
+  unsigned char type;
+  unsigned char reserved[7];
 } FcgiUnknownTypeBody;
 
 typedef struct
 {
-    FcgiHeader header;
-    FcgiUnknownTypeBody body;
+  FcgiHeader header;
+  FcgiUnknownTypeBody body;
 } FcgiUnknownTypeRecord;
 
 
diff --git a/myserver/include/http_handler/http_dir/http_dir.h b/myserver/include/http_handler/http_dir/http_dir.h
index fae68b9..6446392 100644
--- a/myserver/include/http_handler/http_dir/http_dir.h
+++ b/myserver/include/http_handler/http_dir/http_dir.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-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/>.
+  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/>.
 */
 
 #ifndef HTTP_DIR_H
@@ -40,8 +40,8 @@ public:
   virtual int load ();
   virtual int unLoad ();
   virtual int send (HttpThreadContext*,
-                   const char *filenamePath, const char* cgi,
-                   bool execute = false, bool OnlyHeader = false);
+                    const char *filenamePath, const char* cgi,
+                    bool execute = false, bool OnlyHeader = false);
   HttpDir ();
   virtual ~HttpDir ();
 private:
diff --git a/myserver/include/http_handler/http_file/http_file.h b/myserver/include/http_handler/http_file/http_file.h
index 5b0b0b0..6412aeb 100644
--- a/myserver/include/http_handler/http_file/http_file.h
+++ b/myserver/include/http_handler/http_file/http_file.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2005, 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/>.
+  MyServer
+  Copyright (C) 2005, 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/>.
 */
 
 #ifndef HTTP_FILE_H
@@ -30,8 +30,8 @@ public:
   virtual int load ();
   virtual int unLoad ();
   virtual int send (HttpThreadContext* td,
-                   const char *filenamePath, const char* cgi,
-                   bool execute = false, bool OnlyHeader = false);
+                    const char *filenamePath, const char* cgi,
+                    bool execute = false, bool OnlyHeader = false);
   HttpFile ();
   virtual ~HttpFile ();
 
diff --git a/myserver/include/http_handler/isapi/isapi.h b/myserver/include/http_handler/isapi/isapi.h
index bc4a36e..0b0e5b6 100644
--- a/myserver/include/http_handler/isapi/isapi.h
+++ b/myserver/include/http_handler/isapi/isapi.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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) 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
+  (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 ISAPI_H
@@ -136,17 +136,17 @@ public:
   int Senduri (HttpThreadContext* td,ConnectionPtr a,char *URL);
   int SendHeader (HttpThreadContext* td,ConnectionPtr a,char *URL);
   static BOOL buildAllHttpHeaders (HttpThreadContext* td,ConnectionPtr a,
-                                  LPVOID output, LPDWORD maxLen);
+                                   LPVOID output, LPDWORD maxLen);
   static BOOL buildAllRawHeaders (HttpThreadContext* td,ConnectionPtr a,
-                                 LPVOID output, LPDWORD maxLen);
+                                  LPVOID output, LPDWORD maxLen);
 # endif
   Isapi ();
   static Mutex *isapiMutex;
   virtual int load ();
   virtual int unLoad ();
   virtual int send (HttpThreadContext* td, const char* scriptpath,
-                   const char *cgipath = 0, bool execute = false,
-                   bool onlyHeader = false);
+                    const char *cgipath = 0, bool execute = false,
+                    bool onlyHeader = false);
 private:
 # ifdef WIN32
   static int initialized;
@@ -157,11 +157,11 @@ private:
 
 # ifdef WIN32
 BOOL WINAPI ISAPI_ServerSupportFunctionExport (HCONN hConn, DWORD dwHSERRequest,
-                                              LPVOID lpvBuffer, LPDWORD lpdwSize,
-                                              LPDWORD lpdwDataType);
+                                               LPVOID lpvBuffer, LPDWORD lpdwSize,
+                                               LPDWORD lpdwDataType);
 BOOL WINAPI ISAPI_ReadClientExport (HCONN hConn, LPVOID lpvBuffer, LPDWORD lpdwSize ) ;
 BOOL WINAPI ISAPI_WriteClientExport (HCONN hConn, LPVOID Buffer, LPDWORD lpdwBytes,
-                                    DWORD dwReserved);
+                                     DWORD dwReserved);
 BOOL WINAPI ISAPI_GetServerVariableExport (HCONN, LPSTR, LPVOID, LPDWORD);
 # endif
 
diff --git a/myserver/include/http_handler/mscgi/mscgi.h b/myserver/include/http_handler/mscgi/mscgi.h
index 783cbca..8ab21d4 100644
--- a/myserver/include/http_handler/mscgi/mscgi.h
+++ b/myserver/include/http_handler/mscgi/mscgi.h
@@ -34,17 +34,17 @@ class MsCgi;
 
 struct MsCgiData
 {
-	char *envString;
-	HttpThreadContext* td;
-	int errorPage;
-	bool headerSent;
-	Server* server;
-	MsCgi* mscgi;
-	FiltersChain *filtersChain;
-	bool keepAlive;
+  char *envString;
+  HttpThreadContext* td;
+  int errorPage;
+  bool headerSent;
+  Server* server;
+  MsCgi* mscgi;
+  FiltersChain *filtersChain;
+  bool keepAlive;
   bool useChunks;
-	bool onlyHeader;
-	bool error;
+  bool onlyHeader;
+  bool error;
 
 };
 
@@ -53,17 +53,17 @@ typedef int (*CGIMAIN)(const char*, MsCgiData*);
 class MsCgi : public HttpDataHandler
 {
 public:
-	virtual int load ();
-	virtual int unLoad ();
-	virtual int send (HttpThreadContext*, const char* exec,
-                   const char* cmdLine = 0, bool execute = false,
-                   bool onlyHeader = false);
+  virtual int load ();
+  virtual int unLoad ();
+  virtual int send (HttpThreadContext*, const char* exec,
+                    const char* cmdLine = 0, bool execute = false,
+                    bool onlyHeader = false);
 
-	int write (const char*, u_long, MsCgiData*);
-	int sendHeader (MsCgiData*);
+  int write (const char*, u_long, MsCgiData*);
+  int sendHeader (MsCgiData*);
 
 private:
-	static DynamicLibrary mscgiModule;
-	MsCgiData data;
+  static DynamicLibrary mscgiModule;
+  MsCgiData data;
 };
 #endif
diff --git a/myserver/include/http_handler/mscgi/mscgi_manager.h b/myserver/include/http_handler/mscgi/mscgi_manager.h
index 9d19eb9..0b53401 100644
--- a/myserver/include/http_handler/mscgi/mscgi_manager.h
+++ b/myserver/include/http_handler/mscgi/mscgi_manager.h
@@ -1,21 +1,21 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-version 2.1 of the License, or (at your option) any later version.
+  MyServer
+  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
+  version 2.1 of the License, or (at your option) any later version.
 
-This library 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
-Lesser General Public License for more details.
+  This library 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
+  Lesser General Public License for more details.
 
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+  You should have received a copy of the GNU Lesser General Public
+  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
@@ -41,28 +41,28 @@ class EXPORTABLE MscgiManager
 class MscgiManager
 # endif
 {
-public:
-	Server *getServer ();
-	MsCgiData* getCgiData ();
-	void setContentType (const char *);
-	void addHeader (const char*,  const char *);
-	int setPageError (int);
-	int raiseError (int);
-	MscgiManager (MsCgiData* data);
-	~MscgiManager (void);
-	int operator <<(const char*);
-	char* operator >>(const char*);
-	int start (MsCgiData* data);
-	int clean ();
-	void getenv (const char*, char*, u_long*);
-	char* getParam (const char*);
-	char* postParam (const char*);
-	int write (const char*);
-	int write (const void*, int);
-private:
-	HttpThreadContext* td;
-	MsCgiData* cgidata;
-	char localbuffer[LOCAL_BUFFER_DIM];
+ public:
+  Server *getServer ();
+  MsCgiData* getCgiData ();
+  void setContentType (const char *);
+  void addHeader (const char*,  const char *);
+  int setPageError (int);
+  int raiseError (int);
+  MscgiManager (MsCgiData* data);
+  ~MscgiManager (void);
+  int operator <<(const char*);
+  char* operator >>(const char*);
+  int start (MsCgiData* data);
+  int clean ();
+  void getenv (const char*, char*, u_long*);
+  char* getParam (const char*);
+  char* postParam (const char*);
+  int write (const char*);
+  int write (const void*, int);
+ private:
+  HttpThreadContext* td;
+  MsCgiData* cgidata;
+  char localbuffer[LOCAL_BUFFER_DIM];
 };
 
 #endif
diff --git a/myserver/include/http_handler/proxy/proxy.h b/myserver/include/http_handler/proxy/proxy.h
index 536eb42..9ef1642 100644
--- a/myserver/include/http_handler/proxy/proxy.h
+++ b/myserver/include/http_handler/proxy/proxy.h
@@ -35,7 +35,7 @@ public:
   static void setTimeout (int);
   static int getTimeout ();
 
-	virtual int send (HttpThreadContext*, const char* scriptpath,
+  virtual int send (HttpThreadContext*, const char* scriptpath,
                     const char* exec = 0, bool execute = false,
                     bool onlyHeader = false);
 protected:
diff --git a/myserver/include/http_handler/scgi/scgi.h b/myserver/include/http_handler/scgi/scgi.h
index 26be4a2..e6a4f7d 100644
--- a/myserver/include/http_handler/scgi/scgi.h
+++ b/myserver/include/http_handler/scgi/scgi.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(at your option) any later version.
+  MyServer
+  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
+  (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.
+  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/>.
+  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 SCGI_H
@@ -56,8 +56,8 @@ public:
   virtual int load ();
   virtual int unLoad ();
   int send (HttpThreadContext* td, const char* scriptpath,
-           const char *cgipath = 0, bool execute = false,
-           bool onlyHeader = false);
+            const char *cgipath = 0, bool execute = false,
+            bool onlyHeader = false);
 private:
   static ProcessServerManager *processServerManager;
   static int initialized;
diff --git a/myserver/include/http_handler/wincgi/wincgi.h b/myserver/include/http_handler/wincgi/wincgi.h
index b5efdad..d6dad69 100644
--- a/myserver/include/http_handler/wincgi/wincgi.h
+++ b/myserver/include/http_handler/wincgi/wincgi.h
@@ -34,7 +34,7 @@ public:
   ~WinCgi ();
 
   virtual int send (HttpThreadContext* td, const char* exec,
-                   const char* cmdLine = 0, bool execute = false,
-                   bool onlyHeader = false);
+                    const char* cmdLine = 0, bool execute = false,
+                    bool onlyHeader = false);
 };
 #endif
diff --git a/myserver/include/plugin/plugin.h b/myserver/include/plugin/plugin.h
index f69e6f7..3946b0e 100644
--- a/myserver/include/plugin/plugin.h
+++ b/myserver/include/plugin/plugin.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 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/>.
+  MyServer
+  Copyright (C) 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/>.
 */
 
 #ifndef PLUGIN_H
@@ -32,16 +32,16 @@ class XmlParser;
 class Plugin
 {
 public:
-	Plugin ();
-	virtual ~Plugin ();
-	virtual int load (Server* server);
-	virtual int preLoad (string& file, bool global);
-	virtual int postLoad (Server* server);
-	virtual int unLoad ();
-	virtual const char* getName (char* buffer, u_long len);
-	virtual void* getDirectMethod (char* name);
+  Plugin ();
+  virtual ~Plugin ();
+  virtual int load (Server* server);
+  virtual int preLoad (string& file, bool global);
+  virtual int postLoad (Server* server);
+  virtual int unLoad ();
+  virtual const char* getName (char* buffer, u_long len);
+  virtual void* getDirectMethod (char* name);
 protected:
-	DynamicLibrary hinstLib;
+  DynamicLibrary hinstLib;
 };
 
 #endif
diff --git a/myserver/include/plugin/plugin_info.h b/myserver/include/plugin/plugin_info.h
index 67ac5a4..295b5ee 100644
--- a/myserver/include/plugin/plugin_info.h
+++ b/myserver/include/plugin/plugin_info.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 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/>.
+  MyServer
+  Copyright (C) 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/>.
 */
 
 #ifndef PLUGIN_INFO_H
@@ -37,35 +37,35 @@ class PluginInfo
 public:
 
   PluginInfo (string& name, bool enabled = 1, bool global = 0);
-	~PluginInfo ();
+  ~PluginInfo ();
 
-	bool isEnabled ();
-	bool isGlobal ();
+  bool isEnabled ();
+  bool isGlobal ();
 
-	void addDependence (string, int minVersion, int maxVersion);
+  void addDependence (string, int minVersion, int maxVersion);
 
-	int getVersion ();
-	void setVersion (int v);
-	string getName ();
-	int getMyServerMinVersion ();
-	int getMyServerMaxVersion ();
-	int setMyServerMinVersion (int v);
-	int setMyServerMaxVersion (int v);
+  int getVersion ();
+  void setVersion (int v);
+  string getName ();
+  int getMyServerMinVersion ();
+  int getMyServerMaxVersion ();
+  int setMyServerMinVersion (int v);
+  int setMyServerMaxVersion (int v);
 
-	HashMap<string, pair<int,int>* >::Iterator begin (){return dependences.begin ();}
-	HashMap<string, pair<int,int>* >::Iterator end (){return dependences.end ();}
+  HashMap<string, pair<int,int>* >::Iterator begin (){return dependences.begin ();}
+  HashMap<string, pair<int,int>* >::Iterator end (){return dependences.end ();}
 
-	void setPlugin (Plugin* plugin);
-	Plugin* getPlugin ();
-	Plugin* removePlugin ();
-	void setEnabled (bool enabled);
-	pair<int,int>* getDependence (string name);
+  void setPlugin (Plugin* plugin);
+  Plugin* getPlugin ();
+  Plugin* removePlugin ();
+  void setEnabled (bool enabled);
+  pair<int,int>* getDependence (string name);
 
-	static int convertVersion (string* s);
+  static int convertVersion (string* s);
 
 private:
-	string name;
-	bool enabled;
+  string name;
+  bool enabled;
   bool global;
   int version;
   int msMinVersion;
diff --git a/myserver/include/plugin/plugins_manager.h b/myserver/include/plugin/plugins_manager.h
index 4842dfd..883a623 100644
--- a/myserver/include/plugin/plugins_manager.h
+++ b/myserver/include/plugin/plugins_manager.h
@@ -1,20 +1,20 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2007, 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/>.
- */
+  MyServer
+  Copyright (C) 2007, 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 PLUGINS_MANAGER_H
 # define PLUGINS_MANAGER_H
diff --git a/myserver/include/protocol/control/control_header.h b/myserver/include/protocol/control/control_header.h
index c23eb8a..0d6794d 100644
--- a/myserver/include/protocol/control/control_header.h
+++ b/myserver/include/protocol/control/control_header.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 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.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 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.
+  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/>.
+  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 CONTROLHEADER_H
diff --git a/myserver/include/protocol/ftp/ftp.h b/myserver/include/protocol/ftp/ftp.h
index e420bbf..9633bbd 100644
--- a/myserver/include/protocol/ftp/ftp.h
+++ b/myserver/include/protocol/ftp/ftp.h
@@ -128,7 +128,7 @@ public:
   static int LAST_PASV_PORT;
 
   int checkRights (const std::string & suser, const std::string & sPass,
-		   const std::string & sPath, int mask);
+                   const std::string & sPath, int mask);
   void waitDataConnection ();
 
   int OpenDataConnection ();
diff --git a/myserver/include/protocol/ftp/ftp_common.h b/myserver/include/protocol/ftp/ftp_common.h
index cec7339..cac3a16 100644
--- a/myserver/include/protocol/ftp/ftp_common.h
+++ b/myserver/include/protocol/ftp/ftp_common.h
@@ -24,12 +24,12 @@
 
 # include <string>
 
-# define PARSER_STR_LEN	512
+# define PARSER_STR_LEN 512
 
 struct FtpHost
 {
-	int h1, h2, h3, h4;
-	int p1, p2;
+  int h1, h2, h3, h4;
+  int p1, p2;
 };
 
 void setFtpHost (FtpHost &out, const FtpHost &in);
diff --git a/myserver/include/protocol/ftp/ftp_lexer.h b/myserver/include/protocol/ftp/ftp_lexer.h
index e85448f..5123dbf 100644
--- a/myserver/include/protocol/ftp/ftp_lexer.h
+++ b/myserver/include/protocol/ftp/ftp_lexer.h
@@ -97,15 +97,15 @@ typedef unsigned int flex_uint32_t;
 /* The "const" storage-class-modifier is valid. */
 #define YY_USE_CONST
 
-#else	/* ! __cplusplus */
+#else   /* ! __cplusplus */
 
 /* C99 requires __STDC__ to be defined as 1. */
 #if defined (__STDC__)
 
 #define YY_USE_CONST
 
-#endif	/* defined (__STDC__) */
-#endif	/* ! __cplusplus */
+#endif  /* defined (__STDC__) */
+#endif  /* ! __cplusplus */
 
 #ifdef YY_USE_CONST
 #define yyconst const
@@ -156,52 +156,52 @@ typedef size_t yy_size_t;
 #ifndef YY_STRUCT_YY_BUFFER_STATE
 #define YY_STRUCT_YY_BUFFER_STATE
 struct yy_buffer_state
-	{
-	FILE *yy_input_file;
-
-	char *yy_ch_buf;		/* input buffer */
-	char *yy_buf_pos;		/* current position in input buffer */
-
-	/* Size of input buffer in bytes, not including room for EOB
-	 * characters.
-	 */
-	yy_size_t yy_buf_size;
-
-	/* Number of characters read into yy_ch_buf, not including EOB
-	 * characters.
-	 */
-	int yy_n_chars;
-
-	/* Whether we "own" the buffer - i.e., we know we created it,
-	 * and can realloc() it to grow it, and should free() it to
-	 * delete it.
-	 */
-	int yy_is_our_buffer;
-
-	/* Whether this is an "interactive" input source; if so, and
-	 * if we're using stdio for input, then we want to use getc()
-	 * instead of fread(), to make sure we stop fetching input after
-	 * each newline.
-	 */
-	int yy_is_interactive;
-
-	/* Whether we're considered to be at the beginning of a line.
-	 * If so, '^' rules will be active on the next match, otherwise
-	 * not.
-	 */
-	int yy_at_bol;
-
-    int yy_bs_lineno; /**< The line count. */
-    int yy_bs_column; /**< The column count. */
+{
+  FILE *yy_input_file;
+
+  char *yy_ch_buf;              /* input buffer */
+  char *yy_buf_pos;             /* current position in input buffer */
+
+  /* Size of input buffer in bytes, not including room for EOB
+   * characters.
+   */
+  yy_size_t yy_buf_size;
+
+  /* Number of characters read into yy_ch_buf, not including EOB
+   * characters.
+   */
+  int yy_n_chars;
+
+  /* Whether we "own" the buffer - i.e., we know we created it,
+   * and can realloc() it to grow it, and should free() it to
+   * delete it.
+   */
+  int yy_is_our_buffer;
+
+  /* Whether this is an "interactive" input source; if so, and
+   * if we're using stdio for input, then we want to use getc()
+   * instead of fread(), to make sure we stop fetching input after
+   * each newline.
+   */
+  int yy_is_interactive;
+
+  /* Whether we're considered to be at the beginning of a line.
+   * If so, '^' rules will be active on the next match, otherwise
+   * not.
+   */
+  int yy_at_bol;
+
+  int yy_bs_lineno; /**< The line count. */
+  int yy_bs_column; /**< The column count. */
     
-	/* Whether to try to fill the input buffer when we reach the
-	 * end of it.
-	 */
-	int yy_fill_buffer;
+  /* Whether to try to fill the input buffer when we reach the
+   * end of it.
+   */
+  int yy_fill_buffer;
 
-	int yy_buffer_status;
+  int yy_buffer_status;
 
-	};
+};
 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
 
 void yyrestart (FILE *input_file ,yyscan_t yyscanner );
@@ -284,9 +284,9 @@ YYSTYPE * yyget_lval (yyscan_t yyscanner );
 
 void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
 
-       YYLTYPE *yyget_lloc (yyscan_t yyscanner );
+YYLTYPE *yyget_lloc (yyscan_t yyscanner );
     
-        void yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
+void yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
     
 /* Macros after this point can all be overridden by user definitions in
  * section 1.
@@ -334,10 +334,10 @@ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
 #define YY_DECL_IS_OURS 1
 
 extern int yylex \
-               (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
+(YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
 
-#define YY_DECL int yylex \
-               (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
+#define YY_DECL int yylex                                               \
+  (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
 #endif /* !YY_DECL */
 
 /* yy_get_previous_state - get the state just before the EOB char was reached */
diff --git a/myserver/include/protocol/ftp/ftp_parser.h b/myserver/include/protocol/ftp/ftp_parser.h
index 3d0b19c..f041eb3 100644
--- a/myserver/include/protocol/ftp/ftp_parser.h
+++ b/myserver/include/protocol/ftp/ftp_parser.h
@@ -3,7 +3,7 @@
 
 /* Skeleton interface for Bison's Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
    
    This program is free software: you can redistribute it and/or modify
@@ -36,49 +36,49 @@
 /* Tokens.  */
 #ifndef YYTOKENTYPE
 # define YYTOKENTYPE
-   /* Put the tokens into the symbol table, so that GDB and other debuggers
-      know about them.  */
-   enum yytokentype {
-     NUMBER_FTP_ARG = 258,
-     STRING_FTP_ARG = 259,
-     CHAR_FTP_ARG = 260,
-     CRLF_FTP_SEP = 261,
-     SPACE_FTP_SEP = 262,
-     PUNCT_FTP_SEP = 263,
-     USER_FTP_COMMAND = 264,
-     PASS_FTP_COMMAND = 265,
-     QUIT_FTP_COMMAND = 266,
-     PORT_FTP_COMMAND = 267,
-     PASV_FTP_COMMAND = 268,
-     MODE_FTP_COMMAND = 269,
-     TYPE_FTP_COMMAND = 270,
-     STRU_FTP_COMMAND = 271,
-     REST_FTP_COMMAND = 272,
-     RETR_FTP_COMMAND = 273,
-     LIST_FTP_COMMAND = 274,
-     NLST_FTP_COMMAND = 275,
-     ABOR_FTP_COMMAND = 276,
-     CWD_FTP_COMMAND = 277,
-     CDUP_FTP_COMMAND = 278,
-     PWD_FTP_COMMAND = 279,
-     ALLO_FTP_COMMAND = 280,
-     STOR_FTP_COMMAND = 281,
-     STOU_FTP_COMMAND = 282,
-     DELE_FTP_COMMAND = 283,
-     APPE_FTP_COMMAND = 284,
-     MKD_FTP_COMMAND = 285,
-     RMD_FTP_COMMAND = 286,
-     RNFR_FTP_COMMAND = 287,
-     RNTO_FTP_COMMAND = 288,
-     HELP_FTP_COMMAND = 289,
-     SYST_FTP_COMMAND = 290,
-     STAT_FTP_COMMAND = 291,
-     NOOP_FTP_COMMAND = 292,
-     SITE_FTP_COMMAND = 293,
-     CHMOD_FTP_COMMAND = 294,
-     UTIME_FTP_COMMAND = 295,
-     SIZE_FTP_COMMAND = 296
-   };
+/* Put the tokens into the symbol table, so that GDB and other debuggers
+   know about them.  */
+enum yytokentype {
+  NUMBER_FTP_ARG = 258,
+  STRING_FTP_ARG = 259,
+  CHAR_FTP_ARG = 260,
+  CRLF_FTP_SEP = 261,
+  SPACE_FTP_SEP = 262,
+  PUNCT_FTP_SEP = 263,
+  USER_FTP_COMMAND = 264,
+  PASS_FTP_COMMAND = 265,
+  QUIT_FTP_COMMAND = 266,
+  PORT_FTP_COMMAND = 267,
+  PASV_FTP_COMMAND = 268,
+  MODE_FTP_COMMAND = 269,
+  TYPE_FTP_COMMAND = 270,
+  STRU_FTP_COMMAND = 271,
+  REST_FTP_COMMAND = 272,
+  RETR_FTP_COMMAND = 273,
+  LIST_FTP_COMMAND = 274,
+  NLST_FTP_COMMAND = 275,
+  ABOR_FTP_COMMAND = 276,
+  CWD_FTP_COMMAND = 277,
+  CDUP_FTP_COMMAND = 278,
+  PWD_FTP_COMMAND = 279,
+  ALLO_FTP_COMMAND = 280,
+  STOR_FTP_COMMAND = 281,
+  STOU_FTP_COMMAND = 282,
+  DELE_FTP_COMMAND = 283,
+  APPE_FTP_COMMAND = 284,
+  MKD_FTP_COMMAND = 285,
+  RMD_FTP_COMMAND = 286,
+  RNFR_FTP_COMMAND = 287,
+  RNTO_FTP_COMMAND = 288,
+  HELP_FTP_COMMAND = 289,
+  SYST_FTP_COMMAND = 290,
+  STAT_FTP_COMMAND = 291,
+  NOOP_FTP_COMMAND = 292,
+  SITE_FTP_COMMAND = 293,
+  CHMOD_FTP_COMMAND = 294,
+  UTIME_FTP_COMMAND = 295,
+  SIZE_FTP_COMMAND = 296
+};
 #endif
 /* Tokens.  */
 #define NUMBER_FTP_ARG 258
@@ -128,17 +128,17 @@
 typedef union YYSTYPE
 {
 
-/* Line 1676 of yacc.c  */
+  /* Line 1676 of yacc.c  */
 #line 15 "ftp_parser.ypp"
 
-	int		m_nInt;
-	char		m_nChar;
-	char		m_szStr[PARSER_STR_LEN];
-	FtpHost 	m_host;
+  int           m_nInt;
+  char          m_nChar;
+  char          m_szStr[PARSER_STR_LEN];
+  FtpHost       m_host;
 
 
 
-/* Line 1676 of yacc.c  */
+  /* Line 1676 of yacc.c  */
 #line 143 "../../../include/protocol/ftp/ftp_parser.h"
 } YYSTYPE;
 # define YYSTYPE_IS_TRIVIAL 1
diff --git a/myserver/include/protocol/gopher/engine.h b/myserver/include/protocol/gopher/engine.h
index 5211078..a6a10a9 100644
--- a/myserver/include/protocol/gopher/engine.h
+++ b/myserver/include/protocol/gopher/engine.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002-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.
+  MyServer
+  Copyright (C) 2002-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.
+  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/>.
+  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 GOPHER_ENGINE_H
diff --git a/myserver/include/protocol/gopher/gopher.h b/myserver/include/protocol/gopher/gopher.h
index e9905f0..bc11e52 100644
--- a/myserver/include/protocol/gopher/gopher.h
+++ b/myserver/include/protocol/gopher/gopher.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002-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/>.
+  MyServer
+  Copyright (C) 2002-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 GOPHER_H
diff --git a/myserver/include/protocol/gopher/gopher_content.h b/myserver/include/protocol/gopher/gopher_content.h
index 9802c95..2644c81 100644
--- a/myserver/include/protocol/gopher/gopher_content.h
+++ b/myserver/include/protocol/gopher/gopher_content.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002-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/>.
+  MyServer
+  Copyright (C) 2002-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 GOPHER_CONTENT_H
@@ -55,7 +55,7 @@ protected:
 
 class GopherItem: public GopherContent
 {
- public:
+public:
   GopherItem ();
   GopherItem (char, const char[], const char[], const char[], const char[]);
 
@@ -74,7 +74,7 @@ class GopherItem: public GopherContent
 
   void toProtocol (Socket *s);
 
- protected:
+protected:
   char type;
   string desc;
   string rlocation;
@@ -249,7 +249,6 @@ private:
   string buff;
 };
 
-
 class GopherFileContent: public GopherContent
 {
 public:
diff --git a/myserver/include/protocol/http/env/env.h b/myserver/include/protocol/http/env/env.h
index 70aeed8..306433e 100644
--- a/myserver/include/protocol/http/env/env.h
+++ b/myserver/include/protocol/http/env/env.h
@@ -30,7 +30,7 @@
 class Env
 {
 public:
-	static void buildEnvironmentString (HttpThreadContext*, char*, int = 1);
+  static void buildEnvironmentString (HttpThreadContext*, char*, int = 1);
 private:
   static void buildProcessEnvString (MemBuf& memCgi);
   static void buildHttpHeaderEnvString (MemBuf& memCgi, HttpRequestHeader & req);
diff --git a/myserver/include/protocol/http/http_data_read.h b/myserver/include/protocol/http/http_data_read.h
index bfcf3a0..eb82683 100644
--- a/myserver/include/protocol/http/http_data_read.h
+++ b/myserver/include/protocol/http/http_data_read.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002-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.
+  MyServer
+  Copyright (C) 2002-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.
+  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/>.
+  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 HTTP_DATA_READ_H
@@ -44,23 +44,23 @@ public:
   static int readPostData (HttpThreadContext* td, int* ret);
 
   static int readContiguousPrimitivePostData (const char* inBuffer,
-                                             u_long *inBufferPos,
-                                             u_long inBufferSize,
-                                             Socket *inSocket,
-                                             char* outBuffer,
-                                             u_long outBufferSize,
-                                             u_long* nbr,
-                                             u_long timeout);
+                                              u_long *inBufferPos,
+                                              u_long inBufferSize,
+                                              Socket *inSocket,
+                                              char* outBuffer,
+                                              u_long outBufferSize,
+                                              u_long* nbr,
+                                              u_long timeout);
   static int readChunkedPostData (const char* inBuffer,
-                                 u_long *inBufferPos,
-                                 u_long inBufferSize,
-                                 Socket *inSocket,
-                                 char* outBuffer,
-                                 u_long outBufferSize,
-                                 u_long* nbr,
-                                 u_long timeout,
-                                 Stream* out,
-                                 long maxChunks);
+                                  u_long *inBufferPos,
+                                  u_long inBufferSize,
+                                  Socket *inSocket,
+                                  char* outBuffer,
+                                  u_long outBufferSize,
+                                  u_long* nbr,
+                                  u_long timeout,
+                                  Stream* out,
+                                  long maxChunks);
 
 };
 
diff --git a/myserver/include/protocol/http/http_errors.h b/myserver/include/protocol/http/http_errors.h
index 278b195..597ffb4 100644
--- a/myserver/include/protocol/http/http_errors.h
+++ b/myserver/include/protocol/http/http_errors.h
@@ -31,13 +31,13 @@ using namespace std;
 class HttpErrors
 {
 public:
-	static void getErrorPage (int statusCode, string& out);
-	static void getErrorMessage (int statusCode, string& out);
-	static void load ();
-	static void unLoad ();
+  static void getErrorPage (int statusCode, string& out);
+  static void getErrorMessage (int statusCode, string& out);
+  static void load ();
+  static void unLoad ();
 private:
   static bool loaded;
-	static void putMessage (int, const char*);
-	static HashMap<int, const char*> messagesMap;
+  static void putMessage (int, const char*);
+  static HashMap<int, const char*> messagesMap;
 };
 #endif
diff --git a/myserver/include/protocol/http/http_header.h b/myserver/include/protocol/http/http_header.h
index 48a5919..c9196f6 100644
--- a/myserver/include/protocol/http/http_header.h
+++ b/myserver/include/protocol/http/http_header.h
@@ -29,7 +29,7 @@ using namespace std;
 struct HttpHeader
 {
   virtual string* getValue (const char* name, string* out) = 0;
-	virtual string* setValue (const char* name, const char* in) = 0;
+  virtual string* setValue (const char* name, const char* in) = 0;
   virtual ~HttpHeader (){}
 };
 
diff --git a/myserver/include/protocol/http/http_req_security_domain.h b/myserver/include/protocol/http/http_req_security_domain.h
index ca74fb7..65a80c3 100644
--- a/myserver/include/protocol/http/http_req_security_domain.h
+++ b/myserver/include/protocol/http/http_req_security_domain.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-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
-(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, 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 HTTP_REQ_SECURITY_DOMAIN_H
diff --git a/myserver/include/protocol/http/http_request.h b/myserver/include/protocol/http/http_request.h
index b381573..79236e8 100644
--- a/myserver/include/protocol/http/http_request.h
+++ b/myserver/include/protocol/http/http_request.h
@@ -48,64 +48,64 @@ struct HttpRequestHeader : public HttpHeader
   {
     string *name;
     string *value;
-		Entry ()
-		{
-			name = new string ();
-			value = new string ();
-		}
+    Entry ()
+    {
+      name = new string ();
+      value = new string ();
+    }
 
-		Entry (string& n, string& v)
-		{
-			name = new string ();
-			value = new string ();
+    Entry (string& n, string& v)
+    {
+      name = new string ();
+      value = new string ();
 
-			name->assign (n);
-			value->assign (v);
-		}
+      name->assign (n);
+      value->assign (v);
+    }
 
-		~Entry ()
-		{
-			delete name;
-			delete value;
+    ~Entry ()
+    {
+      delete name;
+      delete value;
 
-		}
+    }
 
   };
-	string cmd;
-	string ver;
-	string auth;
-	string contentLength;
-	string uri;
-	string uriOpts;
-	char *uriOptsPtr;
-	string rangeType;
-	u_long rangeByteBegin;
-	u_long rangeByteEnd;
-	int uriEndsWithSlash;
-
-	/*! Digest authorization scheme stuff.  */
-	char digestRealm[48+1];
-	char digestOpaque[48+1];
-	char digestNonce[48+1];
-	char digestCnonce[48+1];
-	char digestUri[1024+1];
-	char digestMethod[16+1];
-	char digestUsername[48+1];
-	char digestResponse[48+1];
-	char digestQop[16+1];
-	char digestNc[10+1];
-
-
-	HashMap<string, HttpRequestHeader::Entry*> other;
+  string cmd;
+  string ver;
+  string auth;
+  string contentLength;
+  string uri;
+  string uriOpts;
+  char *uriOptsPtr;
+  string rangeType;
+  u_long rangeByteBegin;
+  u_long rangeByteEnd;
+  int uriEndsWithSlash;
+
+  /*! Digest authorization scheme stuff.  */
+  char digestRealm[48+1];
+  char digestOpaque[48+1];
+  char digestNonce[48+1];
+  char digestCnonce[48+1];
+  char digestUri[1024+1];
+  char digestMethod[16+1];
+  char digestUsername[48+1];
+  char digestResponse[48+1];
+  char digestQop[16+1];
+  char digestNc[10+1];
+
+
+  HashMap<string, HttpRequestHeader::Entry*> other;
   virtual string* getValue (const char* name, string* out);
   virtual string* setValue (const char* name, const char* in);
 
-	HashMap<string, HttpRequestHeader::Entry*>::Iterator begin (){return other.begin ();}
-	HashMap<string, HttpRequestHeader::Entry*>::Iterator back (){return other.back ();}
-	HashMap<string, HttpRequestHeader::Entry*>::Iterator end (){return other.end ();}
+  HashMap<string, HttpRequestHeader::Entry*>::Iterator begin (){return other.begin ();}
+  HashMap<string, HttpRequestHeader::Entry*>::Iterator back (){return other.back ();}
+  HashMap<string, HttpRequestHeader::Entry*>::Iterator end (){return other.end ();}
 
 
-	bool isKeepAlive ();
+  bool isKeepAlive ();
 
   HttpRequestHeader ();
   ~HttpRequestHeader ();
diff --git a/myserver/include/protocol/http/http_response.h b/myserver/include/protocol/http/http_response.h
index 926f7ed..10ad784 100644
--- a/myserver/include/protocol/http/http_response.h
+++ b/myserver/include/protocol/http/http_response.h
@@ -47,33 +47,33 @@ struct HttpResponseHeader : public HttpHeader
   {
     string *name;
     string *value;
-		Entry ()
-		{
-			name = new string ();
-			value = new string ();
-		}
-
-		Entry (string& n, string& v)
-		{
-			name = new string ();
-			value = new string ();
-
-			name->assign (n);
-			value->assign (v);
-		}
-		~Entry ()
-		{
-			delete name;
-			delete value;
-
-		}
+    Entry ()
+    {
+      name = new string ();
+      value = new string ();
+    }
+
+    Entry (string& n, string& v)
+    {
+      name = new string ();
+      value = new string ();
+
+      name->assign (n);
+      value->assign (v);
+    }
+    ~Entry ()
+    {
+      delete name;
+      delete value;
+
+    }
   };
-	int httpStatus;
-	string ver;
-	string contentLength;
-	string errorType;
+  int httpStatus;
+  string ver;
+  string contentLength;
+  string errorType;
 
-	HashMap<string,HttpResponseHeader::Entry*> other;
+  HashMap<string,HttpResponseHeader::Entry*> other;
   HttpResponseHeader ();
   ~HttpResponseHeader ();
 
diff --git a/myserver/include/server/clients_thread.h b/myserver/include/server/clients_thread.h
index 954115d..10c504f 100644
--- a/myserver/include/server/clients_thread.h
+++ b/myserver/include/server/clients_thread.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2005, 2006, 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.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2005, 2006, 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.
+  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/>.
+  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 CLIENTS_THREAD_H
@@ -33,26 +33,26 @@ class  ClientsThread
 
 public:
   enum RETURN_CODE
-  {
-    /*!
-      Delete the current connection from the connections pool.
-    */
-    DELETE_CONNECTION = 1,
-    /*!
-      Keep the connection in the connections pool waiting for new data.
-    */
-    KEEP_CONNECTION,
-    /*!
-      The request present in the connection buffer is not complete, keep
-      data in the buffer and append to it.
-    */
-    INCOMPLETE_REQUEST,
-    /*!
-      The request present in the buffer is not complete, append to the buffer
-      and check before new data is present.
-    */
-    INCOMPLETE_REQUEST_NO_WAIT
-  };
+    {
+      /*!
+        Delete the current connection from the connections pool.
+      */
+      DELETE_CONNECTION = 1,
+      /*!
+        Keep the connection in the connections pool waiting for new data.
+      */
+      KEEP_CONNECTION,
+      /*!
+        The request present in the connection buffer is not complete, keep
+        data in the buffer and append to it.
+      */
+      INCOMPLETE_REQUEST,
+      /*!
+        The request present in the buffer is not complete, append to the buffer
+        and check before new data is present.
+      */
+      INCOMPLETE_REQUEST_NO_WAIT
+    };
 
   MemBuf *getBuffer ();
   MemBuf *getAuxiliaryBuffer ();
diff --git a/myserver/include/server/server.h b/myserver/include/server/server.h
index 518f79d..b4ca619 100644
--- a/myserver/include/server/server.h
+++ b/myserver/include/server/server.h
@@ -1,19 +1,19 @@
 /* -*- mode: c++ -*- */
 /*
-MyServer
-Copyright (C) 2002, 2003, 2004, 2005, 2006, 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/>.
+  MyServer
+  Copyright (C) 2002, 2003, 2004, 2005, 2006, 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/>.
 */
 
 #ifndef SERVER_H
@@ -120,7 +120,8 @@ public:
   int getMaxLogFileSize ();
   int mustUseLogonOption ();
   void start (string &, string &, string &, string &,
-           MainConfiguration* (*genMainConf) (Server *server, const char *arg));
+              MainConfiguration* (*genMainConf) (Server *server,
+                                                 const char *arg));
   void stop ();
   void finalCleanup ();
   int terminate ();

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

Summary of changes:
 myserver/include/base/base64/mime_utils.h          |   26 +-
 myserver/include/base/bitvec/bitvec.h              |   24 +-
 myserver/include/base/dynamic_lib/dynamiclib.h     |   32 +-
 myserver/include/base/file/file.h                  |   32 +-
 myserver/include/base/file/files_utility.h         |   46 ++--
 .../include/base/files_cache/cached_file_buffer.h  |   28 +-
 .../include/base/files_cache/cached_file_factory.h |   28 +-
 myserver/include/base/hash_map/hash_map.h          |  368 ++++++++++----------
 myserver/include/base/home_dir/home_dir.h          |   44 ++--
 myserver/include/base/multicast/multicast.h        |   46 ++--
 myserver/include/base/pipe/pipe.h                  |   24 +-
 myserver/include/base/process/process.h            |   64 ++--
 .../include/base/process/process_server_manager.h  |  136 ++++----
 .../include/base/read_directory/read_directory.h   |   24 +-
 myserver/include/base/regex/myserver_regex.h       |   36 +-
 myserver/include/base/safetime/safetime.h          |   28 +-
 myserver/include/base/slab/slab.h                  |   28 +-
 myserver/include/base/socket/socket.h              |   28 +-
 myserver/include/base/socket/ssl_socket.h          |   66 ++--
 myserver/include/base/ssl/ssl.h                    |   60 ++--
 myserver/include/base/string/securestr.h           |   28 +-
 myserver/include/base/string/stringutils.h         |    2 +-
 myserver/include/base/sync/event.h                 |   54 ++--
 myserver/include/base/sync/mutex.h                 |   46 ++--
 myserver/include/base/sync/read_write_lock.h       |   40 +-
 myserver/include/base/sync/recursive_mutex.h       |   32 +-
 myserver/include/base/sync/semaphore.h             |   40 +-
 myserver/include/base/thread/thread.h              |   42 ++--
 myserver/include/base/unix_socket/unix_socket.h    |   24 +-
 myserver/include/base/utility.h                    |   28 +-
 myserver/include/base/xml/xml_parser.h             |   24 +-
 myserver/include/conf/main/main_configuration.h    |   28 +-
 .../include/conf/main/xml_main_configuration.h     |   24 +-
 myserver/include/conf/security/auth_domain.h       |   28 +-
 myserver/include/conf/security/auth_method.h       |   30 +-
 .../include/conf/security/auth_method_factory.h    |   30 +-
 myserver/include/conf/security/security_cache.h    |   10 +-
 myserver/include/conf/security/security_domain.h   |   28 +-
 myserver/include/conf/security/security_manager.h  |   62 ++--
 myserver/include/conf/security/validator.h         |   30 +-
 myserver/include/conf/security/validator_factory.h |   26 +-
 myserver/include/conf/vhost/ip.h                   |    2 +-
 myserver/include/conf/xml_conf.h                   |    4 +-
 .../connections_scheduler/connections_scheduler.h  |   30 +-
 .../include/connections_scheduler/listen_threads.h |   78 ++--
 myserver/include/filter/filter.h                   |   28 +-
 myserver/include/filter/filters_factory.h          |   32 +-
 myserver/include/filter/gzip/gzip.h                |    4 +-
 myserver/include/filter/gzip/gzip_decompress.h     |   66 ++--
 myserver/include/filter/memory_stream.h            |   24 +-
 myserver/include/http_handler/cgi/cgi.h            |    2 +-
 myserver/include/http_handler/fastcgi/fastcgi.h    |   80 +++---
 myserver/include/http_handler/http_dir/http_dir.h  |   32 +-
 .../include/http_handler/http_file/http_file.h     |   32 +-
 myserver/include/http_handler/isapi/isapi.h        |   42 ++--
 myserver/include/http_handler/mscgi/mscgi.h        |   38 +-
 .../include/http_handler/mscgi/mscgi_manager.h     |   72 ++--
 myserver/include/http_handler/proxy/proxy.h        |    2 +-
 myserver/include/http_handler/scgi/scgi.h          |   28 +-
 myserver/include/http_handler/wincgi/wincgi.h      |    4 +-
 myserver/include/plugin/plugin.h                   |   46 ++--
 myserver/include/plugin/plugin_info.h              |   70 ++--
 myserver/include/plugin/plugins_manager.h          |   26 +-
 myserver/include/protocol/control/control_header.h |   24 +-
 myserver/include/protocol/ftp/ftp.h                |    2 +-
 myserver/include/protocol/ftp/ftp_common.h         |    6 +-
 myserver/include/protocol/ftp/ftp_lexer.h          |  102 +++---
 myserver/include/protocol/ftp/ftp_parser.h         |  100 +++---
 myserver/include/protocol/gopher/engine.h          |   28 +-
 myserver/include/protocol/gopher/gopher.h          |   28 +-
 myserver/include/protocol/gopher/gopher_content.h  |   33 +-
 myserver/include/protocol/http/env/env.h           |    2 +-
 myserver/include/protocol/http/http_data_read.h    |   56 ++--
 myserver/include/protocol/http/http_errors.h       |   12 +-
 myserver/include/protocol/http/http_header.h       |    2 +-
 .../protocol/http/http_req_security_domain.h       |   28 +-
 myserver/include/protocol/http/http_request.h      |   94 +++---
 myserver/include/protocol/http/http_response.h     |   50 ++--
 myserver/include/server/clients_thread.h           |   64 ++--
 myserver/include/server/server.h                   |   31 +-
 80 files changed, 1613 insertions(+), 1615 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Mon Nov 09 11:58:37 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N7XZc-0004us-RA
	for mharc-myserver-commit@gnu.org; Mon, 09 Nov 2009 11:58:37 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N7XZZ-0004ua-Vc
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 11:58:34 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N7XZZ-0004uD-AC
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 11:58:33 -0500
Received: from [199.232.76.173] (port=56103 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N7XZX-0004u7-R2
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 11:58:32 -0500
Received: from savannah.gnu.org ([199.232.41.3]:49770 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 1N7XZX-0008Ml-8j
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 11:58:31 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N7XZW-0002l2-TH
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 16:58:30 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N7XZW-0002kX-Kq
	for myserver-commit@gnu.org; Mon, 09 Nov 2009 16:58:30 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: f4d8d8a3011332a400b96629f8fdec658377b2a9
X-Git-Newrev: 510c8b8238b8cb4a2d5ccfbdda0058512d7913d5
Message-Id: <E1N7XZW-0002kX-Kq@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Mon, 09 Nov 2009 16:58: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. 0_9-399-g510c8b8
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, 09 Nov 2009 16:58:34 -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  510c8b8238b8cb4a2d5ccfbdda0058512d7913d5 (commit)
       via  06ee870fbd638a27e7c669fcecd5ea1a75e72226 (commit)
      from  f4d8d8a3011332a400b96629f8fdec658377b2a9 (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 510c8b8238b8cb4a2d5ccfbdda0058512d7913d5
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Nov 9 17:57:16 2009 +0100

    Small optimization: pass the argument by reference, not by copy.

diff --git a/myserver/include/log/stream/log_stream.h b/myserver/include/log/stream/log_stream.h
index 42016d9..73048dc 100644
--- a/myserver/include/log/stream/log_stream.h
+++ b/myserver/include/log/stream/log_stream.h
@@ -78,7 +78,7 @@ public:
 protected:
   virtual int streamCycle ();
   int doCycle ();
-  int write (string message);
+  int write (const string &message);
   int resetFilters ();
   u_long nbw;
   u_long cycle;
diff --git a/myserver/src/log/stream/log_stream.cpp b/myserver/src/log/stream/log_stream.cpp
index 2fc156a..c46e5a8 100644
--- a/myserver/src/log/stream/log_stream.cpp
+++ b/myserver/src/log/stream/log_stream.cpp
@@ -76,9 +76,9 @@ LogStream::doCycle ()
 }
 
 int
-LogStream::write (string message)
+LogStream::write (const string &message)
 {
-  return fc->write (message.c_str (), message.size (), &nbw);
+  return fc->write (message.c_str (), message.length (), &nbw);
 }
 
 int



commit 06ee870fbd638a27e7c669fcecd5ea1a75e72226
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Nov 9 17:56:00 2009 +0100

    Specify which log use when the new-line is notified.

diff --git a/myserver/src/log/log_manager.cpp b/myserver/src/log/log_manager.cpp
index d6698e0..1f9ebea 100644
--- a/myserver/src/log/log_manager.cpp
+++ b/myserver/src/log/log_manager.cpp
@@ -676,7 +676,7 @@ LogManager::log (const void* owner, const string & type, LoggingLevel level,
              || notify (owner, type, MYSERVER_LOG_EVT_LOG, &message);
 
       if (appendNL)
-        failure |= notify (owner, MYSERVER_LOG_EVT_LOG, &newline);
+        failure |= notify (owner, type, MYSERVER_LOG_EVT_LOG, &newline);
     }
   catch (...)
     {

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

Summary of changes:
 myserver/include/log/stream/log_stream.h |    2 +-
 myserver/src/log/log_manager.cpp         |    2 +-
 myserver/src/log/stream/log_stream.cpp   |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Tue Nov 10 17:37:58 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N7zLa-0006fF-AC
	for mharc-myserver-commit@gnu.org; Tue, 10 Nov 2009 17:37:58 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N7zLY-0006eF-AU
	for myserver-commit@gnu.org; Tue, 10 Nov 2009 17:37:56 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N7zLX-0006dl-Bf
	for myserver-commit@gnu.org; Tue, 10 Nov 2009 17:37:55 -0500
Received: from [199.232.76.173] (port=54521 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N7zLX-0006df-4g
	for myserver-commit@gnu.org; Tue, 10 Nov 2009 17:37:55 -0500
Received: from savannah.gnu.org ([199.232.41.3]:56589 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 1N7zLW-0004De-MA
	for myserver-commit@gnu.org; Tue, 10 Nov 2009 17:37:54 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N7zLW-0004tt-DN
	for myserver-commit@gnu.org; Tue, 10 Nov 2009 22:37:54 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N7zLT-0004tL-F3
	for myserver-commit@gnu.org; Tue, 10 Nov 2009 22:37:54 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 510c8b8238b8cb4a2d5ccfbdda0058512d7913d5
X-Git-Newrev: dc0439e55949fd7d4ce8d683562e957bd2d02508
Message-Id: <E1N7zLT-0004tL-F3@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 10 Nov 2009 22:37: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. 0_9-400-gdc0439e
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, 10 Nov 2009 22:37:56 -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  dc0439e55949fd7d4ce8d683562e957bd2d02508 (commit)
      from  510c8b8238b8cb4a2d5ccfbdda0058512d7913d5 (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 dc0439e55949fd7d4ce8d683562e957bd2d02508
Author: Domenico Chierico <spaghetty@gmail.com>
Date:   Tue Nov 10 21:04:08 2009 +0100

    Add a test for the gopher protocol.
    
    A new mock class MemorySocket is used to expose the socket interface.

diff --git a/myserver/tests/Makefile.am b/myserver/tests/Makefile.am
index 50c05a3..f634da8 100644
--- a/myserver/tests/Makefile.am
+++ b/myserver/tests/Makefile.am
@@ -1,5 +1,6 @@
 bin_PROGRAMS = tests_suite
 tests_suite_SOURCES =  	main.cpp				\
+			memory_socket.h			\
 			test_auth_domain.cpp			\
 			test_auth_method.cpp			\
 			test_base64.cpp				\
@@ -17,6 +18,7 @@ tests_suite_SOURCES =  	main.cpp				\
 			test_filter_chain.cpp			\
 			test_fork_server.cpp			\
 			test_ftp.cpp				\
+			test_gopher_content.cpp				\
 			test_gzip.cpp				\
 			test_hashmap.cpp			\
 			test_homedir.cpp			\
@@ -30,6 +32,7 @@ tests_suite_SOURCES =  	main.cpp				\
 			test_mem_buff.cpp			\
 			test_mem_stream.cpp			\
 			test_membuf_file.cpp			\
+			test_mem_socket.cpp			\
 			test_mime_manager.cpp			\
 			test_multicast.cpp			\
 			test_mutex.cpp				\
diff --git a/myserver/tests/memory_socket.h b/myserver/tests/memory_socket.h
new file mode 100644
index 0000000..54bd531
--- /dev/null
+++ b/myserver/tests/memory_socket.h
@@ -0,0 +1,70 @@
+/*
+  MyServer
+  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
+  (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/base/socket/socket.h>
+#include <string.h>
+#include <include/base/mem_buff/mem_buff.h>
+
+
+class MemorySocket : public Socket
+{
+public:
+  MemorySocket (){};
+  ~MemorySocket (){};
+
+
+  virtual Handle getHandle () {return (Handle) -1;}
+
+  virtual int connect (MYSERVER_SOCKADDR*, int) {return 0;}
+  virtual int close (){return 0;}
+  virtual int shutdown (int){return 0;}
+  virtual int recv (char*, int, int, u_long){return 0;}
+  virtual int recv (char*, int, int) {return 0;}
+  virtual u_long bytesToRead () {return 0;}
+
+  virtual int dataOnRead (int sec = 0, int usec = 500){return 0;}
+
+  int read (char* buffer, u_long len, u_long *nbr)
+  {
+    return len;
+  }
+
+  int write (const char* buffer, u_long len, u_long *nbw)
+  {
+    interBuff << buffer;
+    return len;
+  }
+
+  int rawSend (const char* buffer, int len, int flags)
+  {
+    interBuff << buffer;
+    return len;
+  }
+
+  int getLength()
+  {
+    return interBuff.getLength();
+  }
+
+  operator const char *()
+  {
+    return interBuff.getBuffer ();
+  }
+
+private:
+  MemBuf interBuff;
+};
diff --git a/myserver/tests/test_gopher_content.cpp b/myserver/tests/test_gopher_content.cpp
new file mode 100644
index 0000000..548d8ea
--- /dev/null
+++ b/myserver/tests/test_gopher_content.cpp
@@ -0,0 +1,63 @@
+/*
+  MyServer
+  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
+  (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"
+#include <include/protocol/gopher/gopher_content.h>
+#include "memory_socket.h"
+
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+
+class TestGopherContent : public CppUnit::TestFixture
+{
+  CPPUNIT_TEST_SUITE (TestGopherContent);
+  CPPUNIT_TEST (testGopherImageContent);
+  CPPUNIT_TEST_SUITE_END ();
+  MemorySocket *s;
+
+public:
+  void setUp ()
+  {
+    s = new MemorySocket ();
+    s->setThrottling (0);
+  }
+  void tearDown ()
+  {
+    delete s;
+  }
+
+  void testGopherImageContent ()
+  {
+    string fname = "test.jpg";
+    string path = "root/subdir/gopher";
+    string hostname = "localhost";
+    string port = "70";
+    string element  = "Itest.jpg\troot/subdir/gopher\tlocalhost\t70\t\n";
+    GopherImage i (fname.c_str (), path.c_str (), hostname.c_str (),
+                   port.c_str ());
+    i.toProtocol(s);
+
+    const char *buffer = *s;
+    CPPUNIT_ASSERT_EQUAL (strncmp (element.c_str (), buffer, element.length ()),
+                          0);
+  }
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION (TestGopherContent);
diff --git a/myserver/tests/test_mem_socket.cpp b/myserver/tests/test_mem_socket.cpp
new file mode 100644
index 0000000..f15992e
--- /dev/null
+++ b/myserver/tests/test_mem_socket.cpp
@@ -0,0 +1,65 @@
+/*
+  MyServer
+  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
+  (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"
+#include "stdafx.h"
+#include "memory_socket.h"
+
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+/* Ensure the mock memory socket works.  */
+class TestMemorySocket : public CppUnit::TestFixture
+{
+  CPPUNIT_TEST_SUITE (TestMemorySocket);
+  CPPUNIT_TEST (testMemorySocketWrite);
+  CPPUNIT_TEST (testMemorySocketRead);
+  CPPUNIT_TEST_SUITE_END ();
+
+  MemorySocket *s;
+
+public:
+  void setUp ()
+  {
+    s = new MemorySocket ();
+    s->setThrottling (0);
+  }
+  void tearDown ()
+  {
+    delete s;
+  }
+
+  void testMemorySocketWrite ()
+  {
+    string temp = "foo bar foo bar foo bar";
+    s->send (temp.c_str (), temp.length (), 0);
+    const char* buffer = *s;
+    CPPUNIT_ASSERT_EQUAL (strncmp (temp.c_str (), buffer, temp.length ()), 0);
+    CPPUNIT_ASSERT_EQUAL (strncmp (temp.c_str (), buffer, s->getLength ()), 0);
+  }
+
+  void testMemorySocketRead ()
+  {
+    string temp = "foo bar foo bar foo bar";
+    s->send (temp.c_str (), temp.length (), 0);
+    CPPUNIT_ASSERT_EQUAL (strncmp (temp.c_str (), *s, temp.length ()), 0);
+  }
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION (TestMemorySocket);

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

Summary of changes:
 myserver/tests/Makefile.am                         |    3 +
 myserver/tests/memory_socket.h                     |   70 ++++++++++++++++++++
 ..._stream_creator.cpp => test_gopher_content.cpp} |   60 +++++++----------
 ...cket_stream_creator.cpp => test_mem_socket.cpp} |   58 +++++++---------
 4 files changed, 123 insertions(+), 68 deletions(-)
 create mode 100644 myserver/tests/memory_socket.h
 copy myserver/tests/{test_socket_stream_creator.cpp => test_gopher_content.cpp} (52%)
 copy myserver/tests/{test_socket_stream_creator.cpp => test_mem_socket.cpp} (52%)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Tue Nov 10 17:40:04 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N7zNc-00089u-JJ
	for mharc-myserver-commit@gnu.org; Tue, 10 Nov 2009 17:40:04 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N7zNb-00089Z-CM
	for myserver-commit@gnu.org; Tue, 10 Nov 2009 17:40:03 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N7zNa-000899-Sq
	for myserver-commit@gnu.org; Tue, 10 Nov 2009 17:40:03 -0500
Received: from [199.232.76.173] (port=54663 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N7zNa-000891-OQ
	for myserver-commit@gnu.org; Tue, 10 Nov 2009 17:40:02 -0500
Received: from savannah.gnu.org ([199.232.41.3]:55217 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 1N7zNY-0004cZ-Ft
	for myserver-commit@gnu.org; Tue, 10 Nov 2009 17:40:00 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N7zNX-00051i-GI
	for myserver-commit@gnu.org; Tue, 10 Nov 2009 22:39:59 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N7zNX-00051G-83
	for myserver-commit@gnu.org; Tue, 10 Nov 2009 22:39:59 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: dc0439e55949fd7d4ce8d683562e957bd2d02508
X-Git-Newrev: cb1049379e7c793d1e8c9e402691fedbed49e561
Message-Id: <E1N7zNX-00051G-83@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 10 Nov 2009 22:39:59 +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. 0_9-401-gcb10493
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, 10 Nov 2009 22:40:03 -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  cb1049379e7c793d1e8c9e402691fedbed49e561 (commit)
      from  dc0439e55949fd7d4ce8d683562e957bd2d02508 (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 cb1049379e7c793d1e8c9e402691fedbed49e561
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Nov 10 23:39:35 2009 +0100

    Remove temporary files used by tests.

diff --git a/myserver/tests/test_file.cpp b/myserver/tests/test_file.cpp
index 4a3fb43..6a9d52b 100644
--- a/myserver/tests/test_file.cpp
+++ b/myserver/tests/test_file.cpp
@@ -64,6 +64,7 @@ public:
   void tearDown ()
   {
     delete tfile;
+    FilesUtility::deleteFile (fname);
   }
 
   void testCreateTemporaryFile ()
diff --git a/myserver/tests/test_security_manager.cpp b/myserver/tests/test_security_manager.cpp
index c40dc3e..291c72a 100644
--- a/myserver/tests/test_security_manager.cpp
+++ b/myserver/tests/test_security_manager.cpp
@@ -49,7 +49,8 @@ public:
 
   void setUp ()
   {
-    securityManager = new SecurityManager (&validatorFactory, &authMethodFactory);
+    securityManager =
+      new SecurityManager (&validatorFactory, &authMethodFactory);
   }
 
   void tearDown ()
@@ -61,8 +62,10 @@ public:
   {
     SecurityToken secToken;
     string xml ("xml");
-    CPPUNIT_ASSERT_EQUAL (securityManager->getPermissionMask (&secToken, (list<SecurityDomain*>*)NULL, xml, xml), 0);
-    CPPUNIT_ASSERT_EQUAL (securityManager->getPermissionMask (&secToken, (SecurityDomain**)NULL, xml, xml), 0);
+    CPPUNIT_ASSERT_EQUAL (securityManager->getPermissionMask (&secToken,
+                                   (list<SecurityDomain*>*)NULL, xml, xml), 0);
+    CPPUNIT_ASSERT_EQUAL (securityManager->getPermissionMask (&secToken,
+                                         (SecurityDomain**)NULL, xml, xml), 0);
   }
 };
 
diff --git a/myserver/tests/test_socket_pair.cpp b/myserver/tests/test_socket_pair.cpp
index fbae256..970b77a 100644
--- a/myserver/tests/test_socket_pair.cpp
+++ b/myserver/tests/test_socket_pair.cpp
@@ -100,6 +100,7 @@ public:
 
     file.close ();
     sp.close ();
+    FilesUtility::deleteFile (fname);
   }
 
   void testCreateClose ()

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

Summary of changes:
 myserver/tests/test_file.cpp             |    1 +
 myserver/tests/test_security_manager.cpp |    9 ++++++---
 myserver/tests/test_socket_pair.cpp      |    1 +
 3 files changed, 8 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Nov 11 15:14:18 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N8Ja6-0004Ol-Km
	for mharc-myserver-commit@gnu.org; Wed, 11 Nov 2009 15:14:18 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N8Ja5-0004Le-2P
	for myserver-commit@gnu.org; Wed, 11 Nov 2009 15:14:17 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N8Ja4-0004Jj-C6
	for myserver-commit@gnu.org; Wed, 11 Nov 2009 15:14:16 -0500
Received: from [199.232.76.173] (port=37193 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N8Ja3-0004Iq-Ti
	for myserver-commit@gnu.org; Wed, 11 Nov 2009 15:14:15 -0500
Received: from savannah.gnu.org ([199.232.41.3]:53591 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 1N8Ja3-0004Q4-Lh
	for myserver-commit@gnu.org; Wed, 11 Nov 2009 15:14:15 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N8Ja3-0000pD-5h
	for myserver-commit@gnu.org; Wed, 11 Nov 2009 20:14:15 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N8Ja1-0000oj-Qe
	for myserver-commit@gnu.org; Wed, 11 Nov 2009 20:14:15 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: cb1049379e7c793d1e8c9e402691fedbed49e561
X-Git-Newrev: 5275860f57a0dd07542072ee9b3b9f6c68f410e8
Message-Id: <E1N8Ja1-0000oj-Qe@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Wed, 11 Nov 2009 20:14: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. 0_9-402-g5275860
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, 11 Nov 2009 20:14: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  5275860f57a0dd07542072ee9b3b9f6c68f410e8 (commit)
      from  cb1049379e7c793d1e8c9e402691fedbed49e561 (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 5275860f57a0dd07542072ee9b3b9f6c68f410e8
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Nov 11 21:11:09 2009 +0100

    Bump version to 0.9.1-rc1.

diff --git a/myserver/version b/myserver/version
index 9a7d84f..7ca9e31 100644
--- a/myserver/version
+++ b/myserver/version
@@ -1 +1 @@
-0.9
\ No newline at end of file
+0.9.1-rc1
\ No newline at end of file

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

Summary of changes:
 myserver/version |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Nov 11 15:15:12 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1N8Jax-0006av-V1
	for mharc-myserver-commit@gnu.org; Wed, 11 Nov 2009 15:15:11 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N8Jaw-0006ZC-Ty
	for myserver-commit@gnu.org; Wed, 11 Nov 2009 15:15:11 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N8Jav-0006Uz-HL
	for myserver-commit@gnu.org; Wed, 11 Nov 2009 15:15:10 -0500
Received: from [199.232.76.173] (port=37231 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1N8Jav-0006Ug-4a
	for myserver-commit@gnu.org; Wed, 11 Nov 2009 15:15:09 -0500
Received: from savannah.gnu.org ([199.232.41.3]:54002 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 1N8Jau-0004ZN-7O
	for myserver-commit@gnu.org; Wed, 11 Nov 2009 15:15:08 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1N8Jas-00011P-L4
	for myserver-commit@gnu.org; Wed, 11 Nov 2009 20:15:07 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1N8Jar-000103-PO
	for myserver-commit@gnu.org; Wed, 11 Nov 2009 20:15:06 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/tags/0_9_1_rc1
X-Git-Reftype: annotated tag
X-Git-Oldrev: 0000000000000000000000000000000000000000
X-Git-Newrev: c48e7a7fb1ca1a634ad46626dfc46a56cf63e6a6
Message-Id: <E1N8Jar-000103-PO@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Wed, 11 Nov 2009 20:15:05 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer annotated tag, 0_9_1_rc1,
	created. 0_9_1_rc1
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, 11 Nov 2009 20:15:11 -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 annotated tag, 0_9_1_rc1 has been created
        at  c48e7a7fb1ca1a634ad46626dfc46a56cf63e6a6 (tag)
   tagging  5275860f57a0dd07542072ee9b3b9f6c68f410e8 (commit)
  replaces  0_9
 tagged by  Giuseppe Scrivano
        on  Wed Nov 11 21:15:02 2009 +0100

- Log -----------------------------------------------------------------
0.9.1-rc1 version.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEABECAAYFAkr7G1AACgkQB5GvjMAzY/SFNwCePcQXNmrALGPpr9EZZwsR8zq7
swYAn0ZpLMy9MbzNTua088dq5sgt9BRd
=mMWf
-----END PGP SIGNATURE-----

Domenico Chierico (2):
      Add support for gopher protocol
      Add a test for the gopher protocol.

Giuseppe Scrivano (234):
      Code refactoring
      Merge branch 'master' of file:///home/gscrivano/myserver/myserver
      Merge branch 'master' of file:///home/gscrivano/myserver/myserver
      Merge branch 'master' of file:///home/gscrivano/myserver/myserver
      Removed MACRO defined constants.
      Limit usage of the same LogManager to only a thread at time.
      New LogManager method that allows to log according to a format string.
      Extract a method from LogManager::log (void*, string, string, LoggingLevel, bool, const char*, ...).
      LogManager uses arguments by reference and not by copy for logging.
      Log can add a timestamp before the message body
      The server class logs using a formatting string.
      Use the new Server logging functionality.
      Don't specify the log location when a format string is used.
      Log virtual hosts accesses and warnings using a formatting string.
      Check for the array dimension used by Process::generateEnvString before access it.
      Fix a race.
      Fix the `make check' command.  Now it executes the `tests_suite' program when it is available.
      Localize messages using the GNU gettext package
      Update plugins to use the simpler interface to `PluginsManager'
      Add notice that the localedir.h file is auto-generated.
      Removed global getOSVersion() function.
      The MimeManager can have external handlers now.
      HTTP uses the specified handler for MIME types.
      Fixed some error messages.
      Delegate the function using the desired handler, not NULL.
      New plugin MIME magic.
      Remove unused files added by the last commit.
      Use the ETag header with static files.
      Directories are not handled by the magic MIME plugin.
      Added missing files ABOUT-NLS and config.rpath
      Update build-system
      Remove files that are generated automatically.
      Code refactoring: fix indentation and formatting
      Specify the Emacs mode to use
      Documentation mentions how change the MIME types handler.
      Mass update: apply the emacs delete-trailing-whitespace function to every (.cpp|.h)$ file.
      Remove log verbosity as a global server variable.
      Refactoring: rename any `getHashedData' to `getData'.
      Refactoring: rename any `logWriteln' to `log'.
      Fix test failure.
      Plugins use the new logging facilities.
      Avoid to use non-existing files.
      Merge branch 'master' of http://students.mimuw.edu.pl/~ms262969/GNU/MyServer/myserver
      Define a single macro when a regex library is present.
      Use position independent code (PIC) when it is possible.
      Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/myserver
      Mass update: corrected C preprocessor indentation using GNU cppi.
      Move the XmlValidator definition inside the Server class.
      Allow definition of NodeTree in the security and in the MIME configuration files
      Remove unused method from the Server class.
      Prevent a deadlock when logging to the main server log from the `LogManager' class.
      `Vhost::accessesLogWrite' appends a newline character.
      Remove some obsoleted macro definitions.
      Remove some members from the `HttpResponseHeader' struct, leaving their definitions in the hash map.
      Remove some members from the `HttpResponseHeader' struct.
      A new process creation supports a chroot now.
      Processes spawned by the ProcessServerManager and CGI ones can specify a different chroot
      Surround the error message with the _ macro
      Pass the right type to the log function.
      When `make check' is used in the root directory, run only the tests suite
      Close the pidfile file on error.
      Fix some possible memleaks
      By default use silent automake rules.
      Refactor the same repeated statements in a single function.
      Give a slightly saner --version message.
      Accept a --cfgdir option to specify a different path where look for configuration files.
      Raise an error if the specified protocol is not loaded.
      Default configuration files are not copied automatically when a valid configuration files set is not found.
      Use string's instead of pointers to string's to store configuration files name.
      Make `make check' again recursive.
      Remove `if' statement having the same two source branches.
      Get the `server.max_files_cache' value by `Server::getData ()'.
      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.
      Clear the buffer every time a command is sent.
      Data read from the XML file is not copied on an internal buffer before.
      Make the `MainConfiguration' class d'tor virtual.
      Declare c'tor and d'tor for the `XmlMainConfiguration' class.
      Remove unneeded cast.
      Fix indentation
      Mass update: leave an empty space between the function name and the open round brace.
      Lazy allocate the static PluginInfo::regex object on the first usage.
      Remove unused definition.
      Change return type from `char*' to `const char*'.
      Change macro quoting style.
      Simplify the configure.ac script.
      Configuration files location is not exposed by the Server.
      Refactor common code in a single function.
      The Server delegates configuration values loading to the `MainConfiguration' class.  Also, the Server now accepts a builder function to create a `MainConfiguration' instance.
      Remove cast to XmlMainConfiguration.
      Refactoring: rename `FindData' to `ReadDirectory'
      Add test case for the `ReadDirectory' class.
      Protect access to `opendir' and `readdir' using a mutex.
      Use the reentrant `readdir_r' function when it is available.
      The d'tor frees used resource, calling close.
      Spell `Content-Type' properly.
      Store the value of the `mime' attribute.
      The HttpFile handler avoids to reset the HttpResponseHeader.
      Now the `Server::addConnection' function doesn't free the socket argument on errors.
      Replace getNonBLocking with getNonBlocking.
      Remove the meaning-less `Socket::stopBlockingOperations' operation.
      The file handle is not set explicitely to 0.  It caused the file descriptor 0 to be close'd when it should not.
      Delegate `eventLoopHandler' to register a watch for events on the listener socket.
      Use a switch instead of several if's in the eventLoopHandler body.
      Various small fixes.
      Remove unused members from the `ClientsThread' class
      Use the current repository directory structure as the default path to look for header files.
      Be sure the release directory exists before use it, if it does not exist then create it.
      Emphasize the plugin name in output messages
      Fix some potential memory leaks.
      Refactor a new class `XmlMimeHandler' out of `MimeManager'.
      Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/myserver
      Refactor out XML code from `VhostManager' in the new `XmlVhostHandler' class.
      Remove trailing whitespaces.
      Fix a broken test case.
      Raise an error if the same location is registered multiple times.
      The `VhostManager' and `MimeManager' classes allow to build instances of handlers.
      Allow virtual hosts to use a different MIME type handler.
      Register a builder for the `mime_magic' plugin.
      Use gnulib to improve portability.
      Add Makefile rule to regenerate the POTFILES.in file.
      Use directly `num_processors' offered by gnulib.
      Add gettext to the gnulib modules to use.
      Revert "Use directly `num_processors' offered by gnulib."
      Skip gnulib po retrieving, temporarily.
      Gnulib ensures that regex is always present.
      Update POTFILES.in file.
      Fix some problems introduced by the migration to gnulib.
      Remove the unused macro REGLIB.
      Use the MD5 implementation offered by gnulib.
      Mass update: include the current year in the copyright years list.
      Remove unused member variable.
      Remove files imported by gnulib.
      Remove secondaryBufferSize declarations and any usage.
      Avoid unnecessary shifts while trasforming to the final MD5 hash.
      Add the `chdir-long' and `getcwd' modules from gnulib and use them to configure the current working directory.
      Copy build_aux/config.rpath from gnulib.
      Move {include,src}base/md5 to {include,src}base/crypt.
      Add two new classes: CryptAlgoManager'.
      Use the gnulib snprintf module.
      Add a new method `CryptAlgoManager::check' to quickly check if F(x)=result, using the specified crypt algorithm.
      Use two new gnulib modules: `pipe' and `gettimeofday'.
      Update POTFILES.in.
      Add a new class and the relative test wrapping the gnulib SHA1 implementation
      Aesthetic changes.
      Check that configuration file exist before access them.
      Be sure the attrib element is zero'ed before use it.
      Specify bytes when the file length is zero.
      Fix broken test case.
      ReadDirectory::find{first,next} return different codes for errors and EOF.
      Fix typo introduced by the last commit
      Add support for the `X-Sendfile' directive from FastCGI scripts.
      By default do not use X-Sendfile.
      Content-type header value is replaced if it is already defined, not appended as it was before.
      Minor aesthetic changes.
      Allocate Server::xmlMimeHandler dinamically, it is freed by the MimeManager.
      Now gzip compression is not handled as a special case for static files.
      Remove protocolData from filters.
      Simplify some functions.
      Use ClientsThread::busy as a bool not an int.
      Remove casts that are not needed.
      Merge branch 'master' of file:///home/gscrivano/myserver/myserver
      Fix build problems under Windows.
      Merge branch 'master' of file:///home/gscrivano/myserver/myserver
      Export the `program_name' symbol.
      Fix a conflict with gnulib renaming the Ftp::stat function name to Ftp::statCmd.
      Ensure the final $ is considered in the regex.
      Ensure stdafx.h is included in any test source file.
      Link to the gnulib library and export program_name.
      Update AUTHORS.
      Some minor aesthetic changes
      MemBuf class refactoring: remove m_ prefix from class members and remove not used code.
      Mass update: include "stdafx.h" not <stdafx.h>.
      Refactor the Ftp class.
      Protocol::controlConnection uses u_long as buffer length, not int.
      Raise an error if Protocol::controlConnection is used.
      Fix indentation.
      Revert a change in MemBuf introduced recently and remove some casts.
      Move the reallocation logic from `MemBuf::setLength' to a new method `MemBuf::setRealLength'.
      Update to the latest gnulib `nproc' module.
      Use AM_SILENT_RULES only when it is defined.
      The directory listing handler allows to specify an ignore pattern.
      Define the new helper function HttpHeaders::sendHeader and use it in the HTTP handlers.
      The HTTP response header is send once, not multiple times.
      Change Protocol interface: rename `registerName' to `getName', it does not accept additional parameters.
      Separe static components loading from plugins.
      Remove configuration files customized for Windows.
      Indent properly XML files
      Indent properly HTML files
      Remove unused files.
      Read from the main configuration the default MIME types and virtual hosts handlers to be used.
      Refactor common code in a single function.
      Document how use different configuration files handlers.
      Rename "server.{mime,vhost}_manager" to "server.{mime,vhost}_handler".
      Fix typo
      Remove the globals `argc' and `argv'.  use an enum instead of #define's for run modes.
      Code refactoring: rename a function and remove some unused macro's.
      Move protocol modes from globals #define's to an enum inside the Protocol class itself.
      Define and use HttpDataHandler::{RET_FAILURE, RET_OK}.
      Rename ConnectionsScheduler::getConnectionsNumber to ConnectionsScheduler::getNumAliveConnections.
      The Server class does not store any opaque static data anymore.
      Update plugins to recent interfaces changes
      Use what buildHTTPResponseHeader returns in place of strlen on the buffer.
      Ensure that stdafx.h is the first include in any .h or .cpp file.
      Use an enum to define the control protocol codes.
      Avoid several casts using directly an object of the desired type.
      Rename secondaryBuffer to auxiliaryBuffer plus minor style changes.
      Fix a problem in the texinfo documentation: use @code, not @value.
      Fix a compiling error on W32 introduced by recent changes.
      ClientsThread return codes start counting from 1.
      Drop connections limit check from the HTTP code.
      Rename getSecondaryBuffer to getAuxiliaryBuffer.
      Make the Protocol::controlConnection a pure virtual method.
      Remove any dependency to the Protocol class from FiltersChain.
      Remove some unneeded `friend' declarations.
      Security configuration file passwords can be specified using a hash function.
      Http digest authorization can be used only with clear-text or digest a1 passwords.
      Fix copyright notice.
      Add a facility method to the CryptAlgo class.
      The AuthMethod::comparePassword method does not raise exceptions.
      Add two new wrapper methods to the CryptAlgoManager class.
      Remove a not used variable plus re-indentation.
      Handle correctly HTTP headers facilities return values in the Proxy handler.
      Add new class MemBufFile and relative tests.
      Refactoring: divide a big test case in smaller tests.
      Add test case for `File::fastCopyToSocket'.
      Add a comment.
      The ReadDirectory class does not expose the inner stat struct.
      Ensure the XML node child exists before try to read its value.
      Mass update: reindent .h files.
      Remove a not-used method.
      Specify which log use when the new-line is notified.
      Small optimization: pass the argument by reference, not by copy.
      Remove temporary files used by tests.
      Bump version to 0.9.1-rc1.

Ignacy Moryc (1):
      Corrected typo in git URL

Marek Aaron Sapota (165):
      Imported pycontrollib to main tree.
      Merge branch 'master' of git://git.savannah.gnu.org/myserver
      Added files needed for installation on unix systems.
      Skeleton class for handling MIME types configuration.
      Rename test.py to include module name.
      Added Definition, DefinitionElement and DefinitionTree classes.
      Changed definitions, so only DefinitionElement accepts value attribute.
      Check if tag names are right when creating definitions.
      Fix equality of definitions an other types.
      Extended mime types classes and tests for them.
      Tests for log stream.
      Log Stream class added.
      Tests for Log class.
      Implemented Log class.
      Basic vhost tests.
      Extended tests for mimetypes.
      Fixed equality comparision between MIMETypes and other types.
      Updated tests for vhost.
      Makefile for running tests.
      Partial vhost implementation.
      Added clean action to Makefile.
      Moved pycontrol and pycontrollib to MyServer package.
      Move tests to their own directory.
      Removed old, unused code.
      Extended VHost class.
      Added factory methods for VHost.
      Changed Makefile rules to match test filenames.
      Added constructor tests for mimetypes.
      Added VHosts class.
      Added setup script for packaging and distribution of pycontrol.
      Added control to valid protocols.
      Updated method docstrings.
      Cleaned up log constructors.
      Cleaned up definition constructors.
      Cleaned mimetypes constructors.
      Added instructions how to install pycontrol libraries.
      Removed valid_* from pycontrollib for greater flexibility.
      Update and refactoring of definitions.
      Split log.py tests for easy testing.
      Split mimetypes to/from string/lxml tests.
      Made VHost class more flexible.
      Split vhost  to/from string/lxml tests.
      Implemented BasicController.
      Implemented get methods of Controller.
      Added DefinitionList class.
      Mimetypes use DefinitionList.
      Implemented MyServerConfig.
      Added SSL support in VHost class.
      Added definition.search_by_name
      Fixed errors whith getting configuration from server.
      Made docstrings from comments in pycontrol.
      Fixed method name to be private.
      User ssl.wrap_socket instead of depreciated socket.ssl
      Merge branch 'master' of git://git.savannah.gnu.org/myserver
      Merge branch 'master' of git://git.savannah.gnu.org/myserver
      PyControlLib can now put files to server.
      First GUI design.
      Changed GUI to dynamic one.
      List is fully functional.
      Added copyright header.
      Added about window.
      Implemented menu->new
      Accept lower case "yes".
      File opening in MyServercontrol.
      Removed combobox option.
      Implemented save and save as.
      Auto change port to int.
      Added methods to put configuration files back on server.
      Implemented getting/putting config on server.
      Perserve additional attributes of definitions.
      Merge branch 'master' of git://git.savannah.gnu.org/myserver
      SYSFOLDER => SYSROOT
      Unknown definitions are not lost in GUI.
      Merge branch 'master' of git://git.savannah.gnu.org/myserver
      Unix installation fixed upstream.
      Partial transfer to treeview.
      Save attributes on tree selection change.
      TreeViews are put inside ScrolledWindows to get scrollbars.
      Working new file.
      Removed name field, added enabled field.
      Access definitions by name, not by TreeIter.
      Added get_attributes to Definition.
      Fixed opening flat files (no trees for now).
      Store options state in additional tree columns.
      One level open file working.
      Open handles multiple levels of definitions.
      Merge branch 'master' of git://git.savannah.gnu.org/myserver
      Removed old GUI.
      Implemented save file.
      Unknown options are handled as they should be.
      Use gtk.HPaned instead of gtk.HBox.
      Added tooltips.
      Merge branch 'treeview'
      Add/Remove definitions are handled now.
      Added value column to TreeView.
      Name editing.
      User can add unknown definitions.
      Value field is auto disabled for definition trees.
      Removed old code.
      GUI widgets for mime types.
      GUI shows all mime options.
      Editable MIME types.
      Split MyServerControl to several files.
      Refactoring of configuration saving.
      Refactored set_up.
      Added definitions to MIME types.
      New file menu.
      Renamed methods to match new names from glade.
      MIMEType doesn't need handler.
      MIMEType self_executed is string not (was bool).
      New/open/save for MIME types.
      Added VHosts.
      Full support for logs.
      Open, save of VHosts.
      Added gui edition of additional Log properties.
      Updated interface to get/put config from server.
      Config files can be put on/got from server using control protocol.
      Merge branch 'master' of git://git.savannah.gnu.org/myserver
      Fixed test executing Makefile.
      DefinitionTree keeps unknown tags found in tree.
      MIME types remember unknown sub-nodes and attributes.
      Preserve unknown things in vhosts.
      Remember unhandled things in streams and logs.
      Working keeping unknown things in main config.
      Clean up redundant code.
      Working keeping unknown things in mimes and vhosts.
      Better GUI look.
      Moved GUI widgets to library.
      Updated setup script.
      Fix GUI segfault.
      Added GUI interface to remove mimes and vhosts.
      Added filesystem browser to GUI for security files.
      Added condition to control lib.
      Control lib implements security files.
      Pycontrollib Condition tests.
      Pycontrollib Permission tests.
      Pycontrollib User tests.
      Complete tests for pycontrollib security classes.
      Partial security file edition support.
      Security editor actually works.
      Implemented opening of security files.
      Full security file edition support in GUI.
      GUI can save security files.
      Security file elements can be removed from GUI.
      Don't throw unhandled exceptions when security.xml can't be read.
      Merge branch 'master' of git://git.savannah.gnu.org/myserver
      Added drag and drop in security files editor.
      Fixed fcntl call.
      Updated GUI version string.
      GUI can be installed with ./configure --enable-gui
      Merge branch 'master' of ../MyServer
      Merge branch 'master' of git.sv.gnu.org:/srv/git/myserver
      GUI was moved to src.
      m4 macro for checking Python version.
      Autoconf checking for required python modules.
      Removed main window's dependency on Glade.
      Glade isn't used at all.
      Added back images to menu bar.
      Merge branch 'master' of git.sv.gnu.org:/srv/git/myserver
      About dialog in GUI uses COPYING and version files.
      Merge branch 'master' of git.sv.gnu.org:/srv/git/myserver
      Added statusbar messages in GUI after save, open and new.
      Merge branch 'master' of git.sv.gnu.org:/srv/git/myserver
      GUI respects input types in server configuration.
      Merge branch 'master' of git.sv.gnu.org:/srv/git/myserver

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


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Mon Nov 16 16:26:59 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NA96A-0007Tf-Pq
	for mharc-myserver-commit@gnu.org; Mon, 16 Nov 2009 16:26:58 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NA969-0007Sh-FE
	for myserver-commit@gnu.org; Mon, 16 Nov 2009 16:26:57 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1NA968-0007SK-Se
	for myserver-commit@gnu.org; Mon, 16 Nov 2009 16:26:57 -0500
Received: from [199.232.76.173] (port=51345 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NA968-0007S6-L5
	for myserver-commit@gnu.org; Mon, 16 Nov 2009 16:26:56 -0500
Received: from savannah.gnu.org ([199.232.41.3]:51402 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 1NA967-000269-Md
	for myserver-commit@gnu.org; Mon, 16 Nov 2009 16:26:56 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NA966-0002t1-MR
	for myserver-commit@gnu.org; Mon, 16 Nov 2009 21:26:54 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1NA965-0002sZ-MJ
	for myserver-commit@gnu.org; Mon, 16 Nov 2009 21:26:54 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 5275860f57a0dd07542072ee9b3b9f6c68f410e8
X-Git-Newrev: 5ac1fa5ac8e7155df31ad8fdb5d3e2288e317a52
Message-Id: <E1NA965-0002sZ-MJ@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Mon, 16 Nov 2009 21:26:53 +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. 0_9_1_rc1-1-g5ac1fa5
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, 16 Nov 2009 21:26: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  5ac1fa5ac8e7155df31ad8fdb5d3e2288e317a52 (commit)
      from  5275860f57a0dd07542072ee9b3b9f6c68f410e8 (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 5ac1fa5ac8e7155df31ad8fdb5d3e2288e317a52
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Mon Nov 16 22:26:53 2009 +0100

    Fix a compiling issue under Windows.

diff --git a/myserver/tests/test_membuf_file.cpp b/myserver/tests/test_membuf_file.cpp
index 922b721..a114847 100644
--- a/myserver/tests/test_membuf_file.cpp
+++ b/myserver/tests/test_membuf_file.cpp
@@ -64,9 +64,9 @@ public:
   void testHandle ()
   {
     Handle handle = (Handle) 1;
-    CPPUNIT_ASSERT_EQUAL (tfile->getHandle (), -1);
+    CPPUNIT_ASSERT_EQUAL (tfile->getHandle (), (Handle)-1);
     CPPUNIT_ASSERT_EQUAL (tfile->setHandle (handle), -1);
-    CPPUNIT_ASSERT_EQUAL (tfile->getHandle (), -1);
+    CPPUNIT_ASSERT_EQUAL (tfile->getHandle (), (Handle)-1);
   }
 
   void testCreateTemporaryMembufFile ()

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

Summary of changes:
 myserver/tests/test_membuf_file.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Tue Nov 17 14:23:59 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NATeg-0002hv-Qb
	for mharc-myserver-commit@gnu.org; Tue, 17 Nov 2009 14:23:58 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NATef-0002h8-8h
	for myserver-commit@gnu.org; Tue, 17 Nov 2009 14:23:57 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1NATee-0002gC-6a
	for myserver-commit@gnu.org; Tue, 17 Nov 2009 14:23:56 -0500
Received: from [199.232.76.173] (port=57498 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NATee-0002g8-3s
	for myserver-commit@gnu.org; Tue, 17 Nov 2009 14:23:56 -0500
Received: from savannah.gnu.org ([199.232.41.3]:57571 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 1NATed-0005wK-I4
	for myserver-commit@gnu.org; Tue, 17 Nov 2009 14:23:55 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NATec-0000nf-Jy
	for myserver-commit@gnu.org; Tue, 17 Nov 2009 19:23:54 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1NATec-0000nA-4A
	for myserver-commit@gnu.org; Tue, 17 Nov 2009 19:23:54 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 5ac1fa5ac8e7155df31ad8fdb5d3e2288e317a52
X-Git-Newrev: 258dd00b39e6303bf859062a8bcc5d0d45a99094
Message-Id: <E1NATec-0000nA-4A@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 17 Nov 2009 19:23:54 +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. 0_9_1_rc1-3-g258dd00
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, 17 Nov 2009 19:23: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  258dd00b39e6303bf859062a8bcc5d0d45a99094 (commit)
       via  4715f76587635d2d3aae61014c9d9a753c3c5768 (commit)
      from  5ac1fa5ac8e7155df31ad8fdb5d3e2288e317a52 (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 258dd00b39e6303bf859062a8bcc5d0d45a99094
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Nov 17 20:23:39 2009 +0100

    Http header parser avoids to copy more bytes than needed.

diff --git a/myserver/src/protocol/http/http_headers.cpp b/myserver/src/protocol/http/http_headers.cpp
index d5e5dac..642e595 100644
--- a/myserver/src/protocol/http/http_headers.cpp
+++ b/myserver/src/protocol/http/http_headers.cpp
@@ -523,14 +523,14 @@ int HttpHeaders::buildHTTPRequestHeaderStruct (const char *input,
            * If the version is not specified or it is too long store
            * some information for logging then return an invalid header value.
            */
-          if ((!j) || ( (i-j) == HTTP_REQUEST_VER_DIM ))
+          if (!j || ((i-j) == HTTP_REQUEST_VER_DIM))
             {
               request->ver.clear ();
               request->cmd.clear ();
               tokenOff = getEndLine (input, HTTP_REQUEST_URI_DIM);
               if (tokenOff > 0)
-                request->uri.assign (input,
-                                     min (HTTP_REQUEST_URI_DIM, tokenOff));
+                request->uri.assign (input, min (HTTP_REQUEST_URI_DIM,
+                                                 tokenOff));
               else
                 request->uri.assign (input, HTTP_REQUEST_URI_DIM );
               return 400;
@@ -547,14 +547,14 @@ int HttpHeaders::buildHTTPRequestHeaderStruct (const char *input,
           request->uri=trimRight (request->uri, " /");
           request->uriOpts=trim (request->uriOpts, " ");
         }
-      else if (!strcmpi (command,"Authorization"))
+      else if (!strcmpi (command, "Authorization"))
         {
           int ret = readReqAuthLine (request, connection, token, &tokenOff);
           if (ret)
             return ret;
           lineControlled = 1;
         }
-      else if (!strcmpi (command, (char*)"Content-length"))
+      else if (!strcmpi (command, "Content-length"))
         {
           tokenOff = getEndLine (token, HTTP_REQUEST_CONTENT_LENGTH_DIM);
           if (tokenOff == -1)
@@ -562,7 +562,7 @@ int HttpHeaders::buildHTTPRequestHeaderStruct (const char *input,
           lineControlled = 1;
           request->contentLength.assign (token,tokenOff);
         }
-      else if (!strcmpi (command, (char*)"Range"))
+      else if (!strcmpi (command, "Range"))
         {
           int ret = readReqRangeLine (request, connection, token, &tokenOff);
           if (ret)
@@ -588,13 +588,11 @@ int HttpHeaders::buildHTTPRequestHeaderStruct (const char *input,
           else
             {
               HttpRequestHeader::Entry *e = new HttpRequestHeader::Entry ();
-              if (e)
-                {
-                  e->name->assign (command, HTTP_RESPONSE_OTHER_DIM);
-                  e->value->assign (token,
-                               std::min (HTTP_RESPONSE_OTHER_DIM, tokenOff));
-                  request->other.put (cmdStr, e);
-                }
+              e->name->assign (command, std::min (HTTP_RESPONSE_OTHER_DIM,
+                                                  tokenOff));
+              e->value->assign (token, std::min (HTTP_RESPONSE_OTHER_DIM,
+                                                 tokenOff));
+              request->other.put (cmdStr, e);
             }
         }
       token += tokenOff + 2;



commit 4715f76587635d2d3aae61014c9d9a753c3c5768
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Nov 17 20:11:54 2009 +0100

    Under Windows configuration files can be only in the current directory.

diff --git a/myserver/src/myserver.cpp b/myserver/src/myserver.cpp
index d044359..e9b138f 100644
--- a/myserver/src/myserver.cpp
+++ b/myserver/src/myserver.cpp
@@ -264,6 +264,7 @@ int loadConfFileLocation (string &outFile, string fileName, const char *dir)
 
 #ifdef WIN32
       outFile = fileName;
+      return FilesUtility::fileExists (fileName) ? 0 : -1;
 #else
 
       if (dir)

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

Summary of changes:
 myserver/src/myserver.cpp                   |    1 +
 myserver/src/protocol/http/http_headers.cpp |   24 +++++++++++-------------
 2 files changed, 12 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Tue Nov 17 14:40:53 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NATv3-0002k7-7A
	for mharc-myserver-commit@gnu.org; Tue, 17 Nov 2009 14:40:53 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NATv1-0002jR-76
	for myserver-commit@gnu.org; Tue, 17 Nov 2009 14:40:51 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1NATuz-0002j5-H1
	for myserver-commit@gnu.org; Tue, 17 Nov 2009 14:40:50 -0500
Received: from [199.232.76.173] (port=36217 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NATuz-0002j2-AP
	for myserver-commit@gnu.org; Tue, 17 Nov 2009 14:40:49 -0500
Received: from savannah.gnu.org ([199.232.41.3]:51718 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 1NATuy-0000AE-Rr
	for myserver-commit@gnu.org; Tue, 17 Nov 2009 14:40:49 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NATuy-0001wW-6R
	for myserver-commit@gnu.org; Tue, 17 Nov 2009 19:40:48 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1NATux-0001w4-UG
	for myserver-commit@gnu.org; Tue, 17 Nov 2009 19:40:48 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 258dd00b39e6303bf859062a8bcc5d0d45a99094
X-Git-Newrev: 5da9ce59597ba62c4296f6d20ca7f816fe265594
Message-Id: <E1NATux-0001w4-UG@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Tue, 17 Nov 2009 19:40: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. 0_9_1_rc1-4-g5da9ce5
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, 17 Nov 2009 19:40:51 -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  5da9ce59597ba62c4296f6d20ca7f816fe265594 (commit)
      from  258dd00b39e6303bf859062a8bcc5d0d45a99094 (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 5da9ce59597ba62c4296f6d20ca7f816fe265594
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Tue Nov 17 20:41:08 2009 +0100

    Handle properly the `HttpDataRead::readPostData' return code.

diff --git a/myserver/src/protocol/http/http.cpp b/myserver/src/protocol/http/http.cpp
index b0df006..44465e8 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -955,7 +955,7 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
           (dynamicCommand && dynamicCommand->acceptData ()))
         {
           int httpErrorCode;
-
+          int readPostRet;
           /* Be sure that the client can handle the 100 status code.  */
           if (nbtr == td->nHeaderChars && td->request.contentLength.compare ("0")
               && td->request.ver.compare ("HTTP/1.0"))
@@ -969,13 +969,13 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
               return ClientsThread::INCOMPLETE_REQUEST;
             }
 
-          ret = HttpDataRead::readPostData (td, &httpErrorCode);
-          if (ret == -1)
+          readPostRet = HttpDataRead::readPostData (td, &httpErrorCode);
+          if (readPostRet < 0)
             {
               logHTTPaccess ();
               return ClientsThread::DELETE_CONNECTION;
             }
-          else if (ret)
+          else if (readPostRet)
             ret = raiseHTTPError (httpErrorCode);
         }
       else
@@ -984,7 +984,7 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, u_long, u_long,
           td->request.uriOptsPtr = 0;
         }
 
-      /* If return value is not configured propertly.  */
+      /* If return value is not configured properly.  */
       if (ret < 0)
         {
           /*

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

Summary of changes:
 myserver/src/protocol/http/http.cpp |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Wed Nov 18 17:34:18 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NAt6Q-0003Nh-62
	for mharc-myserver-commit@gnu.org; Wed, 18 Nov 2009 17:34:18 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NAt6O-0003Mt-Me
	for myserver-commit@gnu.org; Wed, 18 Nov 2009 17:34:16 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1NAt6N-0003Ly-2r
	for myserver-commit@gnu.org; Wed, 18 Nov 2009 17:34:16 -0500
Received: from [199.232.76.173] (port=37920 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NAt6M-0003Ls-Vi
	for myserver-commit@gnu.org; Wed, 18 Nov 2009 17:34:15 -0500
Received: from savannah.gnu.org ([199.232.41.3]:37938 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 1NAt6M-0008Nw-Jy
	for myserver-commit@gnu.org; Wed, 18 Nov 2009 17:34:14 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NAt6L-0003aY-TU
	for myserver-commit@gnu.org; Wed, 18 Nov 2009 22:34:13 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1NAt6L-0003aC-Ld
	for myserver-commit@gnu.org; Wed, 18 Nov 2009 22:34:13 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/tags/0_9_1
X-Git-Reftype: annotated tag
X-Git-Oldrev: 0000000000000000000000000000000000000000
X-Git-Newrev: aace56a2f23c5b264c1d3522a5e4aa3691a74b9f
Message-Id: <E1NAt6L-0003aC-Ld@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Wed, 18 Nov 2009 22:34:13 +0000
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2)
Subject: [myserver-commit] [SCM] GNU MyServer annotated tag, 0_9_1,
	created. 0_9_1
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, 18 Nov 2009 22:34:16 -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 annotated tag, 0_9_1 has been created
        at  aace56a2f23c5b264c1d3522a5e4aa3691a74b9f (tag)
   tagging  32f225fe222aa1468220c05c680a5b4cc570c679 (commit)
  replaces  0_9_1_rc1
 tagged by  Giuseppe Scrivano
        on  Wed Nov 18 22:48:24 2009 +0100

- Log -----------------------------------------------------------------
0.9.1 release
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEABECAAYFAksEa68ACgkQB5GvjMAzY/SstQCeKCady2o1vNpALYmICuJuHA7S
CJcAnjPg0wjxj9Jf+BawzxLUDI4Cj1jh
=+KdS
-----END PGP SIGNATURE-----

Giuseppe Scrivano (6):
      Fix a compiling issue under Windows.
      Under Windows configuration files can be only in the current directory.
      Http header parser avoids to copy more bytes than needed.
      Handle properly the `HttpDataRead::readPostData' return code.
      Regenerate potfiles.
      Bump version to 0.9.1

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


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Thu Nov 19 12:39:10 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NBAyM-0007wR-6l
	for mharc-myserver-commit@gnu.org; Thu, 19 Nov 2009 12:39:10 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NBAyJ-0007v1-KV
	for myserver-commit@gnu.org; Thu, 19 Nov 2009 12:39:07 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1NBAyI-0007u6-F6
	for myserver-commit@gnu.org; Thu, 19 Nov 2009 12:39:06 -0500
Received: from [199.232.76.173] (port=58110 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NBAyI-0007tY-3o
	for myserver-commit@gnu.org; Thu, 19 Nov 2009 12:39:06 -0500
Received: from savannah.gnu.org ([199.232.41.3]:55631 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 1NBAyH-0005FB-Ag
	for myserver-commit@gnu.org; Thu, 19 Nov 2009 12:39:05 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NBAyG-0003pi-S3
	for myserver-commit@gnu.org; Thu, 19 Nov 2009 17:39:04 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1NBAyF-0003pA-OH
	for myserver-commit@gnu.org; Thu, 19 Nov 2009 17:39:04 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 5da9ce59597ba62c4296f6d20ca7f816fe265594
X-Git-Newrev: 32f225fe222aa1468220c05c680a5b4cc570c679
Message-Id: <E1NBAyF-0003pA-OH@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Thu, 19 Nov 2009 17:39:03 +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. 0_9_1
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: Thu, 19 Nov 2009 17:39: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  32f225fe222aa1468220c05c680a5b4cc570c679 (commit)
       via  dd337cda320677346bbae989f46ee043ec1a1264 (commit)
      from  5da9ce59597ba62c4296f6d20ca7f816fe265594 (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 32f225fe222aa1468220c05c680a5b4cc570c679
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Nov 18 19:06:05 2009 +0100

    Bump version to 0.9.1

diff --git a/myserver/version b/myserver/version
index 7ca9e31..f514a2f 100644
--- a/myserver/version
+++ b/myserver/version
@@ -1 +1 @@
-0.9.1-rc1
\ No newline at end of file
+0.9.1
\ No newline at end of file



commit dd337cda320677346bbae989f46ee043ec1a1264
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Wed Nov 18 18:52:11 2009 +0100

    Regenerate potfiles.

diff --git a/myserver/po/POTFILES.in b/myserver/po/POTFILES.in
index 638e124..2e3ddc1 100644
--- a/myserver/po/POTFILES.in
+++ b/myserver/po/POTFILES.in
@@ -10,6 +10,7 @@ src/base/file/files_utility.cpp
 src/base/files_cache/cached_file_buffer.cpp
 src/base/files_cache/cached_file.cpp
 src/base/files_cache/cached_file_factory.cpp
+src/base/files_cache/membuf_file.cpp
 src/base/hash_map/hash_map.cpp
 src/base/home_dir/home_dir.cpp
 src/base/mem_buff/mem_buff.cpp
@@ -96,7 +97,11 @@ src/protocol/control/control_header.cpp
 src/protocol/control/control_protocol.cpp
 src/protocol/ftp/ftp.cpp
 src/protocol/ftp/ftp_lexer.cpp
+src/protocol/ftp/ftp_lexer.out.cpp
 src/protocol/ftp/ftp_parser.cpp
+src/protocol/gopher/engine.cpp
+src/protocol/gopher/gopher_content.cpp
+src/protocol/gopher/gopher.cpp
 src/protocol/http/dyn_http_command.cpp
 src/protocol/http/dyn_http_command_manager.cpp
 src/protocol/http/dyn_http_manager.cpp

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

Summary of changes:
 myserver/po/POTFILES.in |    5 +++++
 myserver/version        |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU MyServer



From MAILER-DAEMON Sat Nov 21 19:20:06 2009
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1NC0BS-0004gA-9p
	for mharc-myserver-commit@gnu.org; Sat, 21 Nov 2009 19:20:06 -0500
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NC0BQ-0004dr-O3
	for myserver-commit@gnu.org; Sat, 21 Nov 2009 19:20:04 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1NC0BP-0004cm-8Q
	for myserver-commit@gnu.org; Sat, 21 Nov 2009 19:20:03 -0500
Received: from [199.232.76.173] (port=50107 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NC0BP-0004cR-1p
	for myserver-commit@gnu.org; Sat, 21 Nov 2009 19:20:03 -0500
Received: from savannah.gnu.org ([199.232.41.3]:38825 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 1NC0BO-0002so-Pj
	for myserver-commit@gnu.org; Sat, 21 Nov 2009 19:20:02 -0500
Received: from [10.1.0.109] (helo=cvs.savannah.gnu.org)
	by sv.gnu.org with esmtp (Exim 4.69)
	(envelope-from <gscrivano@gnu.org>) id 1NC0BN-0002Ip-K4
	for myserver-commit@gnu.org; Sun, 22 Nov 2009 00:20:01 +0000
Received: from gscrivano by cvs.savannah.gnu.org with local (Exim 4.69)
	(envelope-from <gscrivano@savannah.gnu.org>) id 1NC0BM-0002I2-WF
	for myserver-commit@gnu.org; Sun, 22 Nov 2009 00:20:01 +0000
To: myserver-commit@gnu.org
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 32f225fe222aa1468220c05c680a5b4cc570c679
X-Git-Newrev: c615d09d073168cce8f00997e8681ae8b41c9e37
Message-Id: <E1NC0BM-0002I2-WF@cvs.savannah.gnu.org>
From: Giuseppe Scrivano <gscrivano@gnu.org>
Date: Sun, 22 Nov 2009 00:20:01 +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. 0_9_1-1-gc615d09
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, 22 Nov 2009 00:20: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  c615d09d073168cce8f00997e8681ae8b41c9e37 (commit)
      from  32f225fe222aa1468220c05c680a5b4cc570c679 (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 c615d09d073168cce8f00997e8681ae8b41c9e37
Author: Giuseppe Scrivano <gscrivano@gnu.org>
Date:   Sun Nov 22 01:19:12 2009 +0100

    Do not define GCRY_CONTROL when the gcrypt library is present.

diff --git a/myserver/configure.ac b/myserver/configure.ac
index f060fe1..8cb05ca 100644
--- a/myserver/configure.ac
+++ b/myserver/configure.ac
@@ -91,8 +91,7 @@ gl_INIT
 AC_CHECK_FUNCS(regcomp setgroups localtime_r posix_fallocate \
 		           openat fstatat getpwnam ffsl readdir_r)
 
-AC_CHECK_LIB(gcrypt, gcry_control, AC_DEFINE(GCRY_CONTROL, 1,
-		     [Define if the gcry_control function is present]))
+AC_CHECK_LIB(gcrypt, gcry_control)
 
 case "${host}" in
     *-*-mingw32*)

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

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


hooks/post-receive
-- 
GNU MyServer



