myserver-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myserver-commit] [SCM] GNU MyServer branch, master, updated. 0_9-378-g6


From: Giuseppe Scrivano
Subject: [myserver-commit] [SCM] GNU MyServer branch, master, updated. 0_9-378-g6cb5a34
Date: Sat, 07 Nov 2009 11:41:57 +0000

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

The branch, master has been updated
       via  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 <address@hidden>
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 <address@hidden>
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 <address@hidden>
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 <address@hidden>
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 <address@hidden>
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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]