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


From: Giuseppe Scrivano
Subject: [myserver-commit] [SCM] GNU MyServer branch, master, updated. v0.9.2-474-gb7b4bdb
Date: Fri, 22 Apr 2011 18:12:21 +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  b7b4bdb78b7b6b366b96cfef71c4a5fbc378ef1d (commit)
      from  f7999a90b39d964a5e3aa9f70cef8a6bae7ac69a (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 b7b4bdb78b7b6b366b96cfef71c4a5fbc378ef1d
Author: Giuseppe Scrivano <address@hidden>
Date:   Fri Apr 22 20:12:19 2011 +0200

    Fix a segfault when a MIME type is not found.

diff --git a/myserver/src/http_handler/http_file/http_file.cpp 
b/myserver/src/http_handler/http_file/http_file.cpp
index faa3561..df22552 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -363,9 +363,6 @@ int HttpFile::send (HttpThreadContext* td, const char 
*filenamePath,
 
     file->seek (firstByte);
 
-    chain.setStream (td->connection->socket);
-
-
     td->sentData += HttpDataHandler::beginHTTPResponse (td, memStream, chain,
                                                         useChunks);
 
diff --git a/myserver/src/protocol/http/http_data_handler.cpp 
b/myserver/src/protocol/http/http_data_handler.cpp
index 9d2f1aa..cd6cb70 100644
--- a/myserver/src/protocol/http/http_data_handler.cpp
+++ b/myserver/src/protocol/http/http_data_handler.cpp
@@ -274,12 +274,13 @@ HttpDataHandler::generateFiltersChain (HttpThreadContext 
*td,
                                        MimeRecord *mime,
                                        MemoryStream &memStream)
 {
-  size_t nbw;
+  size_t nbw = 0;
   HttpRequestHeader::Entry* e = td->request.other.get ("accept-encoding");
   memStream.refresh ();
-  factory->chain (&fc, mime->filters, &memStream, &nbw, 0, false,
-                  e ? e->value : "");
 
+  if (mime)
+    factory->chain (&fc, mime->filters, &memStream, &nbw, 0, false,
+                    e ? e->value : "");
 
   if (fc.hasModifiersFilters ())
     {
@@ -287,5 +288,7 @@ HttpDataHandler::generateFiltersChain (HttpThreadContext 
*td,
       fc.getName (filters);
       td->response.setValue ("content-encoding", filters.c_str ());
     }
+
+  fc.setStream (td->connection->socket);
   return nbw;
 }

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

Summary of changes:
 myserver/src/http_handler/http_file/http_file.cpp |    3 ---
 myserver/src/protocol/http/http_data_handler.cpp  |    9 ++++++---
 2 files changed, 6 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
GNU MyServer



reply via email to

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