aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--BUILD32
-rw-r--r--Makefile12
-rw-r--r--build.json13
-rw-r--r--gRPC.podspec20
-rw-r--r--src/core/httpcli/httpcli.c71
-rw-r--r--src/core/httpcli/httpcli.h14
-rw-r--r--src/core/httpcli/httpcli_security_connector.c49
-rw-r--r--src/core/httpcli/httpcli_security_connector.h43
-rw-r--r--src/core/security/credentials.c4
-rw-r--r--src/core/security/jwt_verifier.c4
-rw-r--r--test/core/httpcli/httpcli_test.c4
-rw-r--r--test/core/security/credentials_test.c6
-rw-r--r--test/core/security/jwt_verifier_test.c10
-rw-r--r--test/core/util/port_posix.c66
-rw-r--r--tools/doxygen/Doxyfile.core.internal13
-rwxr-xr-xtools/run_tests/jobset.py28
-rwxr-xr-xtools/run_tests/port_server.py105
-rwxr-xr-xtools/run_tests/run_tests.py46
-rw-r--r--tools/run_tests/sources_and_headers.json11
-rw-r--r--vsprojects/grpc/grpc.vcxproj19
-rw-r--r--vsprojects/grpc/grpc.vcxproj.filters39
-rw-r--r--vsprojects/grpc_unsecure/grpc_unsecure.vcxproj9
-rw-r--r--vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters21
23 files changed, 442 insertions, 197 deletions
diff --git a/BUILD b/BUILD
index 9c170f1d5e..8672d7f942 100644
--- a/BUILD
+++ b/BUILD
@@ -132,10 +132,6 @@ cc_library(
cc_library(
name = "grpc",
srcs = [
- "src/core/httpcli/format_request.h",
- "src/core/httpcli/httpcli.h",
- "src/core/httpcli/httpcli_security_connector.h",
- "src/core/httpcli/parser.h",
"src/core/security/auth_filters.h",
"src/core/security/base64.h",
"src/core/security/credentials.h",
@@ -175,6 +171,9 @@ cc_library(
"src/core/client_config/uri_parser.h",
"src/core/compression/message_compress.h",
"src/core/debug/trace.h",
+ "src/core/httpcli/format_request.h",
+ "src/core/httpcli/httpcli.h",
+ "src/core/httpcli/parser.h",
"src/core/iomgr/alarm.h",
"src/core/iomgr/alarm_heap.h",
"src/core/iomgr/alarm_internal.h",
@@ -248,10 +247,7 @@ cc_library(
"src/core/transport/transport_impl.h",
"src/core/census/context.h",
"src/core/census/rpc_stat_id.h",
- "src/core/httpcli/format_request.c",
- "src/core/httpcli/httpcli.c",
"src/core/httpcli/httpcli_security_connector.c",
- "src/core/httpcli/parser.c",
"src/core/security/base64.c",
"src/core/security/client_auth_filter.c",
"src/core/security/credentials.c",
@@ -298,6 +294,9 @@ cc_library(
"src/core/compression/algorithm.c",
"src/core/compression/message_compress.c",
"src/core/debug/trace.c",
+ "src/core/httpcli/format_request.c",
+ "src/core/httpcli/httpcli.c",
+ "src/core/httpcli/parser.c",
"src/core/iomgr/alarm.c",
"src/core/iomgr/alarm_heap.c",
"src/core/iomgr/endpoint.c",
@@ -437,6 +436,9 @@ cc_library(
"src/core/client_config/uri_parser.h",
"src/core/compression/message_compress.h",
"src/core/debug/trace.h",
+ "src/core/httpcli/format_request.h",
+ "src/core/httpcli/httpcli.h",
+ "src/core/httpcli/parser.h",
"src/core/iomgr/alarm.h",
"src/core/iomgr/alarm_heap.h",
"src/core/iomgr/alarm_internal.h",
@@ -537,6 +539,9 @@ cc_library(
"src/core/compression/algorithm.c",
"src/core/compression/message_compress.c",
"src/core/debug/trace.c",
+ "src/core/httpcli/format_request.c",
+ "src/core/httpcli/httpcli.c",
+ "src/core/httpcli/parser.c",
"src/core/iomgr/alarm.c",
"src/core/iomgr/alarm_heap.c",
"src/core/iomgr/endpoint.c",
@@ -973,10 +978,7 @@ objc_library(
objc_library(
name = "grpc_objc",
srcs = [
- "src/core/httpcli/format_request.c",
- "src/core/httpcli/httpcli.c",
"src/core/httpcli/httpcli_security_connector.c",
- "src/core/httpcli/parser.c",
"src/core/security/base64.c",
"src/core/security/client_auth_filter.c",
"src/core/security/credentials.c",
@@ -1023,6 +1025,9 @@ objc_library(
"src/core/compression/algorithm.c",
"src/core/compression/message_compress.c",
"src/core/debug/trace.c",
+ "src/core/httpcli/format_request.c",
+ "src/core/httpcli/httpcli.c",
+ "src/core/httpcli/parser.c",
"src/core/iomgr/alarm.c",
"src/core/iomgr/alarm_heap.c",
"src/core/iomgr/endpoint.c",
@@ -1121,10 +1126,6 @@ objc_library(
"include/grpc/grpc.h",
"include/grpc/status.h",
"include/grpc/census.h",
- "src/core/httpcli/format_request.h",
- "src/core/httpcli/httpcli.h",
- "src/core/httpcli/httpcli_security_connector.h",
- "src/core/httpcli/parser.h",
"src/core/security/auth_filters.h",
"src/core/security/base64.h",
"src/core/security/credentials.h",
@@ -1164,6 +1165,9 @@ objc_library(
"src/core/client_config/uri_parser.h",
"src/core/compression/message_compress.h",
"src/core/debug/trace.h",
+ "src/core/httpcli/format_request.h",
+ "src/core/httpcli/httpcli.h",
+ "src/core/httpcli/parser.h",
"src/core/iomgr/alarm.h",
"src/core/iomgr/alarm_heap.h",
"src/core/iomgr/alarm_internal.h",
diff --git a/Makefile b/Makefile
index 8a38a689f9..0042ffa056 100644
--- a/Makefile
+++ b/Makefile
@@ -3698,10 +3698,7 @@ endif
LIBGRPC_SRC = \
- src/core/httpcli/format_request.c \
- src/core/httpcli/httpcli.c \
src/core/httpcli/httpcli_security_connector.c \
- src/core/httpcli/parser.c \
src/core/security/base64.c \
src/core/security/client_auth_filter.c \
src/core/security/credentials.c \
@@ -3748,6 +3745,9 @@ LIBGRPC_SRC = \
src/core/compression/algorithm.c \
src/core/compression/message_compress.c \
src/core/debug/trace.c \
+ src/core/httpcli/format_request.c \
+ src/core/httpcli/httpcli.c \
+ src/core/httpcli/parser.c \
src/core/iomgr/alarm.c \
src/core/iomgr/alarm_heap.c \
src/core/iomgr/endpoint.c \
@@ -4016,6 +4016,9 @@ LIBGRPC_UNSECURE_SRC = \
src/core/compression/algorithm.c \
src/core/compression/message_compress.c \
src/core/debug/trace.c \
+ src/core/httpcli/format_request.c \
+ src/core/httpcli/httpcli.c \
+ src/core/httpcli/parser.c \
src/core/iomgr/alarm.c \
src/core/iomgr/alarm_heap.c \
src/core/iomgr/endpoint.c \
@@ -18680,10 +18683,7 @@ ifneq ($(OPENSSL_DEP),)
# This is to ensure the embedded OpenSSL is built beforehand, properly
# installing headers to their final destination on the drive. We need this
# otherwise parallel compilation will fail if a source is compiled first.
-src/core/httpcli/format_request.c: $(OPENSSL_DEP)
-src/core/httpcli/httpcli.c: $(OPENSSL_DEP)
src/core/httpcli/httpcli_security_connector.c: $(OPENSSL_DEP)
-src/core/httpcli/parser.c: $(OPENSSL_DEP)
src/core/security/base64.c: $(OPENSSL_DEP)
src/core/security/client_auth_filter.c: $(OPENSSL_DEP)
src/core/security/credentials.c: $(OPENSSL_DEP)
diff --git a/build.json b/build.json
index deb8640422..d1405054ad 100644
--- a/build.json
+++ b/build.json
@@ -140,6 +140,9 @@
"src/core/client_config/uri_parser.h",
"src/core/compression/message_compress.h",
"src/core/debug/trace.h",
+ "src/core/httpcli/format_request.h",
+ "src/core/httpcli/httpcli.h",
+ "src/core/httpcli/parser.h",
"src/core/iomgr/alarm.h",
"src/core/iomgr/alarm_heap.h",
"src/core/iomgr/alarm_internal.h",
@@ -239,6 +242,9 @@
"src/core/compression/algorithm.c",
"src/core/compression/message_compress.c",
"src/core/debug/trace.c",
+ "src/core/httpcli/format_request.c",
+ "src/core/httpcli/httpcli.c",
+ "src/core/httpcli/parser.c",
"src/core/iomgr/alarm.c",
"src/core/iomgr/alarm_heap.c",
"src/core/iomgr/endpoint.c",
@@ -461,10 +467,6 @@
"include/grpc/grpc_security.h"
],
"headers": [
- "src/core/httpcli/format_request.h",
- "src/core/httpcli/httpcli.h",
- "src/core/httpcli/httpcli_security_connector.h",
- "src/core/httpcli/parser.h",
"src/core/security/auth_filters.h",
"src/core/security/base64.h",
"src/core/security/credentials.h",
@@ -480,10 +482,7 @@
"src/core/tsi/transport_security_interface.h"
],
"src": [
- "src/core/httpcli/format_request.c",
- "src/core/httpcli/httpcli.c",
"src/core/httpcli/httpcli_security_connector.c",
- "src/core/httpcli/parser.c",
"src/core/security/base64.c",
"src/core/security/client_auth_filter.c",
"src/core/security/credentials.c",
diff --git a/gRPC.podspec b/gRPC.podspec
index 632f1ad4e4..31c8ee4074 100644
--- a/gRPC.podspec
+++ b/gRPC.podspec
@@ -134,10 +134,6 @@ Pod::Spec.new do |s|
'src/core/support/time_posix.c',
'src/core/support/time_win32.c',
'src/core/support/tls_pthread.c',
- 'src/core/httpcli/format_request.h',
- 'src/core/httpcli/httpcli.h',
- 'src/core/httpcli/httpcli_security_connector.h',
- 'src/core/httpcli/parser.h',
'src/core/security/auth_filters.h',
'src/core/security/base64.h',
'src/core/security/credentials.h',
@@ -177,6 +173,9 @@ Pod::Spec.new do |s|
'src/core/client_config/uri_parser.h',
'src/core/compression/message_compress.h',
'src/core/debug/trace.h',
+ 'src/core/httpcli/format_request.h',
+ 'src/core/httpcli/httpcli.h',
+ 'src/core/httpcli/parser.h',
'src/core/iomgr/alarm.h',
'src/core/iomgr/alarm_heap.h',
'src/core/iomgr/alarm_internal.h',
@@ -257,10 +256,7 @@ Pod::Spec.new do |s|
'grpc/grpc.h',
'grpc/status.h',
'grpc/census.h',
- 'src/core/httpcli/format_request.c',
- 'src/core/httpcli/httpcli.c',
'src/core/httpcli/httpcli_security_connector.c',
- 'src/core/httpcli/parser.c',
'src/core/security/base64.c',
'src/core/security/client_auth_filter.c',
'src/core/security/credentials.c',
@@ -307,6 +303,9 @@ Pod::Spec.new do |s|
'src/core/compression/algorithm.c',
'src/core/compression/message_compress.c',
'src/core/debug/trace.c',
+ 'src/core/httpcli/format_request.c',
+ 'src/core/httpcli/httpcli.c',
+ 'src/core/httpcli/parser.c',
'src/core/iomgr/alarm.c',
'src/core/iomgr/alarm_heap.c',
'src/core/iomgr/endpoint.c',
@@ -404,10 +403,6 @@ Pod::Spec.new do |s|
'src/core/support/string.h',
'src/core/support/string_win32.h',
'src/core/support/thd_internal.h',
- 'src/core/httpcli/format_request.h',
- 'src/core/httpcli/httpcli.h',
- 'src/core/httpcli/httpcli_security_connector.h',
- 'src/core/httpcli/parser.h',
'src/core/security/auth_filters.h',
'src/core/security/base64.h',
'src/core/security/credentials.h',
@@ -447,6 +442,9 @@ Pod::Spec.new do |s|
'src/core/client_config/uri_parser.h',
'src/core/compression/message_compress.h',
'src/core/debug/trace.h',
+ 'src/core/httpcli/format_request.h',
+ 'src/core/httpcli/httpcli.h',
+ 'src/core/httpcli/parser.h',
'src/core/iomgr/alarm.h',
'src/core/iomgr/alarm_heap.h',
'src/core/iomgr/alarm_internal.h',
diff --git a/src/core/httpcli/httpcli.c b/src/core/httpcli/httpcli.c
index 65997d5f44..bf5cbfcfba 100644
--- a/src/core/httpcli/httpcli.c
+++ b/src/core/httpcli/httpcli.c
@@ -40,7 +40,6 @@
#include "src/core/iomgr/resolve_address.h"
#include "src/core/iomgr/tcp_client.h"
#include "src/core/httpcli/format_request.h"
-#include "src/core/httpcli/httpcli_security_connector.h"
#include "src/core/httpcli/parser.h"
#include "src/core/security/secure_transport_setup.h"
#include "src/core/support/string.h"
@@ -57,7 +56,7 @@ typedef struct {
char *host;
gpr_timespec deadline;
int have_read_byte;
- int use_ssl;
+ const grpc_httpcli_handshaker *handshaker;
grpc_httpcli_response_cb on_response;
void *user_data;
grpc_httpcli_context *context;
@@ -68,6 +67,16 @@ typedef struct {
static grpc_httpcli_get_override g_get_override = NULL;
static grpc_httpcli_post_override g_post_override = NULL;
+static void plaintext_handshake(void *arg, grpc_endpoint *endpoint,
+ const char *host,
+ void (*on_done)(void *arg,
+ grpc_endpoint *endpoint)) {
+ on_done(arg, endpoint);
+}
+
+const grpc_httpcli_handshaker grpc_httpcli_plaintext = {"http",
+ plaintext_handshake};
+
void grpc_httpcli_context_init(grpc_httpcli_context *context) {
grpc_pollset_set_init(&context->pollset_set);
}
@@ -163,18 +172,16 @@ static void start_write(internal_request *req) {
}
}
-static void on_secure_transport_setup_done(void *rp,
- grpc_security_status status,
- grpc_endpoint *wrapped_endpoint,
- grpc_endpoint *secure_endpoint) {
- internal_request *req = rp;
- if (status != GRPC_SECURITY_OK) {
- gpr_log(GPR_ERROR, "Secure transport setup failed with error %d.", status);
- finish(req, 0);
- } else {
- req->ep = secure_endpoint;
- start_write(req);
+static void on_handshake_done(void *arg, grpc_endpoint *ep) {
+ internal_request *req = arg;
+
+ if (!ep) {
+ next_address(req);
+ return;
}
+
+ req->ep = ep;
+ start_write(req);
}
static void on_connected(void *arg, grpc_endpoint *tcp) {
@@ -184,25 +191,7 @@ static void on_connected(void *arg, grpc_endpoint *tcp) {
next_address(req);
return;
}
- req->ep = tcp;
- if (req->use_ssl) {
- grpc_channel_security_connector *sc = NULL;
- const unsigned char *pem_root_certs = NULL;
- size_t pem_root_certs_size = grpc_get_default_ssl_roots(&pem_root_certs);
- if (pem_root_certs == NULL || pem_root_certs_size == 0) {
- gpr_log(GPR_ERROR, "Could not get default pem root certs.");
- finish(req, 0);
- return;
- }
- GPR_ASSERT(grpc_httpcli_ssl_channel_security_connector_create(
- pem_root_certs, pem_root_certs_size, req->host, &sc) ==
- GRPC_SECURITY_OK);
- grpc_setup_secure_transport(&sc->base, tcp, on_secure_transport_setup_done,
- req);
- GRPC_SECURITY_CONNECTOR_UNREF(&sc->base, "httpcli");
- } else {
- start_write(req);
- }
+ req->handshaker->handshake(req, tcp, req->host, on_handshake_done);
}
static void next_address(internal_request *req) {
@@ -245,18 +234,17 @@ void grpc_httpcli_get(grpc_httpcli_context *context, grpc_pollset *pollset,
req->on_response = on_response;
req->user_data = user_data;
req->deadline = deadline;
- req->use_ssl = request->use_ssl;
+ req->handshaker =
+ request->handshaker ? request->handshaker : &grpc_httpcli_plaintext;
req->context = context;
req->pollset = pollset;
gpr_asprintf(&name, "HTTP:GET:%s:%s", request->host, request->path);
grpc_iomgr_register_object(&req->iomgr_obj, name);
gpr_free(name);
- if (req->use_ssl) {
- req->host = gpr_strdup(request->host);
- }
+ req->host = gpr_strdup(request->host);
grpc_pollset_set_add_pollset(&req->context->pollset_set, req->pollset);
- grpc_resolve_address(request->host, req->use_ssl ? "https" : "http",
+ grpc_resolve_address(request->host, req->handshaker->default_port,
on_resolved, req);
}
@@ -279,18 +267,17 @@ void grpc_httpcli_post(grpc_httpcli_context *context, grpc_pollset *pollset,
req->on_response = on_response;
req->user_data = user_data;
req->deadline = deadline;
- req->use_ssl = request->use_ssl;
+ req->handshaker =
+ request->handshaker ? request->handshaker : &grpc_httpcli_plaintext;
req->context = context;
req->pollset = pollset;
gpr_asprintf(&name, "HTTP:GET:%s:%s", request->host, request->path);
grpc_iomgr_register_object(&req->iomgr_obj, name);
gpr_free(name);
- if (req->use_ssl) {
- req->host = gpr_strdup(request->host);
- }
+ req->host = gpr_strdup(request->host);
grpc_pollset_set_add_pollset(&req->context->pollset_set, req->pollset);
- grpc_resolve_address(request->host, req->use_ssl ? "https" : "http",
+ grpc_resolve_address(request->host, req->handshaker->default_port,
on_resolved, req);
}
diff --git a/src/core/httpcli/httpcli.h b/src/core/httpcli/httpcli.h
index ab98178f8a..c45966714c 100644
--- a/src/core/httpcli/httpcli.h
+++ b/src/core/httpcli/httpcli.h
@@ -38,6 +38,7 @@
#include <grpc/support/time.h>
+#include "src/core/iomgr/endpoint.h"
#include "src/core/iomgr/pollset_set.h"
/* User agent this library reports */
@@ -58,6 +59,15 @@ typedef struct grpc_httpcli_context {
grpc_pollset_set pollset_set;
} grpc_httpcli_context;
+typedef struct {
+ const char *default_port;
+ void (*handshake)(void *arg, grpc_endpoint *endpoint, const char *host,
+ void (*on_done)(void *arg, grpc_endpoint *endpoint));
+} grpc_httpcli_handshaker;
+
+extern const grpc_httpcli_handshaker grpc_httpcli_plaintext;
+extern const grpc_httpcli_handshaker grpc_httpcli_ssl;
+
/* A request */
typedef struct grpc_httpcli_request {
/* The host name to connect to */
@@ -69,8 +79,8 @@ typedef struct grpc_httpcli_request {
Host, Connection, User-Agent */
size_t hdr_count;
grpc_httpcli_header *hdrs;
- /* whether to use ssl for the request */
- int use_ssl;
+ /* handshaker to use ssl for the request */
+ const grpc_httpcli_handshaker *handshaker;
} grpc_httpcli_request;
/* A response */
diff --git a/src/core/httpcli/httpcli_security_connector.c b/src/core/httpcli/httpcli_security_connector.c
index ce0d3d5a70..7887f9d530 100644
--- a/src/core/httpcli/httpcli_security_connector.c
+++ b/src/core/httpcli/httpcli_security_connector.c
@@ -31,7 +31,7 @@
*
*/
-#include "src/core/httpcli/httpcli_security_connector.h"
+#include "src/core/httpcli/httpcli.h"
#include <string.h>
@@ -96,7 +96,7 @@ static grpc_security_status httpcli_ssl_check_peer(grpc_security_connector *sc,
static grpc_security_connector_vtable httpcli_ssl_vtable = {
httpcli_ssl_destroy, httpcli_ssl_create_handshaker, httpcli_ssl_check_peer};
-grpc_security_status grpc_httpcli_ssl_channel_security_connector_create(
+static grpc_security_status httpcli_ssl_channel_security_connector_create(
const unsigned char *pem_root_certs, size_t pem_root_certs_size,
const char *secure_peer_name, grpc_channel_security_connector **sc) {
tsi_result result = TSI_OK;
@@ -130,3 +130,48 @@ grpc_security_status grpc_httpcli_ssl_channel_security_connector_create(
*sc = &c->base;
return GRPC_SECURITY_OK;
}
+
+/* handshaker */
+
+typedef struct {
+ void (*func)(void *arg, grpc_endpoint *endpoint);
+ void *arg;
+} on_done_closure;
+
+static void on_secure_transport_setup_done(void *rp,
+ grpc_security_status status,
+ grpc_endpoint *wrapped_endpoint,
+ grpc_endpoint *secure_endpoint) {
+ on_done_closure *c = rp;
+ if (status != GRPC_SECURITY_OK) {
+ gpr_log(GPR_ERROR, "Secure transport setup failed with error %d.", status);
+ c->func(c->arg, NULL);
+ } else {
+ c->func(c->arg, secure_endpoint);
+ }
+ gpr_free(c);
+}
+
+static void ssl_handshake(void *arg, grpc_endpoint *tcp, const char *host,
+ void (*on_done)(void *arg, grpc_endpoint *endpoint)) {
+ grpc_channel_security_connector *sc = NULL;
+ const unsigned char *pem_root_certs = NULL;
+ on_done_closure *c = gpr_malloc(sizeof(*c));
+ size_t pem_root_certs_size = grpc_get_default_ssl_roots(&pem_root_certs);
+ if (pem_root_certs == NULL || pem_root_certs_size == 0) {
+ gpr_log(GPR_ERROR, "Could not get default pem root certs.");
+ on_done(arg, NULL);
+ gpr_free(c);
+ return;
+ }
+ c->func = on_done;
+ c->arg = arg;
+ GPR_ASSERT(httpcli_ssl_channel_security_connector_create(
+ pem_root_certs, pem_root_certs_size, host, &sc) ==
+ GRPC_SECURITY_OK);
+ grpc_setup_secure_transport(&sc->base, tcp, on_secure_transport_setup_done,
+ c);
+ GRPC_SECURITY_CONNECTOR_UNREF(&sc->base, "httpcli");
+}
+
+const grpc_httpcli_handshaker grpc_httpcli_ssl = {"https", ssl_handshake};
diff --git a/src/core/httpcli/httpcli_security_connector.h b/src/core/httpcli/httpcli_security_connector.h
deleted file mode 100644
index c50f25905e..0000000000
--- a/src/core/httpcli/httpcli_security_connector.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *
- * Copyright 2015, Google Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef GRPC_INTERNAL_CORE_HTTPCLI_HTTPCLI_SECURITY_CONNECTOR_H
-#define GRPC_INTERNAL_CORE_HTTPCLI_HTTPCLI_SECURITY_CONNECTOR_H
-
-#include "src/core/security/security_connector.h"
-
-grpc_security_status grpc_httpcli_ssl_channel_security_connector_create(
- const unsigned char *pem_root_certs, size_t pem_root_certs_size,
- const char *secure_peer_name, grpc_channel_security_connector **sc);
-
-#endif /* GRPC_INTERNAL_CORE_HTTPCLI_HTTPCLI_SECURITY_CONNECTOR_H */
diff --git a/src/core/security/credentials.c b/src/core/security/credentials.c
index 15268cefbe..c45b5c065d 100644
--- a/src/core/security/credentials.c
+++ b/src/core/security/credentials.c
@@ -679,7 +679,7 @@ static void service_account_fetch_oauth2(
request.path = GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH;
request.hdr_count = 1;
request.hdrs = &header;
- request.use_ssl = 1;
+ request.handshaker = &grpc_httpcli_ssl;
grpc_httpcli_post(httpcli_context, pollset, &request, body, strlen(body),
deadline, response_cb, metadata_req);
gpr_free(body);
@@ -738,7 +738,7 @@ static void refresh_token_fetch_oauth2(
request.path = GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH;
request.hdr_count = 1;
request.hdrs = &header;
- request.use_ssl = 1;
+ request.handshaker = &grpc_httpcli_ssl;
grpc_httpcli_post(httpcli_context, pollset, &request, body, strlen(body),
deadline, response_cb, metadata_req);
gpr_free(body);
diff --git a/src/core/security/jwt_verifier.c b/src/core/security/jwt_verifier.c
index 1276693da7..38ad134a6a 100644
--- a/src/core/security/jwt_verifier.c
+++ b/src/core/security/jwt_verifier.c
@@ -628,7 +628,7 @@ static void on_openid_config_retrieved(void *user_data,
goto error;
}
jwks_uri += 8;
- req.use_ssl = 1;
+ req.handshaker = &grpc_httpcli_ssl;
req.host = gpr_strdup(jwks_uri);
req.path = strchr(jwks_uri, '/');
if (req.path == NULL) {
@@ -685,7 +685,7 @@ static void retrieve_key_and_verify(verifier_cb_ctx *ctx) {
const char *iss;
grpc_httpcli_request req;
memset(&req, 0, sizeof(grpc_httpcli_request));
- req.use_ssl = 1;
+ req.handshaker = &grpc_httpcli_ssl;
GPR_ASSERT(ctx != NULL && ctx->header != NULL && ctx->claims != NULL);
iss = ctx->claims->iss;
diff --git a/test/core/httpcli/httpcli_test.c b/test/core/httpcli/httpcli_test.c
index 4801eb3e39..034501ee69 100644
--- a/test/core/httpcli/httpcli_test.c
+++ b/test/core/httpcli/httpcli_test.c
@@ -81,7 +81,7 @@ static void test_get(int use_ssl, int port) {
memset(&req, 0, sizeof(req));
req.host = host;
req.path = "/get";
- req.use_ssl = use_ssl;
+ req.handshaker = use_ssl ? &grpc_httpcli_ssl : &grpc_httpcli_plaintext;
grpc_httpcli_get(&g_context, &g_pollset, &req, n_seconds_time(15), on_finish,
(void *)42);
@@ -106,7 +106,7 @@ static void test_post(int use_ssl, int port) {
memset(&req, 0, sizeof(req));
req.host = host;
req.path = "/post";
- req.use_ssl = use_ssl;
+ req.handshaker = use_ssl ? &grpc_httpcli_ssl : &grpc_httpcli_plaintext;
grpc_httpcli_post(&g_context, &g_pollset, &req, "hello", 5,
n_seconds_time(15), on_finish, (void *)42);
diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c
index dd6e0d7bb3..a0c9445f19 100644
--- a/test/core/security/credentials_test.c
+++ b/test/core/security/credentials_test.c
@@ -477,7 +477,7 @@ static void on_oauth2_creds_get_metadata_failure(
static void validate_compute_engine_http_request(
const grpc_httpcli_request *request) {
- GPR_ASSERT(!request->use_ssl);
+ GPR_ASSERT(request->handshaker != &grpc_httpcli_ssl);
GPR_ASSERT(strcmp(request->host, "metadata") == 0);
GPR_ASSERT(
strcmp(request->path,
@@ -573,7 +573,7 @@ static void validate_refresh_token_http_request(
GPR_ASSERT(strlen(expected_body) == body_size);
GPR_ASSERT(memcmp(expected_body, body, body_size) == 0);
gpr_free(expected_body);
- GPR_ASSERT(request->use_ssl);
+ GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl);
GPR_ASSERT(strcmp(request->host, GRPC_GOOGLE_OAUTH2_SERVICE_HOST) == 0);
GPR_ASSERT(strcmp(request->path, GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH) == 0);
GPR_ASSERT(request->hdr_count == 1);
@@ -697,7 +697,7 @@ static void validate_service_account_http_request(
GPR_ASSERT(strlen(expected_body) == body_size);
GPR_ASSERT(memcmp(expected_body, body, body_size) == 0);
gpr_free(expected_body);
- GPR_ASSERT(request->use_ssl);
+ GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl);
GPR_ASSERT(strcmp(request->host, GRPC_GOOGLE_OAUTH2_SERVICE_HOST) == 0);
GPR_ASSERT(strcmp(request->path, GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH) == 0);
GPR_ASSERT(request->hdr_count == 1);
diff --git a/test/core/security/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c
index 98db56c0ef..440286ea1a 100644
--- a/test/core/security/jwt_verifier_test.c
+++ b/test/core/security/jwt_verifier_test.c
@@ -286,7 +286,7 @@ static int httpcli_get_google_keys_for_email(
const grpc_httpcli_request *request, gpr_timespec deadline,
grpc_httpcli_response_cb on_response, void *user_data) {
grpc_httpcli_response response = http_response(200, good_google_email_keys());
- GPR_ASSERT(request->use_ssl);
+ GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl);
GPR_ASSERT(strcmp(request->host, "www.googleapis.com") == 0);
GPR_ASSERT(strcmp(request->path,
"/robot/v1/metadata/x509/"
@@ -331,7 +331,7 @@ static int httpcli_get_custom_keys_for_email(
const grpc_httpcli_request *request, gpr_timespec deadline,
grpc_httpcli_response_cb on_response, void *user_data) {
grpc_httpcli_response response = http_response(200, gpr_strdup(good_jwk_set));
- GPR_ASSERT(request->use_ssl);
+ GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl);
GPR_ASSERT(strcmp(request->host, "keys.bar.com") == 0);
GPR_ASSERT(strcmp(request->path, "/jwk/foo@bar.com") == 0);
on_response(user_data, &response);
@@ -363,7 +363,7 @@ static int httpcli_get_jwk_set(
const grpc_httpcli_request *request, gpr_timespec deadline,
grpc_httpcli_response_cb on_response, void *user_data) {
grpc_httpcli_response response = http_response(200, gpr_strdup(good_jwk_set));
- GPR_ASSERT(request->use_ssl);
+ GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl);
GPR_ASSERT(strcmp(request->host, "www.googleapis.com") == 0);
GPR_ASSERT(strcmp(request->path, "/oauth2/v3/certs") == 0);
on_response(user_data, &response);
@@ -377,7 +377,7 @@ static int httpcli_get_openid_config(const grpc_httpcli_request *request,
void *user_data) {
grpc_httpcli_response response =
http_response(200, gpr_strdup(good_openid_config));
- GPR_ASSERT(request->use_ssl);
+ GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl);
GPR_ASSERT(strcmp(request->host, "accounts.google.com") == 0);
GPR_ASSERT(strcmp(request->path, GRPC_OPENID_CONFIG_URL_SUFFIX) == 0);
grpc_httpcli_set_override(httpcli_get_jwk_set,
@@ -421,7 +421,7 @@ static int httpcli_get_bad_json(const grpc_httpcli_request *request,
void *user_data) {
grpc_httpcli_response response =
http_response(200, gpr_strdup("{\"bad\": \"stuff\"}"));
- GPR_ASSERT(request->use_ssl);
+ GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl);
on_response(user_data, &response);
gpr_free(response.body);
return 1;
diff --git a/test/core/util/port_posix.c b/test/core/util/port_posix.c
index b07df391f9..715e458262 100644
--- a/test/core/util/port_posix.c
+++ b/test/core/util/port_posix.c
@@ -44,9 +44,13 @@
#include <string.h>
#include <unistd.h>
+#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
+#include "src/core/httpcli/httpcli.h"
+#include "src/core/support/env.h"
+
#define NUM_RANDOM_PORTS_TO_PICK 100
static int *chosen_ports = NULL;
@@ -126,6 +130,59 @@ static int is_port_available(int *port, int is_tcp) {
return 1;
}
+typedef struct portreq {
+ grpc_pollset pollset;
+ int port;
+} portreq;
+
+static void got_port_from_server(void *arg,
+ const grpc_httpcli_response *response) {
+ size_t i;
+ int port = 0;
+ portreq *pr = arg;
+ GPR_ASSERT(response);
+ GPR_ASSERT(response->status == 200);
+ for (i = 0; i < response->body_length; i++) {
+ GPR_ASSERT(response->body[i] >= '0' && response->body[i] <= '9');
+ port = port * 10 + response->body[i] - '0';
+ }
+ GPR_ASSERT(port > 1024);
+ gpr_mu_lock(GRPC_POLLSET_MU(&pr->pollset));
+ pr->port = port;
+ grpc_pollset_kick(&pr->pollset);
+ gpr_mu_unlock(GRPC_POLLSET_MU(&pr->pollset));
+}
+
+static int pick_port_using_server(char *server) {
+ grpc_httpcli_context context;
+ grpc_httpcli_request req;
+ portreq pr;
+
+ grpc_init();
+
+ memset(&pr, 0, sizeof(pr));
+ memset(&req, 0, sizeof(req));
+ grpc_pollset_init(&pr.pollset);
+ pr.port = -1;
+
+ req.host = server;
+ req.path = "/get";
+
+ grpc_httpcli_context_init(&context);
+ grpc_httpcli_get(&context, &pr.pollset, &req,
+ GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), got_port_from_server,
+ &pr);
+ gpr_mu_lock(GRPC_POLLSET_MU(&pr.pollset));
+ while (pr.port == -1) {
+ grpc_pollset_work(&pr.pollset, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1));
+ }
+ gpr_mu_unlock(GRPC_POLLSET_MU(&pr.pollset));
+
+ grpc_shutdown();
+
+ return pr.port;
+}
+
int grpc_pick_unused_port(void) {
/* We repeatedly pick a port and then see whether or not it is
available for use both as a TCP socket and a UDP socket. First, we
@@ -143,6 +200,15 @@ int grpc_pick_unused_port(void) {
int is_tcp = 1;
int try = 0;
+ char *env = gpr_getenv("GRPC_TEST_PORT_SERVER");
+ if (env) {
+ int port = pick_port_using_server(env);
+ gpr_free(env);
+ if (port != 0) {
+ return port;
+ }
+ }
+
for (;;) {
int port;
try++;
diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal
index cce0b6fed0..abe1f72d36 100644
--- a/tools/doxygen/Doxyfile.core.internal
+++ b/tools/doxygen/Doxyfile.core.internal
@@ -767,10 +767,6 @@ include/grpc/compression.h \
include/grpc/grpc.h \
include/grpc/status.h \
include/grpc/census.h \
-src/core/httpcli/format_request.h \
-src/core/httpcli/httpcli.h \
-src/core/httpcli/httpcli_security_connector.h \
-src/core/httpcli/parser.h \
src/core/security/auth_filters.h \
src/core/security/base64.h \
src/core/security/credentials.h \
@@ -810,6 +806,9 @@ src/core/client_config/subchannel_factory_decorators/merge_channel_args.h \
src/core/client_config/uri_parser.h \
src/core/compression/message_compress.h \
src/core/debug/trace.h \
+src/core/httpcli/format_request.h \
+src/core/httpcli/httpcli.h \
+src/core/httpcli/parser.h \
src/core/iomgr/alarm.h \
src/core/iomgr/alarm_heap.h \
src/core/iomgr/alarm_internal.h \
@@ -883,10 +882,7 @@ src/core/transport/transport.h \
src/core/transport/transport_impl.h \
src/core/census/context.h \
src/core/census/rpc_stat_id.h \
-src/core/httpcli/format_request.c \
-src/core/httpcli/httpcli.c \
src/core/httpcli/httpcli_security_connector.c \
-src/core/httpcli/parser.c \
src/core/security/base64.c \
src/core/security/client_auth_filter.c \
src/core/security/credentials.c \
@@ -933,6 +929,9 @@ src/core/client_config/uri_parser.c \
src/core/compression/algorithm.c \
src/core/compression/message_compress.c \
src/core/debug/trace.c \
+src/core/httpcli/format_request.c \
+src/core/httpcli/httpcli.c \
+src/core/httpcli/parser.c \
src/core/iomgr/alarm.c \
src/core/iomgr/alarm_heap.c \
src/core/iomgr/endpoint.c \
diff --git a/tools/run_tests/jobset.py b/tools/run_tests/jobset.py
index ec25b47610..0318e357b8 100755
--- a/tools/run_tests/jobset.py
+++ b/tools/run_tests/jobset.py
@@ -162,13 +162,15 @@ class JobSpec(object):
class Job(object):
"""Manages one job."""
- def __init__(self, spec, bin_hash, newline_on_success, travis, xml_report):
+ def __init__(self, spec, bin_hash, newline_on_success, travis, add_env, xml_report):
self._spec = spec
self._bin_hash = bin_hash
self._tempfile = tempfile.TemporaryFile()
env = os.environ.copy()
for k, v in spec.environ.iteritems():
env[k] = v
+ for k, v in add_env.iteritems():
+ env[k] = v
self._start = time.time()
self._process = subprocess.Popen(args=spec.cmdline,
stderr=subprocess.STDOUT,
@@ -227,7 +229,7 @@ class Jobset(object):
"""Manages one run of jobs."""
def __init__(self, check_cancelled, maxjobs, newline_on_success, travis,
- stop_on_failure, cache, xml_report):
+ stop_on_failure, add_env, cache, xml_report):
self._running = set()
self._check_cancelled = check_cancelled
self._cancelled = False
@@ -240,6 +242,7 @@ class Jobset(object):
self._stop_on_failure = stop_on_failure
self._hashes = {}
self._xml_report = xml_report
+ self._add_env = add_env
def start(self, spec):
"""Start a job. Return True on success, False on failure."""
@@ -262,16 +265,12 @@ class Jobset(object):
bin_hash = None
should_run = True
if should_run:
- try:
- self._running.add(Job(spec,
- bin_hash,
- self._newline_on_success,
- self._travis,
- self._xml_report))
- except:
- message('FAILED', spec.shortname)
- self._cancelled = True
- return False
+ self._running.add(Job(spec,
+ bin_hash,
+ self._newline_on_success,
+ self._travis,
+ self._add_env,
+ self._xml_report))
return True
def reap(self):
@@ -342,10 +341,11 @@ def run(cmdlines,
infinite_runs=False,
stop_on_failure=False,
cache=None,
- xml_report=None):
+ xml_report=None,
+ add_env={}):
js = Jobset(check_cancelled,
maxjobs if maxjobs is not None else _DEFAULT_MAX_JOBS,
- newline_on_success, travis, stop_on_failure,
+ newline_on_success, travis, stop_on_failure, add_env,
cache if cache is not None else NoCache(),
xml_report)
for cmdline in cmdlines:
diff --git a/tools/run_tests/port_server.py b/tools/run_tests/port_server.py
new file mode 100755
index 0000000000..41f862ad88
--- /dev/null
+++ b/tools/run_tests/port_server.py
@@ -0,0 +1,105 @@
+#!/usr/bin/env python
+# Copyright 2015, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""Manage TCP ports for unit tests; started by run_tests.py"""
+
+import argparse
+import BaseHTTPServer
+import hashlib
+import os
+import socket
+import sys
+import time
+
+argp = argparse.ArgumentParser(description='Server for httpcli_test')
+argp.add_argument('-p', '--port', default=12345, type=int)
+args = argp.parse_args()
+
+print 'port server running on port %d' % args.port
+
+pool = []
+in_use = {}
+
+with open(sys.argv[0]) as f:
+ _MY_VERSION = hashlib.sha1(f.read()).hexdigest()
+
+
+def refill_pool():
+ """Scan for ports not marked for being in use"""
+ for i in range(10000, 65000):
+ if len(pool) > 100: break
+ if i in in_use:
+ age = time.time() - in_use[i]
+ if age < 600:
+ continue
+ del in_use[i]
+ s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ try:
+ s.bind(('localhost', i))
+ pool.append(i)
+ except:
+ pass # we really don't care about failures
+ finally:
+ s.close()
+
+
+def allocate_port():
+ global pool
+ global in_use
+ if not pool:
+ refill_pool()
+ port = pool[0]
+ pool = pool[1:]
+ in_use[port] = time.time()
+ return port
+
+
+class Handler(BaseHTTPServer.BaseHTTPRequestHandler):
+
+ def do_GET(self):
+ if self.path == '/get':
+ # allocate a new port, it will stay bound for ten minutes and until
+ # it's unused
+ self.send_response(200)
+ self.send_header('Content-Type', 'text/plain')
+ self.end_headers()
+ p = allocate_port()
+ self.log_message('allocated port %d' % p)
+ self.wfile.write('%d' % p)
+ elif self.path == '/version_and_pid':
+ # fetch a version string and the current process pid
+ self.send_response(200)
+ self.send_header('Content-Type', 'text/plain')
+ self.end_headers()
+ self.wfile.write('%s+%d' % (_MY_VERSION, os.getpid()))
+
+
+BaseHTTPServer.HTTPServer(('', args.port), Handler).serve_forever()
+
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index fa749498d2..653b98d57d 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -32,17 +32,20 @@
import argparse
import glob
+import hashlib
import itertools
import json
import multiprocessing
import os
import platform
+import psutil
import random
import re
import subprocess
import sys
import time
import xml.etree.cElementTree as ET
+import urllib2
import jobset
import watch_dirs
@@ -522,7 +525,43 @@ class TestCache(object):
self.parse(json.loads(f.read()))
-def _build_and_run(check_cancelled, newline_on_success, travis, cache, xml_report=None):
+def _start_port_server(port_server_port):
+ # check if a compatible port server is running
+ # if incompatible (version mismatch) ==> start a new one
+ # if not running ==> start a new one
+ # otherwise, leave it up
+ try:
+ version, _, pid = urllib2.urlopen(
+ 'http://localhost:%d/version_and_pid' % port_server_port).read().partition('+')
+ running = True
+ except Exception:
+ running = False
+ if running:
+ with open('tools/run_tests/port_server.py') as f:
+ current_version = hashlib.sha1(f.read()).hexdigest()
+ running = (version == current_version)
+ if not running:
+ psutil.Process(int(pid)).terminate()
+ if not running:
+ port_log = open('portlog.txt', 'w')
+ port_server = subprocess.Popen(
+ ['tools/run_tests/port_server.py', '-p', '%d' % port_server_port],
+ stderr=subprocess.STDOUT,
+ stdout=port_log)
+ # ensure port server is up
+ while True:
+ try:
+ urllib2.urlopen('http://localhost:%d/get' % port_server_port).read()
+ break
+ except urllib2.URLError:
+ time.sleep(0.5)
+ except:
+ port_server.kill()
+ raise
+
+
+def _build_and_run(
+ check_cancelled, newline_on_success, travis, cache, xml_report=None):
"""Do one pass of building & running tests."""
# build latest sequentially
if not jobset.run(build_steps, maxjobs=1,
@@ -532,6 +571,8 @@ def _build_and_run(check_cancelled, newline_on_success, travis, cache, xml_repor
# start antagonists
antagonists = [subprocess.Popen(['tools/run_tests/antagonist.py'])
for _ in range(0, args.antagonists)]
+ port_server_port = 9999
+ _start_port_server(port_server_port)
try:
infinite_runs = runs_per_test == 0
# When running on travis, we want out test runs to be as similar as possible
@@ -558,7 +599,8 @@ def _build_and_run(check_cancelled, newline_on_success, travis, cache, xml_repor
maxjobs=args.jobs,
stop_on_failure=args.stop_on_failure,
cache=cache if not xml_report else None,
- xml_report=testsuite):
+ xml_report=testsuite,
+ add_env={'GRPC_TEST_PORT_SERVER': 'localhost:%d' % port_server_port}):
return 2
finally:
for antagonist in antagonists:
diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json
index d2cf07f197..a8bc1a615c 100644
--- a/tools/run_tests/sources_and_headers.json
+++ b/tools/run_tests/sources_and_headers.json
@@ -10955,7 +10955,6 @@
"src/core/debug/trace.h",
"src/core/httpcli/format_request.h",
"src/core/httpcli/httpcli.h",
- "src/core/httpcli/httpcli_security_connector.h",
"src/core/httpcli/parser.h",
"src/core/iomgr/alarm.h",
"src/core/iomgr/alarm_heap.h",
@@ -11114,7 +11113,6 @@
"src/core/httpcli/httpcli.c",
"src/core/httpcli/httpcli.h",
"src/core/httpcli/httpcli_security_connector.c",
- "src/core/httpcli/httpcli_security_connector.h",
"src/core/httpcli/parser.c",
"src/core/httpcli/parser.h",
"src/core/iomgr/alarm.c",
@@ -11423,6 +11421,9 @@
"src/core/client_config/uri_parser.h",
"src/core/compression/message_compress.h",
"src/core/debug/trace.h",
+ "src/core/httpcli/format_request.h",
+ "src/core/httpcli/httpcli.h",
+ "src/core/httpcli/parser.h",
"src/core/iomgr/alarm.h",
"src/core/iomgr/alarm_heap.h",
"src/core/iomgr/alarm_internal.h",
@@ -11561,6 +11562,12 @@
"src/core/compression/message_compress.h",
"src/core/debug/trace.c",
"src/core/debug/trace.h",
+ "src/core/httpcli/format_request.c",
+ "src/core/httpcli/format_request.h",
+ "src/core/httpcli/httpcli.c",
+ "src/core/httpcli/httpcli.h",
+ "src/core/httpcli/parser.c",
+ "src/core/httpcli/parser.h",
"src/core/iomgr/alarm.c",
"src/core/iomgr/alarm.h",
"src/core/iomgr/alarm_heap.c",
diff --git a/vsprojects/grpc/grpc.vcxproj b/vsprojects/grpc/grpc.vcxproj
index 4f28ed922e..a698612606 100644
--- a/vsprojects/grpc/grpc.vcxproj
+++ b/vsprojects/grpc/grpc.vcxproj
@@ -229,10 +229,6 @@
<ClInclude Include="..\..\include\grpc\census.h" />
</ItemGroup>
<ItemGroup>
- <ClInclude Include="..\..\src\core\httpcli\format_request.h" />
- <ClInclude Include="..\..\src\core\httpcli\httpcli.h" />
- <ClInclude Include="..\..\src\core\httpcli\httpcli_security_connector.h" />
- <ClInclude Include="..\..\src\core\httpcli\parser.h" />
<ClInclude Include="..\..\src\core\security\auth_filters.h" />
<ClInclude Include="..\..\src\core\security\base64.h" />
<ClInclude Include="..\..\src\core\security\credentials.h" />
@@ -272,6 +268,9 @@
<ClInclude Include="..\..\src\core\client_config\uri_parser.h" />
<ClInclude Include="..\..\src\core\compression\message_compress.h" />
<ClInclude Include="..\..\src\core\debug\trace.h" />
+ <ClInclude Include="..\..\src\core\httpcli\format_request.h" />
+ <ClInclude Include="..\..\src\core\httpcli\httpcli.h" />
+ <ClInclude Include="..\..\src\core\httpcli\parser.h" />
<ClInclude Include="..\..\src\core\iomgr\alarm.h" />
<ClInclude Include="..\..\src\core\iomgr\alarm_heap.h" />
<ClInclude Include="..\..\src\core\iomgr\alarm_internal.h" />
@@ -347,14 +346,8 @@
<ClInclude Include="..\..\src\core\census\rpc_stat_id.h" />
</ItemGroup>
<ItemGroup>
- <ClCompile Include="..\..\src\core\httpcli\format_request.c">
- </ClCompile>
- <ClCompile Include="..\..\src\core\httpcli\httpcli.c">
- </ClCompile>
<ClCompile Include="..\..\src\core\httpcli\httpcli_security_connector.c">
</ClCompile>
- <ClCompile Include="..\..\src\core\httpcli\parser.c">
- </ClCompile>
<ClCompile Include="..\..\src\core\security\base64.c">
</ClCompile>
<ClCompile Include="..\..\src\core\security\client_auth_filter.c">
@@ -447,6 +440,12 @@
</ClCompile>
<ClCompile Include="..\..\src\core\debug\trace.c">
</ClCompile>
+ <ClCompile Include="..\..\src\core\httpcli\format_request.c">
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\httpcli\httpcli.c">
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\httpcli\parser.c">
+ </ClCompile>
<ClCompile Include="..\..\src\core\iomgr\alarm.c">
</ClCompile>
<ClCompile Include="..\..\src\core\iomgr\alarm_heap.c">
diff --git a/vsprojects/grpc/grpc.vcxproj.filters b/vsprojects/grpc/grpc.vcxproj.filters
index 2f2c5936d1..d87fef9250 100644
--- a/vsprojects/grpc/grpc.vcxproj.filters
+++ b/vsprojects/grpc/grpc.vcxproj.filters
@@ -1,18 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
- <ClCompile Include="..\..\src\core\httpcli\format_request.c">
- <Filter>src\core\httpcli</Filter>
- </ClCompile>
- <ClCompile Include="..\..\src\core\httpcli\httpcli.c">
- <Filter>src\core\httpcli</Filter>
- </ClCompile>
<ClCompile Include="..\..\src\core\httpcli\httpcli_security_connector.c">
<Filter>src\core\httpcli</Filter>
</ClCompile>
- <ClCompile Include="..\..\src\core\httpcli\parser.c">
- <Filter>src\core\httpcli</Filter>
- </ClCompile>
<ClCompile Include="..\..\src\core\security\base64.c">
<Filter>src\core\security</Filter>
</ClCompile>
@@ -151,6 +142,15 @@
<ClCompile Include="..\..\src\core\debug\trace.c">
<Filter>src\core\debug</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\core\httpcli\format_request.c">
+ <Filter>src\core\httpcli</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\httpcli\httpcli.c">
+ <Filter>src\core\httpcli</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\httpcli\parser.c">
+ <Filter>src\core\httpcli</Filter>
+ </ClCompile>
<ClCompile Include="..\..\src\core\iomgr\alarm.c">
<Filter>src\core\iomgr</Filter>
</ClCompile>
@@ -443,18 +443,6 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
- <ClInclude Include="..\..\src\core\httpcli\format_request.h">
- <Filter>src\core\httpcli</Filter>
- </ClInclude>
- <ClInclude Include="..\..\src\core\httpcli\httpcli.h">
- <Filter>src\core\httpcli</Filter>
- </ClInclude>
- <ClInclude Include="..\..\src\core\httpcli\httpcli_security_connector.h">
- <Filter>src\core\httpcli</Filter>
- </ClInclude>
- <ClInclude Include="..\..\src\core\httpcli\parser.h">
- <Filter>src\core\httpcli</Filter>
- </ClInclude>
<ClInclude Include="..\..\src\core\security\auth_filters.h">
<Filter>src\core\security</Filter>
</ClInclude>
@@ -572,6 +560,15 @@
<ClInclude Include="..\..\src\core\debug\trace.h">
<Filter>src\core\debug</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\core\httpcli\format_request.h">
+ <Filter>src\core\httpcli</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\httpcli\httpcli.h">
+ <Filter>src\core\httpcli</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\httpcli\parser.h">
+ <Filter>src\core\httpcli</Filter>
+ </ClInclude>
<ClInclude Include="..\..\src\core\iomgr\alarm.h">
<Filter>src\core\iomgr</Filter>
</ClInclude>
diff --git a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj
index 004858d070..2be0d1792b 100644
--- a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj
+++ b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj
@@ -251,6 +251,9 @@
<ClInclude Include="..\..\src\core\client_config\uri_parser.h" />
<ClInclude Include="..\..\src\core\compression\message_compress.h" />
<ClInclude Include="..\..\src\core\debug\trace.h" />
+ <ClInclude Include="..\..\src\core\httpcli\format_request.h" />
+ <ClInclude Include="..\..\src\core\httpcli\httpcli.h" />
+ <ClInclude Include="..\..\src\core\httpcli\parser.h" />
<ClInclude Include="..\..\src\core\iomgr\alarm.h" />
<ClInclude Include="..\..\src\core\iomgr\alarm_heap.h" />
<ClInclude Include="..\..\src\core\iomgr\alarm_internal.h" />
@@ -380,6 +383,12 @@
</ClCompile>
<ClCompile Include="..\..\src\core\debug\trace.c">
</ClCompile>
+ <ClCompile Include="..\..\src\core\httpcli\format_request.c">
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\httpcli\httpcli.c">
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\httpcli\parser.c">
+ </ClCompile>
<ClCompile Include="..\..\src\core\iomgr\alarm.c">
</ClCompile>
<ClCompile Include="..\..\src\core\iomgr\alarm_heap.c">
diff --git a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters
index b0c62b07c3..03b4fb5bd9 100644
--- a/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters
+++ b/vsprojects/grpc_unsecure/grpc_unsecure.vcxproj.filters
@@ -82,6 +82,15 @@
<ClCompile Include="..\..\src\core\debug\trace.c">
<Filter>src\core\debug</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\core\httpcli\format_request.c">
+ <Filter>src\core\httpcli</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\httpcli\httpcli.c">
+ <Filter>src\core\httpcli</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\src\core\httpcli\parser.c">
+ <Filter>src\core\httpcli</Filter>
+ </ClCompile>
<ClCompile Include="..\..\src\core\iomgr\alarm.c">
<Filter>src\core\iomgr</Filter>
</ClCompile>
@@ -449,6 +458,15 @@
<ClInclude Include="..\..\src\core\debug\trace.h">
<Filter>src\core\debug</Filter>
</ClInclude>
+ <ClInclude Include="..\..\src\core\httpcli\format_request.h">
+ <Filter>src\core\httpcli</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\httpcli\httpcli.h">
+ <Filter>src\core\httpcli</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\src\core\httpcli\parser.h">
+ <Filter>src\core\httpcli</Filter>
+ </ClInclude>
<ClInclude Include="..\..\src\core\iomgr\alarm.h">
<Filter>src\core\iomgr</Filter>
</ClInclude>
@@ -707,6 +725,9 @@
<Filter Include="src\core\debug">
<UniqueIdentifier>{6d8d5774-7291-554d-fafa-583463cd3fd9}</UniqueIdentifier>
</Filter>
+ <Filter Include="src\core\httpcli">
+ <UniqueIdentifier>{1ba3a245-47e7-89b5-b0c9-aca758bd0277}</UniqueIdentifier>
+ </Filter>
<Filter Include="src\core\iomgr">
<UniqueIdentifier>{a9df8b24-ecea-ff6d-8999-d8fa54cd70bf}</UniqueIdentifier>
</Filter>