[Groonga-commit] groonga/groonga at 25f12b6 [master] http: find new line in POST data from the end of buffer

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Mar 11 17:01:45 JST 2015


Kouhei Sutou	2015-03-11 17:01:45 +0900 (Wed, 11 Mar 2015)

  New Revision: 25f12b6a7a4fcc75f05138bbdc5f86d648067d74
  https://github.com/groonga/groonga/commit/25f12b6a7a4fcc75f05138bbdc5f86d648067d74

  Message:
    http: find new line in POST data from the end of buffer
    
    It reduces the number of `grn_ctx_send()` calls.

  Modified files:
    src/groonga.c

  Modified: src/groonga.c (+4 -2)
===================================================================
--- src/groonga.c    2015-03-11 16:31:16 +0900 (224f0a9)
+++ src/groonga.c    2015-03-11 17:01:45 +0900 (adc6d0d)
@@ -1237,8 +1237,10 @@ do_htreq_post(grn_ctx *ctx, grn_msg *msg)
       read_content_length += buffer_end - buffer_start;
 
       rc = GRN_SUCCESS;
-      buffer_current = buffer_start;
-      for (; rc == GRN_SUCCESS && buffer_current < buffer_end; buffer_current++) {
+      buffer_current = buffer_end;
+      for (;
+           rc == GRN_SUCCESS && buffer_current > buffer_start;
+           buffer_current--) {
         if (buffer_current[0] != '\n') {
           continue;
         }
-------------- next part --------------
HTML����������������������������...
下载 



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