grpc 1.60.0 → 1.60.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb0ea6c3865a0ac83fcf6b3094439655462eaf4a18797ef08989d9caf6211be4
4
- data.tar.gz: eae7b94bd65c9ce13c1341433524e246ce068b1585d18549df1df45bac5f8745
3
+ metadata.gz: '0688ef74aa144714449a3f9c106d06afb9437a41d041a9ae0fd7768d14f1f4b4'
4
+ data.tar.gz: 2ae2303f457f44230a26a986fd8672b2230aa6644951ecd2a3d4abb5e7317b47
5
5
  SHA512:
6
- metadata.gz: 07dabb0bdb5536d746150ed7ca12aa37fcc563a03a1c68db84bb8f4d2d65d15769c96f4d50be8145a60ed43c6ddae427a674373bb3481f6bf5c00dad03ccc0e6
7
- data.tar.gz: d8e620bd5a9b82e10cca440b3d290c11348bd776f04984e9a4f29bdaee7049ed2bc2a21a9355dac677cbe6ec43eee1185c15921282d07b282fc71f360f87dd41
6
+ metadata.gz: 05a4de709e74faa7581ec2c9ce0a65fca8acb1b77fcdc8a885864882c8fd3d22e5cf5421c1352b8c848d65e78ade03a960dd683e634fbad96f915c9bd97f9e0b
7
+ data.tar.gz: cb267fca38856b692c902c4c649a9a40198083a29c72f0a283b1d89540fd8d81a9bab273320ad25cdba40540bb1119f0048d42aa07fbb24b576f646d4760ef45
data/Makefile CHANGED
@@ -411,7 +411,7 @@ Q = @
411
411
  endif
412
412
 
413
413
  CORE_VERSION = 37.0.0
414
- CPP_VERSION = 1.60.0
414
+ CPP_VERSION = 1.60.2
415
415
 
416
416
  CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES))
417
417
  CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)
