<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/http.c, branch v2.13.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.13.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.13.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-04-24T05:07:45Z</updated>
<entry>
<title>Merge branch 'dt/http-postbuffer-can-be-large'</title>
<updated>2017-04-24T05:07:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-04-24T05:07:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4c01f67d9102942cc7f0a737de4c609a6ac1832e'/>
<id>urn:sha1:4c01f67d9102942cc7f0a737de4c609a6ac1832e</id>
<content type='text'>
Allow the http.postbuffer configuration variable to be set to a
size that can be expressed in size_t, which can be larger than
ulong on some platforms.

* dt/http-postbuffer-can-be-large:
  http.postbuffer: allow full range of ssize_t values
</content>
</entry>
<entry>
<title>Merge branch 'sr/http-proxy-configuration-fix'</title>
<updated>2017-04-24T05:07:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-04-24T05:07:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6b51cb61812c11915dbcc1d6daeee60ac77297de'/>
<id>urn:sha1:6b51cb61812c11915dbcc1d6daeee60ac77297de</id>
<content type='text'>
"http.proxy" set to an empty string is used to disable the usage of
proxy.  We broke this early last year.

* sr/http-proxy-configuration-fix:
  http: fix the silent ignoring of proxy misconfiguraion
  http: honor empty http.proxy option to bypass proxy
</content>
</entry>
<entry>
<title>http.postbuffer: allow full range of ssize_t values</title>
<updated>2017-04-14T01:24:32Z</updated>
<author>
<name>David Turner</name>
<email>dturner@twosigma.com</email>
</author>
<published>2017-04-11T18:13:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=37ee680d9b90fe4c4fc5be4e14f17baf49f6ce59'/>
<id>urn:sha1:37ee680d9b90fe4c4fc5be4e14f17baf49f6ce59</id>
<content type='text'>
Unfortunately, in order to push some large repos where a server does
not support chunked encoding, the http postbuffer must sometimes
exceed two gigabytes.  On a 64-bit system, this is OK: we just malloc
a larger buffer.

This means that we need to use CURLOPT_POSTFIELDSIZE_LARGE to set the
buffer size.

Signed-off-by: David Turner &lt;dturner@twosigma.com&gt;
Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http: fix the silent ignoring of proxy misconfiguraion</title>
<updated>2017-04-13T22:51:33Z</updated>
<author>
<name>Sergey Ryazanov</name>
<email>ryazanov.s.a@gmail.com</email>
</author>
<published>2017-04-11T20:22:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ae51d91105981888f58ad21825b4ef0c540032e3'/>
<id>urn:sha1:ae51d91105981888f58ad21825b4ef0c540032e3</id>
<content type='text'>
Earlier, the whole http.proxy option string was passed to curl without
any preprocessing so curl could complain about the invalid proxy
configuration.

