Currently the HttpResponse's getContent method implicitly wraps the response InputStream with GZipInputStream if the content-encoding is set to gzip like below: https://github.com/googleapis/google-http-java-client/blob/master/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java#L360 ``` // gzip encoding (wrap content with GZipInputStream) String contentEncoding = this.contentEncoding; if (contentEncoding != null && contentEncoding.contains("gzip")) { lowLevelResponseContent = new GZIPInputStream(lowLevelResponseContent); } ``` I am implementing a proxy and would ideally want to avoid decompressing this and then recompressing the response again before sending it through to the client. It would be good if we had the option to disable this on demand. I do see a few others interested in this feature per this discussion: https://groups.google.com/forum/#!searchin/google-http-java-client/disable$20gzip%7Csort:date/google-http-java-client/VpNHTcwGvgw/lleR9ncuXesJ
Currently the HttpResponse's getContent method implicitly wraps the response InputStream with GZipInputStream if the content-encoding is set to gzip like below:
https://github.com/googleapis/google-http-java-client/blob/master/google-http-client/src/main/java/com/google/api/client/http/HttpResponse.java#L360
I am implementing a proxy and would ideally want to avoid decompressing this and then recompressing the response again before sending it through to the client. It would be good if we had the option to disable this on demand.
I do see a few others interested in this feature per this discussion: https://groups.google.com/forum/#!searchin/google-http-java-client/disable$20gzip%7Csort:date/google-http-java-client/VpNHTcwGvgw/lleR9ncuXesJ