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


From: Giuseppe Scrivano
Subject: [myserver-commit] [SCM] GNU MyServer branch, master, updated. v0.9.2-481-g9fc8ba3
Date: Sat, 23 Apr 2011 21:41:55 +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  9fc8ba318396e6b884ef68601722c338ff70b52c (commit)
       via  6d8d4b834009b8d27b00e679ce7b34492df4b049 (commit)
      from  683d2be1d20c202bbcdbe45b77cc37e831638906 (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 9fc8ba318396e6b884ef68601722c338ff70b52c
Author: Giuseppe Scrivano <address@hidden>
Date:   Sat Apr 23 23:39:02 2011 +0200

    HttpHandlers: cleanup

diff --git a/myserver/include/http_handler/cgi/cgi.h 
b/myserver/include/http_handler/cgi/cgi.h
index 99f920d..8a1f4c5 100644
--- a/myserver/include/http_handler/cgi/cgi.h
+++ b/myserver/include/http_handler/cgi/cgi.h
@@ -41,6 +41,6 @@ private:
                 Process& cgiProc, bool onlyHeader, bool nph);
   int sendHeader (HttpThreadContext* td, Pipe &stdOutFile, FiltersChain& chain,
                   Process& cgiProc, bool onlyHeader, bool nph, u_long 
procStartTime,
-                  bool *useChunks, int *ret);
+                  int *ret);
 };
 #endif
diff --git a/myserver/include/http_handler/proxy/proxy.h 
b/myserver/include/http_handler/proxy/proxy.h
index a92dc08..0ccb3f6 100644
--- a/myserver/include/http_handler/proxy/proxy.h
+++ b/myserver/include/http_handler/proxy/proxy.h
@@ -58,8 +58,6 @@ protected:
                    const char *initBuffer,
                    u_long initBufferSize,
                    int timeout,
-                   bool useChunks = false,
-                   bool keepalive = false,
                    string *serverTransferEncoding = NULL);
 
   static void proxySchedulerHandler (void *p, Connection *c, int event);
diff --git a/myserver/src/http_handler/cgi/cgi.cpp 
b/myserver/src/http_handler/cgi/cgi.cpp
index 5ddf0a5..7defe45 100644
--- a/myserver/src/http_handler/cgi/cgi.cpp
+++ b/myserver/src/http_handler/cgi/cgi.cpp
@@ -297,7 +297,7 @@ int Cgi::sendData (HttpThreadContext* td, Pipe &stdOutFile, 
FiltersChain& chain,
   procStartTime = getTicks ();
 
   if (sendHeader (td, stdOutFile, chain, cgiProc, onlyHeader, nph,
-                  procStartTime, &td->useChunks, &ret))
+                  procStartTime, &ret))
     return ret;
 
   if (!nph && onlyHeader)
