aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-02-15 23:27:09 -0800
committerGravatar GitHub <noreply@github.com>2017-02-15 23:27:09 -0800
commit64dc18dda92190b558f392c94e27503226b9225e (patch)
tree34aad6e013000f31fb487e5f870728b5d3ab4a3f /src/core/lib
parent49c44f53709936abc9aa014ee1173552b630b920 (diff)
parent5f4264f9a6b891fd032784ef9811c53d4a70bcdd (diff)
Merge pull request #9643 from ctiller/authority_allocation
Signal that authority can be compressed in hpack: saves 1 allocation/rpc
Diffstat (limited to 'src/core/lib')
-rw-r--r--src/core/lib/surface/channel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/lib/surface/channel.c b/src/core/lib/surface/channel.c
index 429dbad7c7..d6acd392c1 100644
--- a/src/core/lib/surface/channel.c
+++ b/src/core/lib/surface/channel.c
@@ -128,7 +128,8 @@ grpc_channel *grpc_channel_create(grpc_exec_ctx *exec_ctx, const char *target,
}
channel->default_authority = grpc_mdelem_from_slices(
exec_ctx, GRPC_MDSTR_AUTHORITY,
- grpc_slice_from_copied_string(args->args[i].value.string));
+ grpc_slice_intern(
+ grpc_slice_from_static_string(args->args[i].value.string)));
}
} else if (0 ==
strcmp(args->args[i].key, GRPC_SSL_TARGET_NAME_OVERRIDE_ARG)) {
@@ -144,7 +145,8 @@ grpc_channel *grpc_channel_create(grpc_exec_ctx *exec_ctx, const char *target,
} else {
channel->default_authority = grpc_mdelem_from_slices(
exec_ctx, GRPC_MDSTR_AUTHORITY,
- grpc_slice_from_copied_string(args->args[i].value.string));
+ grpc_slice_intern(
+ grpc_slice_from_static_string(args->args[i].value.string)));
}
}
} else if (0 == strcmp(args->args[i].key,