From: Brandon Williams <bmwill@google.com>
To: Daniel Stenberg <daniel@haxx.se>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
Stefan Beller <sbeller@google.com>, git <git@vger.kernel.org>,
Anton Golubev <anton.golubev@gmail.com>
Subject: Re: [PATCH 1/2] remote-curl: accept all encoding supported by curl
Date: Tue, 22 May 2018 11:40:07 -0700 [thread overview]
Message-ID: <20180522184007.GA177559@google.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1805220824440.6210@tvnag.unkk.fr>
On 05/22, Daniel Stenberg wrote:
> On Mon, 21 May 2018, Jonathan Nieder wrote:
>
> > > Looking at the code here, this succeeds if enough memory is available.
> > > There is no check if the given parameter is part of
> > > Curl_all_content_encodings();
> >
> > By "this" are you referring to the preimage or the postimage? Are you
> > suggesting a change in git or in libcurl?
> >
> > Curl_all_content_encodings() is an internal function in libcurl, so I'm
> > assuming the latter.
>
> Ack, that certainly isn't the most wonderful API for selecting a compression
> method. In reality, almost everyone sticks to passing on a "" to that option
> to let libcurl pick and ask for the compression algos it knows since both
> gzip and brotli are present only conditionally depending on build options.
Thanks for the clarification. Sounds like the best option is to
continue with this patch and let curl decide using "".
>
> I would agree that the libcurl setopt call should probably be made to fail
> if asked to use a compression method not built-in/supported. Then an
> application could in fact try different algos in order until one works or
> ask to disable compression completely.
>
> In the generic HTTP case, it usually makes sense to ask for more than one
> algorthim though, since this is asking the server for a compressed version
> and typically a HTTP client doesn't know which compression methods the
> server offers. Not sure this is actually true to the same extent for git.
>
> --
>
> / daniel.haxx.se
--
Brandon Williams
next prev parent reply other threads:[~2018-05-22 18:40 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 [this message]
2018-05-22 18:42 ` [PATCH v2 1/2] remote-curl: accept all encodings " Brandon Williams
2018-05-22 18:42 ` [PATCH v2 2/2] remote-curl: accept compressed responses with protocol v2 Brandon Williams
2018-05-22 18:55 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180522184007.GA177559@google.com \
--to=bmwill@google.com \
--cc=anton.golubev@gmail.com \
--cc=daniel@haxx.se \
--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.
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 NNTP newsgroup(s).