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. v0.9.2-249


From: Giuseppe Scrivano
Subject: [myserver-commit] [SCM] GNU MyServer branch, master, updated. v0.9.2-249-g2a1142e
Date: Mon, 24 May 2010 10:19: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  2a1142ee58090b6750a85531789568b15b9a88e3 (commit)
       via  4854f135492cabdcd6c87edac1f49da698542951 (commit)
      from  56a82e2184951621173a8cd3d1a41fe4fac379c7 (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 2a1142ee58090b6750a85531789568b15b9a88e3
Author: Giuseppe Scrivano <address@hidden>
Date:   Mon May 24 12:20:28 2010 +0200

    Silently ignore exceptions happening before a virtual host is found

diff --git a/myserver/src/server/clients_thread.cpp 
b/myserver/src/server/clients_thread.cpp
index 15e8a60..b16a530 100644
--- a/myserver/src/server/clients_thread.cpp
+++ b/myserver/src/server/clients_thread.cpp
@@ -168,9 +168,7 @@ DEFINE_THREAD (clients_thread, pParam)
         }
       catch (exception &e)
         {
-          ct->server->log (MYSERVER_LOG_MSG_ERROR, _("Error : %s"),
-                                  e.what ());
-        };
+        }
   }
 
   ct->server->decreaseFreeThread ();



commit 4854f135492cabdcd6c87edac1f49da698542951
Author: Giuseppe Scrivano <address@hidden>
Date:   Mon May 24 11:22:53 2010 +0200

    Specify correctly if only the HTTP header must be sent.
    
    Change some variables type from `int' to `bool' when used merely as 1 or 0.

diff --git a/myserver/include/base/xml/xml_parser.h 
b/myserver/include/base/xml/xml_parser.h
index 527394d..e3da646 100644
--- a/myserver/include/base/xml/xml_parser.h
+++ b/myserver/include/base/xml/xml_parser.h
@@ -58,9 +58,9 @@ public:
   XmlParser ();
   ~XmlParser ();
   xmlDocPtr getDoc ();
-  int open (const char* filename, bool useXpath = 0);
-  int open (string const &filename, bool useXpath = 0){return open 
(filename.c_str (), useXpath);};
-  int openMemBuf (MemBuf &, bool useXpath = 0);
+  int open (const char* filename, bool useXpath = false);
+  int open (string const &filename, bool useXpath = false){return open 
(filename.c_str (), useXpath);};
+  int openMemBuf (MemBuf &, bool useXpath = false);
 
   const char *getValue (const char* field);
   const char *getValue (string const &field){return getValue (field.c_str 
());};
diff --git a/myserver/include/http_handler/cgi/cgi.h 
b/myserver/include/http_handler/cgi/cgi.h
index a727439..002b123 100644
--- a/myserver/include/http_handler/cgi/cgi.h
+++ b/myserver/include/http_handler/cgi/cgi.h
@@ -38,9 +38,9 @@ public:
                     bool onlyHeader = false);
 private:
   int sendData (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain,
-                Process& cgiProc, int onlyHeader, bool nph);
+                Process& cgiProc, bool onlyHeader, bool nph);
   int sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain,
-                  Process& cgiProc, int onlyHeader, bool nph, u_long 
procStartTime,
+                  Process& cgiProc, bool onlyHeader, bool nph, u_long 
procStartTime,
                   bool keepalive, bool useChunks, int *ret);
 };
 #endif