@@ -356,7 +356,7 @@ int Cgi::sendData (HttpThreadContext* td, Pipe &stdOutFile, 
FiltersChain& chain,
  */
 int Cgi::sendHeader (HttpThreadContext *td, Pipe &stdOutFile,
                      FiltersChain &chain, Process &cgiProc, bool onlyHeader,
-                     bool nph, u_long procStartTime, bool *useChunks, int *ret)
+                     bool nph, u_long procStartTime, int *ret)
 {
   u_long headerSize = 0;
   bool headerCompleted = false;
diff --git a/myserver/src/http_handler/proxy/proxy.cpp 
b/myserver/src/http_handler/proxy/proxy.cpp
index c1432bb..c2ae6dc 100644
--- a/myserver/src/http_handler/proxy/proxy.cpp
+++ b/myserver/src/http_handler/proxy/proxy.cpp
@@ -223,7 +223,6 @@ int Proxy::flushToClient (HttpThreadContext* td, Socket& 
client,
   readPayLoad (td, &td->response, &out, &client,
                td->auxiliaryBuffer->getBuffer () + headerLength,
                read - headerLength, td->http->getTimeout (),
-               td->useChunks, td->keepalive,
                hasTransferEncoding ? &transferEncoding : NULL);
 
   td->sentData += ret;
@@ -239,9 +238,7 @@ int Proxy::flushToClient (HttpThreadContext* td, Socket& 
client,
   \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.
 
@@ -255,8 +252,6 @@ int Proxy::readPayLoad (HttpThreadContext* td,
                         const char *initBuffer,
                         u_long initBufferSize,
                         int timeout,
-                        bool useChunks,
-                        bool keepalive,
                         string *serverTransferEncoding)
 {
   size_t contentLength = 0;



commit 6d8d4b834009b8d27b00e679ce7b34492df4b049
Author: Giuseppe Scrivano <address@hidden>
Date:   Sat Apr 23 23:31:56 2011 +0200

    HttpDataHandler: rename `checkDataChunks' to `chooseEncoding'

diff --git a/myserver/include/protocol/http/http_data_handler.h 
b/myserver/include/protocol/http/http_data_handler.h
index 729720e..cd3d013 100644
--- a/myserver/include/protocol/http/http_data_handler.h
+++ b/myserver/include/protocol/http/http_data_handler.h
@@ -52,7 +52,7 @@ public:
   HttpDataHandler ();
   virtual ~HttpDataHandler ();
 
-  static void checkDataChunks (HttpThreadContext* td,
+  static void chooseEncoding (HttpThreadContext* td,
                                bool disableEncoding = false);
 
   static size_t appendDataToHTTPChannel (HttpThreadContext* td,
diff --git a/myserver/src/http_handler/cgi/cgi.cpp 
b/myserver/src/http_handler/cgi/cgi.cpp
index f171e0f..5ddf0a5 100644
--- a/myserver/src/http_handler/cgi/cgi.cpp
+++ b/myserver/src/http_handler/cgi/cgi.cpp
@@ -451,7 +451,7 @@ int Cgi::sendHeader (HttpThreadContext *td, Pipe 
&stdOutFile,
               return 1;
             }
 
-          checkDataChunks (td);
+          chooseEncoding (td);
           HttpHeaders::sendHeader (td->response, *chain.getStream (),
                                    *td->buffer, td);
         }
diff --git a/myserver/src/http_handler/fastcgi/fastcgi.cpp 
b/myserver/src/http_handler/fastcgi/fastcgi.cpp
index ed67a2b..47f56fc 100644
--- a/myserver/src/http_handler/fastcgi/fastcgi.cpp
+++ b/myserver/src/http_handler/fastcgi/fastcgi.cpp
@@ -689,7 +689,7 @@ int FastCgi::handleHeader (FcgiContext* con, FiltersChain* 
chain, bool* response
         }
     }
 
-  checkDataChunks (con->td);
+  chooseEncoding (con->td);
   if (HttpHeaders::sendHeader (con->td->response, *con->td->connection->socket,
                                *con->td->auxiliaryBuffer, con->td))
     {
diff --git a/myserver/src/http_handler/http_dir/http_dir.cpp 
b/myserver/src/http_handler/http_dir/http_dir.cpp
index eba7db2..260e94b 100644
--- a/myserver/src/http_handler/http_dir/http_dir.cpp
+++ b/myserver/src/http_handler/http_dir/http_dir.cpp
@@ -380,7 +380,7 @@ int HttpDir::send (HttpThreadContext* td,
             }
         }
 
-      checkDataChunks (td);
+      chooseEncoding (td);
       HttpHeaders::sendHeader (td->response, *td->connection->socket,
                                *td->buffer, td);
 
diff --git a/myserver/src/http_handler/http_file/http_file.cpp 
b/myserver/src/http_handler/http_file/http_file.cpp
index a857017..8f39261 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -323,7 +323,7 @@ int HttpFile::send (HttpThreadContext* td, const char 
*filenamePath,
         td->response.contentLength.assign (buffer.str ());
       }
 
-    checkDataChunks (td, fastCopyAllowed);
+    chooseEncoding (td, fastCopyAllowed);
     HttpHeaders::sendHeader (td->response, *td->connection->socket,
                              *td->buffer, td);
 
diff --git a/myserver/src/http_handler/isapi/isapi.cpp 
b/myserver/src/http_handler/isapi/isapi.cpp
index 0f87005..3ae9523 100644
--- a/myserver/src/http_handler/isapi/isapi.cpp
+++ b/myserver/src/http_handler/isapi/isapi.cpp
@@ -270,7 +270,7 @@ BOOL WINAPI ISAPI_WriteClientExport (HCONN hConn, LPVOID 
Buffer, LPDWORD lpdwByt
             (ConnInfo->td->buffer->getBuffer (), &ConnInfo->td->response,
              &(ConnInfo->td->nBytesToRead));
 
-          HttpDataHandler::checkDataChunks (ConnInfo->td);
+          HttpDataHandler::chooseEncoding (ConnInfo->td);
           if (HttpHeaders::sendHeader (ConnInfo->td->response,
                                        *ConnInfo->td->connection->socket,
                                        *ConnInfo->td->auxiliaryBuffer,
diff --git a/myserver/src/http_handler/mscgi/mscgi.cpp 
b/myserver/src/http_handler/mscgi/mscgi.cpp
index 223a08e..0732223 100644
--- a/myserver/src/http_handler/mscgi/mscgi.cpp
+++ b/myserver/src/http_handler/mscgi/mscgi.cpp
@@ -157,7 +157,6 @@ int MsCgi::write (const char* data, size_t len, MsCgiData* 
mcd)
   if (mcd->error)
     return 1;
 
-  checkDataChunks (mcd->td);
   if (!mcd->headerSent && sendHeader (mcd))
     return 1;
 
@@ -184,6 +183,7 @@ int MsCgi::sendHeader (MsCgiData* mcd)
   if (mcd->headerSent)
     return 0;
 
+  chooseEncoding (mcd->td);
   HttpHeaders::sendHeader (td->response, *td->connection->socket,
                            *td->auxiliaryBuffer, td);
 
diff --git a/myserver/src/http_handler/proxy/proxy.cpp 
b/myserver/src/http_handler/proxy/proxy.cpp
index 126a19c..c1432bb 100644
--- a/myserver/src/http_handler/proxy/proxy.cpp
+++ b/myserver/src/http_handler/proxy/proxy.cpp
@@ -214,7 +214,7 @@ int Proxy::flushToClient (HttpThreadContext* td, Socket& 
client,
   /* At this point we can modify the response struct before send it to the
      client.  */
 
-  checkDataChunks (td, td->response.contentLength.length ());
+  chooseEncoding (td, td->response.contentLength.length ());
   HttpHeaders::sendHeader (td->response, *out.getStream (), *td->buffer, td);
 
   if (onlyHeader)
diff --git a/myserver/src/http_handler/scgi/scgi.cpp 
b/myserver/src/http_handler/scgi/scgi.cpp
index 2c0c60e..e6583aa 100644
--- a/myserver/src/http_handler/scgi/scgi.cpp
+++ b/myserver/src/http_handler/scgi/scgi.cpp
@@ -255,7 +255,7 @@ int Scgi::sendResponse (ScgiContext* ctx, bool onlyHeader, 
FiltersChain* chain)
                                                 &td->response,
                                                 &(td->nBytesToRead));
 
-  checkDataChunks (td);
+  chooseEncoding (td);
   HttpHeaders::sendHeader (td->response, *td->connection->socket,
                            *td->auxiliaryBuffer, td);
 
diff --git a/myserver/src/http_handler/wincgi/wincgi.cpp 
b/myserver/src/http_handler/wincgi/wincgi.cpp
index e578f2b..c1e7473 100644
--- a/myserver/src/http_handler/wincgi/wincgi.cpp
+++ b/myserver/src/http_handler/wincgi/wincgi.cpp
@@ -293,7 +293,7 @@ int WinCgi::send (HttpThreadContext* td, const char* 
scriptpath,
 
       HttpHeaders::buildHTTPResponseHeaderStruct (buffer, &td->response, 
&(td->nBytesToRead));
 
-      checkDataChunks (td);
+      chooseEncoding (td);
       HttpHeaders::sendHeader (td->response, *chain.getStream (),
                                *td->buffer, td);
 
diff --git a/myserver/src/protocol/http/http_data_handler.cpp 
b/myserver/src/protocol/http/http_data_handler.cpp
index 37e8dd0..af656e5 100644
--- a/myserver/src/protocol/http/http_data_handler.cpp
+++ b/myserver/src/protocol/http/http_data_handler.cpp
@@ -157,11 +157,13 @@ HttpDataHandler::appendDataToHTTPChannel 
(HttpThreadContext *td,
 }
 
 /*!
-  Check if the server can use the chunked transfer encoding and if the client
-  supports keep-alive connections.
+  Choose the transfer encoding to use with the client.
+  \param td The HTTP thread context.
+  \param disableEncoding If specified don't use any transfer encoding.
+  If it is specified, then the Content-Length must be specified.
  */
 void
-HttpDataHandler::checkDataChunks (HttpThreadContext* td, bool disableEncoding)
+HttpDataHandler::chooseEncoding (HttpThreadContext* td, bool disableEncoding)
 {
   td->keepalive = td->request.isKeepAlive ();
   td->useChunks = false;
diff --git a/myserver/src/protocol/http/webdav/webdav.cpp 
b/myserver/src/protocol/http/webdav/webdav.cpp
index 303a4c0..5dbd433 100644
--- a/myserver/src/protocol/http/webdav/webdav.cpp
+++ b/myserver/src/protocol/http/webdav/webdav.cpp
@@ -303,7 +303,7 @@ int WebDAV::propfind (HttpThreadContext* td)
 
       td->response.httpStatus = 207;
 
-      HttpDataHandler::checkDataChunks (td);
+      HttpDataHandler::chooseEncoding (td);
       HttpHeaders::sendHeader (td->response, *chain.getStream (), *td->buffer, 
td);
 
       /* Determine the Depth.  */
@@ -617,7 +617,7 @@ int WebDAV::lock (HttpThreadContext* td)
 
       td->response.httpStatus = 201;
 
-      HttpDataHandler::checkDataChunks (td);
+      HttpDataHandler::chooseEncoding (td);
       HttpHeaders::sendHeader (td->response, *chain.getStream (), *td->buffer, 
td);
 
       string lc = "http://"; + *td->request.getValue ("Host", NULL) + 
td->request.uri;

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

Summary of changes:
 myserver/include/http_handler/cgi/cgi.h            |    2 +-
 myserver/include/http_handler/proxy/proxy.h        |    2 --
 myserver/include/protocol/http/http_data_handler.h |    2 +-
 myserver/src/http_handler/cgi/cgi.cpp              |    6 +++---
 myserver/src/http_handler/fastcgi/fastcgi.cpp      |    2 +-
 myserver/src/http_handler/http_dir/http_dir.cpp    |    2 +-
 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          |    2 +-
 myserver/src/http_handler/proxy/proxy.cpp          |    7 +------
 myserver/src/http_handler/scgi/scgi.cpp            |    2 +-
 myserver/src/http_handler/wincgi/wincgi.cpp        |    2 +-
 myserver/src/protocol/http/http_data_handler.cpp   |    8 +++++---
 myserver/src/protocol/http/webdav/webdav.cpp       |    4 ++--
 14 files changed, 20 insertions(+), 25 deletions(-)


hooks/post-receive
-- 
GNU MyServer



reply via email to

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