aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Julien Boeuf <jboeuf@google.com>2015-11-25 13:47:56 -0800
committerGravatar Julien Boeuf <jboeuf@google.com>2015-11-25 13:47:56 -0800
commiteb029c93fb273925102bd25e6972b9d9edf0ccde (patch)
tree435eafc3ea1128cbf93c7b829c7a95a8018a0c5b /src/core
parentcaf9935e456436a54931bf8112c25515100ccd20 (diff)
Better documentation of the method_name field.
Also passing empty string as opposed to NULL when the method name is not found. This is much less error-prone.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/security/client_auth_filter.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/security/client_auth_filter.c b/src/core/security/client_auth_filter.c
index d822164233..e7057051e0 100644
--- a/src/core/security/client_auth_filter.c
+++ b/src/core/security/client_auth_filter.c
@@ -146,6 +146,7 @@ void build_auth_metadata_context(grpc_security_connector *sc,
*last_slash = '\0';
method_name = gpr_strdup(last_slash + 1);
}
+ if (method_name == NULL) method_name = gpr_strdup("");
gpr_asprintf(&service_url, "%s://%s%s",
sc->url_scheme == NULL ? "" : sc->url_scheme,
grpc_mdstr_as_c_string(calld->host), service);