Navigation Menu

Skip to content

Commit

Permalink
http: fix a bug that body isn't returned for POST
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jan 26, 2015
1 parent 73daf3a commit 7836472
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/groonga.c
Expand Up @@ -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);
Expand Down

0 comments on commit 7836472

Please sign in to comment.