From 3cb8b0b8cba79a7200b5bb60e6e711062dec34bc Mon Sep 17 00:00:00 2001 From: ncteisen Date: Tue, 30 Oct 2018 11:39:26 -0700 Subject: Move uri_parser to common spot --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 19c518427f..6aa5e3ebd8 100644 --- a/Makefile +++ b/Makefile @@ -3629,6 +3629,7 @@ LIBGRPC_SRC = \ src/core/ext/filters/http/http_filters_plugin.cc \ src/core/ext/filters/http/message_compress/message_compress_filter.cc \ src/core/ext/filters/http/server/http_server_filter.cc \ + src/core/ext/uri/uri_parser.cc \ src/core/lib/http/httpcli_security_connector.cc \ src/core/lib/security/context/security_context.cc \ src/core/lib/security/credentials/alts/alts_credentials.cc \ @@ -3723,7 +3724,6 @@ LIBGRPC_SRC = \ src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_index.cc \ - src/core/ext/filters/client_channel/uri_parser.cc \ src/core/ext/filters/deadline/deadline_filter.cc \ src/core/ext/filters/client_channel/health/health.pb.c \ src/core/tsi/alts_transport_security.cc \ @@ -4047,6 +4047,7 @@ LIBGRPC_CRONET_SRC = \ src/core/ext/filters/http/http_filters_plugin.cc \ src/core/ext/filters/http/message_compress/message_compress_filter.cc \ src/core/ext/filters/http/server/http_server_filter.cc \ + src/core/ext/uri/uri_parser.cc \ src/core/ext/filters/client_channel/backup_poller.cc \ src/core/ext/filters/client_channel/channel_connectivity.cc \ src/core/ext/filters/client_channel/client_channel.cc \ @@ -4069,7 +4070,6 @@ LIBGRPC_CRONET_SRC = \ src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_index.cc \ - src/core/ext/filters/client_channel/uri_parser.cc \ src/core/ext/filters/deadline/deadline_filter.cc \ src/core/ext/filters/client_channel/health/health.pb.c \ third_party/nanopb/pb_common.c \ @@ -4434,12 +4434,12 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_index.cc \ - src/core/ext/filters/client_channel/uri_parser.cc \ src/core/ext/filters/deadline/deadline_filter.cc \ src/core/ext/filters/client_channel/health/health.pb.c \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ + src/core/ext/uri/uri_parser.cc \ src/core/ext/transport/chttp2/transport/bin_decoder.cc \ src/core/ext/transport/chttp2/transport/bin_encoder.cc \ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc \ @@ -4739,12 +4739,12 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_index.cc \ - src/core/ext/filters/client_channel/uri_parser.cc \ src/core/ext/filters/deadline/deadline_filter.cc \ src/core/ext/filters/client_channel/health/health.pb.c \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ + src/core/ext/uri/uri_parser.cc \ src/core/ext/transport/chttp2/transport/bin_decoder.cc \ src/core/ext/transport/chttp2/transport/bin_encoder.cc \ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc \ @@ -5017,6 +5017,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/filters/http/http_filters_plugin.cc \ src/core/ext/filters/http/message_compress/message_compress_filter.cc \ src/core/ext/filters/http/server/http_server_filter.cc \ + src/core/ext/uri/uri_parser.cc \ src/core/ext/transport/chttp2/server/chttp2_server.cc \ src/core/ext/transport/chttp2/client/insecure/channel_create.cc \ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc \ @@ -5044,7 +5045,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_index.cc \ - src/core/ext/filters/client_channel/uri_parser.cc \ src/core/ext/filters/deadline/deadline_filter.cc \ src/core/ext/filters/client_channel/health/health.pb.c \ third_party/nanopb/pb_common.c \ @@ -5844,6 +5844,7 @@ LIBGRPC++_CRONET_SRC = \ src/core/ext/filters/http/http_filters_plugin.cc \ src/core/ext/filters/http/message_compress/message_compress_filter.cc \ src/core/ext/filters/http/server/http_server_filter.cc \ + src/core/ext/uri/uri_parser.cc \ src/core/ext/filters/client_channel/backup_poller.cc \ src/core/ext/filters/client_channel/channel_connectivity.cc \ src/core/ext/filters/client_channel/client_channel.cc \ @@ -5866,7 +5867,6 @@ LIBGRPC++_CRONET_SRC = \ src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_index.cc \ - src/core/ext/filters/client_channel/uri_parser.cc \ src/core/ext/filters/deadline/deadline_filter.cc \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc \ src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc \ -- cgit v1.2.3 From 1a3c2d3e3ae3e7ab242c486db7e6405c9b7f8999 Mon Sep 17 00:00:00 2001 From: ncteisen Date: Wed, 31 Oct 2018 14:14:09 -0700 Subject: Move uri_parser to lib --- BUILD | 4 +- CMakeLists.txt | 12 +- Makefile | 12 +- build.yaml | 4 +- config.m4 | 4 +- config.w32 | 4 +- gRPC-C++.podspec | 2 +- gRPC-Core.podspec | 6 +- grpc.gemspec | 4 +- grpc.gyp | 8 +- package.xml | 4 +- .../client_channel/http_connect_handshaker.cc | 2 +- src/core/ext/filters/client_channel/http_proxy.cc | 2 +- .../ext/filters/client_channel/lb_policy_factory.h | 2 +- .../ext/filters/client_channel/parse_address.h | 2 +- .../client_channel/resolver/fake/fake_resolver.h | 2 +- .../ext/filters/client_channel/resolver_factory.h | 2 +- src/core/ext/filters/client_channel/subchannel.cc | 2 +- .../load_reporting/server_load_reporting_filter.cc | 2 +- .../chttp2/client/secure/secure_channel_create.cc | 2 +- .../transport/chttp2/transport/chttp2_transport.cc | 2 +- src/core/ext/uri/uri_parser.cc | 314 --------------------- src/core/ext/uri/uri_parser.h | 50 ---- src/core/lib/uri/uri_parser.cc | 314 +++++++++++++++++++++ src/core/lib/uri/uri_parser.h | 50 ++++ src/python/grpcio/grpc_core_dependencies.py | 2 +- test/core/client_channel/uri_fuzzer_test.cc | 2 +- test/core/client_channel/uri_parser_test.cc | 2 +- tools/doxygen/Doxyfile.core.internal | 4 +- tools/run_tests/generated/sources_and_headers.json | 6 +- 30 files changed, 414 insertions(+), 414 deletions(-) delete mode 100644 src/core/ext/uri/uri_parser.cc delete mode 100644 src/core/ext/uri/uri_parser.h create mode 100644 src/core/lib/uri/uri_parser.cc create mode 100644 src/core/lib/uri/uri_parser.h (limited to 'Makefile') diff --git a/BUILD b/BUILD index 0064b25dc3..1486f4e944 100644 --- a/BUILD +++ b/BUILD @@ -1095,10 +1095,10 @@ grpc_cc_library( grpc_cc_library( name = "grpc_uri", srcs = [ - "src/core/ext/uri/uri_parser.cc", + "src/core/lib/uri/uri_parser.cc", ], hdrs = [ - "src/core/ext/uri/uri_parser.h", + "src/core/lib/uri/uri_parser.h", ], language = "c++", deps = [ diff --git a/CMakeLists.txt b/CMakeLists.txt index e45772c237..a6b3d1c246 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1154,7 +1154,7 @@ add_library(grpc src/core/ext/filters/http/http_filters_plugin.cc src/core/ext/filters/http/message_compress/message_compress_filter.cc src/core/ext/filters/http/server/http_server_filter.cc - src/core/ext/uri/uri_parser.cc + src/core/lib/uri/uri_parser.cc src/core/lib/http/httpcli_security_connector.cc src/core/lib/security/context/security_context.cc src/core/lib/security/credentials/alts/alts_credentials.cc @@ -1578,7 +1578,7 @@ add_library(grpc_cronet src/core/ext/filters/http/http_filters_plugin.cc src/core/ext/filters/http/message_compress/message_compress_filter.cc src/core/ext/filters/http/server/http_server_filter.cc - src/core/ext/uri/uri_parser.cc + src/core/lib/uri/uri_parser.cc src/core/ext/filters/client_channel/backup_poller.cc src/core/ext/filters/client_channel/channel_connectivity.cc src/core/ext/filters/client_channel/client_channel.cc @@ -1977,7 +1977,7 @@ add_library(grpc_test_util third_party/nanopb/pb_common.c third_party/nanopb/pb_decode.c third_party/nanopb/pb_encode.c - src/core/ext/uri/uri_parser.cc + src/core/lib/uri/uri_parser.cc src/core/ext/transport/chttp2/transport/bin_decoder.cc src/core/ext/transport/chttp2/transport/bin_encoder.cc src/core/ext/transport/chttp2/transport/chttp2_plugin.cc @@ -2296,7 +2296,7 @@ add_library(grpc_test_util_unsecure third_party/nanopb/pb_common.c third_party/nanopb/pb_decode.c third_party/nanopb/pb_encode.c - src/core/ext/uri/uri_parser.cc + src/core/lib/uri/uri_parser.cc src/core/ext/transport/chttp2/transport/bin_decoder.cc src/core/ext/transport/chttp2/transport/bin_encoder.cc src/core/ext/transport/chttp2/transport/chttp2_plugin.cc @@ -2596,7 +2596,7 @@ add_library(grpc_unsecure src/core/ext/filters/http/http_filters_plugin.cc src/core/ext/filters/http/message_compress/message_compress_filter.cc src/core/ext/filters/http/server/http_server_filter.cc - src/core/ext/uri/uri_parser.cc + src/core/lib/uri/uri_parser.cc src/core/ext/transport/chttp2/server/chttp2_server.cc src/core/ext/transport/chttp2/client/insecure/channel_create.cc src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc @@ -3448,7 +3448,7 @@ add_library(grpc++_cronet src/core/ext/filters/http/http_filters_plugin.cc src/core/ext/filters/http/message_compress/message_compress_filter.cc src/core/ext/filters/http/server/http_server_filter.cc - src/core/ext/uri/uri_parser.cc + src/core/lib/uri/uri_parser.cc src/core/ext/filters/client_channel/backup_poller.cc src/core/ext/filters/client_channel/channel_connectivity.cc src/core/ext/filters/client_channel/client_channel.cc diff --git a/Makefile b/Makefile index 6aa5e3ebd8..8cd870ef97 100644 --- a/Makefile +++ b/Makefile @@ -3629,7 +3629,7 @@ LIBGRPC_SRC = \ src/core/ext/filters/http/http_filters_plugin.cc \ src/core/ext/filters/http/message_compress/message_compress_filter.cc \ src/core/ext/filters/http/server/http_server_filter.cc \ - src/core/ext/uri/uri_parser.cc \ + src/core/lib/uri/uri_parser.cc \ src/core/lib/http/httpcli_security_connector.cc \ src/core/lib/security/context/security_context.cc \ src/core/lib/security/credentials/alts/alts_credentials.cc \ @@ -4047,7 +4047,7 @@ LIBGRPC_CRONET_SRC = \ src/core/ext/filters/http/http_filters_plugin.cc \ src/core/ext/filters/http/message_compress/message_compress_filter.cc \ src/core/ext/filters/http/server/http_server_filter.cc \ - src/core/ext/uri/uri_parser.cc \ + src/core/lib/uri/uri_parser.cc \ src/core/ext/filters/client_channel/backup_poller.cc \ src/core/ext/filters/client_channel/channel_connectivity.cc \ src/core/ext/filters/client_channel/client_channel.cc \ @@ -4439,7 +4439,7 @@ LIBGRPC_TEST_UTIL_SRC = \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ - src/core/ext/uri/uri_parser.cc \ + src/core/lib/uri/uri_parser.cc \ src/core/ext/transport/chttp2/transport/bin_decoder.cc \ src/core/ext/transport/chttp2/transport/bin_encoder.cc \ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc \ @@ -4744,7 +4744,7 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ - src/core/ext/uri/uri_parser.cc \ + src/core/lib/uri/uri_parser.cc \ src/core/ext/transport/chttp2/transport/bin_decoder.cc \ src/core/ext/transport/chttp2/transport/bin_encoder.cc \ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc \ @@ -5017,7 +5017,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/filters/http/http_filters_plugin.cc \ src/core/ext/filters/http/message_compress/message_compress_filter.cc \ src/core/ext/filters/http/server/http_server_filter.cc \ - src/core/ext/uri/uri_parser.cc \ + src/core/lib/uri/uri_parser.cc \ src/core/ext/transport/chttp2/server/chttp2_server.cc \ src/core/ext/transport/chttp2/client/insecure/channel_create.cc \ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc \ @@ -5844,7 +5844,7 @@ LIBGRPC++_CRONET_SRC = \ src/core/ext/filters/http/http_filters_plugin.cc \ src/core/ext/filters/http/message_compress/message_compress_filter.cc \ src/core/ext/filters/http/server/http_server_filter.cc \ - src/core/ext/uri/uri_parser.cc \ + src/core/lib/uri/uri_parser.cc \ src/core/ext/filters/client_channel/backup_poller.cc \ src/core/ext/filters/client_channel/channel_connectivity.cc \ src/core/ext/filters/client_channel/client_channel.cc \ diff --git a/build.yaml b/build.yaml index 4f84265cae..35db884cff 100644 --- a/build.yaml +++ b/build.yaml @@ -1098,9 +1098,9 @@ filegroups: - grpc_base_headers - name: grpc_uri headers: - - src/core/ext/uri/uri_parser.h + - src/core/lib/uri/uri_parser.h src: - - src/core/ext/uri/uri_parser.cc + - src/core/lib/uri/uri_parser.cc uses: - grpc_base - name: grpc_workaround_cronet_compression_filter diff --git a/config.m4 b/config.m4 index 6912f03078..8702650287 100644 --- a/config.m4 +++ b/config.m4 @@ -263,7 +263,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/filters/http/http_filters_plugin.cc \ src/core/ext/filters/http/message_compress/message_compress_filter.cc \ src/core/ext/filters/http/server/http_server_filter.cc \ - src/core/ext/uri/uri_parser.cc \ + src/core/lib/uri/uri_parser.cc \ src/core/lib/http/httpcli_security_connector.cc \ src/core/lib/security/context/security_context.cc \ src/core/lib/security/credentials/alts/alts_credentials.cc \ @@ -700,7 +700,6 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/server/secure) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/transport) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/inproc) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/uri) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/avl) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/backoff) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/channel) @@ -734,6 +733,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/slice) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/surface) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/transport) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/uri) PHP_ADD_BUILD_DIR($ext_builddir/src/core/plugin_registry) PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi) PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi/alts/crypt) diff --git a/config.w32 b/config.w32 index ed4cfd1da7..cb08f779d0 100644 --- a/config.w32 +++ b/config.w32 @@ -238,7 +238,7 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\filters\\http\\http_filters_plugin.cc " + "src\\core\\ext\\filters\\http\\message_compress\\message_compress_filter.cc " + "src\\core\\ext\\filters\\http\\server\\http_server_filter.cc " + - "src\\core\\ext\\uri\\uri_parser.cc " + + "src\\core\\lib\\uri\\uri_parser.cc " + "src\\core\\lib\\http\\httpcli_security_connector.cc " + "src\\core\\lib\\security\\context\\security_context.cc " + "src\\core\\lib\\security\\credentials\\alts\\alts_credentials.cc " + @@ -714,7 +714,6 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2\\server\\secure"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2\\transport"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\inproc"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\uri"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\avl"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\backoff"); @@ -750,6 +749,7 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\slice"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\surface"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\transport"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\uri"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\plugin_registry"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi\\alts"); diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index cb7523a78b..f3316b18bc 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -274,7 +274,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/http/client/http_client_filter.h', 'src/core/ext/filters/http/message_compress/message_compress_filter.h', 'src/core/ext/filters/http/server/http_server_filter.h', - 'src/core/ext/uri/uri_parser.h', + 'src/core/lib/uri/uri_parser.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h', 'src/core/ext/filters/client_channel/lb_policy/xds/xds.h', 'src/core/lib/security/context/security_context.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index f27f6e3ad9..90eee14b2a 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -275,7 +275,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/http/client/http_client_filter.h', 'src/core/ext/filters/http/message_compress/message_compress_filter.h', 'src/core/ext/filters/http/server/http_server_filter.h', - 'src/core/ext/uri/uri_parser.h', + 'src/core/lib/uri/uri_parser.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h', 'src/core/ext/filters/client_channel/lb_policy/xds/xds.h', 'src/core/lib/security/context/security_context.h', @@ -703,7 +703,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/http/http_filters_plugin.cc', 'src/core/ext/filters/http/message_compress/message_compress_filter.cc', 'src/core/ext/filters/http/server/http_server_filter.cc', - 'src/core/ext/uri/uri_parser.cc', + 'src/core/lib/uri/uri_parser.cc', 'src/core/lib/http/httpcli_security_connector.cc', 'src/core/lib/security/context/security_context.cc', 'src/core/lib/security/credentials/alts/alts_credentials.cc', @@ -894,7 +894,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/http/client/http_client_filter.h', 'src/core/ext/filters/http/message_compress/message_compress_filter.h', 'src/core/ext/filters/http/server/http_server_filter.h', - 'src/core/ext/uri/uri_parser.h', + 'src/core/lib/uri/uri_parser.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h', 'src/core/ext/filters/client_channel/lb_policy/xds/xds.h', 'src/core/lib/security/context/security_context.h', diff --git a/grpc.gemspec b/grpc.gemspec index 64aa581076..77dc1741fa 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -207,7 +207,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/http/client/http_client_filter.h ) s.files += %w( src/core/ext/filters/http/message_compress/message_compress_filter.h ) s.files += %w( src/core/ext/filters/http/server/http_server_filter.h ) - s.files += %w( src/core/ext/uri/uri_parser.h ) + s.files += %w( src/core/lib/uri/uri_parser.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds.h ) s.files += %w( src/core/lib/security/context/security_context.h ) @@ -639,7 +639,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/http/http_filters_plugin.cc ) s.files += %w( src/core/ext/filters/http/message_compress/message_compress_filter.cc ) s.files += %w( src/core/ext/filters/http/server/http_server_filter.cc ) - s.files += %w( src/core/ext/uri/uri_parser.cc ) + s.files += %w( src/core/lib/uri/uri_parser.cc ) s.files += %w( src/core/lib/http/httpcli_security_connector.cc ) s.files += %w( src/core/lib/security/context/security_context.cc ) s.files += %w( src/core/lib/security/credentials/alts/alts_credentials.cc ) diff --git a/grpc.gyp b/grpc.gyp index e4654e2514..a16622459d 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -455,7 +455,7 @@ 'src/core/ext/filters/http/http_filters_plugin.cc', 'src/core/ext/filters/http/message_compress/message_compress_filter.cc', 'src/core/ext/filters/http/server/http_server_filter.cc', - 'src/core/ext/uri/uri_parser.cc', + 'src/core/lib/uri/uri_parser.cc', 'src/core/lib/http/httpcli_security_connector.cc', 'src/core/lib/security/context/security_context.cc', 'src/core/lib/security/credentials/alts/alts_credentials.cc', @@ -814,7 +814,7 @@ 'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c', - 'src/core/ext/uri/uri_parser.cc', + 'src/core/lib/uri/uri_parser.cc', 'src/core/ext/transport/chttp2/transport/bin_decoder.cc', 'src/core/ext/transport/chttp2/transport/bin_encoder.cc', 'src/core/ext/transport/chttp2/transport/chttp2_plugin.cc', @@ -1053,7 +1053,7 @@ 'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c', - 'src/core/ext/uri/uri_parser.cc', + 'src/core/lib/uri/uri_parser.cc', 'src/core/ext/transport/chttp2/transport/bin_decoder.cc', 'src/core/ext/transport/chttp2/transport/bin_encoder.cc', 'src/core/ext/transport/chttp2/transport/chttp2_plugin.cc', @@ -1272,7 +1272,7 @@ 'src/core/ext/filters/http/http_filters_plugin.cc', 'src/core/ext/filters/http/message_compress/message_compress_filter.cc', 'src/core/ext/filters/http/server/http_server_filter.cc', - 'src/core/ext/uri/uri_parser.cc', + 'src/core/lib/uri/uri_parser.cc', 'src/core/ext/transport/chttp2/server/chttp2_server.cc', 'src/core/ext/transport/chttp2/client/insecure/channel_create.cc', 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc', diff --git a/package.xml b/package.xml index c3e7e5bde2..2a8d6a3595 100644 --- a/package.xml +++ b/package.xml @@ -212,7 +212,7 @@ - + @@ -644,7 +644,7 @@ - + diff --git a/src/core/ext/filters/client_channel/http_connect_handshaker.cc b/src/core/ext/filters/client_channel/http_connect_handshaker.cc index bf39dcbb52..0716e46818 100644 --- a/src/core/ext/filters/client_channel/http_connect_handshaker.cc +++ b/src/core/ext/filters/client_channel/http_connect_handshaker.cc @@ -29,7 +29,6 @@ #include "src/core/ext/filters/client_channel/client_channel.h" #include "src/core/ext/filters/client_channel/resolver_registry.h" -#include "src/core/ext/uri/uri_parser.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/handshaker_registry.h" #include "src/core/lib/gpr/env.h" @@ -37,6 +36,7 @@ #include "src/core/lib/http/format_request.h" #include "src/core/lib/http/parser.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/lib/uri/uri_parser.h" typedef struct http_connect_handshaker { // Base class. Must be first. diff --git a/src/core/ext/filters/client_channel/http_proxy.cc b/src/core/ext/filters/client_channel/http_proxy.cc index c93f81f3fd..8951a2920c 100644 --- a/src/core/ext/filters/client_channel/http_proxy.cc +++ b/src/core/ext/filters/client_channel/http_proxy.cc @@ -29,12 +29,12 @@ #include "src/core/ext/filters/client_channel/http_connect_handshaker.h" #include "src/core/ext/filters/client_channel/proxy_mapper_registry.h" -#include "src/core/ext/uri/uri_parser.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gpr/env.h" #include "src/core/lib/gpr/host_port.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/slice/b64.h" +#include "src/core/lib/uri/uri_parser.h" /** * Parses the 'https_proxy' env var (fallback on 'http_proxy') and returns the diff --git a/src/core/ext/filters/client_channel/lb_policy_factory.h b/src/core/ext/filters/client_channel/lb_policy_factory.h index bc5154269e..a59deadb26 100644 --- a/src/core/ext/filters/client_channel/lb_policy_factory.h +++ b/src/core/ext/filters/client_channel/lb_policy_factory.h @@ -25,7 +25,7 @@ #include "src/core/ext/filters/client_channel/client_channel_factory.h" #include "src/core/ext/filters/client_channel/lb_policy.h" -#include "src/core/ext/uri/uri_parser.h" +#include "src/core/lib/uri/uri_parser.h" // // representation of an LB address diff --git a/src/core/ext/filters/client_channel/parse_address.h b/src/core/ext/filters/client_channel/parse_address.h index 3385575fd1..5c050a2333 100644 --- a/src/core/ext/filters/client_channel/parse_address.h +++ b/src/core/ext/filters/client_channel/parse_address.h @@ -23,8 +23,8 @@ #include -#include "src/core/ext/uri/uri_parser.h" #include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/uri/uri_parser.h" /** Populate \a resolved_addr from \a uri, whose path is expected to contain a * unix socket path. Returns true upon success. */ diff --git a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h index a08ea127ab..74a3062e7f 100644 --- a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +++ b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h @@ -20,9 +20,9 @@ #include #include "src/core/ext/filters/client_channel/lb_policy_factory.h" -#include "src/core/ext/uri/uri_parser.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gprpp/ref_counted.h" +#include "src/core/lib/uri/uri_parser.h" #define GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR \ "grpc.fake_resolver.response_generator" diff --git a/src/core/ext/filters/client_channel/resolver_factory.h b/src/core/ext/filters/client_channel/resolver_factory.h index 8e9c314f5d..d891ef62e1 100644 --- a/src/core/ext/filters/client_channel/resolver_factory.h +++ b/src/core/ext/filters/client_channel/resolver_factory.h @@ -24,11 +24,11 @@ #include #include "src/core/ext/filters/client_channel/resolver.h" -#include "src/core/ext/uri/uri_parser.h" #include "src/core/lib/gprpp/abstract.h" #include "src/core/lib/gprpp/memory.h" #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/iomgr/pollset_set.h" +#include "src/core/lib/uri/uri_parser.h" namespace grpc_core { diff --git a/src/core/ext/filters/client_channel/subchannel.cc b/src/core/ext/filters/client_channel/subchannel.cc index cb9bb2290f..b98f238be0 100644 --- a/src/core/ext/filters/client_channel/subchannel.cc +++ b/src/core/ext/filters/client_channel/subchannel.cc @@ -34,7 +34,6 @@ #include "src/core/ext/filters/client_channel/parse_address.h" #include "src/core/ext/filters/client_channel/proxy_mapper_registry.h" #include "src/core/ext/filters/client_channel/subchannel_index.h" -#include "src/core/ext/uri/uri_parser.h" #include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/connected_channel.h" @@ -54,6 +53,7 @@ #include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/service_config.h" #include "src/core/lib/transport/status_metadata.h" +#include "src/core/lib/uri/uri_parser.h" #define INTERNAL_REF_BITS 16 #define STRONG_REF_MASK (~(gpr_atm)((1 << INTERNAL_REF_BITS) - 1)) diff --git a/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc b/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc index 3469d89cce..6a7231ff7d 100644 --- a/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc +++ b/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc @@ -27,7 +27,6 @@ #include "src/core/ext/filters/client_channel/parse_address.h" #include "src/core/ext/filters/load_reporting/registered_opencensus_objects.h" #include "src/core/ext/filters/load_reporting/server_load_reporting_filter.h" -#include "src/core/ext/uri/uri_parser.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/context.h" #include "src/core/lib/iomgr/resolve_address.h" @@ -36,6 +35,7 @@ #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/surface/call.h" +#include "src/core/lib/uri/uri_parser.h" namespace grpc { diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc index 6064f9a84a..e73eee4353 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc @@ -28,7 +28,6 @@ #include "src/core/ext/filters/client_channel/client_channel.h" #include "src/core/ext/filters/client_channel/resolver_registry.h" #include "src/core/ext/transport/chttp2/client/chttp2_connector.h" -#include "src/core/ext/uri/uri_parser.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gprpp/memory.h" #include "src/core/lib/iomgr/sockaddr_utils.h" @@ -39,6 +38,7 @@ #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/channel.h" +#include "src/core/lib/uri/uri_parser.h" static void client_channel_factory_ref( grpc_client_channel_factory* cc_factory) {} diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc index 0179831328..4fb121135c 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc @@ -34,7 +34,6 @@ #include "src/core/ext/transport/chttp2/transport/frame_data.h" #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/ext/transport/chttp2/transport/varint.h" -#include "src/core/ext/uri/uri_parser.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/compression/stream_compression.h" #include "src/core/lib/debug/stats.h" @@ -55,6 +54,7 @@ #include "src/core/lib/transport/timeout_encoding.h" #include "src/core/lib/transport/transport.h" #include "src/core/lib/transport/transport_impl.h" +#include "src/core/lib/uri/uri_parser.h" #define DEFAULT_CONNECTION_WINDOW_TARGET (1024 * 1024) #define MAX_WINDOW 0x7fffffffu diff --git a/src/core/ext/uri/uri_parser.cc b/src/core/ext/uri/uri_parser.cc deleted file mode 100644 index bc9a86c8a3..0000000000 --- a/src/core/ext/uri/uri_parser.cc +++ /dev/null @@ -1,314 +0,0 @@ -/* - * - * Copyright 2015 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include - -#include "src/core/ext/uri/uri_parser.h" - -#include - -#include -#include -#include -#include - -#include "src/core/lib/gpr/string.h" -#include "src/core/lib/slice/percent_encoding.h" -#include "src/core/lib/slice/slice_internal.h" -#include "src/core/lib/slice/slice_string_helpers.h" - -/** a size_t default value... maps to all 1's */ -#define NOT_SET (~(size_t)0) - -static grpc_uri* bad_uri(const char* uri_text, size_t pos, const char* section, - bool suppress_errors) { - char* line_prefix; - size_t pfx_len; - - if (!suppress_errors) { - gpr_asprintf(&line_prefix, "bad uri.%s: '", section); - pfx_len = strlen(line_prefix) + pos; - gpr_log(GPR_ERROR, "%s%s'", line_prefix, uri_text); - gpr_free(line_prefix); - - line_prefix = static_cast(gpr_malloc(pfx_len + 1)); - memset(line_prefix, ' ', pfx_len); - line_prefix[pfx_len] = 0; - gpr_log(GPR_ERROR, "%s^ here", line_prefix); - gpr_free(line_prefix); - } - - return nullptr; -} - -/** Returns a copy of percent decoded \a src[begin, end) */ -static char* decode_and_copy_component(const char* src, size_t begin, - size_t end) { - grpc_slice component = - (begin == NOT_SET || end == NOT_SET) - ? grpc_empty_slice() - : grpc_slice_from_copied_buffer(src + begin, end - begin); - grpc_slice decoded_component = - grpc_permissive_percent_decode_slice(component); - char* out = grpc_dump_slice(decoded_component, GPR_DUMP_ASCII); - grpc_slice_unref_internal(component); - grpc_slice_unref_internal(decoded_component); - return out; -} - -static bool valid_hex(char c) { - return ((c >= 'a') && (c <= 'f')) || ((c >= 'A') && (c <= 'F')) || - ((c >= '0') && (c <= '9')); -} - -/** Returns how many chars to advance if \a uri_text[i] begins a valid \a pchar - * production. If \a uri_text[i] introduces an invalid \a pchar (such as percent - * sign not followed by two hex digits), NOT_SET is returned. */ -static size_t parse_pchar(const char* uri_text, size_t i) { - /* pchar = unreserved / pct-encoded / sub-delims / ":" / "@" - * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" - * pct-encoded = "%" HEXDIG HEXDIG - * sub-delims = "!" / "$" / "&" / "'" / "(" / ")" - / "*" / "+" / "," / ";" / "=" */ - char c = uri_text[i]; - switch (c) { - default: - if (((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) || - ((c >= '0') && (c <= '9'))) { - return 1; - } - break; - case ':': - case '@': - case '-': - case '.': - case '_': - case '~': - case '!': - case '$': - case '&': - case '\'': - case '(': - case ')': - case '*': - case '+': - case ',': - case ';': - case '=': - return 1; - case '%': /* pct-encoded */ - if (valid_hex(uri_text[i + 1]) && valid_hex(uri_text[i + 2])) { - return 2; - } - return NOT_SET; - } - return 0; -} - -/* *( pchar / "?" / "/" ) */ -static int parse_fragment_or_query(const char* uri_text, size_t* i) { - char c; - while ((c = uri_text[*i]) != 0) { - const size_t advance = parse_pchar(uri_text, *i); /* pchar */ - switch (advance) { - case 0: /* uri_text[i] isn't in pchar */ - /* maybe it's ? or / */ - if (uri_text[*i] == '?' || uri_text[*i] == '/') { - (*i)++; - break; - } else { - return 1; - } - GPR_UNREACHABLE_CODE(return 0); - default: - (*i) += advance; - break; - case NOT_SET: /* uri_text[i] introduces an invalid URI */ - return 0; - } - } - /* *i is the first uri_text position past the \a query production, maybe \0 */ - return 1; -} - -static void parse_query_parts(grpc_uri* uri) { - static const char* QUERY_PARTS_SEPARATOR = "&"; - static const char* QUERY_PARTS_VALUE_SEPARATOR = "="; - GPR_ASSERT(uri->query != nullptr); - if (uri->query[0] == '\0') { - uri->query_parts = nullptr; - uri->query_parts_values = nullptr; - uri->num_query_parts = 0; - return; - } - - gpr_string_split(uri->query, QUERY_PARTS_SEPARATOR, &uri->query_parts, - &uri->num_query_parts); - uri->query_parts_values = - static_cast(gpr_malloc(uri->num_query_parts * sizeof(char**))); - for (size_t i = 0; i < uri->num_query_parts; i++) { - char** query_param_parts; - size_t num_query_param_parts; - char* full = uri->query_parts[i]; - gpr_string_split(full, QUERY_PARTS_VALUE_SEPARATOR, &query_param_parts, - &num_query_param_parts); - GPR_ASSERT(num_query_param_parts > 0); - uri->query_parts[i] = query_param_parts[0]; - if (num_query_param_parts > 1) { - /* TODO(dgq): only the first value after the separator is considered. - * Perhaps all chars after the first separator for the query part should - * be included, even if they include the separator. */ - uri->query_parts_values[i] = query_param_parts[1]; - } else { - uri->query_parts_values[i] = nullptr; - } - for (size_t j = 2; j < num_query_param_parts; j++) { - gpr_free(query_param_parts[j]); - } - gpr_free(query_param_parts); - gpr_free(full); - } -} - -grpc_uri* grpc_uri_parse(const char* uri_text, bool suppress_errors) { - grpc_uri* uri; - size_t scheme_begin = 0; - size_t scheme_end = NOT_SET; - size_t authority_begin = NOT_SET; - size_t authority_end = NOT_SET; - size_t path_begin = NOT_SET; - size_t path_end = NOT_SET; - size_t query_begin = NOT_SET; - size_t query_end = NOT_SET; - size_t fragment_begin = NOT_SET; - size_t fragment_end = NOT_SET; - size_t i; - - for (i = scheme_begin; uri_text[i] != 0; i++) { - if (uri_text[i] == ':') { - scheme_end = i; - break; - } - if (uri_text[i] >= 'a' && uri_text[i] <= 'z') continue; - if (uri_text[i] >= 'A' && uri_text[i] <= 'Z') continue; - if (i != scheme_begin) { - if (uri_text[i] >= '0' && uri_text[i] <= '9') continue; - if (uri_text[i] == '+') continue; - if (uri_text[i] == '-') continue; - if (uri_text[i] == '.') continue; - } - break; - } - if (scheme_end == NOT_SET) { - return bad_uri(uri_text, i, "scheme", suppress_errors); - } - - if (uri_text[scheme_end + 1] == '/' && uri_text[scheme_end + 2] == '/') { - authority_begin = scheme_end + 3; - for (i = authority_begin; uri_text[i] != 0 && authority_end == NOT_SET; - i++) { - if (uri_text[i] == '/' || uri_text[i] == '?' || uri_text[i] == '#') { - authority_end = i; - } - } - if (authority_end == NOT_SET && uri_text[i] == 0) { - authority_end = i; - } - if (authority_end == NOT_SET) { - return bad_uri(uri_text, i, "authority", suppress_errors); - } - /* TODO(ctiller): parse the authority correctly */ - path_begin = authority_end; - } else { - path_begin = scheme_end + 1; - } - - for (i = path_begin; uri_text[i] != 0; i++) { - if (uri_text[i] == '?' || uri_text[i] == '#') { - path_end = i; - break; - } - } - if (path_end == NOT_SET && uri_text[i] == 0) { - path_end = i; - } - if (path_end == NOT_SET) { - return bad_uri(uri_text, i, "path", suppress_errors); - } - - if (uri_text[i] == '?') { - query_begin = ++i; - if (!parse_fragment_or_query(uri_text, &i)) { - return bad_uri(uri_text, i, "query", suppress_errors); - } else if (uri_text[i] != 0 && uri_text[i] != '#') { - /* We must be at the end or at the beginning of a fragment */ - return bad_uri(uri_text, i, "query", suppress_errors); - } - query_end = i; - } - if (uri_text[i] == '#') { - fragment_begin = ++i; - if (!parse_fragment_or_query(uri_text, &i)) { - return bad_uri(uri_text, i - fragment_end, "fragment", suppress_errors); - } else if (uri_text[i] != 0) { - /* We must be at the end */ - return bad_uri(uri_text, i, "fragment", suppress_errors); - } - fragment_end = i; - } - - uri = static_cast(gpr_zalloc(sizeof(*uri))); - uri->scheme = decode_and_copy_component(uri_text, scheme_begin, scheme_end); - uri->authority = - decode_and_copy_component(uri_text, authority_begin, authority_end); - uri->path = decode_and_copy_component(uri_text, path_begin, path_end); - uri->query = decode_and_copy_component(uri_text, query_begin, query_end); - uri->fragment = - decode_and_copy_component(uri_text, fragment_begin, fragment_end); - parse_query_parts(uri); - - return uri; -} - -const char* grpc_uri_get_query_arg(const grpc_uri* uri, const char* key) { - GPR_ASSERT(key != nullptr); - if (key[0] == '\0') return nullptr; - - for (size_t i = 0; i < uri->num_query_parts; ++i) { - if (0 == strcmp(key, uri->query_parts[i])) { - return uri->query_parts_values[i]; - } - } - return nullptr; -} - -void grpc_uri_destroy(grpc_uri* uri) { - if (!uri) return; - gpr_free(uri->scheme); - gpr_free(uri->authority); - gpr_free(uri->path); - gpr_free(uri->query); - for (size_t i = 0; i < uri->num_query_parts; ++i) { - gpr_free(uri->query_parts[i]); - gpr_free(uri->query_parts_values[i]); - } - gpr_free(uri->query_parts); - gpr_free(uri->query_parts_values); - gpr_free(uri->fragment); - gpr_free(uri); -} diff --git a/src/core/ext/uri/uri_parser.h b/src/core/ext/uri/uri_parser.h deleted file mode 100644 index c13778bc55..0000000000 --- a/src/core/ext/uri/uri_parser.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * - * Copyright 2015 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef GRPC_CORE_EXT_URI_URI_PARSER_H -#define GRPC_CORE_EXT_URI_URI_PARSER_H - -#include - -#include - -typedef struct { - char* scheme; - char* authority; - char* path; - char* query; - /** Query substrings separated by '&' */ - char** query_parts; - /** Number of elements in \a query_parts and \a query_parts_values */ - size_t num_query_parts; - /** Split each query part by '='. NULL if not present. */ - char** query_parts_values; - char* fragment; -} grpc_uri; - -/** parse a uri, return NULL on failure */ -grpc_uri* grpc_uri_parse(const char* uri_text, bool suppress_errors); - -/** return the part of a query string after the '=' in "?key=xxx&...", or NULL - * if key is not present */ -const char* grpc_uri_get_query_arg(const grpc_uri* uri, const char* key); - -/** destroy a uri */ -void grpc_uri_destroy(grpc_uri* uri); - -#endif /* GRPC_CORE_EXT_URI_URI_PARSER_H */ diff --git a/src/core/lib/uri/uri_parser.cc b/src/core/lib/uri/uri_parser.cc new file mode 100644 index 0000000000..f212c7d2c0 --- /dev/null +++ b/src/core/lib/uri/uri_parser.cc @@ -0,0 +1,314 @@ +/* + * + * Copyright 2015 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +#include "src/core/lib/uri/uri_parser.h" + +#include + +#include +#include +#include +#include + +#include "src/core/lib/gpr/string.h" +#include "src/core/lib/slice/percent_encoding.h" +#include "src/core/lib/slice/slice_internal.h" +#include "src/core/lib/slice/slice_string_helpers.h" + +/** a size_t default value... maps to all 1's */ +#define NOT_SET (~(size_t)0) + +static grpc_uri* bad_uri(const char* uri_text, size_t pos, const char* section, + bool suppress_errors) { + char* line_prefix; + size_t pfx_len; + + if (!suppress_errors) { + gpr_asprintf(&line_prefix, "bad uri.%s: '", section); + pfx_len = strlen(line_prefix) + pos; + gpr_log(GPR_ERROR, "%s%s'", line_prefix, uri_text); + gpr_free(line_prefix); + + line_prefix = static_cast(gpr_malloc(pfx_len + 1)); + memset(line_prefix, ' ', pfx_len); + line_prefix[pfx_len] = 0; + gpr_log(GPR_ERROR, "%s^ here", line_prefix); + gpr_free(line_prefix); + } + + return nullptr; +} + +/** Returns a copy of percent decoded \a src[begin, end) */ +static char* decode_and_copy_component(const char* src, size_t begin, + size_t end) { + grpc_slice component = + (begin == NOT_SET || end == NOT_SET) + ? grpc_empty_slice() + : grpc_slice_from_copied_buffer(src + begin, end - begin); + grpc_slice decoded_component = + grpc_permissive_percent_decode_slice(component); + char* out = grpc_dump_slice(decoded_component, GPR_DUMP_ASCII); + grpc_slice_unref_internal(component); + grpc_slice_unref_internal(decoded_component); + return out; +} + +static bool valid_hex(char c) { + return ((c >= 'a') && (c <= 'f')) || ((c >= 'A') && (c <= 'F')) || + ((c >= '0') && (c <= '9')); +} + +/** Returns how many chars to advance if \a uri_text[i] begins a valid \a pchar + * production. If \a uri_text[i] introduces an invalid \a pchar (such as percent + * sign not followed by two hex digits), NOT_SET is returned. */ +static size_t parse_pchar(const char* uri_text, size_t i) { + /* pchar = unreserved / pct-encoded / sub-delims / ":" / "@" + * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" + * pct-encoded = "%" HEXDIG HEXDIG + * sub-delims = "!" / "$" / "&" / "'" / "(" / ")" + / "*" / "+" / "," / ";" / "=" */ + char c = uri_text[i]; + switch (c) { + default: + if (((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) || + ((c >= '0') && (c <= '9'))) { + return 1; + } + break; + case ':': + case '@': + case '-': + case '.': + case '_': + case '~': + case '!': + case '$': + case '&': + case '\'': + case '(': + case ')': + case '*': + case '+': + case ',': + case ';': + case '=': + return 1; + case '%': /* pct-encoded */ + if (valid_hex(uri_text[i + 1]) && valid_hex(uri_text[i + 2])) { + return 2; + } + return NOT_SET; + } + return 0; +} + +/* *( pchar / "?" / "/" ) */ +static int parse_fragment_or_query(const char* uri_text, size_t* i) { + char c; + while ((c = uri_text[*i]) != 0) { + const size_t advance = parse_pchar(uri_text, *i); /* pchar */ + switch (advance) { + case 0: /* uri_text[i] isn't in pchar */ + /* maybe it's ? or / */ + if (uri_text[*i] == '?' || uri_text[*i] == '/') { + (*i)++; + break; + } else { + return 1; + } + GPR_UNREACHABLE_CODE(return 0); + default: + (*i) += advance; + break; + case NOT_SET: /* uri_text[i] introduces an invalid URI */ + return 0; + } + } + /* *i is the first uri_text position past the \a query production, maybe \0 */ + return 1; +} + +static void parse_query_parts(grpc_uri* uri) { + static const char* QUERY_PARTS_SEPARATOR = "&"; + static const char* QUERY_PARTS_VALUE_SEPARATOR = "="; + GPR_ASSERT(uri->query != nullptr); + if (uri->query[0] == '\0') { + uri->query_parts = nullptr; + uri->query_parts_values = nullptr; + uri->num_query_parts = 0; + return; + } + + gpr_string_split(uri->query, QUERY_PARTS_SEPARATOR, &uri->query_parts, + &uri->num_query_parts); + uri->query_parts_values = + static_cast(gpr_malloc(uri->num_query_parts * sizeof(char**))); + for (size_t i = 0; i < uri->num_query_parts; i++) { + char** query_param_parts; + size_t num_query_param_parts; + char* full = uri->query_parts[i]; + gpr_string_split(full, QUERY_PARTS_VALUE_SEPARATOR, &query_param_parts, + &num_query_param_parts); + GPR_ASSERT(num_query_param_parts > 0); + uri->query_parts[i] = query_param_parts[0]; + if (num_query_param_parts > 1) { + /* TODO(dgq): only the first value after the separator is considered. + * Perhaps all chars after the first separator for the query part should + * be included, even if they include the separator. */ + uri->query_parts_values[i] = query_param_parts[1]; + } else { + uri->query_parts_values[i] = nullptr; + } + for (size_t j = 2; j < num_query_param_parts; j++) { + gpr_free(query_param_parts[j]); + } + gpr_free(query_param_parts); + gpr_free(full); + } +} + +grpc_uri* grpc_uri_parse(const char* uri_text, bool suppress_errors) { + grpc_uri* uri; + size_t scheme_begin = 0; + size_t scheme_end = NOT_SET; + size_t authority_begin = NOT_SET; + size_t authority_end = NOT_SET; + size_t path_begin = NOT_SET; + size_t path_end = NOT_SET; + size_t query_begin = NOT_SET; + size_t query_end = NOT_SET; + size_t fragment_begin = NOT_SET; + size_t fragment_end = NOT_SET; + size_t i; + + for (i = scheme_begin; uri_text[i] != 0; i++) { + if (uri_text[i] == ':') { + scheme_end = i; + break; + } + if (uri_text[i] >= 'a' && uri_text[i] <= 'z') continue; + if (uri_text[i] >= 'A' && uri_text[i] <= 'Z') continue; + if (i != scheme_begin) { + if (uri_text[i] >= '0' && uri_text[i] <= '9') continue; + if (uri_text[i] == '+') continue; + if (uri_text[i] == '-') continue; + if (uri_text[i] == '.') continue; + } + break; + } + if (scheme_end == NOT_SET) { + return bad_uri(uri_text, i, "scheme", suppress_errors); + } + + if (uri_text[scheme_end + 1] == '/' && uri_text[scheme_end + 2] == '/') { + authority_begin = scheme_end + 3; + for (i = authority_begin; uri_text[i] != 0 && authority_end == NOT_SET; + i++) { + if (uri_text[i] == '/' || uri_text[i] == '?' || uri_text[i] == '#') { + authority_end = i; + } + } + if (authority_end == NOT_SET && uri_text[i] == 0) { + authority_end = i; + } + if (authority_end == NOT_SET) { + return bad_uri(uri_text, i, "authority", suppress_errors); + } + /* TODO(ctiller): parse the authority correctly */ + path_begin = authority_end; + } else { + path_begin = scheme_end + 1; + } + + for (i = path_begin; uri_text[i] != 0; i++) { + if (uri_text[i] == '?' || uri_text[i] == '#') { + path_end = i; + break; + } + } + if (path_end == NOT_SET && uri_text[i] == 0) { + path_end = i; + } + if (path_end == NOT_SET) { + return bad_uri(uri_text, i, "path", suppress_errors); + } + + if (uri_text[i] == '?') { + query_begin = ++i; + if (!parse_fragment_or_query(uri_text, &i)) { + return bad_uri(uri_text, i, "query", suppress_errors); + } else if (uri_text[i] != 0 && uri_text[i] != '#') { + /* We must be at the end or at the beginning of a fragment */ + return bad_uri(uri_text, i, "query", suppress_errors); + } + query_end = i; + } + if (uri_text[i] == '#') { + fragment_begin = ++i; + if (!parse_fragment_or_query(uri_text, &i)) { + return bad_uri(uri_text, i - fragment_end, "fragment", suppress_errors); + } else if (uri_text[i] != 0) { + /* We must be at the end */ + return bad_uri(uri_text, i, "fragment", suppress_errors); + } + fragment_end = i; + } + + uri = static_cast(gpr_zalloc(sizeof(*uri))); + uri->scheme = decode_and_copy_component(uri_text, scheme_begin, scheme_end); + uri->authority = + decode_and_copy_component(uri_text, authority_begin, authority_end); + uri->path = decode_and_copy_component(uri_text, path_begin, path_end); + uri->query = decode_and_copy_component(uri_text, query_begin, query_end); + uri->fragment = + decode_and_copy_component(uri_text, fragment_begin, fragment_end); + parse_query_parts(uri); + + return uri; +} + +const char* grpc_uri_get_query_arg(const grpc_uri* uri, const char* key) { + GPR_ASSERT(key != nullptr); + if (key[0] == '\0') return nullptr; + + for (size_t i = 0; i < uri->num_query_parts; ++i) { + if (0 == strcmp(key, uri->query_parts[i])) { + return uri->query_parts_values[i]; + } + } + return nullptr; +} + +void grpc_uri_destroy(grpc_uri* uri) { + if (!uri) return; + gpr_free(uri->scheme); + gpr_free(uri->authority); + gpr_free(uri->path); + gpr_free(uri->query); + for (size_t i = 0; i < uri->num_query_parts; ++i) { + gpr_free(uri->query_parts[i]); + gpr_free(uri->query_parts_values[i]); + } + gpr_free(uri->query_parts); + gpr_free(uri->query_parts_values); + gpr_free(uri->fragment); + gpr_free(uri); +} diff --git a/src/core/lib/uri/uri_parser.h b/src/core/lib/uri/uri_parser.h new file mode 100644 index 0000000000..c13778bc55 --- /dev/null +++ b/src/core/lib/uri/uri_parser.h @@ -0,0 +1,50 @@ +/* + * + * Copyright 2015 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef GRPC_CORE_EXT_URI_URI_PARSER_H +#define GRPC_CORE_EXT_URI_URI_PARSER_H + +#include + +#include + +typedef struct { + char* scheme; + char* authority; + char* path; + char* query; + /** Query substrings separated by '&' */ + char** query_parts; + /** Number of elements in \a query_parts and \a query_parts_values */ + size_t num_query_parts; + /** Split each query part by '='. NULL if not present. */ + char** query_parts_values; + char* fragment; +} grpc_uri; + +/** parse a uri, return NULL on failure */ +grpc_uri* grpc_uri_parse(const char* uri_text, bool suppress_errors); + +/** return the part of a query string after the '=' in "?key=xxx&...", or NULL + * if key is not present */ +const char* grpc_uri_get_query_arg(const grpc_uri* uri, const char* key); + +/** destroy a uri */ +void grpc_uri_destroy(grpc_uri* uri); + +#endif /* GRPC_CORE_EXT_URI_URI_PARSER_H */ diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 618ec99224..4107d347f2 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -237,7 +237,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/filters/http/http_filters_plugin.cc', 'src/core/ext/filters/http/message_compress/message_compress_filter.cc', 'src/core/ext/filters/http/server/http_server_filter.cc', - 'src/core/ext/uri/uri_parser.cc', + 'src/core/lib/uri/uri_parser.cc', 'src/core/lib/http/httpcli_security_connector.cc', 'src/core/lib/security/context/security_context.cc', 'src/core/lib/security/credentials/alts/alts_credentials.cc', diff --git a/test/core/client_channel/uri_fuzzer_test.cc b/test/core/client_channel/uri_fuzzer_test.cc index f4bb020c03..a88e2ac5cf 100644 --- a/test/core/client_channel/uri_fuzzer_test.cc +++ b/test/core/client_channel/uri_fuzzer_test.cc @@ -23,8 +23,8 @@ #include #include -#include "src/core/ext/uri/uri_parser.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/uri/uri_parser.h" bool squelch = true; bool leak_check = true; diff --git a/test/core/client_channel/uri_parser_test.cc b/test/core/client_channel/uri_parser_test.cc index 59b57f3039..ec4f755dda 100644 --- a/test/core/client_channel/uri_parser_test.cc +++ b/test/core/client_channel/uri_parser_test.cc @@ -16,7 +16,7 @@ * */ -#include "src/core/ext/uri/uri_parser.h" +#include "src/core/lib/uri/uri_parser.h" #include diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 5cfd435ae4..0ddfcbd4fb 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -1047,8 +1047,6 @@ src/core/ext/transport/chttp2/transport/writing.cc \ src/core/ext/transport/inproc/inproc_plugin.cc \ src/core/ext/transport/inproc/inproc_transport.cc \ src/core/ext/transport/inproc/inproc_transport.h \ -src/core/ext/uri/uri_parser.cc \ -src/core/ext/uri/uri_parser.h \ src/core/lib/README.md \ src/core/lib/avl/avl.cc \ src/core/lib/avl/avl.h \ @@ -1478,6 +1476,8 @@ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport.h \ src/core/lib/transport/transport_impl.h \ src/core/lib/transport/transport_op_string.cc \ +src/core/lib/uri/uri_parser.cc \ +src/core/lib/uri/uri_parser.h \ src/core/plugin_registry/grpc_plugin_registry.cc \ src/core/tsi/README.md \ src/core/tsi/alts/crypt/aes_gcm.cc \ diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 19127f6528..02e3f02434 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -10997,14 +10997,14 @@ "grpc_base" ], "headers": [ - "src/core/ext/uri/uri_parser.h" + "src/core/lib/uri/uri_parser.h" ], "is_filegroup": true, "language": "c", "name": "grpc_uri", "src": [ - "src/core/ext/uri/uri_parser.cc", - "src/core/ext/uri/uri_parser.h" + "src/core/lib/uri/uri_parser.cc", + "src/core/lib/uri/uri_parser.h" ], "third_party": false, "type": "filegroup" -- cgit v1.2.3 From 44b262c361f1d7f6825363f267da2e0c650f8a1b Mon Sep 17 00:00:00 2001 From: ncteisen Date: Wed, 31 Oct 2018 21:11:28 -0700 Subject: fix build and sanity --- BUILD | 18 ++----------- CMakeLists.txt | 12 ++++----- Makefile | 12 ++++----- build.yaml | 11 ++------ config.m4 | 2 +- config.w32 | 2 +- gRPC-C++.podspec | 3 ++- gRPC-Core.podspec | 6 ++--- grpc.gemspec | 4 +-- grpc.gyp | 8 +++--- package.xml | 4 +-- src/core/lib/uri/uri_parser.h | 6 ++--- src/python/grpcio/grpc_core_dependencies.py | 2 +- tools/doxygen/Doxyfile.c++.internal | 1 + tools/run_tests/generated/sources_and_headers.json | 31 +++++----------------- 15 files changed, 43 insertions(+), 79 deletions(-) (limited to 'Makefile') diff --git a/BUILD b/BUILD index 1486f4e944..62088a6d26 100644 --- a/BUILD +++ b/BUILD @@ -820,6 +820,7 @@ grpc_cc_library( "src/core/lib/transport/timeout_encoding.cc", "src/core/lib/transport/transport.cc", "src/core/lib/transport/transport_op_string.cc", + "src/core/lib/uri/uri_parser.cc", ], hdrs = [ "src/core/lib/avl/avl.h", @@ -954,6 +955,7 @@ grpc_cc_library( "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", "src/core/lib/transport/transport_impl.h", + "src/core/lib/uri/uri_parser.h", ], external_deps = [ "zlib", @@ -1081,7 +1083,6 @@ grpc_cc_library( deps = [ "gpr_base", "grpc_base", - "grpc_uri", "grpc_client_authority_filter", "grpc_deadline_filter", "inlined_vector", @@ -1092,20 +1093,6 @@ grpc_cc_library( ], ) -grpc_cc_library( - name = "grpc_uri", - srcs = [ - "src/core/lib/uri/uri_parser.cc", - ], - hdrs = [ - "src/core/lib/uri/uri_parser.h", - ], - language = "c++", - deps = [ - "grpc_base", - ], -) - grpc_cc_library( name = "grpc_max_age_filter", srcs = [ @@ -1706,7 +1693,6 @@ grpc_cc_library( deps = [ "gpr_base", "grpc_base", - "grpc_uri", "grpc_http_filters", "grpc_transport_chttp2_alpn", ], diff --git a/CMakeLists.txt b/CMakeLists.txt index a6b3d1c246..efa02f1987 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1125,6 +1125,7 @@ add_library(grpc src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc + src/core/lib/uri/uri_parser.cc src/core/lib/debug/trace.cc src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc src/core/ext/transport/chttp2/transport/bin_decoder.cc @@ -1154,7 +1155,6 @@ add_library(grpc src/core/ext/filters/http/http_filters_plugin.cc src/core/ext/filters/http/message_compress/message_compress_filter.cc src/core/ext/filters/http/server/http_server_filter.cc - src/core/lib/uri/uri_parser.cc src/core/lib/http/httpcli_security_connector.cc src/core/lib/security/context/security_context.cc src/core/lib/security/credentials/alts/alts_credentials.cc @@ -1546,6 +1546,7 @@ add_library(grpc_cronet src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc + src/core/lib/uri/uri_parser.cc src/core/lib/debug/trace.cc src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc src/core/ext/transport/cronet/transport/cronet_api_dummy.cc @@ -1578,7 +1579,6 @@ add_library(grpc_cronet src/core/ext/filters/http/http_filters_plugin.cc src/core/ext/filters/http/message_compress/message_compress_filter.cc src/core/ext/filters/http/server/http_server_filter.cc - src/core/lib/uri/uri_parser.cc src/core/ext/filters/client_channel/backup_poller.cc src/core/ext/filters/client_channel/channel_connectivity.cc src/core/ext/filters/client_channel/client_channel.cc @@ -1949,6 +1949,7 @@ add_library(grpc_test_util src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc + src/core/lib/uri/uri_parser.cc src/core/lib/debug/trace.cc src/core/ext/filters/client_channel/backup_poller.cc src/core/ext/filters/client_channel/channel_connectivity.cc @@ -1977,7 +1978,6 @@ add_library(grpc_test_util third_party/nanopb/pb_common.c third_party/nanopb/pb_decode.c third_party/nanopb/pb_encode.c - src/core/lib/uri/uri_parser.cc src/core/ext/transport/chttp2/transport/bin_decoder.cc src/core/ext/transport/chttp2/transport/bin_encoder.cc src/core/ext/transport/chttp2/transport/chttp2_plugin.cc @@ -2268,6 +2268,7 @@ add_library(grpc_test_util_unsecure src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc + src/core/lib/uri/uri_parser.cc src/core/lib/debug/trace.cc src/core/ext/filters/client_channel/backup_poller.cc src/core/ext/filters/client_channel/channel_connectivity.cc @@ -2296,7 +2297,6 @@ add_library(grpc_test_util_unsecure third_party/nanopb/pb_common.c third_party/nanopb/pb_decode.c third_party/nanopb/pb_encode.c - src/core/lib/uri/uri_parser.cc src/core/ext/transport/chttp2/transport/bin_decoder.cc src/core/ext/transport/chttp2/transport/bin_encoder.cc src/core/ext/transport/chttp2/transport/chttp2_plugin.cc @@ -2566,6 +2566,7 @@ add_library(grpc_unsecure src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc + src/core/lib/uri/uri_parser.cc src/core/lib/debug/trace.cc src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc @@ -2596,7 +2597,6 @@ add_library(grpc_unsecure src/core/ext/filters/http/http_filters_plugin.cc src/core/ext/filters/http/message_compress/message_compress_filter.cc src/core/ext/filters/http/server/http_server_filter.cc - src/core/lib/uri/uri_parser.cc src/core/ext/transport/chttp2/server/chttp2_server.cc src/core/ext/transport/chttp2/client/insecure/channel_create.cc src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc @@ -3442,13 +3442,13 @@ add_library(grpc++_cronet src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc + src/core/lib/uri/uri_parser.cc src/core/lib/debug/trace.cc src/core/ext/transport/chttp2/alpn/alpn.cc src/core/ext/filters/http/client/http_client_filter.cc src/core/ext/filters/http/http_filters_plugin.cc src/core/ext/filters/http/message_compress/message_compress_filter.cc src/core/ext/filters/http/server/http_server_filter.cc - src/core/lib/uri/uri_parser.cc src/core/ext/filters/client_channel/backup_poller.cc src/core/ext/filters/client_channel/channel_connectivity.cc src/core/ext/filters/client_channel/client_channel.cc diff --git a/Makefile b/Makefile index 8cd870ef97..a3f8d61928 100644 --- a/Makefile +++ b/Makefile @@ -3600,6 +3600,7 @@ LIBGRPC_SRC = \ src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ + src/core/lib/uri/uri_parser.cc \ src/core/lib/debug/trace.cc \ src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc \ src/core/ext/transport/chttp2/transport/bin_decoder.cc \ @@ -3629,7 +3630,6 @@ LIBGRPC_SRC = \ src/core/ext/filters/http/http_filters_plugin.cc \ src/core/ext/filters/http/message_compress/message_compress_filter.cc \ src/core/ext/filters/http/server/http_server_filter.cc \ - src/core/lib/uri/uri_parser.cc \ src/core/lib/http/httpcli_security_connector.cc \ src/core/lib/security/context/security_context.cc \ src/core/lib/security/credentials/alts/alts_credentials.cc \ @@ -4015,6 +4015,7 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ + src/core/lib/uri/uri_parser.cc \ src/core/lib/debug/trace.cc \ src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc \ src/core/ext/transport/cronet/transport/cronet_api_dummy.cc \ @@ -4047,7 +4048,6 @@ LIBGRPC_CRONET_SRC = \ src/core/ext/filters/http/http_filters_plugin.cc \ src/core/ext/filters/http/message_compress/message_compress_filter.cc \ src/core/ext/filters/http/server/http_server_filter.cc \ - src/core/lib/uri/uri_parser.cc \ src/core/ext/filters/client_channel/backup_poller.cc \ src/core/ext/filters/client_channel/channel_connectivity.cc \ src/core/ext/filters/client_channel/client_channel.cc \ @@ -4411,6 +4411,7 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ + src/core/lib/uri/uri_parser.cc \ src/core/lib/debug/trace.cc \ src/core/ext/filters/client_channel/backup_poller.cc \ src/core/ext/filters/client_channel/channel_connectivity.cc \ @@ -4439,7 +4440,6 @@ LIBGRPC_TEST_UTIL_SRC = \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ - src/core/lib/uri/uri_parser.cc \ src/core/ext/transport/chttp2/transport/bin_decoder.cc \ src/core/ext/transport/chttp2/transport/bin_encoder.cc \ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc \ @@ -4716,6 +4716,7 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ + src/core/lib/uri/uri_parser.cc \ src/core/lib/debug/trace.cc \ src/core/ext/filters/client_channel/backup_poller.cc \ src/core/ext/filters/client_channel/channel_connectivity.cc \ @@ -4744,7 +4745,6 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ - src/core/lib/uri/uri_parser.cc \ src/core/ext/transport/chttp2/transport/bin_decoder.cc \ src/core/ext/transport/chttp2/transport/bin_encoder.cc \ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc \ @@ -4987,6 +4987,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ + src/core/lib/uri/uri_parser.cc \ src/core/lib/debug/trace.cc \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc \ src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc \ @@ -5017,7 +5018,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/filters/http/http_filters_plugin.cc \ src/core/ext/filters/http/message_compress/message_compress_filter.cc \ src/core/ext/filters/http/server/http_server_filter.cc \ - src/core/lib/uri/uri_parser.cc \ src/core/ext/transport/chttp2/server/chttp2_server.cc \ src/core/ext/transport/chttp2/client/insecure/channel_create.cc \ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc \ @@ -5838,13 +5838,13 @@ LIBGRPC++_CRONET_SRC = \ src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ + src/core/lib/uri/uri_parser.cc \ src/core/lib/debug/trace.cc \ src/core/ext/transport/chttp2/alpn/alpn.cc \ src/core/ext/filters/http/client/http_client_filter.cc \ src/core/ext/filters/http/http_filters_plugin.cc \ src/core/ext/filters/http/message_compress/message_compress_filter.cc \ src/core/ext/filters/http/server/http_server_filter.cc \ - src/core/lib/uri/uri_parser.cc \ src/core/ext/filters/client_channel/backup_poller.cc \ src/core/ext/filters/client_channel/channel_connectivity.cc \ src/core/ext/filters/client_channel/client_channel.cc \ diff --git a/build.yaml b/build.yaml index 35db884cff..bdb5abc8be 100644 --- a/build.yaml +++ b/build.yaml @@ -382,6 +382,7 @@ filegroups: - src/core/lib/transport/timeout_encoding.cc - src/core/lib/transport/transport.cc - src/core/lib/transport/transport_op_string.cc + - src/core/lib/uri/uri_parser.cc deps: - gpr filegroups: @@ -538,6 +539,7 @@ filegroups: - src/core/lib/transport/timeout_encoding.h - src/core/lib/transport/transport.h - src/core/lib/transport/transport_impl.h + - src/core/lib/uri/uri_parser.h deps: - gpr uses: @@ -616,7 +618,6 @@ filegroups: - grpc_base - grpc_deadline_filter - health_proto - - grpc_uri - name: grpc_codegen public_headers: - include/grpc/impl/codegen/byte_buffer.h @@ -1006,7 +1007,6 @@ filegroups: - grpc_base - grpc_transport_chttp2_alpn - grpc_http_filters - - grpc_uri - name: grpc_transport_chttp2_alpn headers: - src/core/ext/transport/chttp2/alpn/alpn.h @@ -1096,13 +1096,6 @@ filegroups: - src/core/ext/transport/inproc/inproc_transport.h uses: - grpc_base_headers -- name: grpc_uri - headers: - - src/core/lib/uri/uri_parser.h - src: - - src/core/lib/uri/uri_parser.cc - uses: - - grpc_base - name: grpc_workaround_cronet_compression_filter headers: - src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h diff --git a/config.m4 b/config.m4 index 8702650287..44aac79fa4 100644 --- a/config.m4 +++ b/config.m4 @@ -234,6 +234,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ + src/core/lib/uri/uri_parser.cc \ src/core/lib/debug/trace.cc \ src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc \ src/core/ext/transport/chttp2/transport/bin_decoder.cc \ @@ -263,7 +264,6 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/filters/http/http_filters_plugin.cc \ src/core/ext/filters/http/message_compress/message_compress_filter.cc \ src/core/ext/filters/http/server/http_server_filter.cc \ - src/core/lib/uri/uri_parser.cc \ src/core/lib/http/httpcli_security_connector.cc \ src/core/lib/security/context/security_context.cc \ src/core/lib/security/credentials/alts/alts_credentials.cc \ diff --git a/config.w32 b/config.w32 index cb08f779d0..aa65ec3751 100644 --- a/config.w32 +++ b/config.w32 @@ -209,6 +209,7 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\transport\\timeout_encoding.cc " + "src\\core\\lib\\transport\\transport.cc " + "src\\core\\lib\\transport\\transport_op_string.cc " + + "src\\core\\lib\\uri\\uri_parser.cc " + "src\\core\\lib\\debug\\trace.cc " + "src\\core\\ext\\transport\\chttp2\\server\\secure\\server_secure_chttp2.cc " + "src\\core\\ext\\transport\\chttp2\\transport\\bin_decoder.cc " + @@ -238,7 +239,6 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\filters\\http\\http_filters_plugin.cc " + "src\\core\\ext\\filters\\http\\message_compress\\message_compress_filter.cc " + "src\\core\\ext\\filters\\http\\server\\http_server_filter.cc " + - "src\\core\\lib\\uri\\uri_parser.cc " + "src\\core\\lib\\http\\httpcli_security_connector.cc " + "src\\core\\lib\\security\\context\\security_context.cc " + "src\\core\\lib\\security\\credentials\\alts\\alts_credentials.cc " + diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index f3316b18bc..338eeb0cec 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -274,7 +274,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/http/client/http_client_filter.h', 'src/core/ext/filters/http/message_compress/message_compress_filter.h', 'src/core/ext/filters/http/server/http_server_filter.h', - 'src/core/lib/uri/uri_parser.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h', 'src/core/ext/filters/client_channel/lb_policy/xds/xds.h', 'src/core/lib/security/context/security_context.h', @@ -502,6 +501,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', 'src/core/lib/transport/transport_impl.h', + 'src/core/lib/uri/uri_parser.h', 'src/core/lib/debug/trace.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h', @@ -693,6 +693,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', 'src/core/lib/transport/transport_impl.h', + 'src/core/lib/uri/uri_parser.h', 'src/core/lib/debug/trace.h', 'src/core/ext/transport/inproc/inproc_transport.h', 'src/core/ext/filters/client_channel/health/health.pb.h' diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 90eee14b2a..a7ef6f5702 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -275,7 +275,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/http/client/http_client_filter.h', 'src/core/ext/filters/http/message_compress/message_compress_filter.h', 'src/core/ext/filters/http/server/http_server_filter.h', - 'src/core/lib/uri/uri_parser.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h', 'src/core/ext/filters/client_channel/lb_policy/xds/xds.h', 'src/core/lib/security/context/security_context.h', @@ -503,6 +502,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', 'src/core/lib/transport/transport_impl.h', + 'src/core/lib/uri/uri_parser.h', 'src/core/lib/debug/trace.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h', @@ -674,6 +674,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/timeout_encoding.cc', 'src/core/lib/transport/transport.cc', 'src/core/lib/transport/transport_op_string.cc', + 'src/core/lib/uri/uri_parser.cc', 'src/core/lib/debug/trace.cc', 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc', 'src/core/ext/transport/chttp2/transport/bin_decoder.cc', @@ -703,7 +704,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/http/http_filters_plugin.cc', 'src/core/ext/filters/http/message_compress/message_compress_filter.cc', 'src/core/ext/filters/http/server/http_server_filter.cc', - 'src/core/lib/uri/uri_parser.cc', 'src/core/lib/http/httpcli_security_connector.cc', 'src/core/lib/security/context/security_context.cc', 'src/core/lib/security/credentials/alts/alts_credentials.cc', @@ -894,7 +894,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/http/client/http_client_filter.h', 'src/core/ext/filters/http/message_compress/message_compress_filter.h', 'src/core/ext/filters/http/server/http_server_filter.h', - 'src/core/lib/uri/uri_parser.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h', 'src/core/ext/filters/client_channel/lb_policy/xds/xds.h', 'src/core/lib/security/context/security_context.h', @@ -1122,6 +1121,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', 'src/core/lib/transport/transport_impl.h', + 'src/core/lib/uri/uri_parser.h', 'src/core/lib/debug/trace.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h', diff --git a/grpc.gemspec b/grpc.gemspec index 77dc1741fa..deee564665 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -207,7 +207,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/http/client/http_client_filter.h ) s.files += %w( src/core/ext/filters/http/message_compress/message_compress_filter.h ) s.files += %w( src/core/ext/filters/http/server/http_server_filter.h ) - s.files += %w( src/core/lib/uri/uri_parser.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds.h ) s.files += %w( src/core/lib/security/context/security_context.h ) @@ -439,6 +438,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/transport/timeout_encoding.h ) s.files += %w( src/core/lib/transport/transport.h ) s.files += %w( src/core/lib/transport/transport_impl.h ) + s.files += %w( src/core/lib/uri/uri_parser.h ) s.files += %w( src/core/lib/debug/trace.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h ) @@ -610,6 +610,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/transport/timeout_encoding.cc ) s.files += %w( src/core/lib/transport/transport.cc ) s.files += %w( src/core/lib/transport/transport_op_string.cc ) + s.files += %w( src/core/lib/uri/uri_parser.cc ) s.files += %w( src/core/lib/debug/trace.cc ) s.files += %w( src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc ) s.files += %w( src/core/ext/transport/chttp2/transport/bin_decoder.cc ) @@ -639,7 +640,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/http/http_filters_plugin.cc ) s.files += %w( src/core/ext/filters/http/message_compress/message_compress_filter.cc ) s.files += %w( src/core/ext/filters/http/server/http_server_filter.cc ) - s.files += %w( src/core/lib/uri/uri_parser.cc ) s.files += %w( src/core/lib/http/httpcli_security_connector.cc ) s.files += %w( src/core/lib/security/context/security_context.cc ) s.files += %w( src/core/lib/security/credentials/alts/alts_credentials.cc ) diff --git a/grpc.gyp b/grpc.gyp index a16622459d..10c9b84bef 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -426,6 +426,7 @@ 'src/core/lib/transport/timeout_encoding.cc', 'src/core/lib/transport/transport.cc', 'src/core/lib/transport/transport_op_string.cc', + 'src/core/lib/uri/uri_parser.cc', 'src/core/lib/debug/trace.cc', 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc', 'src/core/ext/transport/chttp2/transport/bin_decoder.cc', @@ -455,7 +456,6 @@ 'src/core/ext/filters/http/http_filters_plugin.cc', 'src/core/ext/filters/http/message_compress/message_compress_filter.cc', 'src/core/ext/filters/http/server/http_server_filter.cc', - 'src/core/lib/uri/uri_parser.cc', 'src/core/lib/http/httpcli_security_connector.cc', 'src/core/lib/security/context/security_context.cc', 'src/core/lib/security/credentials/alts/alts_credentials.cc', @@ -786,6 +786,7 @@ 'src/core/lib/transport/timeout_encoding.cc', 'src/core/lib/transport/transport.cc', 'src/core/lib/transport/transport_op_string.cc', + 'src/core/lib/uri/uri_parser.cc', 'src/core/lib/debug/trace.cc', 'src/core/ext/filters/client_channel/backup_poller.cc', 'src/core/ext/filters/client_channel/channel_connectivity.cc', @@ -814,7 +815,6 @@ 'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c', - 'src/core/lib/uri/uri_parser.cc', 'src/core/ext/transport/chttp2/transport/bin_decoder.cc', 'src/core/ext/transport/chttp2/transport/bin_encoder.cc', 'src/core/ext/transport/chttp2/transport/chttp2_plugin.cc', @@ -1025,6 +1025,7 @@ 'src/core/lib/transport/timeout_encoding.cc', 'src/core/lib/transport/transport.cc', 'src/core/lib/transport/transport_op_string.cc', + 'src/core/lib/uri/uri_parser.cc', 'src/core/lib/debug/trace.cc', 'src/core/ext/filters/client_channel/backup_poller.cc', 'src/core/ext/filters/client_channel/channel_connectivity.cc', @@ -1053,7 +1054,6 @@ 'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c', - 'src/core/lib/uri/uri_parser.cc', 'src/core/ext/transport/chttp2/transport/bin_decoder.cc', 'src/core/ext/transport/chttp2/transport/bin_encoder.cc', 'src/core/ext/transport/chttp2/transport/chttp2_plugin.cc', @@ -1242,6 +1242,7 @@ 'src/core/lib/transport/timeout_encoding.cc', 'src/core/lib/transport/transport.cc', 'src/core/lib/transport/transport_op_string.cc', + 'src/core/lib/uri/uri_parser.cc', 'src/core/lib/debug/trace.cc', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc', @@ -1272,7 +1273,6 @@ 'src/core/ext/filters/http/http_filters_plugin.cc', 'src/core/ext/filters/http/message_compress/message_compress_filter.cc', 'src/core/ext/filters/http/server/http_server_filter.cc', - 'src/core/lib/uri/uri_parser.cc', 'src/core/ext/transport/chttp2/server/chttp2_server.cc', 'src/core/ext/transport/chttp2/client/insecure/channel_create.cc', 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc', diff --git a/package.xml b/package.xml index 2a8d6a3595..6aa4f4aada 100644 --- a/package.xml +++ b/package.xml @@ -212,7 +212,6 @@ - @@ -444,6 +443,7 @@ + @@ -615,6 +615,7 @@ + @@ -644,7 +645,6 @@ - diff --git a/src/core/lib/uri/uri_parser.h b/src/core/lib/uri/uri_parser.h index c13778bc55..b6771bbde3 100644 --- a/src/core/lib/uri/uri_parser.h +++ b/src/core/lib/uri/uri_parser.h @@ -16,8 +16,8 @@ * */ -#ifndef GRPC_CORE_EXT_URI_URI_PARSER_H -#define GRPC_CORE_EXT_URI_URI_PARSER_H +#ifndef GRPC_CORE_LIB_URI_URI_PARSER_H +#define GRPC_CORE_LIB_URI_URI_PARSER_H #include @@ -47,4 +47,4 @@ const char* grpc_uri_get_query_arg(const grpc_uri* uri, const char* key); /** destroy a uri */ void grpc_uri_destroy(grpc_uri* uri); -#endif /* GRPC_CORE_EXT_URI_URI_PARSER_H */ +#endif /* GRPC_CORE_LIB_URI_URI_PARSER_H */ diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 4107d347f2..7d9ce0cf28 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -208,6 +208,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/transport/timeout_encoding.cc', 'src/core/lib/transport/transport.cc', 'src/core/lib/transport/transport_op_string.cc', + 'src/core/lib/uri/uri_parser.cc', 'src/core/lib/debug/trace.cc', 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc', 'src/core/ext/transport/chttp2/transport/bin_decoder.cc', @@ -237,7 +238,6 @@ CORE_SOURCE_FILES = [ 'src/core/ext/filters/http/http_filters_plugin.cc', 'src/core/ext/filters/http/message_compress/message_compress_filter.cc', 'src/core/ext/filters/http/server/http_server_filter.cc', - 'src/core/lib/uri/uri_parser.cc', 'src/core/lib/http/httpcli_security_connector.cc', 'src/core/lib/security/context/security_context.cc', 'src/core/lib/security/credentials/alts/alts_credentials.cc', diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 81d74cd972..9af44e75ff 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1181,6 +1181,7 @@ src/core/lib/transport/status_metadata.h \ src/core/lib/transport/timeout_encoding.h \ src/core/lib/transport/transport.h \ src/core/lib/transport/transport_impl.h \ +src/core/lib/uri/uri_parser.h \ src/cpp/README.md \ src/cpp/client/channel_cc.cc \ src/cpp/client/client_context.cc \ diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 02e3f02434..f045c2719b 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -9648,7 +9648,8 @@ "src/core/lib/transport/status_metadata.cc", "src/core/lib/transport/timeout_encoding.cc", "src/core/lib/transport/transport.cc", - "src/core/lib/transport/transport_op_string.cc" + "src/core/lib/transport/transport_op_string.cc", + "src/core/lib/uri/uri_parser.cc" ], "third_party": false, "type": "filegroup" @@ -9805,7 +9806,8 @@ "src/core/lib/transport/status_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", - "src/core/lib/transport/transport_impl.h" + "src/core/lib/transport/transport_impl.h", + "src/core/lib/uri/uri_parser.h" ], "is_filegroup": true, "language": "c", @@ -9956,7 +9958,8 @@ "src/core/lib/transport/status_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", - "src/core/lib/transport/transport_impl.h" + "src/core/lib/transport/transport_impl.h", + "src/core/lib/uri/uri_parser.h" ], "third_party": false, "type": "filegroup" @@ -10011,7 +10014,6 @@ "gpr", "grpc_base", "grpc_deadline_filter", - "grpc_uri", "health_proto" ], "headers": [ @@ -10721,8 +10723,7 @@ "gpr", "grpc_base", "grpc_http_filters", - "grpc_transport_chttp2_alpn", - "grpc_uri" + "grpc_transport_chttp2_alpn" ], "headers": [ "src/core/ext/transport/chttp2/transport/bin_decoder.h", @@ -10991,24 +10992,6 @@ "third_party": false, "type": "filegroup" }, - { - "deps": [ - "gpr", - "grpc_base" - ], - "headers": [ - "src/core/lib/uri/uri_parser.h" - ], - "is_filegroup": true, - "language": "c", - "name": "grpc_uri", - "src": [ - "src/core/lib/uri/uri_parser.cc", - "src/core/lib/uri/uri_parser.h" - ], - "third_party": false, - "type": "filegroup" - }, { "deps": [ "gpr", -- cgit v1.2.3