Skip to content
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

%-encoded characters in url path are not decoded during json-grpc transcoding #425

Open
ashi009 opened this issue Aug 10, 2018 · 3 comments

Comments

@ashi009
Copy link

ashi009 commented Aug 10, 2018

We have a rpc method like the following:

  rpc GetBook(GetBookRequest) returns (Book) {
    option (google.api.http) = {
      get : "/v1/{name=books/*}",
    };
  }

When receiving a GET request like GET /books/something%26like%26this, the resource name books/something%26like%26this is passed in GetBookRequest.name field as it.

The tests in path_matcher_node_test.cc suggests this is the intended behavior. However, I found that fully_decode_reserved_expansion was added in http.proto. This new flag allows the user to force decoding of all %-encoded characters (if I understand it correctly), and it doesn't seem to have implemented in esp/grpc-httpjson-transcoding.

@ashi009 ashi009 changed the title %-encoded characters are not decoded during json-grpc transcoding %-encoded characters in url path are not decoded during json-grpc transcoding Aug 10, 2018
@ashi009 ashi009 closed this as completed Aug 10, 2018
@ashi009 ashi009 reopened this Aug 10, 2018
@ashi009
Copy link
Author

ashi009 commented Aug 10, 2018

Our RPCs are designed as follow: https://cloud.google.com/apis/design/resource_names#resource_name_vs_url

@fieryorc
Copy link

fieryorc commented Jan 9, 2019

Running into the same issue. When we use our local grpc gateway (golang generated code), it does the right thing. However, ESP doesn't decode the values.

@qiwzhang
Copy link
Contributor

qiwzhang commented Jan 9, 2019

Yes, the flag fully_decode_reserved_expansion is not supported by ESP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants