Fix too much metadata

reviewable/pr6737/r3
Craig Tiller 9 years ago
parent caad18024d
commit 09c464a142
  1. 13
      src/core/ext/transport/chttp2/transport/chttp2_transport.c
  2. 2
      src/core/lib/iomgr/error.c
  3. 1
      src/core/lib/iomgr/error.h

@ -1140,10 +1140,15 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx,
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);
grpc_chttp2_complete_closure_step(
exec_ctx, transport_global, stream_global,
&stream_global->send_initial_metadata_finished,
grpc_error_set_int(
grpc_error_set_int(
GRPC_ERROR_CREATE(
"to-be-sent initial metadata size exceeds peer limit"),
GRPC_ERROR_INT_SIZE, (intptr_t)metadata_size),
GRPC_ERROR_INT_LIMIT, (intptr_t)metadata_peer_limit));
cancel_from_api(exec_ctx, transport_global, stream_global,
GRPC_STATUS_RESOURCE_EXHAUSTED);
} else {

@ -102,6 +102,8 @@ static const char *error_int_name(grpc_error_ints key) {
return "grpc_status";
case GRPC_ERROR_INT_OFFSET:
return "offset";
case GRPC_ERROR_INT_LIMIT:
return "limit";
case GRPC_ERROR_INT_INDEX:
return "index";
case GRPC_ERROR_INT_SIZE:

@ -62,6 +62,7 @@ typedef enum {
GRPC_ERROR_INT_OFFSET,
GRPC_ERROR_INT_INDEX,
GRPC_ERROR_INT_SIZE,
GRPC_ERROR_INT_LIMIT,
GRPC_ERROR_INT_HTTP2_ERROR,
GRPC_ERROR_INT_TSI_CODE,
GRPC_ERROR_INT_SECURITY_STATUS,

Loading…
Cancel
Save