grpc 1.54.0 → 1.54.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of grpc might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Makefile +2 -2
- data/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc +1 -1
- data/src/core/ext/gcp/metadata_query.cc +5 -10
- data/src/core/ext/gcp/metadata_query.h +10 -5
- data/src/core/ext/transport/chttp2/transport/bin_encoder.cc +12 -8
- data/src/core/ext/transport/chttp2/transport/bin_encoder.h +5 -1
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +118 -222
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +295 -113
- data/src/core/ext/transport/chttp2/transport/hpack_encoder_table.cc +2 -0
- data/src/core/ext/transport/chttp2/transport/hpack_encoder_table.h +2 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +451 -277
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +3 -1
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.cc +14 -12
- data/src/core/ext/transport/chttp2/transport/hpack_parser_table.h +9 -1
- data/src/core/lib/event_engine/event_engine.cc +4 -4
- data/src/core/lib/surface/validate_metadata.cc +43 -42
- data/src/core/lib/surface/validate_metadata.h +9 -0
- data/src/core/lib/transport/metadata_batch.h +110 -2
- data/src/core/lib/transport/parsed_metadata.h +16 -6
- data/src/ruby/lib/grpc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d598caa30453ae27a2e770adab7de9eae672d3ce5a1f90424251b4242493800
|
4
|
+
data.tar.gz: c050771539ec9df8569b590297783ee9a0538ff692b6d45a1cf1b0fdb73a0120
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e469fa1123d56a78b3ec61d32ad3a4c89086f3fb0dded22e51c64d68da0cce5d9d42742a123cafee1c2c3e6ebafa0a322d81d88e82498f20454e0f9eb3e65275
|
7
|
+
data.tar.gz: 38435b040d5ec1a61fa39caef97bc45229a17b2f1a3313588d1108b0f3e039cead9ffeb5421b2c2c0c4cd856940ac6b0ab852f694f480d8449874dfb3e246399
|
data/Makefile
CHANGED
@@ -411,8 +411,8 @@ Q = @
|
|
411
411
|
endif
|
412
412
|
|
413
413
|
CORE_VERSION = 31.0.0
|
414
|
-
CPP_VERSION = 1.54.
|
415
|
-
CSHARP_VERSION = 2.54.
|
414
|
+
CPP_VERSION = 1.54.2
|
415
|
+
CSHARP_VERSION = 2.54.2
|
416
416
|
|
417
417
|
CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES))
|
418
418
|
CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)
|
@@ -116,7 +116,7 @@ constexpr absl::string_view kRls = "rls_experimental";
|
|
116
116
|
const char kGrpc[] = "grpc";
|
117
117
|
const char* kRlsRequestPath = "/grpc.lookup.v1.RouteLookupService/RouteLookup";
|
118
118
|
const char* kFakeTargetFieldValue = "fake_target_field_value";
|
119
|
-
const char* kRlsHeaderKey = "
|
119
|
+
const char* kRlsHeaderKey = "x-google-rls-data";
|
120
120
|
|
121
121
|
const Duration kDefaultLookupServiceTimeout = Duration::Seconds(10);
|
122
122
|
const Duration kMaxMaxAge = Duration::Minutes(5);
|
@@ -46,16 +46,11 @@ namespace grpc_core {
|
|
46
46
|
|
47
47
|
TraceFlag grpc_metadata_query_trace(false, "metadata_query");
|
48
48
|
|
49
|
-
constexpr const char MetadataQuery::kZoneAttribute[]
|
50
|
-
|
51
|
-
constexpr const char MetadataQuery::
|
52
|
-
|
53
|
-
constexpr const char MetadataQuery::
|
54
|
-
"/computeMetadata/v1/instance/region";
|
55
|
-
constexpr const char MetadataQuery::kInstanceIdAttribute[] =
|
56
|
-
"/computeMetadata/v1/instance/id";
|
57
|
-
constexpr const char MetadataQuery::kIPv6Attribute[] =
|
58
|
-
"/computeMetadata/v1/instance/network-interfaces/0/ipv6s";
|
49
|
+
constexpr const char MetadataQuery::kZoneAttribute[];
|
50
|
+
constexpr const char MetadataQuery::kClusterNameAttribute[];
|
51
|
+
constexpr const char MetadataQuery::kRegionAttribute[];
|
52
|
+
constexpr const char MetadataQuery::kInstanceIdAttribute[];
|
53
|
+
constexpr const char MetadataQuery::kIPv6Attribute[];
|
59
54
|
|
60
55
|
MetadataQuery::MetadataQuery(
|
61
56
|
std::string attribute, grpc_polling_entity* pollent,
|
@@ -38,11 +38,16 @@ namespace grpc_core {
|
|
38
38
|
// environment.
|
39
39
|
class MetadataQuery : public InternallyRefCounted<MetadataQuery> {
|
40
40
|
public:
|
41
|
-
static const char kZoneAttribute[]
|
42
|
-
|
43
|
-
static const char
|
44
|
-
|
45
|
-
static const char
|
41
|
+
static constexpr const char kZoneAttribute[] =
|
42
|
+
"/computeMetadata/v1/instance/zone";
|
43
|
+
static constexpr const char kClusterNameAttribute[] =
|
44
|
+
"/computeMetadata/v1/instance/attributes/cluster-name";
|
45
|
+
static constexpr const char kRegionAttribute[] =
|
46
|
+
"/computeMetadata/v1/instance/region";
|
47
|
+
static constexpr const char kInstanceIdAttribute[] =
|
48
|
+
"/computeMetadata/v1/instance/id";
|
49
|
+
static constexpr const char kIPv6Attribute[] =
|
50
|
+
"/computeMetadata/v1/instance/network-interfaces/0/ipv6s";
|
46
51
|
|
47
52
|
MetadataQuery(
|
48
53
|
std::string attribute, grpc_polling_entity* pollent,
|
@@ -149,7 +149,8 @@ static void enc_flush_some(huff_out* out) {
|
|
149
149
|
}
|
150
150
|
}
|
151
151
|
|
152
|
-
static void enc_add2(huff_out* out, uint8_t a, uint8_t b) {
|
152
|
+
static void enc_add2(huff_out* out, uint8_t a, uint8_t b, uint32_t* wire_size) {
|
153
|
+
*wire_size += 2;
|
153
154
|
b64_huff_sym sa = huff_alphabet[a];
|
154
155
|
b64_huff_sym sb = huff_alphabet[b];
|
155
156
|
out->temp = (out->temp << (sa.length + sb.length)) |
|
@@ -159,7 +160,8 @@ static void enc_add2(huff_out* out, uint8_t a, uint8_t b) {
|
|
159
160
|
enc_flush_some(out);
|
160
161
|
}
|
161
162
|
|
162
|
-
static void enc_add1(huff_out* out, uint8_t a) {
|
163
|
+
static void enc_add1(huff_out* out, uint8_t a, uint32_t* wire_size) {
|
164
|
+
*wire_size += 1;
|
163
165
|
b64_huff_sym sa = huff_alphabet[a];
|
164
166
|
out->temp = (out->temp << sa.length) | sa.bits;
|
165
167
|
out->temp_length += sa.length;
|
@@ -167,7 +169,7 @@ static void enc_add1(huff_out* out, uint8_t a) {
|
|
167
169
|
}
|
168
170
|
|
169
171
|
grpc_slice grpc_chttp2_base64_encode_and_huffman_compress(
|
170
|
-
const grpc_slice& input) {
|
172
|
+
const grpc_slice& input, uint32_t* wire_size) {
|
171
173
|
size_t input_length = GRPC_SLICE_LENGTH(input);
|
172
174
|
size_t input_triplets = input_length / 3;
|
173
175
|
size_t tail_case = input_length % 3;
|
@@ -183,16 +185,17 @@ grpc_slice grpc_chttp2_base64_encode_and_huffman_compress(
|
|
183
185
|
out.temp = 0;
|
184
186
|
out.temp_length = 0;
|
185
187
|
out.out = start_out;
|
188
|
+
*wire_size = 0;
|
186
189
|
|
187
190
|
// encode full triplets
|
188
191
|
for (i = 0; i < input_triplets; i++) {
|
189
192
|
const uint8_t low_to_high = static_cast<uint8_t>((in[0] & 0x3) << 4);
|
190
193
|
const uint8_t high_to_low = in[1] >> 4;
|
191
|
-
enc_add2(&out, in[0] >> 2, low_to_high | high_to_low);
|
194
|
+
enc_add2(&out, in[0] >> 2, low_to_high | high_to_low, wire_size);
|
192
195
|
|
193
196
|
const uint8_t a = static_cast<uint8_t>((in[1] & 0xf) << 2);
|
194
197
|
const uint8_t b = (in[2] >> 6);
|
195
|
-
enc_add2(&out, a | b, in[2] & 0x3f);
|
198
|
+
enc_add2(&out, a | b, in[2] & 0x3f, wire_size);
|
196
199
|
in += 3;
|
197
200
|
}
|
198
201
|
|
@@ -201,14 +204,15 @@ grpc_slice grpc_chttp2_base64_encode_and_huffman_compress(
|
|
201
204
|
case 0:
|
202
205
|
break;
|
203
206
|
case 1:
|
204
|
-
enc_add2(&out, in[0] >> 2, static_cast<uint8_t>((in[0] & 0x3) << 4)
|
207
|
+
enc_add2(&out, in[0] >> 2, static_cast<uint8_t>((in[0] & 0x3) << 4),
|
208
|
+
wire_size);
|
205
209
|
in += 1;
|
206
210
|
break;
|
207
211
|
case 2: {
|
208
212
|
const uint8_t low_to_high = static_cast<uint8_t>((in[0] & 0x3) << 4);
|
209
213
|
const uint8_t high_to_low = in[1] >> 4;
|
210
|
-
enc_add2(&out, in[0] >> 2, low_to_high | high_to_low);
|
211
|
-
enc_add1(&out, static_cast<uint8_t>((in[1] & 0xf) << 2));
|
214
|
+
enc_add2(&out, in[0] >> 2, low_to_high | high_to_low, wire_size);
|
215
|
+
enc_add1(&out, static_cast<uint8_t>((in[1] & 0xf) << 2), wire_size);
|
212
216
|
in += 2;
|
213
217
|
break;
|
214
218
|
}
|
@@ -21,6 +21,8 @@
|
|
21
21
|
|
22
22
|
#include <grpc/support/port_platform.h>
|
23
23
|
|
24
|
+
#include <stdint.h>
|
25
|
+
|
24
26
|
#include <grpc/slice.h>
|
25
27
|
|
26
28
|
// base64 encode a slice. Returns a new slice, does not take ownership of the
|
@@ -36,7 +38,9 @@ grpc_slice grpc_chttp2_huffman_compress(const grpc_slice& input);
|
|
36
38
|
// grpc_slice y = grpc_chttp2_huffman_compress(x);
|
37
39
|
// grpc_core::CSliceUnref( x);
|
38
40
|
// return y;
|
41
|
+
// *wire_size is the length of the base64 encoded string prior to huffman
|
42
|
+
// compression (as is needed for hpack table math)
|
39
43
|
grpc_slice grpc_chttp2_base64_encode_and_huffman_compress(
|
40
|
-
const grpc_slice& input);
|
44
|
+
const grpc_slice& input, uint32_t* wire_size);
|
41
45
|
|
42
46
|
#endif // GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H
|