-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http2: support custom SETTINGS parameters #9964
Changes from 23 commits
9691ae7
28cdf4d
bad389c
4b78a16
0f50401
16b8ba7
08ab741
b553ef5
fdc7c9b
cc5fe09
6def08e
1cf9c32
6bfbfc6
5632a90
b764d34
9455741
78d3e63
8b7621c
7f18239
07c1814
8293133
31c56a0
cb35501
43b83bf
be39274
e48de85
59e2dfe
3f513d4
53bf245
cf8f7f2
ad297e2
6ae55cd
a3dd8bf
e5b5e53
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,8 +112,18 @@ message Http1ProtocolOptions { | |
bool enable_trailers = 5; | ||
} | ||
|
||
// [#next-free-field: 13] | ||
// [#next-free-field: 14] | ||
message Http2ProtocolOptions { | ||
// Defines a parameter to be sent in the SETTINGS frame. | ||
// See `RFC7540, sec. 6.5.1 <https://tools.ietf.org/html/rfc7540#section-6.5.1>`_ for details. | ||
message SettingsParameter { | ||
// The 16 bit parameter identifier. | ||
google.protobuf.UInt32Value identifier = 1 [(validate.rules).uint32 = {lte: 65536 gte: 1}]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this intended for setting just the standardized options? Or experimental as well? It is unclear from the comment below. If just for standardized options should we make the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not just for standardized options but any new options (whether RFC bound or experimental). |
||
|
||
// The 32 bit parameter value. | ||
google.protobuf.UInt32Value value = 2; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the default is 0 and that is OK can we switch this to a basic type, otherwise can we describe the default? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is now required. |
||
} | ||
|
||
// `Maximum table size <https://httpwg.org/specs/rfc7541.html#rfc.section.4.2>`_ | ||
// (in octets) that the encoder is permitted to use for the dynamic HPACK table. Valid values | ||
// range from 0 to 4294967295 (2^32 - 1) and defaults to 4096. 0 effectively disables header | ||
|
@@ -216,6 +226,29 @@ message Http2ProtocolOptions { | |
// | ||
// See `RFC7540, sec. 8.1 <https://tools.ietf.org/html/rfc7540#section-8.1>`_ for details. | ||
bool stream_error_on_invalid_http_messaging = 12; | ||
|
||
// Specifies SETTINGS frame parameters to be sent to the peer, with one exception: | ||
// SETTINGS_ENABLE_PUSH (0x2) is not configurable as HTTP/2 server push is not supported by Envoy. | ||
// | ||
// Note that custom parameters specified through this field may not collide with the following | ||
// named parameters: | ||
// | ||
// .. code-block:: text | ||
// | ||
// ID Field Name | ||
// ---------------- | ||
// 0x1 hpack_table_size | ||
// 0x3 max_concurrent_streams | ||
// 0x4 initial_stream_window_size | ||
// | ||
// Collisions will trigger config validation failure on load/update. | ||
// The only exception is '0x8 allow_connect', for which the named parameter field will be | ||
// overridden by the value set in this field. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we deprecate that field to avoid the confusion in the next api rev? Also if we can consider it a failure to configure both I would - best to avoid confusion. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the deprecation process to follow? I found https://github.com/envoyproxy/envoy/blob/master//CONTRIBUTING.md#breaking-change-policy, and given the level of effort I would prefer to introduce the deprecation in a follow up PR if possible to avoid holding this up. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes +1 on let's do this in a follow up. I would like to land this PR and it's complex enough as it is. I agree with @alyssawilk that we should do this. Can you open an issue to track? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SG. Filed #10412. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cool, I'm fine with a follow-up for deprecation but I'd be inclined to mention the plan in the API comments as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to clarify, is your proposal that |
||
// | ||
// See `IANA HTTP/2 Settings | ||
// <https://www.iana.org/assignments/http2-parameters/http2-parameters.xhtml#settings>`_ for | ||
// standardized identifiers. | ||
repeated SettingsParameter custom_settings_parameters = 13; | ||
} | ||
|
||
// [#not-implemented-hide:] | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be required? <=, >=, etc. I don't think makes it required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, missed that. This is now required along with the second field.