grpc 1.61.0.pre2 → 1.61.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Makefile +1 -1
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +0 -1
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +36 -27
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +2 -0
- data/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc +4 -0
- data/src/core/lib/event_engine/windows/native_windows_dns_resolver.cc +1 -0
- data/src/core/lib/gprpp/windows/directory_reader.cc +1 -0
- data/src/ruby/lib/grpc/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0aeb3cf09d17638e27141f82ff53850ac77f479a78f38cd2378c5aaab5fb5e6b
|
4
|
+
data.tar.gz: 270acd6055d1f1c2744baea531b10c13c8145e93d3bfb36900a5b3805a3fa507
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6849461139cf60018a33f38ecf391e4e53d884b37b01051b549ae010cf1021830a992e6cc07b9ebc5cd9799048e8d87d36bcea6104061677f95bd98492e07499
|
7
|
+
data.tar.gz: bcc4f655675c1bf5506d860ac88344d1a8dab832930330e3b4f4fa87ea78374d8cee13185f191131261eb89cc106a7dbe3f467c730444d617aed12f6c69cfb57
|
data/Makefile
CHANGED
@@ -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,
|
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
|
-
|
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 ||
|
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 (
|
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
|
-
|
306
|
-
|
307
|
-
|
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
|
-
|
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&
|
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
|
-
|
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 (
|
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 (
|
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,
|
996
|
-
if (!
|
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{
|
1004
|
-
|
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
|
-
|
1171
|
-
|
1172
|
-
|
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
|
@@ -18,6 +18,10 @@
|
|
18
18
|
#include <AvailabilityMacros.h>
|
19
19
|
#ifdef AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER
|
20
20
|
|
21
|
+
#include "absl/status/status.h"
|
22
|
+
#include "absl/strings/str_cat.h"
|
23
|
+
#include "absl/strings/str_format.h"
|
24
|
+
|
21
25
|
#include "src/core/lib/event_engine/cf_engine/cfstream_endpoint.h"
|
22
26
|
#include "src/core/lib/event_engine/trace.h"
|
23
27
|
#include "src/core/lib/gprpp/strerror.h"
|
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.61.
|
4
|
+
version: 1.61.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-01
|
11
|
+
date: 2024-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -3482,7 +3482,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
3482
3482
|
- !ruby/object:Gem::Version
|
3483
3483
|
version: '0'
|
3484
3484
|
requirements: []
|
3485
|
-
rubygems_version: 3.5.
|
3485
|
+
rubygems_version: 3.5.17
|
3486
3486
|
signing_key:
|
3487
3487
|
specification_version: 4
|
3488
3488
|
summary: GRPC system in Ruby
|