Skip to content

Commit

Permalink
Add support for gzip compression (#20)
Browse files Browse the repository at this point in the history
* Add support for gzip compression

* Changelog entry
  • Loading branch information
bradleyjkemp authored Jun 24, 2019
1 parent efdf360 commit 17befc4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

## v0.1.3 (unreleased)
* Added proxy loop detection so that misconfiguration (e.g. missing/incorrent `--destination` flag) do not cause infinite loops and connection exhaustion.
* `grpc-proxy` now supports requests with gzip compression (however requests are still proxied uncompressed).

## [v0.1.2](https://github.com/bradleyjkemp/grpc-tools/releases/tag/v0.1.2)
* Fixed bug where the `--destination` flag didn't work (issue [#13](https://github.com/bradleyjkemp/grpc-tools/issues/13))
* Fixed bug where the `--destination` flag didn't work (issue [#13](https://github.com/bradleyjkemp/grpc-tools/issues/13)).

## [v0.1.1](https://github.com/bradleyjkemp/grpc-tools/releases/tag/v0.1.1)
* Added automatic detection of mkcert certificates in the current directory
* Added automatic detection of mkcert certificates in the current directory.

## [v0.1.0](https://github.com/bradleyjkemp/grpc-tools/releases/tag/v0.1.0)
* Added grpc-dump, grpc-fixture, grpc-replay
* Added grpc-dump, grpc-fixture, grpc-replay.
1 change: 1 addition & 0 deletions grpc-proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/improbable-eng/grpc-web/go/grpcweb"
"github.com/sirupsen/logrus"
"google.golang.org/grpc"
_ "google.golang.org/grpc/encoding/gzip"
"net"
)

Expand Down
2 changes: 1 addition & 1 deletion integration_test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ all_proxy=http://localhost:16354 curl -X POST 'https://grpc-web.github.io:1234/g
-H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-US,en;q=0.9' -H 'custom-header-1: value1' \
-H 'User-Agent: Mozilla/5.0' -H 'Content-Type: application/grpc-web+proto' -H 'Accept: */*' \
-H 'X-Grpc-Web: 1' -H 'Cache-Control: no-cache' -H 'Referer: http://localhost:8081/echotest.html' \
-H 'Connection: keep-alive'
-H 'Connection: keep-alive' -H 'grpc-encoding: gzip'

kill ${fixturePID}
kill ${dumpPID}
Expand Down

0 comments on commit 17befc4

Please sign in to comment.