[Groonga-commit] groonga/groonga [master] [http] ensured clean state in each request.

Back to archive index

null+****@clear***** null+****@clear*****
2012年 2月 28日 (火) 06:36:07 JST


Kouhei Sutou	2012-02-12 19:23:08 +0900 (Sun, 12 Feb 2012)

  New Revision: ecc8893f2ae0ebe789d5dc626f1352fc1413246f

  Log:
    [http] ensured clean state in each request.
    
    If the groonga HTTP server receives invalid HTTP as values
    parameter of load command, the groonga HTTP server handles
    the next request as rest of values parameter of load
    command. The groonga HTTP server shouldn't handle the next
    request as rest reqest of the previous request.
    
    TODO: Should we recreate grn_ctx per HTTP request?
    
    Reported by @wareohji. Thanks!!!

  Modified files:
    src/groonga.c

  Modified: src/groonga.c (+3 -1)
===================================================================
--- src/groonga.c    2012-02-27 22:36:05 +0900 (bdcc6c9)
+++ src/groonga.c    2012-02-12 19:23:08 +0900 (7cac88e)
@@ -980,8 +980,10 @@ do_htreq(grn_ctx *ctx, grn_msg *msg)
     grn_ctx_send(ctx, path, pathe - path, 0);
   }
 exit :
-  // todo : support "Connection: keep-alive"
+  /* TODO: support "Connection: keep-alive" */
   ctx->stat = GRN_CTX_QUIT;
+  /* TODO: support a command in multi requests. e.g.: load command */
+  grn_ctx_set_next_expr(ctx, NULL);
   /* if (ctx->rc != GRN_OPERATION_WOULD_BLOCK) {...} */
   grn_msg_close(ctx, (grn_obj *)msg);
   /* if not keep alive connection */




Groonga-commit メーリングリストの案内
Back to archive index