-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fix body with "*" bug #804
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
I'm confused, are you saying that parameters provided as query parameters should be parsed when |
In my case, I have a request
|
Leaving aside the point about having a body in a GET, what does your http.proto annotations look like for this RPC? |
|
CLAs look good, thanks! |
So judging by your annotations I think the wording in http.proto implies that the parameters should go in the body. You can't expect it to read it from query parameters and the body when you use Also; you should really use |
when body is set to "request_id", the generate code is |
Signed-off-by: forrestchen <forrestchen@tencent.com>
0941433
to
0bfe57b
Compare
What does that error look like? |
|
I'm wondering if that's a bug... it should be possible to have the specific parameter parsed from the body. Can you see why this is broken like this? You can't use * and expect query parameters to work. |
I think the premise of this PR is a flawed interpretation of |
this code says that when body is set to
"*"
in a rpc service, all the query param will map to the request body, but the truth is not. when body is"*"
,b.Body != nil && len(b.Body.FieldPath)
will be true and we should continue the methodSigned-off-by: forrestchen forrestchen@tencent.com