After the commit 372370f167 ("http: use credential API to handle proxy
authentication", 2016-01-26), if the user specified an invalid HTTP
proxy option in the configuration, then the option parsing silently
fails and NULL will be passed to curl as a proxy. This forces curl to
fall back to detecting the proxy configuration from the environment,
causing the http.proxy option ignoring.

Fix this issue by checking the proxy option parsing result. If parsing
failed then print an error message and die. Such behaviour allows the
user to quickly figure the proxy misconfiguration and correct it.

Helped-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Sergey Ryazanov &lt;ryazanov.s.a@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http: honor empty http.proxy option to bypass proxy</title>
<updated>2017-04-13T22:51:19Z</updated>
<author>
<name>Sergey Ryazanov</name>
<email>ryazanov.s.a@gmail.com</email>
</author>
<published>2017-04-11T20:22:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=57415089bd33575bcb7e134ddb2e1eacee3dfaca'/>
<id>urn:sha1:57415089bd33575bcb7e134ddb2e1eacee3dfaca</id>
<content type='text'>
Curl distinguishes between an empty proxy address and a NULL proxy
address. In the first case it completely disables proxy usage, but if
the proxy address option is NULL then curl attempts to determine the
proxy address from the http_proxy environment variable.

According to the documentation, if the http.proxy option is set to an
empty string, git should bypass proxy and connect to the server
directly:

    export http_proxy=http://network-proxy/
    cd ~/foobar-project
    git config remote.origin.proxy ""
    git fetch

Previously, proxy host was configured by one line:

    curl_easy_setopt(result, CURLOPT_PROXY, curl_http_proxy);

Commit 372370f167 ("http: use credential API to handle proxy
authentication", 2016-01-26) parses the proxy option, then extracts the
proxy host address and updates the curl configuration, making the
previous call a noop:

    credential_from_url(&amp;proxy_auth, curl_http_proxy);
    curl_easy_setopt(result, CURLOPT_PROXY, proxy_auth.host);

But if the proxy option is empty then the proxy host field becomes NULL.
This forces curl to fall back to detecting the proxy configuration from
the environment, causing the http.proxy option to not work anymore.

Fix this issue by explicitly handling http.proxy being set the empty
string. This also makes the code a bit more clear and should help us
avoid such regressions in the future.

Helped-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Helped-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Sergey Ryazanov &lt;ryazanov.s.a@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>convert unchecked snprintf into xsnprintf</title>
<updated>2017-03-30T21:59:50Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2017-03-28T19:46:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1a168e5c86d2c6cbb57429473357bdf1acdec63c'/>
<id>urn:sha1:1a168e5c86d2c6cbb57429473357bdf1acdec63c</id>
<content type='text'>
These calls to snprintf should always succeed, because their
input is small and fixed. Let's use xsnprintf to make sure
this is the case (and to make auditing for actual truncation
easier).

These could be candidates for turning into heap buffers, but
they fall into a few broad categories that make it not worth
doing:

  - formatting single numbers is simple enough that we can
    see the result should fit

  - the size of a sha1 is likewise well-known, and I didn't
    want to cause unnecessary conflicts with the ongoing
    process to convert these constants to GIT_MAX_HEXSZ

  - the interface for curl_errorstr is dictated by curl

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jt/http-base-url-update-upon-redirect' into maint</title>
<updated>2017-03-16T20:56:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-03-16T20:56:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=68e12d7d97e1c1a853ac4c603b06afa051cf1276'/>
<id>urn:sha1:68e12d7d97e1c1a853ac4c603b06afa051cf1276</id>
<content type='text'>
When a redirected http transport gets an error during the
redirected request, we ignored the error we got from the server,
and ended up giving a not-so-useful error message.

* jt/http-base-url-update-upon-redirect:
  http: attempt updating base URL only if no error
</content>
</entry>
<entry>
<title>Merge branch 'jk/http-auth' into maint</title>
<updated>2017-03-16T20:56:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-03-16T20:56:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d880bfd947f5d5e2b5bcc510d6dee01101ce64a3'/>
<id>urn:sha1:d880bfd947f5d5e2b5bcc510d6dee01101ce64a3</id>
<content type='text'>
Reduce authentication round-trip over HTTP when the server supports
just a single authentication method.

* jk/http-auth:
  http: add an "auto" mode for http.emptyauth
  http: restrict auth methods to what the server advertises
</content>
</entry>
<entry>
<title>Merge branch 'jt/http-base-url-update-upon-redirect'</title>
<updated>2017-03-10T21:24:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-03-10T21:24:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d0f549f403266c14acc687098ee3e697a67984c2'/>
<id>urn:sha1:d0f549f403266c14acc687098ee3e697a67984c2</id>
<content type='text'>
When a redirected http transport gets an error during the
redirected request, we ignored the error we got from the server,
and ended up giving a not-so-useful error message.

* jt/http-base-url-update-upon-redirect:
  http: attempt updating base URL only if no error
</content>
</entry>
<entry>
<title>Merge branch 'jk/http-auth'</title>
<updated>2017-03-10T21:24:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-03-10T21:24:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=92718f57c2e18e69bc7ae3ed18c7157c475e17a9'/>
<id>urn:sha1:92718f57c2e18e69bc7ae3ed18c7157c475e17a9</id>
<content type='text'>
Reduce authentication round-trip over HTTP when the server supports
just a single authentication method.

* jk/http-auth:
  http: add an "auto" mode for http.emptyauth
  http: restrict auth methods to what the server advertises
</content>
</entry>
</feed>
