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

Simplify compressed response handling #46

Merged
merged 1 commit into from
Oct 4, 2018

Conversation

maciej
Copy link
Contributor

@maciej maciej commented Oct 4, 2018

This commit simplifies gzip compressed response handling.
Godoc clearly says that by default http.Transport will
add 'Accept-Encoding: gzip' to a Request and transparently
decode the response if a 'Content-Encoding: gzip' header
is present.
See https://golang.org/src/net/http/transport.go#L181

Therefore it is only necessary to add "enable_http_compression=1"
HTTP query parameter to Clickhouse server requests.

This commit simplifies gzip compressed response handling.
Godoc clearly says that by default http.Transport will
add 'Accept-Encoding: gzip' to a Request and transparently
decode the response if a 'Content-Encoding: gzip' header
is present.
See https://golang.org/src/net/http/transport.go#L181

Therefore it is only necessary to add "enable_http_compression=1"
HTTP query parameter to Clickhouse server requests.
@bgaifullin
Copy link
Contributor

LGTM

@bgaifullin bgaifullin merged commit f16ee58 into mailru:master Oct 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants