grpc 1.62.0.pre1 → 1.62.3

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: 5b0f00f82e1f1bc8b5239a809752429fca9626ff5f29f5078eb7fb019ffe19f7
4
- data.tar.gz: 9b830db17e7014c9365f07faa988c1905d5534ad6dd070d99e0e5dfc93955bf5
3
+ metadata.gz: 2c498eddd18ed16b8f39bfa318f1386c011dc00af9ed067b6636c3ea51c0b6d7
4
+ data.tar.gz: 390a1cdaaa3a3970e1d1a37793795b852897a66233b5d2fe44b6bba1bd9ba50e
5
5
  SHA512:
6
- metadata.gz: 126a8b330806c9014ef10b9ef5ce0a0770951c60789c447545b2f4c4e270ac9460003ec080b32b8b5fa0be4b688e30bb5ba45952a03b12e0293c10c4ddffa3ee
7
- data.tar.gz: 984dfdac038c4591e56773d0a54766a1e505e3282772a5825f66c9caa7f28e4eb7952658d2fd29d4a4618531f6d2fb3d02dd0ceb65d4b3107070c002500d382f
6
+ metadata.gz: 0a7498b7ae8f4a6b6ecbf9dbdb5446c15b92a9c97360d6d1b64edd300cf29009ac873295558818db5db3ef8d724f03239ec90fe152ef8b2cbbc2093fef653a3d
7
+ data.tar.gz: 93b612e1238a1f93491479291d393e2d4530faa4434dd0fe63a11c5c67a7650d1dfe4cb3edeaec01f975402df2f5373bfb0e4d2eafb6d6cf8d2bb16ee027ef28
data/Makefile CHANGED
@@ -411,7 +411,7 @@ Q = @
411
411
  endif
412
412
 
413
413
  CORE_VERSION = 39.0.0
414
- CPP_VERSION = 1.62.0-pre1
414
+ CPP_VERSION = 1.62.3
415
415
 
416
416
  CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES))
417
417
  CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)
@@ -2897,7 +2897,6 @@ static void next_bdp_ping_timer_expired_locked(
2897
2897
  grpc_core::RefCountedPtr<grpc_chttp2_transport> t,
2898
2898
  GRPC_UNUSED grpc_error_handle error) {
2899
2899
  GPR_DEBUG_ASSERT(error.ok());
2900
- GPR_ASSERT(t->next_bdp_ping_timer_handle != TaskHandle::kInvalid);
2901
2900
  t->next_bdp_ping_timer_handle = TaskHandle::kInvalid;
2902
2901
  if (t->flow_control.bdp_estimator()->accumulator() == 0) {
2903
2902
  // 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(
@@ -238,6 +238,8 @@ class HPackParser {
238
238
  HPackTable hpack_table;
239
239
  // Error so far for this frame (set by class Input)
240
240
  HpackParseResult frame_error;
241
+ // Error so far for this field (set by class Input)
242
+ HpackParseResult field_error;
241
243
  // Length of frame so far.
242
244
  uint32_t frame_length = 0;
243
245
  // 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.62.0.pre1'
17
+ VERSION = '1.62.3'
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.62.0.pre1
4
+ version: 1.62.3
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: 2024-02-14 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
@@ -3517,7 +3517,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
3517
3517
  - !ruby/object:Gem::Version
3518
3518
  version: '0'
3519
3519
  requirements: []
3520
- rubygems_version: 3.5.6
3520
+ rubygems_version: 3.5.17
3521
3521
  signing_key:
3522
3522
  specification_version: 4
3523
3523
  summary: GRPC system in Ruby