-
Notifications
You must be signed in to change notification settings - Fork 5.5k
grpc-json-transcoder: Add support for configuring unescaping behavior #14009
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
Changes from 1 commit
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 |
|---|---|---|
|
|
@@ -15,11 +15,24 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; | |
| // gRPC-JSON transcoder :ref:`configuration overview <config_http_filters_grpc_json_transcoder>`. | ||
| // [#extension: envoy.filters.http.grpc_json_transcoder] | ||
|
|
||
| // [#next-free-field: 10] | ||
| // [#next-free-field: 11] | ||
| message GrpcJsonTranscoder { | ||
| option (udpa.annotations.versioning).previous_message_type = | ||
| "envoy.config.filter.http.transcoder.v2.GrpcJsonTranscoder"; | ||
|
|
||
| enum UrlUnescapeSpec { | ||
| // URL path parameters will not decode RFC 6570 reserved characters. | ||
| ALL_CHARACTERS_EXCEPT_RESERVED = 0; | ||
|
|
||
| // URL path parameters will be fully URI-decoded except in | ||
| // cases of single segment matches in reserved expansion, where "%2F" will be | ||
| // left encoded. | ||
| ALL_CHARACTERS_EXCEPT_SLASH = 1; | ||
|
|
||
| // URL path parameters will be fully URI-decoded. | ||
| ALL_CHARACTERS = 2; | ||
| } | ||
|
|
||
| message PrintOptions { | ||
| option (udpa.annotations.versioning).previous_message_type = | ||
| "envoy.config.filter.http.transcoder.v2.GrpcJsonTranscoder.PrintOptions"; | ||
|
|
@@ -160,4 +173,9 @@ message GrpcJsonTranscoder { | |
| // the ``google/rpc/error_details.proto`` should be included in the configured | ||
| // :ref:`proto descriptor set <config_grpc_json_generate_proto_descriptor_set>`. | ||
| bool convert_grpc_status = 9; | ||
|
|
||
| // URL unescaping policy. If this setting is not specified, the | ||
|
Contributor
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. Could you also add comment: |
||
| // value defaults to | ||
| // :ref:`ALL_CHARACTERS_EXCEPT_RESERVED<envoy_api_enum_value_extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder.UrlUnescapeSpec.ALL_CHARACTERS_EXCEPT_RESERVED>`. | ||
| UrlUnescapeSpec url_unescape_spec = 10 [(validate.rules).enum = {defined_only: true}]; | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -134,6 +134,11 @@ service Bookstore { | |
| get: "/bigbook" | ||
| }; | ||
| } | ||
| rpc PostWildcard(EchoBodyRequest) returns (google.protobuf.Empty) { | ||
| option (google.api.http) = { | ||
| post: "/wildcard/{arg=**}" | ||
| }; | ||
|
Contributor
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. I am not sure if The logic will be if UrlUnescape_spec is default, check such
Contributor
Author
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. It can't be,
Contributor
Author
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. I guess the intention of
Contributor
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. I see. Thanks. |
||
| } | ||
| } | ||
|
|
||
| service ServiceWithResponseBody { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.