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-412


From: Giuseppe Scrivano
Subject: [myserver-commit] [SCM] GNU MyServer branch, master, updated. v0.9.2-412-g8cb9165
Date: Wed, 01 Dec 2010 22:01:58 +0000

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

The branch, master has been updated
       via  8cb9165d1692e8f82f2ca1968993e7f0f18ee6bf (commit)
       via  d72a96e34372b47d83085b63776db3c7922483b5 (commit)
      from  52138cc9030e1e6d6e77d242e89ecdda72feeec4 (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 8cb9165d1692e8f82f2ca1968993e7f0f18ee6bf
Author: Giuseppe Scrivano <address@hidden>
Date:   Wed Dec 1 22:59:41 2010 +0100

    CGI: Fix the case when no interpreter is needed.

diff --git a/myserver/src/http_handler/cgi/cgi.cpp 
b/myserver/src/http_handler/cgi/cgi.cpp
index ee751a2..daebf50 100644
--- a/myserver/src/http_handler/cgi/cgi.cpp
+++ b/myserver/src/http_handler/cgi/cgi.cpp
@@ -172,40 +172,44 @@ int Cgi::send (HttpThreadContext* td, const char* 
scriptpath,
         }
       else
         {
-          if (! FilesUtility::nodeExists (tmpCgiPath.c_str ()))
+          if (tmpCgiPath.length () > 0)
             {
-              if (tmpCgiPath.length () > 0)
-                td->connection->host->warningsLogWrite
-                         (_("Cgi: cannot find the %s file")),
-                         tmpCgiPath.c_str ();
-              else
-                td->connection->host->warningsLogWrite
-                           (_("Cgi: Executable file not specified"));
-
-              td->scriptPath.assign ("");
-              td->scriptFile.assign ("");
-              td->scriptDir.assign ("");
-              chain.clearAllFilters ();
-              return td->http->raiseHTTPError (500);
+              if (! FilesUtility::nodeExists (tmpCgiPath.c_str ()))
+                {
+                  td->connection->host->warningsLogWrite
+                    (_("Cgi: cannot find the %s file")),
+                    tmpCgiPath.c_str ();
+
+                  td->scriptPath.assign ("");
+                  td->scriptFile.assign ("");
+                  td->scriptDir.assign ("");
+                  chain.clearAllFilters ();
+                  return td->http->raiseHTTPError (500);
+                }
+
+              spi.arg.assign (moreArg);
+              spi.arg.append (" ");
+
+              cmdLine << "\"" << td->cgiRoot << "/" << td->cgiFile << "\" "  
<< moreArg;
+
+              spi.cmd.assign (td->cgiRoot);
+              spi.cmd.append ("/");
+              spi.cmd.append (td->cgiFile);
+            }
+          else
+            {
+              spi.cmd.append ("./");
+              spi.cmd.append (td->scriptFile);
             }
 
-          spi.arg.assign (moreArg);
-          spi.arg.append (" ");
+          spi.arg.append (" ./");
           spi.arg.append (td->scriptFile);
 
-          cmdLine << "\"" << td->cgiRoot << "/" << td->cgiFile << "\" "
-                  << moreArg << " " << td->scriptFile;
-
-          spi.cmd.assign (td->cgiRoot);
-          spi.cmd.append ("/");
-          spi.cmd.append (td->cgiFile);
+          cmdLine << " ./" << td->scriptFile;
 
-          if (td->cgiFile.length () > 4 && td->cgiFile[0] == 'n'
-              && td->cgiFile[1] == 'p' && td->cgiFile[2] == 'h'
-              && td->cgiFile[3] == '-' )
-            nph = true;
-          else
-            nph = false;
+          nph = td->scriptFile.length () > 4 && td->scriptFile[0] == 'n'
+            && td->scriptFile[1] == 'p' && td->scriptFile[2] == 'h'
+            && td->scriptFile[3] == '-';
         }
 
       /*



commit d72a96e34372b47d83085b63776db3c7922483b5
Author: Giuseppe Scrivano <address@hidden>
Date:   Wed Dec 1 18:23:37 2010 +0100

    Remove redundant check.

diff --git a/myserver/src/http_handler/fastcgi/fastcgi.cpp 
b/myserver/src/http_handler/fastcgi/fastcgi.cpp
index 737472f..a59d91d 100644
--- a/myserver/src/http_handler/fastcgi/fastcgi.cpp
+++ b/myserver/src/http_handler/fastcgi/fastcgi.cpp
@@ -759,7 +759,7 @@ int FastCgi::readHeader (FcgiContext *con, FcgiHeader* 
header, u_long started,
       nbr = con->sock.recv (buffer + readData, sizeof (FcgiHeader) - readData,
                             0, timeout - (ticks - started));
 
-      if (nbr == static_cast<size_t>(-1) || nbr == 0)
+      if (nbr == 0)
         return 1;
 
       readData += nbr;

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

Summary of changes:
 myserver/src/http_handler/cgi/cgi.cpp         |   60 +++++++++++++-----------
 myserver/src/http_handler/fastcgi/fastcgi.cpp |    2 +-
 2 files changed, 33 insertions(+), 29 deletions(-)


hooks/post-receive
-- 
GNU MyServer



reply via email to

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