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


From: Giuseppe Scrivano
Subject: [myserver-commit] [SCM] GNU MyServer branch, master, updated. v0.9.2-410-g52138cc
Date: Wed, 01 Dec 2010 16:44: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 branch, master has been updated
       via  52138cc9030e1e6d6e77d242e89ecdda72feeec4 (commit)
       via  b2eb10117a80d78f26bf1ab02ab9ae0c8ff33e46 (commit)
       via  2046a950ab3c5f52da73c4b6f2df904cf76bbd60 (commit)
       via  3b69ebc8861ed5c929b58bb847b3fd1c1d363546 (commit)
       via  5d0034e4013385154177ed65225d22bdcbda3fe5 (commit)
      from  8ed1dfd8afb14321c7756f4deb6da4afa7624b55 (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 52138cc9030e1e6d6e77d242e89ecdda72feeec4
Author: Giuseppe Scrivano <address@hidden>
Date:   Wed Dec 1 17:00:38 2010 +0100

    FastCGI: send the payload in any case.

diff --git a/myserver/src/http_handler/fastcgi/fastcgi.cpp 
b/myserver/src/http_handler/fastcgi/fastcgi.cpp
index 8a14b81..737472f 100644
--- a/myserver/src/http_handler/fastcgi/fastcgi.cpp
+++ b/myserver/src/http_handler/fastcgi/fastcgi.cpp
@@ -616,11 +616,11 @@ int FastCgi::sendData (FcgiContext* con, u_long dim, 
u_long timeout,
 
       dataRead += nbr;
 
-      if (!con->headerSent)
+      if (! con->headerSent)
         return handleHeader (con, chain, responseCompleted, onlyHeader);
     }
 
-  if (onlyHeader || con->td->response.getStatusType () != 
HttpResponseHeader::SUCCESSFUL)
+  if (onlyHeader)
     return 1;
 
   HttpDataHandler::appendDataToHTTPChannel (con->td,
@@ -713,8 +713,7 @@ int FastCgi::handleHeader (FcgiContext* con, FiltersChain* 
chain, bool* response
   con->headerSent = true;
 
   /* Flush the buffer if remaining data is present.  */
-  if (con->td->response.getStatusType () == HttpResponseHeader::SUCCESSFUL &&
-      size - headerSize)
+  if (size - headerSize)
     {
       HttpDataHandler::appendDataToHTTPChannel (con->td,
                                                 con->td->buffer->getBuffer () 
+ headerSize,



commit b2eb10117a80d78f26bf1ab02ab9ae0c8ff33e46
Author: Giuseppe Scrivano <address@hidden>
Date:   Fri Nov 26 15:39:09 2010 +0100

    Mention last changes in the NEWS file.

diff --git a/myserver/NEWS b/myserver/NEWS
index 7625728..a9e282c 100644
--- a/myserver/NEWS
+++ b/myserver/NEWS
@@ -1,5 +1,16 @@
 GNU myserver NEWS                                    -*- outline -*-
 
+* Noteworthy changes in release X.Y.Z
+
+** Bug fixes
+
+   Cope correctly with CGI payloads if the return code is not 2xx.
+
+   Detect correctly the last existing component before PATH_INFO.
+
+   The proxy handler doesn't use the chunked transfer encoding when the
+   content-length is known, both methods were used at the same time.
+
 * Noteworthy changes in release 0.10
 
 ** Bug fixes



commit 2046a950ab3c5f52da73c4b6f2df904cf76bbd60
Author: Giuseppe Scrivano <address@hidden>
Date:   Fri Nov 26 15:36:22 2010 +0100

    FastCGI: redirect stderr to stdout.

diff --git a/myserver/src/http_handler/fastcgi/fastcgi.cpp 
b/myserver/src/http_handler/fastcgi/fastcgi.cpp
index 146cf76..8a14b81 100644
--- a/myserver/src/http_handler/fastcgi/fastcgi.cpp
+++ b/myserver/src/http_handler/fastcgi/fastcgi.cpp
@@ -235,11 +235,8 @@ int FastCgi::send (HttpThreadContext* td, const char* 
scriptpath,
               switch (header.type)
                 {
                 case FCGISTDERR:
-                  con.sock.close ();
-                  td->http->raiseHTTPError (501);
-                  exit = 1;
-                  ret = HttpDataHandler::RET_FAILURE;
-                  break;
+
+                  /* Fall trough.  */
 
                 case FCGISTDOUT:
                   headerCompleted = false;
@@ -258,10 +255,7 @@ int FastCgi::send (HttpThreadContext* td, const char* 
scriptpath,
                     }
 
                   if (headerCompleted)
-                    {
-                      exit = 1;
-                      break;
-                    }
+                    exit = 1;
 
                   break;
 
@@ -290,7 +284,8 @@ int FastCgi::send (HttpThreadContext* td, const char* 
scriptpath,
                   toPad -= nbr;
                 }
             }
-        }while (!exit);
+        }
+      while (! exit);
 
       /* Send the last null chunk if needed.  */
       if (!responseCompleted && con.useChunks &&



commit 3b69ebc8861ed5c929b58bb847b3fd1c1d363546
Author: Giuseppe Scrivano <address@hidden>
Date:   Fri Nov 26 15:35:58 2010 +0100

    Cope correctly with CGI payloads if the return code is not 2xx.

diff --git a/myserver/src/http_handler/cgi/cgi.cpp 
b/myserver/src/http_handler/cgi/cgi.cpp
index 6b0142a..ee751a2 100644
--- a/myserver/src/http_handler/cgi/cgi.cpp
+++ b/myserver/src/http_handler/cgi/cgi.cpp
@@ -313,51 +313,48 @@ int Cgi::sendData (HttpThreadContext* td, Pipe 
&stdOutFile, FiltersChain& chain,
       ff->chain (&chain, td->mime->filters, td->connection->socket, &nbw, 1);
     }
 
-  if (td->response.getStatusType () == HttpResponseHeader::SUCCESSFUL)
+  /* Send the rest of the data until we can read from the pipe.  */
+  for (;;)
     {
-      /* Send the rest of the data until we can read from the pipe.  */
-      for (;;)
+      nBytesRead = 0;
+      int aliveProcess = 0;
+      u_long ticks = getTicks () - procStartTime;
+      u_long timeout = td->http->getTimeout ();
+      if (timeout <= ticks
+          || stdOutFile.waitForData ((timeout - ticks) / 1000,
+                                     (timeout - ticks) % 1000) == 0)
         {
-          nBytesRead = 0;
-          int aliveProcess = 0;
-          u_long ticks = getTicks () - procStartTime;
-          u_long timeout = td->http->getTimeout ();
-          if (timeout <= ticks
-              || stdOutFile.waitForData ((timeout - ticks) / 1000,
-                                         (timeout - ticks) % 1000) == 0)
-            {
-              td->connection->host->warningsLogWrite (_("Cgi: process %i 
timeout"),
-                                                      cgiProc.getPid ());
-              break;
-            }
-
-          aliveProcess = !stdOutFile.pipeTerminated ();
+          td->connection->host->warningsLogWrite (_("Cgi: process %i timeout"),
+                                                  cgiProc.getPid ());
+          break;
+        }
 
-          /* Read data from the process standard output file.  */
-          stdOutFile.read (td->auxiliaryBuffer->getBuffer (),
-                           td->auxiliaryBuffer->getRealLength (),
-                           &nBytesRead);
+      aliveProcess = !stdOutFile.pipeTerminated ();
 
-          if (!aliveProcess && !nBytesRead)
-            break;
+      /* Read data from the process standard output file.  */
+      stdOutFile.read (td->auxiliaryBuffer->getBuffer (),
+                       td->auxiliaryBuffer->getRealLength (),
+                       &nBytesRead);
 
-          if (nBytesRead)
-            HttpDataHandler::appendDataToHTTPChannel (td,
-                                             td->auxiliaryBuffer->getBuffer (),
-                                                      nBytesRead,
-                                                      &(td->outputData),
-                                                      &chain,
-                                                      td->appendOutputs,
-                                                      useChunks);
+      if (!aliveProcess && !nBytesRead)
+        break;
 
-          nbw += nBytesRead;
-        }
+      if (nBytesRead)
+        HttpDataHandler::appendDataToHTTPChannel (td,
+                                                  
td->auxiliaryBuffer->getBuffer (),
+                                                  nBytesRead,
+                                                  &(td->outputData),
+                                                  &chain,
+                                                  td->appendOutputs,
+                                                  useChunks);
 
-      /* Send the last null chunk if needed.  */
-      if (useChunks && chain.getStream ()->write ("0\r\n\r\n", 5, &nbw2))
-        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 HttpDataHandler::RET_FAILURE;
+
   /* Update the Content-length field for logging activity.  */
   td->sentData += nbw;
 



commit 5d0034e4013385154177ed65225d22bdcbda3fe5
Author: Giuseppe Scrivano <address@hidden>
Date:   Fri Nov 26 15:35:20 2010 +0100

    Http: do not include content-type in a redirect response.

diff --git a/myserver/src/protocol/http/http.cpp 
b/myserver/src/protocol/http/http.cpp
index 0395aef..457434e 100644
--- a/myserver/src/protocol/http/http.cpp
+++ b/myserver/src/protocol/http/http.cpp
@@ -1645,11 +1645,11 @@ int Http::sendHTTPRedirect (const char *newURL)
 
   td->response.httpStatus = 302;
   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";
+  *td->auxiliaryBuffer << "HTTP/1.1 302 Moved\r\n"
+                       << "Accept-Ranges: bytes\r\n"
+                       << "Server: GNU MyServer " << MYSERVER_VERSION << "\r\n"
+                       << "Location: " << newURL << "\r\n"
+                       << "Content-length: 0\r\n";
 
   if (connection && !stringcmpi (connection->value.c_str (), "keep-alive"))
     *td->auxiliaryBuffer << "Connection: keep-alive\r\n";

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

Summary of changes:
 myserver/NEWS                                 |   11 ++++
 myserver/src/http_handler/cgi/cgi.cpp         |   69 ++++++++++++-------------
 myserver/src/http_handler/fastcgi/fastcgi.cpp |   22 +++-----
 myserver/src/protocol/http/http.cpp           |   10 ++--
 4 files changed, 57 insertions(+), 55 deletions(-)


hooks/post-receive
-- 
GNU MyServer



reply via email to

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