[Reconnoiter-devel] [reconnoiter commit] r837 - trunk/src

svn-commit at lists.omniti.com svn-commit at lists.omniti.com
Tue Sep 15 01:25:42 EDT 2009


Author: jesus
Date: 2009-09-15 01:25:42 -0400 (Tue, 15 Sep 2009)
New Revision: 837

Modified:
   trunk/src/noit_http.c
Log:
fix consuming the post and handle an event shutdown in the noit_http_complete_request

Modified: trunk/src/noit_http.c
===================================================================
--- trunk/src/noit_http.c	2009-09-14 19:01:51 UTC (rev 836)
+++ trunk/src/noit_http.c	2009-09-15 05:25:42 UTC (rev 837)
@@ -512,8 +512,8 @@
     in = ctx->req.first_input;
     while(in && bytes_read < len) {
       int partial_len = MIN(in->size, len - bytes_read);
+      if(buf) memcpy(buf+bytes_read, in->buff+in->start, partial_len);
       bytes_read += partial_len;
-      if(buf) memcpy(buf+bytes_read, in->buff+in->start, partial_len);
       ctx->req.content_length_read += partial_len;
       in->start += partial_len;
       in->size -= partial_len;
@@ -582,6 +582,7 @@
     int maybe_write_mask;
     mask = noit_http_complete_request(ctx, origmask);
     _http_perform_write(ctx, &maybe_write_mask);
+    if(ctx->conn.e == NULL) goto release;
     if(ctx->req.complete != noit_true) return mask | maybe_write_mask;
   }
 



More information about the Reconnoiter-devel mailing list