diff --git a/myserver/include/http_handler/http_dir/http_dir.h 
b/myserver/include/http_handler/http_dir/http_dir.h
index f26eec2..4040863 100644
--- a/myserver/include/http_handler/http_dir/http_dir.h
+++ b/myserver/include/http_handler/http_dir/http_dir.h
@@ -42,7 +42,7 @@ public:
   virtual int unLoad ();
   virtual int send (HttpThreadContext*,
                     const char *filenamePath, const char* cgi,
-                    bool execute = false, bool OnlyHeader = false);
+                    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 fb5b986..e672e9a 100644
--- a/myserver/include/http_handler/http_file/http_file.h
+++ b/myserver/include/http_handler/http_file/http_file.h
@@ -31,7 +31,7 @@ public:
   virtual int unLoad ();
   virtual int send (HttpThreadContext* td,
                     const char *filenamePath, const char* cgi,
-                    bool execute = false, bool OnlyHeader = false);
+                    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 1a29b61..26eaed2 100644
--- a/myserver/include/http_handler/isapi/isapi.h
+++ b/myserver/include/http_handler/isapi/isapi.h
@@ -113,7 +113,7 @@ struct ConnTableRecord
 {
   FiltersChain chain;
   BOOL Allocated;
-  int onlyHeader;
+  bool onlyHeader;
   int headerSent;
   int headerSize;
   HttpThreadContext *td;
diff --git a/myserver/include/http_handler/proxy/proxy.h 
b/myserver/include/http_handler/proxy/proxy.h
index b485647..0c5e4c2 100644
--- a/myserver/include/http_handler/proxy/proxy.h
+++ b/myserver/include/http_handler/proxy/proxy.h
@@ -40,7 +40,7 @@ public:
                     bool onlyHeader = false);
 protected:
   int flushToClient (HttpThreadContext* td, Socket& client,
-                     FiltersChain &out, int onlyHeader);
+                     FiltersChain &out, bool onlyHeader);
   int readPayLoad (HttpThreadContext* td,
                    HttpResponseHeader* res,
                    FiltersChain *out,
diff --git a/myserver/include/http_handler/scgi/scgi.h 
b/myserver/include/http_handler/scgi/scgi.h
index c8a5f77..af21069 100644
--- a/myserver/include/http_handler/scgi/scgi.h
+++ b/myserver/include/http_handler/scgi/scgi.h
@@ -64,7 +64,7 @@ private:
   static int initialized;
   Socket getScgiConnection ();
   int sendPostData (ScgiContext* ctx);
-  int sendResponse (ScgiContext* ctx, int onlyHeader, FiltersChain*);
+  int sendResponse (ScgiContext* ctx, bool onlyHeader, FiltersChain*);
   int buildScgiEnvironmentString (HttpThreadContext*, char*, char*);
   int sendNetString (ScgiContext*, const char*, int);
   ScgiServer* isScgiServerRunning (const char*);
diff --git a/myserver/include/plugin/plugin_info.h 
b/myserver/include/plugin/plugin_info.h
index 79eefb7..87d4d00 100644
--- a/myserver/include/plugin/plugin_info.h
+++ b/myserver/include/plugin/plugin_info.h
@@ -36,7 +36,7 @@ class PluginInfo
 {
 public:
 
-  PluginInfo (string& name, bool enabled = 1, bool global = 0);
+  PluginInfo (string& name, bool enabled = true, bool global = false);
   ~PluginInfo ();
 
   bool isEnabled ();
diff --git a/myserver/include/protocol/http/dyn_http_command.h 
b/myserver/include/protocol/http/dyn_http_command.h
index 2cb2b5d..eaa1b95 100644
--- a/myserver/include/protocol/http/dyn_http_command.h
+++ b/myserver/include/protocol/http/dyn_http_command.h
@@ -36,9 +36,9 @@ public:
   virtual ~DynamicHttpCommand ();
   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;
+  virtual int send (HttpThreadContext* context, ConnectionPtr connection,
+                    string& Uri, bool systemrequest = false,
+                    bool onlyHeader = false, bool yetmapped = false) = 0;
 private:
   string name;
 };
diff --git a/myserver/include/protocol/http/dyn_http_manager.h 
b/myserver/include/protocol/http/dyn_http_manager.h
index a31be00..6d0c83a 100644
--- a/myserver/include/protocol/http/dyn_http_manager.h
+++ b/myserver/include/protocol/http/dyn_http_manager.h
@@ -36,7 +36,7 @@ public:
   DynamicHttpManager ();
   virtual ~DynamicHttpManager ();
   virtual int send (HttpThreadContext*, ConnectionPtr s, const char 
*filenamePath,
-                    const char* cgi, int selfExecuted, int onlyHeader = 0) = 0;
+                    const char* cgi, int selfExecuted, bool onlyHeader = 
false) = 0;
 
 };
 
diff --git a/myserver/include/protocol/http/http.h 
b/myserver/include/protocol/http/http.h
index 476bfcb..cb4e222 100644
--- a/myserver/include/protocol/http/http.h
+++ b/myserver/include/protocol/http/http.h
@@ -81,25 +81,25 @@ public:
   int requestAuthorization ();
 
   int sendHTTPResource (string& filename,
-                        int systemrequest = 0,
-                        int onlyHeader = 0,
-                        int yetMapped = 0);
+                        bool systemrequest = false,
+                        bool onlyHeader = false,
+                        bool yetMapped = false);
 
   int putHTTPRESOURCE (string &filename,
-                       int systemrequest = 0,
-                       int onlyHeader = 0,
-                       int yetMapped = 0);
+                       bool systemrequest = false,
+                       bool onlyHeader = false,
+                       bool yetMapped = false);
 
   int optionsHTTPRESOURCE (string &filename,
-                           int yetMapped = 0);
+                           bool yetMapped = false);
 
   int traceHTTPRESOURCE (string& filename,
-                         int yetMapped = 0);
+                         bool yetMapped = false);
 
   int deleteHTTPRESOURCE (string &filename,
-                          int systemrequest = 0,
-                          int onlyHeader = 0,
-                          int yetMapped = 0);
+                          bool systemrequest = false,
+                          bool onlyHeader = false,
+                          bool yetMapped = false);
 
   bool allowMethod (const char *name);
 
