[Groonga-commit] groonga/groonga at da1b59e [master] http: reduce needless process

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Mar 12 13:38:31 JST 2015


Kouhei Sutou	2015-03-12 13:38:31 +0900 (Thu, 12 Mar 2015)

  New Revision: da1b59eaf3c0667bda19fccc641140eca9bf5fa5
  https://github.com/groonga/groonga/commit/da1b59eaf3c0667bda19fccc641140eca9bf5fa5

  Message:
    http: reduce needless process

  Modified files:
    src/groonga.c

  Modified: src/groonga.c (+4 -1)
===================================================================
--- src/groonga.c    2015-03-12 13:30:56 +0900 (9266504)
+++ src/groonga.c    2015-03-12 13:38:31 +0900 (6b855d2)
@@ -1262,7 +1262,10 @@ do_htreq_post(grn_ctx *ctx, grn_msg *msg)
         buffer_start = buffer_current + 1;
         GRN_BULK_REWIND(&chunk_buffer);
       }
-      GRN_TEXT_PUT(ctx, &chunk_buffer, buffer_start, buffer_end - buffer_start);
+      if (buffer_end > buffer_start) {
+        GRN_TEXT_PUT(ctx, &chunk_buffer,
+                     buffer_start, buffer_end - buffer_start);
+      }
 #undef POST_BUFFER_SIZE
     }
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index