Merge pull request #6320 from markdroth/limit_metadata_size

Add support for max metadata size.
pull/6513/head
Jan Tattermusch 9 years ago
commit cfbe02075a
  1. 24
      Makefile
  2. 2
      include/grpc/impl/codegen/grpc_types.h
  3. 5
      include/grpc/impl/codegen/slice_buffer.h
  4. 150
      src/core/ext/transport/chttp2/transport/chttp2_transport.c
  5. 5
      src/core/ext/transport/chttp2/transport/frame_rst_stream.c
  6. 1
      src/core/ext/transport/chttp2/transport/incoming_metadata.c
  7. 1
      src/core/ext/transport/chttp2/transport/incoming_metadata.h
  8. 19
      src/core/ext/transport/chttp2/transport/internal.h
  9. 58
      src/core/ext/transport/chttp2/transport/parsing.c
  10. 4
      src/core/lib/iomgr/tcp_posix.c
  11. 4
      src/core/lib/transport/metadata.h
  12. 9
      src/core/lib/transport/metadata_batch.c
  13. 3
      src/core/lib/transport/metadata_batch.h
  14. 40
      test/core/bad_client/bad_client.c
  15. 18
      test/core/bad_client/bad_client.h
  16. 3
      test/core/bad_client/gen_build_yaml.py
  17. 10
      test/core/bad_client/tests/badreq.c
  18. 49
      test/core/bad_client/tests/connection_prefix.c
  19. 2
      test/core/bad_client/tests/head_of_line_blocking.c
  20. 120
      test/core/bad_client/tests/headers.c
  21. 54
      test/core/bad_client/tests/initial_settings_frame.c
  22. 489
      test/core/bad_client/tests/large_metadata.c
  23. 106
      test/core/bad_client/tests/large_metadata.headers
  24. 22
      test/core/bad_client/tests/server_registered_method.c
  25. 24
      test/core/bad_client/tests/simple_request.c
  26. 2
      test/core/bad_client/tests/unknown_frame.c
  27. 2
      test/core/bad_client/tests/window_overflow.c
  28. 12
      test/core/end2end/fixtures/h2_proxy.c
  29. 19
      test/core/end2end/fixtures/h2_ssl_proxy.c
  30. 9
      test/core/end2end/fixtures/proxy.c
  31. 11
      test/core/end2end/fixtures/proxy.h
  32. 15
      test/core/end2end/tests/large_metadata.c
  33. 5
      test/core/end2end/tests/max_message_length.c
  34. 7
      tools/codegen/core/gen_header_frame.py
  35. 17
      tools/run_tests/sources_and_headers.json
  36. 21
      tools/run_tests/tests.json
  37. 28
      vsprojects/buildtests_c.sln
  38. 202
      vsprojects/vcxproj/test/large_metadata_bad_client_test/large_metadata_bad_client_test.vcxproj
  39. 24
      vsprojects/vcxproj/test/large_metadata_bad_client_test/large_metadata_bad_client_test.vcxproj.filters

