aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar David G. Quintas <dgq@google.com>2015-09-16 20:37:32 -0700
committerGravatar David G. Quintas <dgq@google.com>2015-09-16 20:37:32 -0700
commit19c06494b5144a9e21a12801140201a647752a4c (patch)
treeea6e16ef30b8ad65724af182f5390c8583ae7217 /src
parent1f351c9e1c827b94a87d760e7e5399029738ec98 (diff)
parentcb01417349f5444c2838c4363e1bc72e476b0c3b (diff)
Merge pull request #3288 from ctiller/snarky-nanny
Explicitly set content-type for servers
Diffstat (limited to 'src')
-rw-r--r--src/core/channel/http_server_filter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/channel/http_server_filter.c b/src/core/channel/http_server_filter.c
index 0955ae319a..2f061946a1 100644
--- a/src/core/channel/http_server_filter.c
+++ b/src/core/channel/http_server_filter.c
@@ -46,6 +46,7 @@ typedef struct call_data {
gpr_uint8 seen_te_trailers;
gpr_uint8 seen_authority;
grpc_linked_mdelem status;
+ grpc_linked_mdelem content_type;
grpc_stream_op_buffer *recv_ops;
/** Closure to call when finished with the hs_on_recv hook */
@@ -202,6 +203,8 @@ static void hs_mutate_op(grpc_call_element *elem,
calld->sent_status = 1;
grpc_metadata_batch_add_head(&op->data.metadata, &calld->status,
GRPC_MDELEM_REF(channeld->status_ok));
+ grpc_metadata_batch_add_tail(&op->data.metadata, &calld->content_type,
+ GRPC_MDELEM_REF(channeld->content_type));
break;
}
}