aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-10-21 09:47:23 -0700
committerGravatar GitHub <noreply@github.com>2016-10-21 09:47:23 -0700
commit987f41f397de6c623d11d1391d1e4c9d5a2632d7 (patch)
tree4173700d40edeb6de8d75bda15531dbc284f66d2 /src/core
parentaea91859a3dc800e63a85da9bd717dd8deee96a5 (diff)
parent9a35ec1a1e5ecc93cae9c10371f842bd16aa0827 (diff)
Merge pull request #7651 from rjshade/add_error_log_for_h2_headers
Add error log for invalid http2 headers
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lib/channel/http_server_filter.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c
index 0f2bf97824..f2221fb0fb 100644
--- a/src/core/lib/channel/http_server_filter.c
+++ b/src/core/lib/channel/http_server_filter.c
@@ -42,6 +42,8 @@
#define EXPECTED_CONTENT_TYPE "application/grpc"
#define EXPECTED_CONTENT_TYPE_LENGTH sizeof(EXPECTED_CONTENT_TYPE) - 1
+extern int grpc_http_trace;
+
typedef struct call_data {
uint8_t seen_path;
uint8_t seen_method;
@@ -209,6 +211,11 @@ static void hs_on_recv(grpc_exec_ctx *exec_ctx, void *user_data,
err, GRPC_ERROR_CREATE("Missing te: trailers header"));
}
/* Error this call out */
+ if (grpc_http_trace) {
+ const char *error_str = grpc_error_string(err);
+ gpr_log(GPR_ERROR, "Invalid http2 headers: %s", error_str);
+ grpc_error_free_string(error_str);
+ }
grpc_call_element_send_cancel(exec_ctx, elem);
}
} else {