@ -1089,6 +1089,7 @@ connection_prefix_bad_client_test: $(BINDIR)/$(CONFIG)/connection_prefix_bad_cli
head_of_line_blocking_bad_client_test: $(BINDIR)/$(CONFIG)/head_of_line_blocking_bad_client_test
headers_bad_client_test: $(BINDIR)/$(CONFIG)/headers_bad_client_test
initial_settings_frame_bad_client_test: $(BINDIR)/$(CONFIG)/initial_settings_frame_bad_client_test
large_metadata_bad_client_test: $(BINDIR)/$(CONFIG)/large_metadata_bad_client_test
server_registered_method_bad_client_test: $(BINDIR)/$(CONFIG)/server_registered_method_bad_client_test
simple_request_bad_client_test: $(BINDIR)/$(CONFIG)/simple_request_bad_client_test
unknown_frame_bad_client_test: $(BINDIR)/$(CONFIG)/unknown_frame_bad_client_test
@ -1318,6 +1319,7 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/head_of_line_blocking_bad_client_test \
$(BINDIR)/$(CONFIG)/headers_bad_client_test \
$(BINDIR)/$(CONFIG)/initial_settings_frame_bad_client_test \
$(BINDIR)/$(CONFIG)/large_metadata_bad_client_test \
$(BINDIR)/$(CONFIG)/server_registered_method_bad_client_test \
$(BINDIR)/$(CONFIG)/simple_request_bad_client_test \
$(BINDIR)/$(CONFIG)/unknown_frame_bad_client_test \
@ -1656,6 +1658,8 @@ test_c: buildtests_c
$(Q) $(BINDIR)/$(CONFIG)/headers_bad_client_test || ( echo test headers_bad_client_test failed ; exit 1 )
$(E) "[RUN] Testing initial_settings_frame_bad_client_test"
$(Q) $(BINDIR)/$(CONFIG)/initial_settings_frame_bad_client_test || ( echo test initial_settings_frame_bad_client_test failed ; exit 1 )
$(E) "[RUN] Testing large_metadata_bad_client_test"
$(Q) $(BINDIR)/$(CONFIG)/large_metadata_bad_client_test || ( echo test large_metadata_bad_client_test failed ; exit 1 )
$(E) "[RUN] Testing server_registered_method_bad_client_test"
$(Q) $(BINDIR)/$(CONFIG)/server_registered_method_bad_client_test || ( echo test server_registered_method_bad_client_test failed ; exit 1 )
$(E) "[RUN] Testing simple_request_bad_client_test"
@ -13104,6 +13108,26 @@ ifneq ($(NO_DEPS),true)
endif
LARGE_METADATA_BAD_CLIENT_TEST_SRC = \
test/core/bad_client/tests/large_metadata.c \
LARGE_METADATA_BAD_CLIENT_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LARGE_METADATA_BAD_CLIENT_TEST_SRC))))
$(BINDIR)/$(CONFIG)/large_metadata_bad_client_test: $(LARGE_METADATA_BAD_CLIENT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(LD) $(LDFLAGS) $(LARGE_METADATA_BAD_CLIENT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/large_metadata_bad_client_test
$(OBJDIR)/$(CONFIG)/test/core/bad_client/tests/large_metadata.o: $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
deps_large_metadata_bad_client_test: $(LARGE_METADATA_BAD_CLIENT_TEST_OBJS:.o=.dep)
ifneq ($(NO_DEPS),true)
-include $(LARGE_METADATA_BAD_CLIENT_TEST_OBJS:.o=.dep)
endif
SERVER_REGISTERED_METHOD_BAD_CLIENT_TEST_SRC = \
test/core/bad_client/tests/server_registered_method.c \

@ -152,6 +152,8 @@ typedef struct {
channel). If this parameter is specified and the underlying is not an SSL
channel, it will just be ignored. */
#define GRPC_SSL_TARGET_NAME_OVERRIDE_ARG "grpc.ssl_target_name_override"
/* Maximum metadata size */
#define GRPC_ARG_MAX_METADATA_SIZE "grpc.max_metadata_size"
/** Result of a grpc call. If the caller satisfies the prerequisites of a
particular operation, the grpc_call_error returned will be GRPC_CALL_OK.

@ -42,9 +42,8 @@ extern "C" {
#define GRPC_SLICE_BUFFER_INLINE_ELEMENTS 8
/* Represents an expandable array of slices, to be interpreted as a single item
TODO(ctiller): inline some small number of elements into the struct, to
avoid per-call allocations */
/* Represents an expandable array of slices, to be interpreted as a
single item. */
typedef struct {
/* slices in the array */
gpr_slice *slices;

@ -56,6 +56,8 @@
#define DEFAULT_CONNECTION_WINDOW_TARGET (1024 * 1024)
#define MAX_WINDOW 0x7fffffffu
#define DEFAULT_MAX_HEADER_LIST_SIZE (16 * 1024)
#define MAX_CLIENT_STREAM_ID 0x7fffffffu
int grpc_http_trace = 0;
@ -65,8 +67,8 @@ int grpc_flowctl_trace = 0;
((grpc_chttp2_transport *)((char *)(tw)-offsetof(grpc_chttp2_transport, \
writing)))
#define TRANSPORT_FROM_PARSING(tw) \
((grpc_chttp2_transport *)((char *)(tw)-offsetof(grpc_chttp2_transport, \
#define TRANSPORT_FROM_PARSING(tp) \
((grpc_chttp2_transport *)((char *)(tp)-offsetof(grpc_chttp2_transport, \
parsing)))
#define TRANSPORT_FROM_GLOBAL(tg) \
@ -311,6 +313,8 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
push_setting(t, GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS, 0);
}
push_setting(t, GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE, DEFAULT_WINDOW);
push_setting(t, GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE,
DEFAULT_MAX_HEADER_LIST_SIZE);
if (channel_args) {
for (i = 0; i < channel_args->num_args; i++) {
@ -378,6 +382,18 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
&t->writing.hpack_compressor,
(uint32_t)channel_args->args[i].value.integer);
}
} else if (0 == strcmp(channel_args->args[i].key,
GRPC_ARG_MAX_METADATA_SIZE)) {
if (channel_args->args[i].type != GRPC_ARG_INTEGER) {
gpr_log(GPR_ERROR, "%s: must be an integer",
GRPC_ARG_MAX_METADATA_SIZE);
} else if (channel_args->args[i].value.integer < 0) {
gpr_log(GPR_ERROR, "%s: must be non-negative",
GRPC_ARG_MAX_METADATA_SIZE);
} else {
push_setting(t, GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE,
(uint32_t)channel_args->args[i].value.integer);
}
}
}
}
@ -510,7 +526,7 @@ static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt,
[GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE];
*t->accepting_stream = s;
grpc_chttp2_stream_map_add(&t->parsing_stream_map, s->global.id, s);
s->global.in_stream_map = 1;
s->global.in_stream_map = true;
}
grpc_chttp2_run_with_global_lock(exec_ctx, t, s, finish_init_stream_locked,
@ -834,7 +850,7 @@ static void maybe_start_some_streams(
grpc_chttp2_stream_map_add(
&TRANSPORT_FROM_GLOBAL(transport_global)->new_stream_map,
stream_global->id, STREAM_FROM_GLOBAL(stream_global));
stream_global->in_stream_map = 1;
stream_global->in_stream_map = true;
transport_global->concurrent_stream_count++;
grpc_chttp2_become_writable(transport_global, stream_global);
}
@ -933,24 +949,38 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx,
stream_global->send_initial_metadata_finished =
add_closure_barrier(on_complete);
stream_global->send_initial_metadata = op->send_initial_metadata;
if (contains_non_ok_status(transport_global, op->send_initial_metadata)) {
stream_global->seen_error = 1;
grpc_chttp2_list_add_check_read_ops(transport_global, stream_global);
}
if (!stream_global->write_closed) {
if (transport_global->is_client) {
GPR_ASSERT(stream_global->id == 0);
grpc_chttp2_list_add_waiting_for_concurrency(transport_global,
stream_global);
maybe_start_some_streams(exec_ctx, transport_global);
const size_t metadata_size =
grpc_metadata_batch_size(op->send_initial_metadata);
const size_t metadata_peer_limit =
transport_global->settings[GRPC_PEER_SETTINGS]
[GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE];
if (metadata_size > metadata_peer_limit) {
gpr_log(GPR_DEBUG,
"to-be-sent initial metadata size exceeds peer limit "
"(%lu vs. %lu)",
metadata_size, metadata_peer_limit);
cancel_from_api(exec_ctx, transport_global, stream_global,
GRPC_STATUS_RESOURCE_EXHAUSTED);
} else {
if (contains_non_ok_status(transport_global, op->send_initial_metadata)) {
stream_global->seen_error = true;
grpc_chttp2_list_add_check_read_ops(transport_global, stream_global);
}
if (!stream_global->write_closed) {
if (transport_global->is_client) {
GPR_ASSERT(stream_global->id == 0);
grpc_chttp2_list_add_waiting_for_concurrency(transport_global,
stream_global);
maybe_start_some_streams(exec_ctx, transport_global);
} else {
GPR_ASSERT(stream_global->id != 0);
grpc_chttp2_become_writable(transport_global, stream_global);
}
} else {
GPR_ASSERT(stream_global->id != 0);
grpc_chttp2_become_writable(transport_global, stream_global);
grpc_chttp2_complete_closure_step(
exec_ctx, stream_global,
&stream_global->send_initial_metadata_finished, 0);
}
} else {
grpc_chttp2_complete_closure_step(
exec_ctx, stream_global,
&stream_global->send_initial_metadata_finished, 0);
}
}
@ -974,19 +1004,34 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx,
stream_global->send_trailing_metadata_finished =
add_closure_barrier(on_complete);
stream_global->send_trailing_metadata = op->send_trailing_metadata;
if (contains_non_ok_status(transport_global, op->send_trailing_metadata)) {
stream_global->seen_error = 1;
grpc_chttp2_list_add_check_read_ops(transport_global, stream_global);
}
if (stream_global->write_closed) {
grpc_chttp2_complete_closure_step(
exec_ctx, stream_global,
&stream_global->send_trailing_metadata_finished,
grpc_metadata_batch_is_empty(op->send_trailing_metadata));
} else if (stream_global->id != 0) {
/* TODO(ctiller): check if there's flow control for any outstanding
bytes before going writable */
grpc_chttp2_become_writable(transport_global, stream_global);
const size_t metadata_size =
grpc_metadata_batch_size(op->send_trailing_metadata);
const size_t metadata_peer_limit =
transport_global->settings[GRPC_PEER_SETTINGS]
[GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE];
if (metadata_size > metadata_peer_limit) {
gpr_log(GPR_DEBUG,
"to-be-sent trailing metadata size exceeds peer limit "
"(%lu vs. %lu)",
metadata_size, metadata_peer_limit);
cancel_from_api(exec_ctx, transport_global, stream_global,
GRPC_STATUS_RESOURCE_EXHAUSTED);
} else {
if (contains_non_ok_status(transport_global,
op->send_trailing_metadata)) {
stream_global->seen_error = true;
grpc_chttp2_list_add_check_read_ops(transport_global, stream_global);
}
if (stream_global->write_closed) {
grpc_chttp2_complete_closure_step(
exec_ctx, stream_global,
&stream_global->send_trailing_metadata_finished,
grpc_metadata_batch_is_empty(op->send_trailing_metadata));
} else if (stream_global->id != 0) {
/* TODO(ctiller): check if there's flow control for any outstanding
bytes before going writable */
grpc_chttp2_become_writable(transport_global, stream_global);
}
}
}
@ -1149,6 +1194,16 @@ static void check_read_ops(grpc_exec_ctx *exec_ctx,
grpc_chttp2_list_pop_check_read_ops(transport_global, &stream_global)) {
if (stream_global->recv_initial_metadata_ready != NULL &&
stream_global->published_initial_metadata) {
if (stream_global->seen_error) {
while ((bs = grpc_chttp2_incoming_frame_queue_pop(
&stream_global->incoming_frames)) != NULL) {
incoming_byte_stream_destroy_locked(exec_ctx, NULL, NULL, bs);
}
if (stream_global->exceeded_metadata_size) {
cancel_from_api(exec_ctx, transport_global, stream_global,
GRPC_STATUS_RESOURCE_EXHAUSTED);
}
}
grpc_chttp2_incoming_metadata_buffer_publish(
&stream_global->received_initial_metadata,
stream_global->recv_initial_metadata);
@ -1178,10 +1233,15 @@ static void check_read_ops(grpc_exec_ctx *exec_ctx,
}
if (stream_global->recv_trailing_metadata_finished != NULL &&
stream_global->read_closed && stream_global->write_closed) {
while (stream_global->seen_error &&
(bs = grpc_chttp2_incoming_frame_queue_pop(
&stream_global->incoming_frames)) != NULL) {
incoming_byte_stream_destroy_locked(exec_ctx, NULL, NULL, bs);
if (stream_global->seen_error) {
while ((bs = grpc_chttp2_incoming_frame_queue_pop(
&stream_global->incoming_frames)) != NULL) {
incoming_byte_stream_destroy_locked(exec_ctx, NULL, NULL, bs);
}
if (stream_global->exceeded_metadata_size) {
cancel_from_api(exec_ctx, transport_global, stream_global,
GRPC_STATUS_RESOURCE_EXHAUSTED);
}
}
if (stream_global->all_incoming_byte_streams_finished) {
grpc_chttp2_incoming_metadata_buffer_publish(
@ -1213,7 +1273,7 @@ static void remove_stream(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
s = grpc_chttp2_stream_map_delete(&t->new_stream_map, id);
}
GPR_ASSERT(s);
s->global.in_stream_map = 0;
s->global.in_stream_map = false;
if (t->parsing.incoming_stream == &s->parsing) {
t->parsing.incoming_stream = NULL;
grpc_chttp2_parsing_become_skip_parser(exec_ctx, &t->parsing);
@ -1257,7 +1317,7 @@ static void cancel_from_api(grpc_exec_ctx *exec_ctx,
NULL);
}
if (status != GRPC_STATUS_OK && !stream_global->seen_error) {
stream_global->seen_error = 1;
stream_global->seen_error = true;
grpc_chttp2_list_add_check_read_ops(transport_global, stream_global);
}
grpc_chttp2_mark_stream_closed(exec_ctx, transport_global, stream_global, 1,
@ -1269,7 +1329,7 @@ void grpc_chttp2_fake_status(grpc_exec_ctx *exec_ctx,
grpc_chttp2_stream_global *stream_global,
grpc_status_code status, gpr_slice *slice) {
if (status != GRPC_STATUS_OK) {
stream_global->seen_error = 1;
stream_global->seen_error = true;
grpc_chttp2_list_add_check_read_ops(transport_global, stream_global);
}
/* stream_global->recv_trailing_metadata_finished gives us a
@ -1293,7 +1353,7 @@ void grpc_chttp2_fake_status(grpc_exec_ctx *exec_ctx,
GRPC_MDSTR_GRPC_MESSAGE,
grpc_mdstr_from_slice(gpr_slice_ref(*slice))));
}
stream_global->published_trailing_metadata = 1;
stream_global->published_trailing_metadata = true;
grpc_chttp2_list_add_check_read_ops(transport_global, stream_global);
}
if (slice) {
@ -1323,13 +1383,13 @@ void grpc_chttp2_mark_stream_closed(
}
grpc_chttp2_list_add_check_read_ops(transport_global, stream_global);
if (close_reads && !stream_global->read_closed) {
stream_global->read_closed = 1;
stream_global->published_initial_metadata = 1;
stream_global->published_trailing_metadata = 1;
stream_global->read_closed = true;
stream_global->published_initial_metadata = true;
stream_global->published_trailing_metadata = true;
decrement_active_streams_locked(exec_ctx, transport_global, stream_global);
}
if (close_writes && !stream_global->write_closed) {
stream_global->write_closed = 1;
stream_global->write_closed = true;
if (TRANSPORT_FROM_GLOBAL(transport_global)->executor.writing_active) {
GRPC_CHTTP2_STREAM_REF(stream_global, "finish_writes");
grpc_chttp2_list_add_closed_waiting_for_writing(transport_global,

@ -45,15 +45,20 @@ gpr_slice grpc_chttp2_rst_stream_create(uint32_t id, uint32_t code,
stats->framing_bytes += frame_size;
uint8_t *p = GPR_SLICE_START_PTR(slice);
// Frame size.
*p++ = 0;
*p++ = 0;
*p++ = 4;
// Frame type.
*p++ = GRPC_CHTTP2_FRAME_RST_STREAM;
// Flags.
*p++ = 0;
// Stream ID.
*p++ = (uint8_t)(id >> 24);
*p++ = (uint8_t)(id >> 16);
*p++ = (uint8_t)(id >> 8);
*p++ = (uint8_t)(id);
// Error code.
*p++ = (uint8_t)(code >> 24);
*p++ = (uint8_t)(code >> 16);
*p++ = (uint8_t)(code >> 8);

@ -65,6 +65,7 @@ void grpc_chttp2_incoming_metadata_buffer_add(
gpr_realloc(buffer->elems, sizeof(*buffer->elems) * buffer->capacity);
}
buffer->elems[buffer->count++].md = elem;
buffer->size += GRPC_MDELEM_LENGTH(elem);
}
void grpc_chttp2_incoming_metadata_buffer_set_deadline(

@ -42,6 +42,7 @@ typedef struct {
size_t capacity;
gpr_timespec deadline;
int published;
size_t size; // total size of metadata
} grpc_chttp2_incoming_metadata_buffer;
/** assumes everything initially zeroed */

@ -422,23 +422,21 @@ typedef struct {
/** number of streams that are currently being read */
gpr_refcount active_streams;
/** when the application requests writes be closed, the write_closed is
'queued'; when the close is flow controlled into the send path, we are
'sending' it; when the write has been performed it is 'sent' */
/** Is this stream closed for writing. */
bool write_closed;
/** is this stream reading half-closed (boolean) */
/** Is this stream reading half-closed. */
bool read_closed;
/** are all published incoming byte streams closed */
/** Are all published incoming byte streams closed. */
bool all_incoming_byte_streams_finished;
/** is this stream in the stream map? (boolean) */
/** Is this stream in the stream map. */
bool in_stream_map;
/** has this stream seen an error? if 1, then pending incoming frames
can be thrown away */
/** Has this stream seen an error.
If true, then pending incoming frames can be thrown away. */
bool seen_error;
bool exceeded_metadata_size;
bool published_initial_metadata;
bool published_trailing_metadata;
bool faked_trailing_metadata;
grpc_chttp2_incoming_metadata_buffer received_initial_metadata;
grpc_chttp2_incoming_metadata_buffer received_trailing_metadata;
@ -481,7 +479,8 @@ struct grpc_chttp2_stream_parsing {
/** which metadata did we get (on this parse) */
uint8_t got_metadata_on_parse[2];
/** should we raise the seen_error flag in transport_global */
uint8_t seen_error;
bool seen_error;
bool exceeded_metadata_size;
/** window available for peer to send to us */
int64_t incoming_window;
/** parsing state for data frames */

@ -45,6 +45,10 @@
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/transport/static_metadata.h"
#define TRANSPORT_FROM_PARSING(tp) \
((grpc_chttp2_transport *)((char *)(tp)-offsetof(grpc_chttp2_transport, \
parsing)))
static int init_frame_parser(grpc_exec_ctx *exec_ctx,
grpc_chttp2_transport_parsing *transport_parsing);
static int init_header_frame_parser(
@ -170,7 +174,9 @@ void grpc_chttp2_publish_reads(
while (grpc_chttp2_list_pop_parsing_seen_stream(
transport_global, transport_parsing, &stream_global, &stream_parsing)) {
if (stream_parsing->seen_error) {
stream_global->seen_error = 1;
stream_global->seen_error = true;
stream_global->exceeded_metadata_size =
stream_parsing->exceeded_metadata_size;
grpc_chttp2_list_add_check_read_ops(transport_global, stream_global);
}
@ -612,7 +618,7 @@ static void on_initial_header(void *tp, grpc_mdelem *md) {
if (md->key == GRPC_MDSTR_GRPC_STATUS && md != GRPC_MDELEM_GRPC_STATUS_0) {
/* TODO(ctiller): check for a status like " 0" */
stream_parsing->seen_error = 1;
stream_parsing->seen_error = true;
}
if (md->key == GRPC_MDSTR_GRPC_TIMEOUT) {
@ -633,8 +639,26 @@ static void on_initial_header(void *tp, grpc_mdelem *md) {
gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), *cached_timeout));
GRPC_MDELEM_UNREF(md);
} else {
grpc_chttp2_incoming_metadata_buffer_add(
&stream_parsing->metadata_buffer[0], md);
const size_t new_size =
stream_parsing->metadata_buffer[0].size + GRPC_MDELEM_LENGTH(md);
grpc_chttp2_transport_global *transport_global =
&TRANSPORT_FROM_PARSING(transport_parsing)->global;
const size_t metadata_size_limit =
transport_global->settings[GRPC_LOCAL_SETTINGS]
[GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE];
if (new_size > metadata_size_limit) {
if (!stream_parsing->exceeded_metadata_size) {
gpr_log(GPR_DEBUG,
"received initial metadata size exceeds limit (%lu vs. %lu)",
new_size, metadata_size_limit);
stream_parsing->seen_error = true;
stream_parsing->exceeded_metadata_size = true;
}
GRPC_MDELEM_UNREF(md);
} else {
grpc_chttp2_incoming_metadata_buffer_add(
&stream_parsing->metadata_buffer[0], md);
}
}
grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, stream_parsing);
@ -658,12 +682,30 @@ static void on_trailing_header(void *tp, grpc_mdelem *md) {
if (md->key == GRPC_MDSTR_GRPC_STATUS && md != GRPC_MDELEM_GRPC_STATUS_0) {
/* TODO(ctiller): check for a status like " 0" */
stream_parsing->seen_error = 1;
stream_parsing->seen_error = true;
}
const size_t new_size =
stream_parsing->metadata_buffer[1].size + GRPC_MDELEM_LENGTH(md);
grpc_chttp2_transport_global *transport_global =
&TRANSPORT_FROM_PARSING(transport_parsing)->global;
const size_t metadata_size_limit =
transport_global->settings[GRPC_LOCAL_SETTINGS]
[GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE];
if (new_size > metadata_size_limit) {
if (!stream_parsing->exceeded_metadata_size) {
gpr_log(GPR_DEBUG,
"received trailing metadata size exceeds limit (%lu vs. %lu)",
new_size, metadata_size_limit);
stream_parsing->seen_error = true;
stream_parsing->exceeded_metadata_size = true;
}
GRPC_MDELEM_UNREF(md);
} else {
grpc_chttp2_incoming_metadata_buffer_add(
&stream_parsing->metadata_buffer[1], md);
}
grpc_chttp2_incoming_metadata_buffer_add(&stream_parsing->metadata_buffer[1],
md);
grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, stream_parsing);
GPR_TIMER_END("on_trailing_header", 0);

@ -164,7 +164,7 @@ static void call_read_cb(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, int success) {
for (i = 0; i < tcp->incoming_buffer->count; i++) {
char *dump = gpr_dump_slice(tcp->incoming_buffer->slices[i],
GPR_DUMP_HEX | GPR_DUMP_ASCII);
gpr_log(GPR_DEBUG, "READ %p: %s", tcp, dump);
gpr_log(GPR_DEBUG, "READ %p (peer=%s): %s", tcp, tcp->peer_string, dump);
gpr_free(dump);
}
}
@ -398,7 +398,7 @@ static void tcp_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep,
for (i = 0; i < buf->count; i++) {
char *data =
gpr_dump_slice(buf->slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII);
gpr_log(GPR_DEBUG, "WRITE %p: %s", tcp, data);
gpr_log(GPR_DEBUG, "WRITE %p (peer=%s): %s", tcp, tcp->peer_string, data);
gpr_free(data);
}
}

@ -147,6 +147,10 @@ const char *grpc_mdstr_as_c_string(grpc_mdstr *s);
#define GRPC_MDSTR_LENGTH(s) (GPR_SLICE_LENGTH(s->slice))
/* We add 32 bytes of padding as per RFC-7540 section 6.5.2. */
#define GRPC_MDELEM_LENGTH(e) \
(GRPC_MDSTR_LENGTH((e)->key) + GRPC_MDSTR_LENGTH((e)->value) + 32)
int grpc_mdstr_is_legal_header(grpc_mdstr *s);
int grpc_mdstr_is_legal_nonbin_header(grpc_mdstr *s);
int grpc_mdstr_is_bin_suffixed(grpc_mdstr *s);

@ -192,3 +192,12 @@ int grpc_metadata_batch_is_empty(grpc_metadata_batch *batch) {
gpr_time_cmp(gpr_inf_future(batch->deadline.clock_type),
batch->deadline) == 0;
}
size_t grpc_metadata_batch_size(grpc_metadata_batch *batch) {
size_t size = 0;
for (grpc_linked_mdelem *elem = batch->list.head; elem != NULL;
elem = elem->next) {
size += GRPC_MDELEM_LENGTH(elem->md);
}
return size;
}

@ -66,6 +66,9 @@ void grpc_metadata_batch_destroy(grpc_metadata_batch *batch);
void grpc_metadata_batch_clear(grpc_metadata_batch *batch);
int grpc_metadata_batch_is_empty(grpc_metadata_batch *batch);
/* Returns the transport size of the batch. */
size_t grpc_metadata_batch_size(grpc_metadata_batch *batch);
/** Moves the metadata information from \a src to \a dst. Upon return, \a src is
* zeroed. */
void grpc_metadata_batch_move(grpc_metadata_batch *dst,

@ -75,9 +75,22 @@ static void server_setup_transport(void *ts, grpc_transport *transport) {
grpc_exec_ctx_finish(&exec_ctx);
}
void grpc_run_bad_client_test(grpc_bad_client_server_side_validator validator,
const char *client_payload,
size_t client_payload_length, uint32_t flags) {
typedef struct {
grpc_bad_client_client_stream_validator validator;
gpr_slice_buffer incoming;
gpr_event read_done;
} read_args;
static void read_done(grpc_exec_ctx *exec_ctx, void *arg, bool success) {
read_args *a = arg;
a->validator(&a->incoming);
gpr_event_set(&a->read_done, (void *)1);
}
void grpc_run_bad_client_test(
grpc_bad_client_server_side_validator server_validator,
grpc_bad_client_client_stream_validator client_validator,
const char *client_payload, size_t client_payload_length, uint32_t flags) {
grpc_endpoint_pair sfd;
thd_args a;
gpr_thd_id id;
@ -108,7 +121,7 @@ void grpc_run_bad_client_test(grpc_bad_client_server_side_validator validator,
a.cq = grpc_completion_queue_create(NULL);
gpr_event_init(&a.done_thd);
gpr_event_init(&a.done_write);
a.validator = validator;
a.validator = server_validator;
grpc_server_register_completion_queue(a.server, a.cq, NULL);
a.registered_method =
grpc_server_register_method(a.server, GRPC_BAD_CLIENT_REGISTERED_METHOD,
@ -151,8 +164,23 @@ void grpc_run_bad_client_test(grpc_bad_client_server_side_validator validator,
GPR_ASSERT(gpr_event_wait(&a.done_thd, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5)));
/* Shutdown */
if (sfd.client) {
if (sfd.client != NULL) {
// Validate client stream, if requested.
if (client_validator != NULL) {
read_args args;
args.validator = client_validator;
gpr_slice_buffer_init(&args.incoming);
gpr_event_init(&args.read_done);
grpc_closure read_done_closure;
grpc_closure_init(&read_done_closure, read_done, &args);
grpc_endpoint_read(&exec_ctx, sfd.client, &args.incoming,
&read_done_closure);
grpc_exec_ctx_finish(&exec_ctx);
GPR_ASSERT(
gpr_event_wait(&args.read_done, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5)));
gpr_slice_buffer_destroy(&args.incoming);
}
// Shutdown.
grpc_endpoint_shutdown(&exec_ctx, sfd.client);
grpc_endpoint_destroy(&exec_ctx, sfd.client);
grpc_exec_ctx_finish(&exec_ctx);

@ -44,18 +44,24 @@ typedef void (*grpc_bad_client_server_side_validator)(grpc_server *server,
grpc_completion_queue *cq,
void *registered_method);
typedef void (*grpc_bad_client_client_stream_validator)(
gpr_slice_buffer *incoming);
#define GRPC_BAD_CLIENT_DISCONNECT 1
/* Test runner.
Create a server, and send client_payload to it as bytes from a client.
Execute validator in a separate thread to assert that the bytes are
Execute server_validator in a separate thread to assert that the bytes are
handled as expected. */
void grpc_run_bad_client_test(grpc_bad_client_server_side_validator validator,
const char *client_payload,
size_t client_payload_length, uint32_t flags);
void grpc_run_bad_client_test(
grpc_bad_client_server_side_validator server_validator,
grpc_bad_client_client_stream_validator client_validator,
const char *client_payload, size_t client_payload_length, uint32_t flags);
#define GRPC_RUN_BAD_CLIENT_TEST(validator, payload, flags) \
grpc_run_bad_client_test(validator, payload, sizeof(payload) - 1, flags)
#define GRPC_RUN_BAD_CLIENT_TEST(server_validator, client_validator, payload, \
flags) \
grpc_run_bad_client_test(server_validator, client_validator, payload, \
sizeof(payload) - 1, flags)
#endif /* GRPC_TEST_CORE_BAD_CLIENT_BAD_CLIENT_H */

@ -29,7 +29,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""Generates the appropriate build.json data for all the end2end tests."""
"""Generates the appropriate build.json data for all the bad_client tests."""
import collections
@ -45,6 +45,7 @@ BAD_CLIENT_TESTS = {
'headers': default_test_options._replace(cpu_cost=0.2),
'initial_settings_frame': default_test_options._replace(cpu_cost=0.2),
'head_of_line_blocking': default_test_options,
'large_metadata': default_test_options,
'server_registered_method': default_test_options,
'simple_request': default_test_options,
'window_overflow': default_test_options,

@ -56,7 +56,7 @@ int main(int argc, char **argv) {
/* invalid content type */
GRPC_RUN_BAD_CLIENT_TEST(
verifier, PFX_STR
verifier, NULL, PFX_STR
"\x00\x00\xc2\x01\x04\x00\x00\x00\x01"
"\x10\x05:path\x08/foo/bar"
"\x10\x07:scheme\x04http"
@ -71,7 +71,7 @@ int main(int argc, char **argv) {
/* invalid te */
GRPC_RUN_BAD_CLIENT_TEST(
verifier, PFX_STR
verifier, NULL, PFX_STR
"\x00\x00\xcb\x01\x04\x00\x00\x00\x01"
"\x10\x05:path\x08/foo/bar"
"\x10\x07:scheme\x04http"
@ -88,7 +88,7 @@ int main(int argc, char **argv) {
/* two path headers */
GRPC_RUN_BAD_CLIENT_TEST(
verifier, PFX_STR
verifier, NULL, PFX_STR
"\x00\x00\xd9\x01\x04\x00\x00\x00\x01"
"\x10\x05:path\x08/foo/bar"
"\x10\x05:path\x08/foo/bah"
@ -105,7 +105,7 @@ int main(int argc, char **argv) {
/* bad accept-encoding algorithm */
GRPC_RUN_BAD_CLIENT_TEST(
verifier, PFX_STR
verifier, NULL, PFX_STR
"\x00\x00\xd2\x01\x04\x00\x00\x00\x01"
"\x10\x05:path\x08/foo/bar"
"\x10\x07:scheme\x04http"
@ -121,7 +121,7 @@ int main(int argc, char **argv) {
/* bad grpc-encoding algorithm */
GRPC_RUN_BAD_CLIENT_TEST(
verifier, PFX_STR
verifier, NULL, PFX_STR
"\x00\x00\xf5\x01\x04\x00\x00\x00\x01"
"\x10\x05:path\x08/foo/bar"
"\x10\x07:scheme\x04http"

@ -46,29 +46,30 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq,
int main(int argc, char **argv) {
grpc_test_init(argc, argv);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "X", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRIX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI X", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI *X", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * X", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTPX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/X", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2X", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.X", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.0X", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.0\rX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.0\r\nX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.0\r\n\rX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.0\r\n\r\nX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.0\r\n\r\nSX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.0\r\n\r\nSMX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.0\r\n\r\nSM\rX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.0\r\n\r\nSM\r\nX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.0\r\n\r\nSM\r\n\rX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "X", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRIX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI X", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI *X", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * X", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTPX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/X", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2X", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.X", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.0X", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.0\rX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.0\r\nX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.0\r\n\rX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.0\r\n\r\nX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.0\r\n\r\nSX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.0\r\n\r\nSMX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.0\r\n\r\nSM\rX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.0\r\n\r\nSM\r\nX", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.0\r\n\r\nSM\r\n\rX",
0);
return 0;
}

@ -144,7 +144,7 @@ int main(int argc, char **argv) {
addbuf(hdr, sizeof(hdr));
addbuf(msg, FRAME_SIZE);
}
grpc_run_bad_client_test(verifier, g_buffer, g_count, 0);
grpc_run_bad_client_test(verifier, NULL, g_buffer, g_count, 0);
gpr_free(g_buffer);
return 0;

@ -51,249 +51,251 @@ int main(int argc, char **argv) {
grpc_test_init(argc, argv);
/* partial http2 header prefixes */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x01",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x01",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x01\x00",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x01\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x01\x04",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x01\x04",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x01\x05",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x01\x05",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x01\x04\x00",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x01\x04\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x01\x04\x00\x00",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR "\x00\x00\x00\x01\x04\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x01\x04\x00\x00\x00",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR "\x00\x00\x00\x01\x04\x00\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier,
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR "\x00\x00\x00\x01\x04\x00\x00\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier,
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR "\x00\x00\x00\x01\x04\x00\x00\x00\x01",
GRPC_BAD_CLIENT_DISCONNECT);
/* test adding prioritization data */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x01\x01\x24\x00\x00\x00\x01"
"\x00",
0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x02\x01\x24\x00\x00\x00\x01"
"\x00\x00",
0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x03\x01\x24\x00\x00\x00\x01"
"\x00\x00\x00",
0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x04\x01\x24\x00\x00\x00\x01"
"\x00\x00\x00\x00",
0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x05\x01\x24\x00\x00\x00\x01"
"",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x05\x01\x24\x00\x00\x00\x01"
"\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x05\x01\x24\x00\x00\x00\x01"
"\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x05\x01\x24\x00\x00\x00\x01"
"\x00\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x05\x01\x24\x00\x00\x00\x01"
"\x00\x00\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x05\x01\x24\x00\x00\x00\x01"
"\x00\x00\x00\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);
/* test looking up an invalid index */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x01\x01\x04\x00\x00\x00\x01"
"\xfe",
0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x04\x01\x04\x00\x00\x00\x01"
"\x7f\x7f\x01"
"a",
0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x04\x01\x04\x00\x00\x00\x01"
"\x0f\x7f\x01"
"a",
0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x04\x01\x04\x00\x00\x00\x01"
"\x1f\x7f\x01"
"a",
0);
/* test nvr, not indexed in static table */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x03\x01\x04\x00\x00\x00\x01"
"\x01\x01"
"a",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x03\x01\x04\x00\x00\x00\x01"
"\x11\x01"
"a",
GRPC_BAD_CLIENT_DISCONNECT);
/* illegal op code */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x01\x01\x04\x00\x00\x00\x01"
"\x80",
0);
/* parse some long indices */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x02\x01\x04\x00\x00\x00\x01"
"\xff\x00",
0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x03\x01\x04\x00\x00\x00\x01"
"\xff\x80\x00",
0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x04\x01\x04\x00\x00\x00\x01"
"\xff\x80\x80\x00",
0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x05\x01\x04\x00\x00\x00\x01"
"\xff\x80\x80\x80\x00",
0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x06\x01\x04\x00\x00\x00\x01"
"\xff\x80\x80\x80\x80\x00",
0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x07\x01\x04\x00\x00\x00\x01"
"\xff\x80\x80\x80\x80\x80\x00",
0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x08\x01\x04\x00\x00\x00\x01"
"\xff",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x08\x01\x04\x00\x00\x00\x01"
"\xff\x80",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x08\x01\x04\x00\x00\x00\x01"
"\xff\x80\x80",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x08\x01\x04\x00\x00\x00\x01"
"\xff\x80\x80\x80",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x08\x01\x04\x00\x00\x00\x01"
"\xff\x80\x80\x80\x80",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x08\x01\x04\x00\x00\x00\x01"
"\xff\x80\x80\x80\x80\x80",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x08\x01\x04\x00\x00\x00\x01"
"\xff\x80\x80\x80\x80\x80\x80",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x08\x01\x04\x00\x00\x00\x01"
"\xff\x80\x80\x80\x80\x80\x80\x00",
0);
/* overflow on byte 4 */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x06\x01\x04\x00\x00\x00\x01"
"\xff\x80\x80\x80\x80\x7f",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x06\x01\x04\x00\x00\x00\x01"
"\xff\xff\xff\xff\xff\x0f",
GRPC_BAD_CLIENT_DISCONNECT);
/* overflow after byte 4 */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x08\x01\x04\x00\x00\x00\x01"
"\xff\x80\x80\x80\x80\x80\x80\x02",
0);
/* end of headers mid-opcode */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x01\x01\x04\x00\x00\x00\x01"
"\x01",
GRPC_BAD_CLIENT_DISCONNECT);
/* dynamic table size update: set to default */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x03\x01\x04\x00\x00\x00\x01"
"\x3f\xe1\x1f",
GRPC_BAD_CLIENT_DISCONNECT);
/* dynamic table size update: set too large */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x03\x01\x04\x00\x00\x00\x01"
"\x3f\xf1\x1f",
0);
/* dynamic table size update: set twice */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x04\x01\x04\x00\x00\x00\x01"
"\x20\x3f\xe1\x1f",
GRPC_BAD_CLIENT_DISCONNECT);
/* dynamic table size update: set thrice */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x03\x01\x04\x00\x00\x00\x01"
"\x20\x20\x20",
0);
/* non-ending header followed by continuation frame */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x00\x01\x00\x00\x00\x00\x01"
"\x00\x00\x00\x09\x04\x00\x00\x00\x01",
GRPC_BAD_CLIENT_DISCONNECT);
/* non-ending header followed by non-continuation frame */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x00\x01\x00\x00\x00\x00\x01"
"\x00\x00\x00\x00\x04\x00\x00\x00\x01",
0);
/* non-ending header followed by a continuation frame for a different stream
*/
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x00\x01\x04\x00\x00\x00\x01"
"\x00\x00\x00\x01\x00\x00\x00\x00\x03"
"\x00\x00\x00\x09\x04\x00\x00\x00\x01",
0);
/* opening with a continuation frame */
GRPC_RUN_BAD_CLIENT_TEST(verifier,
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR "\x00\x00\x00\x09\x04\x00\x00\x00\x01", 0);
/* three header frames */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x00\x01\x04\x00\x00\x00\x01"
"\x00\x00\x00\x01\x04\x00\x00\x00\x01"
"\x00\x00\x00\x01\x04\x00\x00\x00\x01",
GRPC_BAD_CLIENT_DISCONNECT);
/* an invalid header found with fuzzing */
GRPC_RUN_BAD_CLIENT_TEST(verifier,
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR "\x00\x00\x00\x01\x39\x67\xed\x1d\x64",
GRPC_BAD_CLIENT_DISCONNECT);
/* a badly encoded timeout value */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x19\x01\x04\x00\x00\x00\x01"
"\x10\x0cgrpc-timeout\x0a"
"15 seconds",
GRPC_BAD_CLIENT_DISCONNECT);
/* a badly encoded timeout value: twice (catches caching) */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x19\x01\x04\x00\x00\x00\x01"
"\x10\x0cgrpc-timeout\x0a"
"15 seconds"

@ -50,70 +50,72 @@ int main(int argc, char **argv) {
grpc_test_init(argc, argv);
/* various partial prefixes */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x06",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x06",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x06",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x06",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x06",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x06",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x04",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x04",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x04\x00",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x04\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x04\x01",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x04\x01",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x04\xff",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x04\xff",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x04\x00\x00",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x04\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x04\x00\x00\x00",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR "\x00\x00\x00\x04\x00\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x04\x00\x00\x00\x00",
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR "\x00\x00\x00\x04\x00\x00\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);
/* must not send frames with stream id != 0 */
GRPC_RUN_BAD_CLIENT_TEST(verifier,
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR "\x00\x00\x00\x04\x00\x00\x00\x00\x01", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier,
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR "\x00\x00\x00\x04\x00\x40\x00\x00\x00", 0);
/* settings frame must be a multiple of six bytes long */
GRPC_RUN_BAD_CLIENT_TEST(verifier,
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR "\x00\x00\x01\x04\x00\x00\x00\x00\x00", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier,
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR "\x00\x00\x02\x04\x00\x00\x00\x00\x00", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier,
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR "\x00\x00\x03\x04\x00\x00\x00\x00\x00", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier,
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR "\x00\x00\x04\x04\x00\x00\x00\x00\x00", 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier,
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR "\x00\x00\x05\x04\x00\x00\x00\x00\x00", 0);
/* some settings values are illegal */
/* max frame size = 0 */
GRPC_RUN_BAD_CLIENT_TEST(verifier,
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR ONE_SETTING_HDR "\x00\x05\x00\x00\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier,
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR ONE_SETTING_HDR "\x00\x06\xff\xff\xff\xff",
GRPC_BAD_CLIENT_DISCONNECT);
/* update intiial window size */
GRPC_RUN_BAD_CLIENT_TEST(verifier,
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR ONE_SETTING_HDR "\x00\x04\x00\x01\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);
/* ack with data */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x00\x04\x00\x00\x00\x00\x00"
"\x00\x00\x01\x04\x01\x00\x00\x00\x00",
0);
/* settings frame with invalid flags */
GRPC_RUN_BAD_CLIENT_TEST(verifier,
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR "\x00\x00\x00\x04\x10\x00\x00\x00\x00", 0);
/* unknown settings should be ignored */
GRPC_RUN_BAD_CLIENT_TEST(verifier,
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR ONE_SETTING_HDR "\x00\x99\x00\x00\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);

@ -0,0 +1,489 @@
/*
*
* 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.
*
*/
#include "test/core/bad_client/bad_client.h"
#include <string.h>
#include <grpc/support/alloc.h>
#include "src/core/lib/surface/server.h"
#include "test/core/end2end/cq_verifier.h"
#define PFX_TOO_MUCH_METADATA_FROM_CLIENT_STR \
"PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" /* settings frame */ \
"\x00\x00\x00\x04\x00\x00\x00\x00\x00" /* headers: generated from \
large_metadata.headers in this \
directory */ \
"\x00" \
"5{\x01\x05\x00\x00\x00\x01" \
"\x10\x05:path\x08/foo/bar" \
"\x10\x07:scheme\x04http" \
"\x10\x07:method\x04POST" \
"\x10\x0a:authority\x09localhost" \
"\x10\x0c" \
"content-type\x10" \
"application/grpc" \
"\x10\x14grpc-accept-encoding\x15identity,deflate,gzip" \
"\x10\x02te\x08trailers" \
"\x10\x0auser-agent\"bad-client grpc-c/0.12.0.0 (linux)" \
"\x10\x0duser-header00~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
"aaaaaaaa" \
"\x10\x0duser-header01~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
"aaaaaaaa" \
"\x10\x0duser-header02~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
"aaaaaaaa" \
"\x10\x0duser-header03~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
"aaaaaaaa" \
"\x10\x0duser-header04~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
"aaaaaaaa" \
"\x10\x0duser-header05~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
"aaaaaaaa" \
"\x10\x0duser-header06~aaaaaaaaaaaaaaaaaaaaaaaaa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define PFX_TOO_MUCH_METADATA_FROM_SERVER_STR \
"PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" /* settings frame: sets \
MAX_HEADER_LIST_SIZE to 16K */ \
"\x00\x00\x06\x04\x00\x00\x00\x00\x00\x00\x06\x00\x00\x40\x00" /* headers: \
generated \
from \
simple_request.headers \
in this \
directory \
*/ \
"\x00\x00\xc9\x01\x04\x00\x00\x00\x01" \
"\x10\x05:path\x08/foo/bar" \
"\x10\x07:scheme\x04http" \
"\x10\x07:method\x04POST" \
"\x10\x0a:authority\x09localhost" \
"\x10\x0c" \
"content-type\x10" \
"application/grpc" \
"\x10\x14grpc-accept-encoding\x15" \
"deflate,identity,gzip" \
"\x10\x02te\x08trailers" \
"\x10\x0auser-agent\"bad-client grpc-c/0.12.0.0 (linux)"
static void *tag(intptr_t t) { return (void *)t; }
static void server_verifier(grpc_server *server, grpc_completion_queue *cq,
void *registered_method) {
grpc_call_error error;
grpc_call *s;
grpc_call_details call_details;
cq_verifier *cqv = cq_verifier_create(cq);
grpc_metadata_array request_metadata_recv;
grpc_call_details_init(&call_details);
grpc_metadata_array_init(&request_metadata_recv);
error = grpc_server_request_call(server, &s, &call_details,
&request_metadata_recv, cq, cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
GPR_ASSERT(0 == strcmp(call_details.host, "localhost"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo/bar"));
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
grpc_call_destroy(s);
cq_verifier_destroy(cqv);
}
static void server_verifier_sends_too_much_metadata(grpc_server *server,
grpc_completion_queue *cq,
void *registered_method) {
grpc_call_error error;
grpc_call *s;
grpc_call_details call_details;
cq_verifier *cqv = cq_verifier_create(cq);
grpc_metadata_array request_metadata_recv;
grpc_call_details_init(&call_details);
grpc_metadata_array_init(&request_metadata_recv);
error = grpc_server_request_call(server, &s, &call_details,
&request_metadata_recv, cq, cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
GPR_ASSERT(0 == strcmp(call_details.host, "localhost"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo/bar"));
const size_t metadata_value_size = 16 * 1024;
grpc_metadata meta;
meta.key = "key";
meta.value = gpr_malloc(metadata_value_size + 1);
memset((char *)meta.value, 'a', metadata_value_size);
((char *)meta.value)[metadata_value_size] = 0;
meta.value_length = metadata_value_size;
grpc_op op;
op.op = GRPC_OP_SEND_INITIAL_METADATA;
op.data.send_initial_metadata.count = 1;
op.data.send_initial_metadata.metadata = &meta;
op.flags = 0;
op.reserved = NULL;
error = grpc_call_start_batch(s, &op, 1, tag(102), NULL);
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(102), 0); // Operation fails.
cq_verify(cqv);
gpr_free((char *)meta.value);
grpc_metadata_array_destroy(&request_metadata_recv);
grpc_call_details_destroy(&call_details);
grpc_call_destroy(s);
cq_verifier_destroy(cqv);
}
static void client_validator(gpr_slice_buffer *incoming) {
// Get last frame from incoming slice buffer.
gpr_slice_buffer last_frame_buffer;
gpr_slice_buffer_init(&last_frame_buffer);
gpr_slice_buffer_trim_end(incoming, 13, &last_frame_buffer);
GPR_ASSERT(last_frame_buffer.count == 1);
gpr_slice last_frame = last_frame_buffer.slices[0];
// Construct expected frame.
gpr_slice expected = gpr_slice_malloc(13);
uint8_t *p = GPR_SLICE_START_PTR(expected);
// Length.
*p++ = 0;
*p++ = 0;
*p++ = 4;
// Frame type (RST_STREAM).
*p++ = 3;
// Flags.
*p++ = 0;
// Stream ID.
*p++ = 0;
*p++ = 0;
*p++ = 0;
*p++ = 1;
// Payload (error code).
*p++ = 0;
*p++ = 0;
*p++ = 0;
*p++ = 11;
// Compare actual and expected.
GPR_ASSERT(gpr_slice_cmp(last_frame, expected) == 0);
gpr_slice_buffer_destroy(&last_frame_buffer);
}
int main(int argc, char **argv) {
grpc_test_init(argc, argv);
// Test sending more metadata than the server will accept.
GRPC_RUN_BAD_CLIENT_TEST(server_verifier, client_validator,
PFX_TOO_MUCH_METADATA_FROM_CLIENT_STR, 0);
// Test sending more metadata than the client will accept.
GRPC_RUN_BAD_CLIENT_TEST(server_verifier_sends_too_much_metadata,
client_validator,
PFX_TOO_MUCH_METADATA_FROM_SERVER_STR, 0);
return 0;
}

@ -0,0 +1,106 @@
# headers used in simple_request.c
# use tools/codegen/core/gen_header_frame.py --set_end_stream to generate
# the binary strings contained in the source code
:path: /foo/bar
:scheme: http
:method: POST
:authority: localhost
content-type: application/grpc
grpc-accept-encoding: identity,deflate,gzip
te: trailers
user-agent: bad-client grpc-c/0.12.0.0 (linux)
user-header00: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
user-header01: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
user-header02: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
user-header03: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
user-header04: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
user-header91: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
user-header92: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
user-header93: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
user-header94: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

@ -111,43 +111,43 @@ int main(int argc, char **argv) {
/* body generated with
* tools/codegen/core/gen_server_registered_method_bad_client_test_body.py */
GRPC_RUN_BAD_CLIENT_TEST(verifier_fails,
GRPC_RUN_BAD_CLIENT_TEST(verifier_fails, NULL,
PFX_STR "\x00\x00\x00\x00\x00\x00\x00\x00\x01",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier_fails,
GRPC_RUN_BAD_CLIENT_TEST(verifier_fails, NULL,
PFX_STR "\x00\x00\x01\x00\x00\x00\x00\x00\x01\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier_fails, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier_fails, NULL, PFX_STR
"\x00\x00\x02\x00\x00\x00\x00\x00\x01\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(verifier_fails, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier_fails, NULL, PFX_STR
"\x00\x00\x03\x00\x00\x00\x00\x00\x01\x00\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(
verifier_fails,
verifier_fails, NULL,
PFX_STR "\x00\x00\x04\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(
verifier_succeeds,
verifier_succeeds, NULL,
PFX_STR "\x00\x00\x05\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00", 0);
GRPC_RUN_BAD_CLIENT_TEST(
verifier_fails,
verifier_fails, NULL,
PFX_STR "\x00\x00\x05\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x01",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(
verifier_succeeds,
verifier_succeeds, NULL,
PFX_STR "\x00\x00\x06\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x01\x00",
0);
GRPC_RUN_BAD_CLIENT_TEST(
verifier_fails,
verifier_fails, NULL,
PFX_STR "\x00\x00\x05\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x02",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(
verifier_fails,
verifier_fails, NULL,
PFX_STR "\x00\x00\x06\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x02\x00",
GRPC_BAD_CLIENT_DISCONNECT);
GRPC_RUN_BAD_CLIENT_TEST(
verifier_succeeds, PFX_STR
verifier_succeeds, NULL, PFX_STR
"\x00\x00\x07\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x02\x00\x00",
0);

@ -139,42 +139,42 @@ int main(int argc, char **argv) {
grpc_test_init(argc, argv);
/* basic request: check that things are working */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR, 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR_UNUSUAL, 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR_UNUSUAL2, 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR, 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR_UNUSUAL, 0);
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR_UNUSUAL2, 0);
/* push an illegal data frame */
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR
"\x00\x00\x05\x00\x00\x00\x00\x00\x01"
"\x34\x00\x00\x00\x00",
0);
/* push a data frame with bad flags */
GRPC_RUN_BAD_CLIENT_TEST(verifier,
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR "\x00\x00\x00\x00\x02\x00\x00\x00\x01", 0);
/* push a window update with a bad length */
GRPC_RUN_BAD_CLIENT_TEST(failure_verifier,
GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, NULL,
PFX_STR "\x00\x00\x01\x08\x00\x00\x00\x00\x01", 0);
/* push a window update with bad flags */
GRPC_RUN_BAD_CLIENT_TEST(failure_verifier,
GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, NULL,
PFX_STR "\x00\x00\x00\x08\x10\x00\x00\x00\x01", 0);
/* push a window update with bad data */
GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, PFX_STR
GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, NULL, PFX_STR
"\x00\x00\x04\x08\x00\x00\x00\x00\x01"
"\xff\xff\xff\xff",
0);
/* push a short goaway */
GRPC_RUN_BAD_CLIENT_TEST(failure_verifier,
GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, NULL,
PFX_STR "\x00\x00\x04\x07\x00\x00\x00\x00\x00", 0);
/* disconnect before sending goaway */
GRPC_RUN_BAD_CLIENT_TEST(failure_verifier,
GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, NULL,
PFX_STR "\x00\x01\x12\x07\x00\x00\x00\x00\x00",
GRPC_BAD_CLIENT_DISCONNECT);
/* push a rst_stream with a bad length */
GRPC_RUN_BAD_CLIENT_TEST(failure_verifier,
GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, NULL,
PFX_STR "\x00\x00\x01\x03\x00\x00\x00\x00\x01", 0);
/* push a rst_stream with bad flags */
GRPC_RUN_BAD_CLIENT_TEST(failure_verifier,
GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, NULL,
PFX_STR "\x00\x00\x00\x03\x10\x00\x00\x00\x01", 0);
return 0;

@ -51,7 +51,7 @@ int main(int argc, char **argv) {
grpc_test_init(argc, argv);
/* test adding prioritization data */
GRPC_RUN_BAD_CLIENT_TEST(verifier,
GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL,
PFX_STR "\x00\x00\x00\x88\x00\x00\x00\x00\x01",
GRPC_BAD_CLIENT_DISCONNECT);

@ -105,7 +105,7 @@ int main(int argc, char **argv) {
addbuf(message, sizeof(message));
}
}
grpc_run_bad_client_test(verifier, g_buffer, g_count, 0);
grpc_run_bad_client_test(verifier, NULL, g_buffer, g_count, 0);
gpr_free(g_buffer);
return 0;

@ -55,14 +55,16 @@ typedef struct fullstack_fixture_data {
grpc_end2end_proxy *proxy;
} fullstack_fixture_data;
static grpc_server *create_proxy_server(const char *port) {
grpc_server *s = grpc_server_create(NULL, NULL);
static grpc_server *create_proxy_server(const char *port,
grpc_channel_args *server_args) {
grpc_server *s = grpc_server_create(server_args, NULL);
GPR_ASSERT(grpc_server_add_insecure_http2_port(s, port));
return s;
}
static grpc_channel *create_proxy_client(const char *target) {
return grpc_insecure_channel_create(target, NULL, NULL);
static grpc_channel *create_proxy_client(const char *target,
grpc_channel_args *client_args) {
return grpc_insecure_channel_create(target, client_args, NULL);
}
static const grpc_end2end_proxy_def proxy_def = {create_proxy_server,
@ -74,7 +76,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack(
fullstack_fixture_data *ffd = gpr_malloc(sizeof(fullstack_fixture_data));
memset(&f, 0, sizeof(f));
ffd->proxy = grpc_end2end_proxy_create(&proxy_def);
ffd->proxy = grpc_end2end_proxy_create(&proxy_def, client_args, server_args);
f.fixture_data = ffd;
f.cq = grpc_completion_queue_create(NULL);

@ -54,8 +54,9 @@ typedef struct fullstack_secure_fixture_data {
grpc_end2end_proxy *proxy;
} fullstack_secure_fixture_data;
static grpc_server *create_proxy_server(const char *port) {
grpc_server *s = grpc_server_create(NULL, NULL);
static grpc_server *create_proxy_server(const char *port,
grpc_channel_args *server_args) {
grpc_server *s = grpc_server_create(server_args, NULL);
grpc_ssl_pem_key_cert_pair pem_cert_key_pair = {test_server1_key,
test_server1_cert};
grpc_server_credentials *ssl_creds =
@ -65,18 +66,20 @@ static grpc_server *create_proxy_server(const char *port) {
return s;
}
static grpc_channel *create_proxy_client(const char *target) {
static grpc_channel *create_proxy_client(const char *target,
grpc_channel_args *client_args) {
grpc_channel *channel;
grpc_channel_credentials *ssl_creds =
grpc_ssl_credentials_create(NULL, NULL, NULL);
grpc_arg ssl_name_override = {GRPC_ARG_STRING,
GRPC_SSL_TARGET_NAME_OVERRIDE_ARG,
{"foo.test.google.fr"}};
grpc_channel_args client_args;
client_args.num_args = 1;
client_args.args = &ssl_name_override;
channel = grpc_secure_channel_create(ssl_creds, target, &client_args, NULL);
grpc_channel_args *new_client_args =
grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1);
channel =
grpc_secure_channel_create(ssl_creds, target, new_client_args, NULL);
grpc_channel_credentials_release(ssl_creds);
grpc_channel_args_destroy(new_client_args);
return channel;
}
@ -90,7 +93,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack(
gpr_malloc(sizeof(fullstack_secure_fixture_data));
memset(&f, 0, sizeof(f));
ffd->proxy = grpc_end2end_proxy_create(&proxy_def);
ffd->proxy = grpc_end2end_proxy_create(&proxy_def, client_args, server_args);
f.fixture_data = ffd;
f.cq = grpc_completion_queue_create(NULL);

@ -89,8 +89,9 @@ typedef struct {
static void thread_main(void *arg);
static void request_call(grpc_end2end_proxy *proxy);
grpc_end2end_proxy *grpc_end2end_proxy_create(
const grpc_end2end_proxy_def *def) {
grpc_end2end_proxy *grpc_end2end_proxy_create(const grpc_end2end_proxy_def *def,
grpc_channel_args *client_args,
grpc_channel_args *server_args) {
gpr_thd_options opt = gpr_thd_options_default();
int proxy_port = grpc_pick_unused_port_or_die();
int server_port = grpc_pick_unused_port_or_die();
@ -105,8 +106,8 @@ grpc_end2end_proxy *grpc_end2end_proxy_create(
proxy->server_port);
proxy->cq = grpc_completion_queue_create(NULL);
proxy->server = def->create_server(proxy->proxy_port);
proxy->client = def->create_client(proxy->server_port);
proxy->server = def->create_server(proxy->proxy_port, server_args);
proxy->client = def->create_client(proxy->server_port, client_args);
grpc_server_register_completion_queue(proxy->server, proxy->cq, NULL);
grpc_server_start(proxy->server);

@ -41,12 +41,15 @@
typedef struct grpc_end2end_proxy grpc_end2end_proxy;
typedef struct grpc_end2end_proxy_def {
grpc_server *(*create_server)(const char *port);
grpc_channel *(*create_client)(const char *target);
grpc_server *(*create_server)(const char *port,
grpc_channel_args *server_args);
grpc_channel *(*create_client)(const char *target,
grpc_channel_args *client_args);
} grpc_end2end_proxy_def;
grpc_end2end_proxy *grpc_end2end_proxy_create(
const grpc_end2end_proxy_def *def);
grpc_end2end_proxy *grpc_end2end_proxy_create(const grpc_end2end_proxy_def *def,
grpc_channel_args *client_args,
grpc_channel_args *server_args);
void grpc_end2end_proxy_destroy(grpc_end2end_proxy *proxy);
const char *grpc_end2end_proxy_get_client_target(grpc_end2end_proxy *proxy);

@ -97,7 +97,7 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
/* Request with a large amount of metadata.*/
// Request with a large amount of metadata.
static void test_request_with_large_metadata(grpc_end2end_test_config config) {
grpc_call *c;
grpc_call *s;
@ -106,8 +106,13 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) {
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
gpr_timespec deadline = five_seconds_time();
grpc_metadata meta;
const size_t large_size = 64 * 1024;
grpc_arg arg = {GRPC_ARG_INTEGER,
GRPC_ARG_MAX_METADATA_SIZE,
{.integer = (int)large_size + 1024}};
grpc_channel_args args = {1, &arg};
grpc_end2end_test_fixture f =
begin_test(config, "test_request_with_large_metadata", NULL, NULL);
begin_test(config, "test_request_with_large_metadata", &args, &args);
cq_verifier *cqv = cq_verifier_create(f.cq);
grpc_op ops[6];
grpc_op *op;
@ -121,7 +126,6 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) {
char *details = NULL;
size_t details_capacity = 0;
int was_cancelled = 2;
const size_t large_size = 64 * 1024;
c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq,
"/foo", "foo.test.google.fr", deadline, NULL);
@ -138,6 +142,7 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) {
grpc_metadata_array_init(&request_metadata_recv);
grpc_call_details_init(&call_details);
// Client: send request.
op = ops;
op->op = GRPC_OP_SEND_INITIAL_METADATA;
op->data.send_initial_metadata.count = 1;
@ -174,9 +179,11 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) {
grpc_server_request_call(f.server, &s, &call_details,
&request_metadata_recv, f.cq, f.cq, tag(101));
GPR_ASSERT(GRPC_CALL_OK == error);
cq_expect_completion(cqv, tag(101), 1);
cq_verify(cqv);
// Server: send initial metadata and receive request.
op = ops;
op->op = GRPC_OP_SEND_INITIAL_METADATA;
op->data.send_initial_metadata.count = 0;
@ -194,6 +201,8 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) {
cq_expect_completion(cqv, tag(102), 1);
cq_verify(cqv);
// Server: receive close and send status. This should trigger
// completion of request on client.
op = ops;
op->op = GRPC_OP_RECV_CLOSE_ON_SERVER;
op->data.recv_close_on_server.cancelled = &was_cancelled;

@ -53,7 +53,10 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
grpc_channel_args *server_args) {
grpc_end2end_test_fixture f;
gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
f = config.create_fixture(client_args, server_args);
// We intentionally do not pass the client and server args to
// create_fixture(), since we don't want the limit enforced on the
// proxy, only on the backend server.
f = config.create_fixture(NULL, NULL);
config.init_server(&f, server_args);
config.init_client(&f, client_args);
return f;

@ -38,6 +38,8 @@
import json
import sys
set_end_stream = len(sys.argv) > 1 and sys.argv[1] == '--set_end_stream'
# parse input, fill in vals
vals = []
for line in sys.stdin:
@ -65,6 +67,9 @@ for key, value in vals:
payload_bytes.append(payload_line)
# fill in header
flags = 0x04 # END_HEADERS
if set_end_stream:
flags |= 0x01 # END_STREAM
payload_bytes[0].extend([
(payload_len >> 16) & 0xff,
(payload_len >> 8) & 0xff,
@ -72,7 +77,7 @@ payload_bytes[0].extend([
# header frame
0x01,
# flags
0x04,
flags,
# stream id
0x00,
0x00,

@ -3387,6 +3387,23 @@
"third_party": false,
"type": "target"
},
{
"deps": [
"bad_client_test",
"gpr",
"gpr_test_util",
"grpc_test_util_unsecure",
"grpc_unsecure"
],
"headers": [],
"language": "c",
"name": "large_metadata_bad_client_test",
"src": [
"test/core/bad_client/tests/large_metadata.c"
],
"third_party": false,
"type": "target"
},
{
"deps": [
"bad_client_test",

@ -2713,6 +2713,27 @@
"windows"
]
},
{
"args": [],
"ci_platforms": [
"linux",
"mac",
"posix",
"windows"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
"gtest": false,
"language": "c",
"name": "large_metadata_bad_client_test",
"platforms": [
"linux",
"mac",
"posix",
"windows"
]
},
{
"args": [],
"ci_platforms": [

@ -1095,6 +1095,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "initial_settings_frame_bad_
{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "large_metadata_bad_client_test", "vcxproj\test\large_metadata_bad_client_test\large_metadata_bad_client_test.vcxproj", "{B706A9EC-7982-0DBC-495D-07B165F6CF56}"
ProjectSection(myProperties) = preProject
lib = "False"
EndProjectSection
ProjectSection(ProjectDependencies) = postProject
{BA67B418-B699-E41A-9CC4-0279C49481A5} = {BA67B418-B699-E41A-9CC4-0279C49481A5}
{0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}
{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}
{EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037}
{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server_registered_method_bad_client_test", "vcxproj\test\server_registered_method_bad_client_test\server_registered_method_bad_client_test.vcxproj", "{B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}"
ProjectSection(myProperties) = preProject
lib = "False"
@ -3087,6 +3099,22 @@ Global
{6756895E-05BF-8CC7-58F2-868DF0C0300C}.Release-DLL|Win32.Build.0 = Release|Win32
{6756895E-05BF-8CC7-58F2-868DF0C0300C}.Release-DLL|x64.ActiveCfg = Release|x64
{6756895E-05BF-8CC7-58F2-868DF0C0300C}.Release-DLL|x64.Build.0 = Release|x64
{B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug|Win32.ActiveCfg = Debug|Win32
{B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug|x64.ActiveCfg = Debug|x64
{B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release|Win32.ActiveCfg = Release|Win32
{B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release|x64.ActiveCfg = Release|x64
{B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug|Win32.Build.0 = Debug|Win32
{B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug|x64.Build.0 = Debug|x64
{B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release|Win32.Build.0 = Release|Win32
{B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release|x64.Build.0 = Release|x64
{B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug-DLL|Win32.ActiveCfg = Debug|Win32
{B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug-DLL|Win32.Build.0 = Debug|Win32
{B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug-DLL|x64.ActiveCfg = Debug|x64
{B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug-DLL|x64.Build.0 = Debug|x64
{B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release-DLL|Win32.ActiveCfg = Release|Win32
{B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release-DLL|Win32.Build.0 = Release|Win32
{B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release-DLL|x64.ActiveCfg = Release|x64
{B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release-DLL|x64.Build.0 = Release|x64
{B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Debug|Win32.ActiveCfg = Debug|Win32
{B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Debug|x64.ActiveCfg = Debug|x64
{B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Release|Win32.ActiveCfg = Release|Win32

@ -0,0 +1,202 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\1.0.204.1.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{B706A9EC-7982-0DBC-495D-07B165F6CF56}</ProjectGuid>
<IgnoreWarnIntDirInTempDetected>true</IgnoreWarnIntDirInTempDetected>
<IntDir>$(SolutionDir)IntDir\$(MSBuildProjectName)\</IntDir>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0'" Label="Configuration">
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' == '11.0'" Label="Configuration">
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' == '12.0'" Label="Configuration">
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)' == '14.0'" Label="Configuration">
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)\..\vsprojects\global.props" />
<Import Project="$(SolutionDir)\..\vsprojects\openssl.props" />
<Import Project="$(SolutionDir)\..\vsprojects\winsock.props" />
<Import Project="$(SolutionDir)\..\vsprojects\zlib.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<TargetName>large_metadata_bad_client_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib>
<Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
<Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TargetName>large_metadata_bad_client_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Release</Configuration-grpc_dependencies_zlib>
<Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
<Configuration-grpc_dependencies_openssl>Release</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat>
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation>
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="$(SolutionDir)\..\test\core\bad_client\tests\large_metadata.c">
</ClCompile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\test/bad_client\bad_client_test\bad_client_test.vcxproj">
<Project>{BA67B418-B699-E41A-9CC4-0279C49481A5}</Project>
</ProjectReference>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc_test_util_unsecure\grpc_test_util_unsecure.vcxproj">
<Project>{0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF}</Project>
</ProjectReference>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc_unsecure\grpc_unsecure.vcxproj">
<Project>{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}</Project>
</ProjectReference>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\gpr_test_util\gpr_test_util.vcxproj">
<Project>{EAB0A629-17A9-44DB-B5FF-E91A721FE037}</Project>
</ProjectReference>
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\gpr\gpr.vcxproj">
<Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" />
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" />
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" />
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" />
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" />
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" />
</Target>
</Project>

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="$(SolutionDir)\..\test\core\bad_client\tests\large_metadata.c">
<Filter>test\core\bad_client\tests</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="test">
<UniqueIdentifier>{6c1eb0cb-9d82-f961-7220-1f6edc913666}</UniqueIdentifier>
</Filter>
<Filter Include="test\core">
<UniqueIdentifier>{79d5006f-93a1-aa0e-2568-37aa63eef567}</UniqueIdentifier>
</Filter>
<Filter Include="test\core\bad_client">
<UniqueIdentifier>{dbde5995-24a0-2332-4bee-0540ed3aa848}</UniqueIdentifier>
</Filter>
<Filter Include="test\core\bad_client\tests">
<UniqueIdentifier>{5cf4a13f-ae24-fd98-eb59-b5301f30367c}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>
Loading…
Cancel
Save