GoogleCloudPlatform / GoogleCloudPlatform/esp-v2

JSON POST full path requests fail when then there is a GET binding

Open
#724 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
307
Forks
185
Avg merge
14h 45m
Merged PRs (30d)
6

Description

In attempting to upgrade to esp-v2, we came across some failing requests. It turns out all the failing calls have service definitions like

```
rpc GetThing(GetThingRequest) returns (GetThingResponse) {
option (google.api.http) = {
get: "/v1/things/{thing_id}"
};
}
```
But were still called from the front end by POST calls to `/my.package.ThingService/GetThing`. All these calls stall for slightly over 4 seconds, before returning a 502. Changing them to GET `/v1/things/mything` makes the calls work.

In esp-v1 both call forms work. It looks like esp-v2 is attempting to make them work, as the calls are forwarded to the underlying server, but the server isn't able to process the call properly. It throws an error message relatively quickly, complaining about a `null` gRPC stream. The server is running Java.

According to https://cloud.google.com/endpoints/docs/grpc/transcoding#where_to_configure_transcoding sending POST calls is still supposed to work, even if there are other bindings.

Contributor guide

Open the contributing guide

Research direction

The issue names no repository file or test. Start by reproducing the POST full-path request against the shown service definition with a GET binding, then compare it with the working transcoded GET request and the reported 502/null gRPC stream failure. Done means both call forms work as they did in esp-v1.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, grpc
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.