git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Brandon Williams <bmwill@google.com>
To: git@vger.kernel.org, jrnieder@gmail.com, sbeller@google.com,
	bmwill@google.com
Cc: jrnieder@gmail.com, sbeller@google.com,
	Brandon Williams <bmwill@google.com>
Subject: [PATCH v2 2/2] remote-curl: accept compressed responses with protocol v2
Date: Tue, 22 May 2018 11:42:04 -0700	[thread overview]
Message-ID: <20180522184204.47332-2-bmwill@google.com> (raw)
In-Reply-To: <20180522184204.47332-1-bmwill@google.com>

Configure curl to accept compressed responses when using protocol v2 by
setting `CURLOPT_ENCODING` to "", which indicates that curl should send
an "Accept-Encoding" header with all supported compression encodings.

Signed-off-by: Brandon Williams <bmwill@google.com>
---
 remote-curl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/remote-curl.c b/remote-curl.c
index 565bba104..99b0bedc6 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -1259,6 +1259,7 @@ static int proxy_request(struct proxy_state *p)
 
 	slot = get_active_slot();
 
+	curl_easy_setopt(slot->curl, CURLOPT_ENCODING, "");
 	curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0);
 	curl_easy_setopt(slot->curl, CURLOPT_POST, 1);
 	curl_easy_setopt(slot->curl, CURLOPT_URL, p->service_url);
-- 
2.17.0.441.gb46fe60e1d-goog


  reply	other threads:[~2018-05-22 18:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-21 23:40 [PATCH 1/2] remote-curl: accept all encoding supported by curl Brandon Williams
2018-05-21 23:40 ` [PATCH 2/2] remote-curl: accept compressed responses with protocol v2 Brandon Williams
2018-05-22  0:01 ` [PATCH 1/2] remote-curl: accept all encoding supported by curl Jonathan Nieder
2018-05-26 11:08   ` anton.golubev
2018-05-22  0:02 ` Stefan Beller
2018-05-22  1:00   ` Jonathan Nieder
2018-05-22  6:32     ` Daniel Stenberg
2018-05-22 18:40       ` Brandon Williams
2018-05-22 18:42 ` [PATCH v2 1/2] remote-curl: accept all encodings " Brandon Williams
2018-05-22 18:42   ` Brandon Williams [this message]
2018-05-22 18:55     ` [PATCH v2 2/2] remote-curl: accept compressed responses with protocol v2 Jonathan Nieder
2018-05-22 18:48   ` [PATCH v2 1/2] remote-curl: accept all encodings supported by curl Jonathan Nieder
2018-05-23  1:23   ` Junio C Hamano
2018-05-23  2:17     ` brian m. carlson
2018-05-23  5:55     ` Daniel Stenberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180522184204.47332-2-bmwill@google.com \
    --to=bmwill@google.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=sbeller@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).