]> source.dussan.org Git - jgit.git/commit
Decide whether to "Accept-Encoding: gzip" on a request-by-request basis 47/85647/12
authorZhen Chen <czhen@google.com>
Wed, 23 Nov 2016 00:39:27 +0000 (16:39 -0800)
committerJonathan Nieder <jrn@google.com>
Sat, 10 Dec 2016 00:24:50 +0000 (16:24 -0800)
commitd62130558884e0600665236ab62b20ba0f5bac45
treea967c046c095f6908a5de2b6e8766941d9df3c51
parenta7915d85a8c393aa292f98705ab0aff6c5e68480
Decide whether to "Accept-Encoding: gzip" on a request-by-request basis

When the reply is already compressed (e.g. a packfile fetched using dumb
HTTP), "Content-Encoding: gzip" wastes bandwidth relative to sending the
content raw. So don't "Accept-Encoding: gzip" for such requests.

Change-Id: Id25702c0b0ed2895df8e9790052c3417d713572c
Signed-off-by: Zhen Chen <czhen@google.com>
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkRemoteObjectDatabase.java