Response parsing breaks with 'grpc-encoding: gzip'
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 802
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 5
Description
When the gRPC response is gzipped (indicated by the `grpc-encoding: gzip` response header), the grpc-web stream parser fails with this error (including the first few bytes for reference):
```
Uncaught Error: The stream is broken @0/0. Error: invalid frame byte. With input:
1,0,0,2,126,31,...
```
And the grpc-web filter in Envoy unfortunately automatically adds this request header when proxying to the gRPC server: `grpc-accept-encoding:identity,deflate,gzip`, which in the case of akka-grpc at least causes the server to gzip. The envoy source code has a comment stating that this header 'is required for gRPC'.
When I hacked akka-grpc to ignore the above header and not gzip, the response is properly parsed.
I'm a backend engr., but if someone can give me some pointers I could take a stab at fixing this.
Contributor guide
Assessment
This issue has not been assessed yet.