|
|
|
@ -18,6 +18,7 @@ |
|
|
|
|
|
|
|
|
|
#include <string.h> |
|
|
|
|
|
|
|
|
|
#include "absl/log/check.h" |
|
|
|
|
#include "absl/log/log.h" |
|
|
|
|
#include "absl/strings/str_cat.h" |
|
|
|
|
#include "absl/strings/string_view.h" |
|
|
|
@ -42,6 +43,7 @@ struct ServiceUrlAndMethod { |
|
|
|
|
ServiceUrlAndMethod MakeServiceUrlAndMethod( |
|
|
|
|
const ClientMetadataHandle& initial_metadata, |
|
|
|
|
const grpc_call_credentials::GetRequestMetadataArgs* args) { |
|
|
|
|
DCHECK(initial_metadata->get_pointer(HttpPathMetadata()) != nullptr); |
|
|
|
|
auto service = |
|
|
|
|
initial_metadata->get_pointer(HttpPathMetadata())->as_string_view(); |
|
|
|
|
auto last_slash = service.find_last_of('/'); |
|
|
|
@ -56,6 +58,7 @@ ServiceUrlAndMethod MakeServiceUrlAndMethod( |
|
|
|
|
method_name = service.substr(last_slash + 1); |
|
|
|
|
service = service.substr(0, last_slash); |
|
|
|
|
} |
|
|
|
|
DCHECK(initial_metadata->get_pointer(HttpAuthorityMetadata()) != nullptr); |
|
|
|
|
auto host_and_port = |
|
|
|
|
initial_metadata->get_pointer(HttpAuthorityMetadata())->as_string_view(); |
|
|
|
|
absl::string_view url_scheme = args->security_connector->url_scheme(); |
|
|
|
|