[Groonga-commit] groonga/groonga at cc82893 [master] http: add "[" as a separator character

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Mar 12 13:43:27 JST 2015


Kouhei Sutou	2015-03-12 13:43:27 +0900 (Thu, 12 Mar 2015)

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

  Message:
    http: add "[" as a separator character

  Modified files:
    src/groonga.c

  Modified: src/groonga.c (+12 -1)
===================================================================
--- src/groonga.c    2015-03-12 13:43:09 +0900 (8e466c7)
+++ src/groonga.c    2015-03-12 13:43:27 +0900 (1f56383)
@@ -1241,7 +1241,18 @@ do_htreq_post(grn_ctx *ctx, grn_msg *msg)
       for (;
            rc == GRN_SUCCESS && buffer_current > buffer_start;
            buffer_current--) {
-        if (!(buffer_current[0] == '\n' || buffer_current[0] == ',')) {
+        grn_bool is_separator;
+        switch (buffer_current[0]) {
+        case '\n' :
+        case ',' :
+        case ']' :
+          is_separator = GRN_TRUE;
+          break;
+        default :
+          is_separator = GRN_FALSE;
+          break;
+        }
+        if (!is_separator) {
           continue;
         }
         GRN_TEXT_PUT(ctx,
-------------- next part --------------
HTML����������������������������...
Download 



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