@@ -112,25 +112,25 @@ public:
 
   int getPath (string& filenamePath,
                const string& filename,
-               int systemrequest)
+               bool systemrequest)
   {return getPath (td, filenamePath, filename.c_str (), systemrequest);}
 
   int getPath (string& filenamePath,
                const char *filename,
-               int systemrequest)
+               bool systemrequest)
   {return getPath (td, filenamePath, filename, systemrequest);}
 
 
   static int getPath (HttpThreadContext* td,
                       string& filenamePath,
                       const string& filename,
-                      int systemrequest)
+                      bool systemrequest)
   {return getPath (td, filenamePath, filename.c_str (), systemrequest);}
 
   static int getPath (HttpThreadContext* td,
                       string& filenamePath,
                       const char *filename,
-                      int systemrequest);
+                      bool systemrequest);
 
   MimeRecord* getMIME (string& filename);
 
@@ -149,12 +149,12 @@ public:
   static int loadProtocolStatic ();
 
   u_long getTimeout ();
-  int preprocessHttpRequest (string& filename, int yetmapped,
+  int preprocessHttpRequest (string& filename, bool yetmapped,
                              int* permissions);
 
   int getFilePermissions (string& filename, string& directory,
                           string& file, string &filenamePath,
-                          int yetmapped, int* permissions);
+                          bool yetmapped, int* permissions);
 
   SecurityToken *getSecurityToken (){return &(td->securityToken);}
   HttpProtocol *getStaticData () {return staticData;}
@@ -171,7 +171,7 @@ public:
   }
 
 protected:
-  int processDefaultFile (string& uri, int permissions, int onlyHeader);
+  int processDefaultFile (string& uri, int permissions, bool onlyHeader);
 
   struct HttpThreadContext *td;
   void clean ();
