[Groonga-commit] groonga/groonga at 7836472 [master] http: fix a bug that body isn't returned for POST

アーカイブの一覧に戻る

Kouhei Sutou null+****@clear*****
Mon Jan 26 20:43:32 JST 2015


Kouhei Sutou	2015-01-26 20:43:32 +0900 (Mon, 26 Jan 2015)

  New Revision: 783647210efa72f2391d641310eff4a34d7f7642
  https://github.com/groonga/groonga/commit/783647210efa72f2391d641310eff4a34d7f7642

  Message:
    http: fix a bug that body isn't returned for POST

  Modified files:
    src/groonga.c

  Modified: src/groonga.c (+11 -1)
===================================================================
--- src/groonga.c    2015-01-26 19:23:15 +0900 (2133400)
+++ src/groonga.c    2015-01-26 20:43:32 +0900 (94d0d93)
@@ -893,10 +893,20 @@ h_output_typed(grn_ctx *ctx, int flags, ht_context *hc)
   char *chunk = NULL;
   unsigned int chunk_size = 0;
   int recv_flags;
-  grn_bool should_return_body = (hc->msg->header.qtype == 'G');
+  grn_bool should_return_body;
 
   if (!(flags & GRN_CTX_TAIL)) { return; }
 
+  switch (hc->msg->header.qtype) {
+  case 'G' :
+  case 'P' :
+    should_return_body = GRN_TRUE;
+    break;
+  default :
+    should_return_body = GRN_FALSE;
+    break;
+  }
+
   GRN_TEXT_INIT(&header, 0);
   GRN_TEXT_INIT(&head, 0);
   GRN_TEXT_INIT(&body, 0);
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る