pull/26700/head
Craig Tiller 4 years ago
parent 2e698ad26b
commit 258d712ed3
  1. 6
      src/core/ext/transport/chttp2/transport/hpack_parser.cc
  2. 2
      src/core/ext/transport/chttp2/transport/hpack_parser.h
  3. 4
      test/core/end2end/tests/retry_per_attempt_recv_timeout.cc

@ -1543,6 +1543,7 @@ HPackParser::~HPackParser() {
}
void HPackParser::BeginFrame(Sink sink, Boundary boundary, Priority priority) {
gpr_log(GPR_ERROR, "%p BeginFrame: b=%d, p=%d", this, (int)boundary, (int)priority);
sink_ = std::move(sink);
boundary_ = boundary;
switch (priority) {
@ -1556,10 +1557,14 @@ void HPackParser::BeginFrame(Sink sink, Boundary boundary, Priority priority) {
}
void HPackParser::QueueBufferToParse(const grpc_slice& slice) {
char* buffer = grpc_dump_slice(slice, GPR_DUMP_ASCII | GPR_DUMP_HEX);
gpr_log(GPR_ERROR, "%p qslice %s", this, buffer);
gpr_free(buffer);
queued_slices_.push_back(grpc_slice_ref_internal(slice));
}
grpc_error_handle HPackParser::Parse() {
gpr_log(GPR_ERROR, "%p Parse", this);
grpc_error_handle error = GRPC_ERROR_NONE;
for (const auto& slice : queued_slices_) {
error = Parse(slice);
@ -1642,6 +1647,7 @@ grpc_error_handle grpc_chttp2_header_parser_parse(void* hpack_parser,
int is_last) {
GPR_TIMER_SCOPE("grpc_chttp2_header_parser_parse", 0);
auto* parser = static_cast<grpc_core::HPackParser*>(hpack_parser);
gpr_log(GPR_ERROR, "%p parse: is_last=%d", parser, is_last);
if (s != nullptr) {
s->stats.incoming.header_bytes += GRPC_SLICE_LENGTH(slice);
}

@ -175,7 +175,7 @@ class HPackParser {
grpc_error_handle AppendHuffBytes(const uint8_t* cur, const uint8_t* end);
grpc_error_handle AppendStrBytes(const uint8_t* cur, const uint8_t* end);
grpc_error_handle Parse(const grpc_slice& slice);
grpc_error_handle Parse(const grpc_slice& slice);
Sink sink_;
grpc_error_handle last_error_;

@ -232,11 +232,11 @@ static void test_retry_per_attempt_recv_timeout(
peer = grpc_call_get_peer(s);
GPR_ASSERT(peer != nullptr);
gpr_log(GPR_DEBUG, "server_peer=%s", peer);
gpr_log(GPR_ERROR, "server_peer=%s", peer);
gpr_free(peer);
peer = grpc_call_get_peer(c);
GPR_ASSERT(peer != nullptr);
gpr_log(GPR_DEBUG, "client_peer=%s", peer);
gpr_log(GPR_ERROR, "client_peer=%s", peer);
gpr_free(peer);
// Server sends status ABORTED.

Loading…
Cancel
Save