diff --git a/myserver/include/protocol/http/http_thread_context.h 
b/myserver/include/protocol/http/http_thread_context.h
index 5c99528..25bf3b2 100644
--- a/myserver/include/protocol/http/http_thread_context.h
+++ b/myserver/include/protocol/http/http_thread_context.h
@@ -50,7 +50,7 @@ class MimeRecord;
  */
 struct HttpThreadContext
 {
-  int appendOutputs;
+  bool appendOutputs;
 
   /*! Set by raiseHTTPError.  */
   int lastError;
diff --git a/myserver/src/http_handler/cgi/cgi.cpp 
b/myserver/src/http_handler/cgi/cgi.cpp
index b71ed2e..bb19bc9 100644
--- a/myserver/src/http_handler/cgi/cgi.cpp
+++ b/myserver/src/http_handler/cgi/cgi.cpp
@@ -299,7 +299,7 @@ int Cgi::send (HttpThreadContext* td, const char* 
scriptpath,
   Read data from the CGI process and send it back to the client.
  */
 int Cgi::sendData (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& 
chain,
-                   Process &cgiProc, int onlyHeader, bool nph)
+                   Process &cgiProc, bool onlyHeader, bool nph)
 {
   u_long nbw = 0;
   u_long nbw2 = 0;
@@ -386,7 +386,7 @@ int Cgi::sendData (HttpThreadContext* td, Pipe &stdOutFile, 
FiltersChain& chain,
   \return nonzero if the reply is already complete.
  */
 int Cgi::sendHeader (HttpThreadContext *td, Pipe &stdOutFile, FiltersChain 
&chain,
-                     Process &cgiProc, int onlyHeader, bool nph,
+                     Process &cgiProc, bool onlyHeader, bool nph,
                      u_long procStartTime, bool keepalive, bool useChunks,
                      int *ret)
 {
diff --git a/myserver/src/http_handler/proxy/proxy.cpp 
b/myserver/src/http_handler/proxy/proxy.cpp
index 27158d0..1dbe690 100644
--- a/myserver/src/http_handler/proxy/proxy.cpp
+++ b/myserver/src/http_handler/proxy/proxy.cpp
@@ -128,7 +128,7 @@ int Proxy::send (HttpThreadContext *td, const char* 
scriptpath,
   Flush the server reply to the client.
  */
 int Proxy::flushToClient (HttpThreadContext* td, Socket& client,
-                          FiltersChain &out, int onlyHeader)
+                          FiltersChain &out, bool onlyHeader)
 {
   u_long read = 0;
   u_long headerLength;
diff --git a/myserver/src/http_handler/scgi/scgi.cpp 
b/myserver/src/http_handler/scgi/scgi.cpp
index e609cd2..d3033ad 100644
--- a/myserver/src/http_handler/scgi/scgi.cpp
+++ b/myserver/src/http_handler/scgi/scgi.cpp
@@ -211,7 +211,7 @@ int Scgi::send (HttpThreadContext* td, const char* 
scriptpath,
 /*!
   Send the response to the client.
  */
-int Scgi::sendResponse (ScgiContext* ctx, int onlyHeader, FiltersChain* chain)
+int Scgi::sendResponse (ScgiContext* ctx, bool onlyHeader, FiltersChain* chain)
 {
   clock_t initialTicks = getTicks ();
   bool useChunks = false;
diff --git a/myserver/src/protocol/http/http.cpp 
b/myserver/src/protocol/http/http.cpp
index 11b0a3a..29603c2 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -107,7 +107,7 @@ int HttpProtocol::unLoadProtocol ()
 /*!
   Build a response for an OPTIONS request.
  */
-int Http::optionsHTTPRESOURCE (string& filename, int yetmapped)
+int Http::optionsHTTPRESOURCE (string& filename, bool yetmapped)
 {
   int ret;
   string time;
@@ -154,7 +154,7 @@ int Http::optionsHTTPRESOURCE (string& filename, int 
yetmapped)
 /*!
   Handle the HTTP TRACE command.
  */
-int Http::traceHTTPRESOURCE (string& filename, int yetmapped)
+int Http::traceHTTPRESOURCE (string& filename, bool yetmapped)
 {
   int ret;
   char tmpStr[12];
@@ -232,8 +232,8 @@ u_long Http::getTimeout ()
 /*!
   Main function to handle the HTTP PUT command.
  */
-int Http::putHTTPRESOURCE (string& filename, int sysReq, int onlyHeader,
-                           int yetmapped)
+int Http::putHTTPRESOURCE (string& filename, bool sysReq, bool onlyHeader,
+                           bool yetmapped)
 {
   return sendHTTPResource (filename, sysReq, onlyHeader, yetmapped);
 }
@@ -250,7 +250,7 @@ int Http::putHTTPRESOURCE (string& filename, int sysReq, 
int onlyHeader,
   \return Any other value is the HTTP error code.
  */
 int Http::getFilePermissions (string& filename, string& directory, string& 
file,
-                              string &filenamePath, int yetmapped, int* 
permissions)
+                              string &filenamePath, bool yetmapped, int* 
permissions)
 {
   try
     {
@@ -426,7 +426,7 @@ int Http::getFilePermissions (string& filename, string& 
directory, string& file,
   \return Return 200 on success.
   \return Any other value is the HTTP error code.
  */
-int Http::preprocessHttpRequest (string& filename, int yetmapped,
+int Http::preprocessHttpRequest (string& filename, bool yetmapped,
                                  int* permissions)
 {
   string directory;
@@ -538,8 +538,8 @@ int Http::preprocessHttpRequest (string& filename, int 
yetmapped,
 /*!
   Delete the resource identified by filename.
  */
-int Http::deleteHTTPRESOURCE (string& filename, int sysReq, int onlyHeader,
-                          int yetmapped)
+int Http::deleteHTTPRESOURCE (string& filename, bool sysReq, bool onlyHeader,
+                              bool yetmapped)
 {
   return sendHTTPResource (filename, sysReq, onlyHeader, yetmapped);
 }
@@ -656,8 +656,8 @@ HttpUserData::reset ()
   Main function to send a resource to a client.
  */
 int
-Http::sendHTTPResource (string& uri, int systemrequest, int onlyHeader,
-                        int yetmapped)
+Http::sendHTTPResource (string& uri, bool systemrequest, bool onlyHeader,
+                        bool yetmapped)
 {
   /*
     With this code we manage a request of a file or a directory or anything
@@ -722,7 +722,7 @@ Http::sendHTTPResource (string& uri, int systemrequest, int 
onlyHeader,
           return raiseHTTPError (500);
         }
 
-      return manager->send (td, td->filenamePath.c_str (), 0, onlyHeader);
+      return manager->send (td, td->filenamePath.c_str (), NULL, false, 
onlyHeader);
     }
   catch (exception & e)
     {
@@ -844,8 +844,8 @@ int Http::controlConnection (ConnectionPtr a, char*, char*, 
u_long, u_long,
       td->id = id;
       td->lastError = 0;
       td->http = this;
-      td->appendOutputs = 0;
-      td->onlyHeader = 0;
+      td->appendOutputs = false;
+      td->onlyHeader = false;
       td->filenamePath.assign ("");
       td->outputDataPath.assign ("");
       td->inputDataPath.assign ("");
@@ -1113,7 +1113,7 @@ int Http::controlConnection (ConnectionPtr a, char*, 
char*, u_long, u_long,
                 ret = sendHTTPResource (td->request.uri);
               else if (!td->request.cmd.compare ("HEAD"))
                 {
-                  td->onlyHeader = 1;
+                  td->onlyHeader = true;
                   ret = sendHTTPResource (td->request.uri, 0, 1);
                 }
               else if (!td->request.cmd.compare ("DELETE"))
@@ -1134,7 +1134,7 @@ int Http::controlConnection (ConnectionPtr a, char*, 
char*, u_long, u_long,
                     ret = raiseHTTPError (501);
                   else
                     ret = dynamicCommand->send (td, a, td->request.uri, 0,
-                                                0, 0);
+                                                false, false);
                 }
             }
         }
@@ -1503,7 +1503,7 @@ MimeRecord* Http::getMIME (string &filename)
   Any other return value is the HTTP error.
  */
 int Http::getPath (HttpThreadContext* td, string& filenamePath,
-                   const char *filename, int systemrequest)
+                   const char *filename, bool systemrequest)
 {
   if (systemrequest)
     {
@@ -1572,7 +1572,7 @@ int Http::getPath (HttpThreadContext* td, string& 
filenamePath,
   \param permissions The permission mask for the client.
   \param onlyHeader specify if the client requested only the header.
  */
-int Http::processDefaultFile (string& uri, int permissions, int onlyHeader)
+int Http::processDefaultFile (string& uri, int permissions, bool onlyHeader)
 {
   string key ("http.default_file");
   NodeTree<string> *node = td->securityToken.getNodeTree (key,
@@ -1628,7 +1628,7 @@ int Http::processDefaultFile (string& uri, int 
permissions, int onlyHeader)
       return raiseHTTPError (500);
     }
 
-  return handler->send (td, td->filenamePath.c_str (), 0, onlyHeader);
+  return handler->send (td, td->filenamePath.c_str (), NULL, 0, onlyHeader);
 }
 
 /*!
diff --git a/myserver/src/server/server.cpp b/myserver/src/server/server.cpp
index 9683c59..79a4e07 100644
--- a/myserver/src/server/server.cpp
+++ b/myserver/src/server/server.cpp
@@ -960,8 +960,8 @@ void Server::checkThreadsNumber ()
   threadsMutex->lock ();
 
   /*
-   *Create a new thread if there are not available threads and
-   *we did not reach the limit.
+    Create a new thread if there are not available threads and
+    we did not reach the limit.
    */
   if ((threads.size () < nMaxThreads) && (freeThreads < 1))
     addThread (false);

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

Summary of changes:
 myserver/include/base/xml/xml_parser.h             |    6 ++--
 myserver/include/http_handler/cgi/cgi.h            |    4 +-
 myserver/include/http_handler/http_dir/http_dir.h  |    2 +-
 .../include/http_handler/http_file/http_file.h     |    2 +-
 myserver/include/http_handler/isapi/isapi.h        |    2 +-
 myserver/include/http_handler/proxy/proxy.h        |    2 +-
 myserver/include/http_handler/scgi/scgi.h          |    2 +-
 myserver/include/plugin/plugin_info.h              |    2 +-
 myserver/include/protocol/http/dyn_http_command.h  |    6 ++--
 myserver/include/protocol/http/dyn_http_manager.h  |    2 +-
 myserver/include/protocol/http/http.h              |   36 ++++++++++----------
 .../include/protocol/http/http_thread_context.h    |    2 +-
 myserver/src/http_handler/cgi/cgi.cpp              |    4 +-
 myserver/src/http_handler/proxy/proxy.cpp          |    2 +-
 myserver/src/http_handler/scgi/scgi.cpp            |    2 +-
 myserver/src/protocol/http/http.cpp                |   36 ++++++++++----------
 myserver/src/server/clients_thread.cpp             |    4 +--
 myserver/src/server/server.cpp                     |    4 +-
 18 files changed, 59 insertions(+), 61 deletions(-)


hooks/post-receive
-- 
GNU MyServer



reply via email to

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