Skip to content
Snippets Groups Projects
Commit 19c06494 authored by David G. Quintas's avatar David G. Quintas
Browse files

Merge pull request #3288 from ctiller/snarky-nanny

Explicitly set content-type for servers
parents 1f351c9e cb014173
No related branches found
No related tags found
No related merge requests found
...@@ -46,6 +46,7 @@ typedef struct call_data { ...@@ -46,6 +46,7 @@ typedef struct call_data {
gpr_uint8 seen_te_trailers; gpr_uint8 seen_te_trailers;
gpr_uint8 seen_authority; gpr_uint8 seen_authority;
grpc_linked_mdelem status; grpc_linked_mdelem status;
grpc_linked_mdelem content_type;
grpc_stream_op_buffer *recv_ops; grpc_stream_op_buffer *recv_ops;
/** Closure to call when finished with the hs_on_recv hook */ /** Closure to call when finished with the hs_on_recv hook */
...@@ -202,6 +203,8 @@ static void hs_mutate_op(grpc_call_element *elem, ...@@ -202,6 +203,8 @@ static void hs_mutate_op(grpc_call_element *elem,
calld->sent_status = 1; calld->sent_status = 1;
grpc_metadata_batch_add_head(&op->data.metadata, &calld->status, grpc_metadata_batch_add_head(&op->data.metadata, &calld->status,
GRPC_MDELEM_REF(channeld->status_ok)); GRPC_MDELEM_REF(channeld->status_ok));
grpc_metadata_batch_add_tail(&op->data.metadata, &calld->content_type,
GRPC_MDELEM_REF(channeld->content_type));
break; break;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment