aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Yang Gao <yangg@google.com>2015-09-04 12:54:38 -0700
committerGravatar Yang Gao <yangg@google.com>2015-09-04 12:54:38 -0700
commit0496e53175221eb3b864f4b6a87a115cd30ced00 (patch)
tree63116f9d93591a1394e6148bdb1c70de01e803fa
parentce7a4f639e3407eae311f41d540a34815e12bbca (diff)
parent37b0044844a82a43ef64b581340db00bc3af5095 (diff)
Merge pull request #3257 from ctiller/!!!!
Fix a case where :status could be returned to applications
-rw-r--r--src/core/channel/http_client_filter.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/core/channel/http_client_filter.c b/src/core/channel/http_client_filter.c
index 2b61d33c29..ec832a0367 100644
--- a/src/core/channel/http_client_filter.c
+++ b/src/core/channel/http_client_filter.c
@@ -85,16 +85,14 @@ static grpc_mdelem *client_filter(void *user_data, grpc_mdelem *md) {
static void hc_on_recv(void *user_data, int success) {
grpc_call_element *elem = user_data;
call_data *calld = elem->call_data;
- if (success) {
- size_t i;
- size_t nops = calld->recv_ops->nops;
- grpc_stream_op *ops = calld->recv_ops->ops;
- for (i = 0; i < nops; i++) {
- grpc_stream_op *op = &ops[i];
- if (op->type != GRPC_OP_METADATA) continue;
- calld->got_initial_metadata = 1;
- grpc_metadata_batch_filter(&op->data.metadata, client_filter, elem);
- }
+ size_t i;
+ size_t nops = calld->recv_ops->nops;
+ grpc_stream_op *ops = calld->recv_ops->ops;
+ for (i = 0; i < nops; i++) {
+ grpc_stream_op *op = &ops[i];
+ if (op->type != GRPC_OP_METADATA) continue;
+ calld->got_initial_metadata = 1;
+ grpc_metadata_batch_filter(&op->data.metadata, client_filter, elem);
}
calld->on_done_recv->cb(calld->on_done_recv->cb_arg, success);
}