@@ -2975,7 +2975,6 @@ static void next_bdp_ping_timer_expired_locked(
2975
2975
  grpc_core::RefCountedPtr<grpc_chttp2_transport> t,
2976
2976
  GRPC_UNUSED grpc_error_handle error) {
2977
2977
  GPR_DEBUG_ASSERT(error.ok());
2978
- GPR_ASSERT(t->next_bdp_ping_timer_handle != TaskHandle::kInvalid);
2979
2978
  t->next_bdp_ping_timer_handle = TaskHandle::kInvalid;
2980
2979
  if (t->flow_control.bdp_estimator()->accumulator() == 0) {
2981
2980
  // Block the bdp ping till we receive more data.
@@ -91,12 +91,14 @@ constexpr Base64InverseTable kBase64InverseTable;
91
91
  class HPackParser::Input {
92
92
  public:
93
93
  Input(grpc_slice_refcount* current_slice_refcount, const uint8_t* begin,
94
- const uint8_t* end, absl::BitGenRef bitsrc, HpackParseResult& error)
94
+ const uint8_t* end, absl::BitGenRef bitsrc,
95
+ HpackParseResult& frame_error, HpackParseResult& field_error)
95
96
  : current_slice_refcount_(current_slice_refcount),
96
97
  begin_(begin),
97
98
  end_(end),
98
99
  frontier_(begin),
99
- error_(error),
100
+ frame_error_(frame_error),
101
+ field_error_(field_error),
100
102
  bitsrc_(bitsrc) {}
101
103
 
102
104
  // If input is backed by a slice, retrieve its refcount. If not, return
@@ -215,14 +217,18 @@ class HPackParser::Input {
215
217
 
216
218
  // Check if we saw an EOF
217
219
  bool eof_error() const {
218
- return min_progress_size_ != 0 || error_.connection_error();
220
+ return min_progress_size_ != 0 || frame_error_.connection_error();
221
+ }
222
+
223
+ // Reset the field error to be ok
224
+ void ClearFieldError() {
225
+ if (field_error_.ok()) return;
226
+ field_error_ = HpackParseResult();
219
227
  }
220
228
 
221
229
  // Minimum number of bytes to unstuck the current parse
222
230
  size_t min_progress_size() const { return min_progress_size_; }
223
231
 
224
- bool has_error() const { return !error_.ok(); }
225
-
226
232
  // Set the current error - tweaks the error to include a stream id so that
227
233
  // chttp2 does not close the connection.
228
234
  // Intended for errors that are specific to a stream and recoverable.
@@ -246,10 +252,7 @@ class HPackParser::Input {
246
252
  // read prior to being able to get further in this parse.
247
253
  void UnexpectedEOF(size_t min_progress_size) {
248
254
  GPR_ASSERT(min_progress_size > 0);
249
- if (min_progress_size_ != 0 || error_.connection_error()) {
250
- GPR_DEBUG_ASSERT(eof_error());
251
- return;
252
- }
255
+ if (eof_error()) return;
253
256
  // Set min progress size, taking into account bytes parsed already but not
254
257
  // consumed.
255
258
  min_progress_size_ = min_progress_size + (begin_ - frontier_);
@@ -302,13 +305,18 @@ class HPackParser::Input {
302
305
  // Do not use this directly, instead use SetErrorAndContinueParsing or
303
306
  // SetErrorAndStopParsing.
304
307
  void SetError(HpackParseResult error) {
305
- if (!error_.ok() || min_progress_size_ > 0) {
306
- if (error.connection_error() && !error_.connection_error()) {
307
- error_ = std::move(error); // connection errors dominate
308
+ SetErrorFor(frame_error_, error);
309
+ SetErrorFor(field_error_, std::move(error));
310
+ }
311
+
312
+ void SetErrorFor(HpackParseResult& error, HpackParseResult new_error) {
313
+ if (!error.ok() || min_progress_size_ > 0) {
314
+ if (new_error.connection_error() && !error.connection_error()) {
315
+ error = std::move(new_error); // connection errors dominate
308
316
  }
309
317
  return;
310
318
  }
311
- error_ = std::move(error);
319
+ error = std::move(new_error);
312
320
  }
313
321
 
314
322
  // Refcount if we are backed by a slice
@@ -320,7 +328,8 @@ class HPackParser::Input {
320
328
  // Frontier denotes the first byte past successfully processed input
321
329
  const uint8_t* frontier_;
322
330
  // Current error
323
- HpackParseResult& error_;
331
+ HpackParseResult& frame_error_;
332
+ HpackParseResult& field_error_;
324
333
  // If the error was EOF, we flag it here by noting how many more bytes would
325
334
  // be needed to make progress
326
335
  size_t min_progress_size_ = 0;
@@ -597,6 +606,7 @@ class HPackParser::Parser {
597
606
  bool ParseTop() {
598
607
  GPR_DEBUG_ASSERT(state_.parse_state == ParseState::kTop);
599
608
  auto cur = *input_->Next();
609
+ input_->ClearFieldError();
600
610
  switch (cur >> 4) {
601
611
  // Literal header not indexed - First byte format: 0000xxxx
602
612
  // Literal header never indexed - First byte format: 0001xxxx
@@ -702,7 +712,7 @@ class HPackParser::Parser {
702
712
  break;
703
713
  }
704
714
  gpr_log(
705
- GPR_DEBUG, "HTTP:%d:%s:%s: %s%s", log_info_.stream_id, type,
715
+ GPR_INFO, "HTTP:%d:%s:%s: %s%s", log_info_.stream_id, type,
706
716
  log_info_.is_client ? "CLI" : "SVR", memento.md.DebugString().c_str(),
707
717
  memento.parse_status == nullptr
708
718
  ? ""
@@ -951,11 +961,10 @@ class HPackParser::Parser {
951
961
  state_.string_length)
952
962
  : String::Parse(input_, state_.is_string_huff_compressed,
953
963
  state_.string_length);
954
- HpackParseResult& status = state_.frame_error;
955
964
  absl::string_view key_string;
956
965
  if (auto* s = absl::get_if<Slice>(&state_.key)) {
957
966
  key_string = s->as_string_view();
958
- if (status.ok()) {
967
+ if (state_.field_error.ok()) {
959
968
  auto r = ValidateKey(key_string);
960
969
  if (r != ValidateMetadataResult::kOk) {
961
970
  input_->SetErrorAndContinueParsing(
@@ -965,7 +974,7 @@ class HPackParser::Parser {
965
974
  } else {
966
975
  const auto* memento = absl::get<const HPackTable::Memento*>(state_.key);
967
976
  key_string = memento->md.key();
968
- if (status.ok() && memento->parse_status != nullptr) {
977
+ if (state_.field_error.ok() && memento->parse_status != nullptr) {
969
978
  input_->SetErrorAndContinueParsing(*memento->parse_status);
970
979
  }
971
980
  }
@@ -992,16 +1001,16 @@ class HPackParser::Parser {
992
1001
  key_string.size() + value.wire_size + hpack_constants::kEntryOverhead;
993
1002
  auto md = grpc_metadata_batch::Parse(
994
1003
  key_string, std::move(value_slice), state_.add_to_table, transport_size,
995
- [key_string, &status, this](absl::string_view message, const Slice&) {
996
- if (!status.ok()) return;
1004
+ [key_string, this](absl::string_view message, const Slice&) {
1005
+ if (!state_.field_error.ok()) return;
997
1006
  input_->SetErrorAndContinueParsing(
998
1007
  HpackParseResult::MetadataParseError(key_string));
999
1008
  gpr_log(GPR_ERROR, "Error parsing '%s' metadata: %s",
1000
1009
  std::string(key_string).c_str(),
1001
1010
  std::string(message).c_str());
1002
1011
  });
1003
- HPackTable::Memento memento{std::move(md),
1004
- status.PersistentStreamErrorOrNullptr()};
1012
+ HPackTable::Memento memento{
1013
+ std::move(md), state_.field_error.PersistentStreamErrorOrNullptr()};
1005
1014
  input_->UpdateFrontier();
1006
1015
  state_.parse_state = ParseState::kTop;
1007
1016
  if (state_.add_to_table) {
@@ -1163,13 +1172,13 @@ grpc_error_handle HPackParser::Parse(
1163
1172
  std::vector<uint8_t> buffer = std::move(unparsed_bytes_);
1164
1173
  return ParseInput(
1165
1174
  Input(nullptr, buffer.data(), buffer.data() + buffer.size(), bitsrc,
1166
- state_.frame_error),
1175
+ state_.frame_error, state_.field_error),
1167
1176
  is_last, call_tracer);
1168
1177
  }
1169
- return ParseInput(
1170
- Input(slice.refcount, GRPC_SLICE_START_PTR(slice),
1171
- GRPC_SLICE_END_PTR(slice), bitsrc, state_.frame_error),
1172
- is_last, call_tracer);
1178
+ return ParseInput(Input(slice.refcount, GRPC_SLICE_START_PTR(slice),
1179
+ GRPC_SLICE_END_PTR(slice), bitsrc, state_.frame_error,
1180
+ state_.field_error),
1181
+ is_last, call_tracer);
1173
1182
  }
1174
1183
 
1175
1184
  grpc_error_handle HPackParser::ParseInput(
@@ -236,6 +236,8 @@ class HPackParser {
236
236
  HPackTable hpack_table;
237
237
  // Error so far for this frame (set by class Input)
238
238
  HpackParseResult frame_error;
239
+ // Error so far for this field (set by class Input)
240
+ HpackParseResult field_error;
239
241
  // Length of frame so far.
240
242
  uint32_t frame_length = 0;
241
243
  // Length of the string being parsed
@@ -14,5 +14,5 @@
14
14
 
15
15
  # GRPC contains the General RPC module.
16
16
  module GRPC
17
- VERSION = '1.60.0'
17
+ VERSION = '1.60.2'
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.60.0
4
+ version: 1.60.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - gRPC Authors
8
8
  autorequire:
9
9
  bindir: src/ruby/bin
10
10
  cert_chain: []
11
- date: 2023-11-28 00:00:00.000000000 Z
11
+ date: 2024-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -3460,7 +3460,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
3460
3460
  - !ruby/object:Gem::Version
3461
3461
  version: '0'
3462
3462
  requirements: []
3463
- rubygems_version: 3.4.22
3463
+ rubygems_version: 3.5.17
3464
3464
  signing_key:
3465
3465
  specification_version: 4
3466
3466
  summary: GRPC system in Ruby