diff options
author | murgatroid99 <mlumish@google.com> | 2016-01-06 13:14:23 -0800 |
---|---|---|
committer | murgatroid99 <mlumish@google.com> | 2016-01-06 13:14:23 -0800 |
commit | c3910cadb49eabcf196e056c1bd5860eb9966c29 (patch) | |
tree | 9c715d0d5ac30591ddbe6b5aaa1626aa282e8971 /include | |
parent | 296ae72581f17438e9355d4862c3ad5c66d49807 (diff) |
Expose core metadata validation functions in public headers
Diffstat (limited to 'include')
-rw-r--r-- | include/grpc/grpc.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index d52aab0dd3..85a2ec4547 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -715,6 +715,16 @@ void grpc_server_destroy(grpc_server *server); thread-safety issues raised by it should not be of concern. */ int grpc_tracer_set_enabled(const char *name, int enabled); +/** Check whether a metadata key is legal (will be accepted by core) */ +int grpc_header_key_is_legal(const char *key, size_t length); + +/** Check whether a non-binary metadata value is legal (will be accepted by + core) */ +int grpc_header_nonbin_value_is_legal(const char *value, size_t length); + +/** Check whether a metadata key corresponds to a binary value */ +int grpc_is_binary_header(const char *key, size_t length); + #ifdef __cplusplus } #endif |