<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/http.c, branch v2.0.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.0.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.0.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-03-14T21:26:29Z</updated>
<entry>
<title>Merge branch 'mh/object-code-cleanup'</title>
<updated>2014-03-14T21:26:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-03-14T21:26:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=060be00621dbac572ac71d07ae40884e0d4303f3'/>
<id>urn:sha1:060be00621dbac572ac71d07ae40884e0d4303f3</id>
<content type='text'>
* mh/object-code-cleanup:
  sha1_file.c: document a bunch of functions defined in the file
  sha1_file_name(): declare to return a const string
  find_pack_entry(): document last_found_pack
  replace_object: use struct members instead of an array
</content>
</entry>
<entry>
<title>sha1_file_name(): declare to return a const string</title>
<updated>2014-02-24T17:10:22Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2014-02-21T16:32:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=30d6c6eabfefed330bebbed9126fe21bf349fd6b'/>
<id>urn:sha1:30d6c6eabfefed330bebbed9126fe21bf349fd6b</id>
<content type='text'>
Change the return value of sha1_file_name() to (const char *).
(Callers have no business mucking about here.)  Change callers
accordingly, deleting a few superfluous temporary variables along the
way.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http: never use curl_easy_perform</title>
<updated>2014-02-18T23:50:57Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-02-18T10:34:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=beed336c3e35acfd7aad9033eb9294e42b9530af'/>
<id>urn:sha1:beed336c3e35acfd7aad9033eb9294e42b9530af</id>
<content type='text'>
We currently don't reuse http connections when fetching via
the smart-http protocol. This is bad because the TCP
handshake introduces latency, and especially because SSL
connection setup may be non-trivial.

We can fix it by consistently using curl's "multi"
interface.  The reason is rather complicated:

Our http code has two ways of being used: queuing many
"slots" to be fetched in parallel, or fetching a single
request in a blocking manner. The parallel code is built on
curl's "multi" interface. Most of the single-request code
uses http_request, which is built on top of the parallel
code (we just feed it one slot, and wait until it finishes).

However, one could also accomplish the single-request scheme
by avoiding curl's multi interface entirely and just using
curl_easy_perform. This is simpler, and is used by post_rpc
in the smart-http protocol.

It does work to use the same curl handle in both contexts,
as long as it is not at the same time.  However, internally
curl may not share all of the cached resources between both
contexts. In particular, a connection formed using the
"multi" code will go into a reuse pool connected to the
"multi" object. Further requests using the "easy" interface
will not be able to reuse that connection.

The smart http protocol does ref discovery via http_request,
which uses the "multi" interface, and then follows up with
the "easy" interface for its rpc calls. As a result, we make
two HTTP connections rather than reusing a single one.

We could teach the ref discovery to use the "easy"
interface. But it is only once we have done this discovery
that we know whether the protocol will be smart or dumb. If
it is dumb, then our further requests, which want to fetch
objects in parallel, will not be able to reuse the same
connection.

Instead, this patch switches post_rpc to build on the
parallel interface, which means that we use it consistently
everywhere. It's a little more complicated to use, but since
we have the infrastructure already, it doesn't add any code;
we can just factor out the relevant bits from http_request.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'cc/starts-n-ends-with'</title>
<updated>2013-12-17T20:02:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-12-17T19:47:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ad7044857660af7ffaaf8fbbccc77b817d1b938f'/>
<id>urn:sha1:ad7044857660af7ffaaf8fbbccc77b817d1b938f</id>
<content type='text'>
Remove a few duplicate implementations of prefix/suffix comparison
functions, and rename them to starts_with and ends_with.

* cc/starts-n-ends-with:
  replace {pre,suf}fixcmp() with {starts,ends}_with()
  strbuf: introduce starts_with() and ends_with()
  builtin/remote: remove postfixcmp() and use suffixcmp() instead
  environment: normalize use of prefixcmp() by removing " != 0"
</content>
</entry>
<entry>
<title>replace {pre,suf}fixcmp() with {starts,ends}_with()</title>
<updated>2013-12-05T22:13:21Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2013-11-30T20:55:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=59556548230e617b837343c2c07e357e688e2ca4'/>
<id>urn:sha1:59556548230e617b837343c2c07e357e688e2ca4</id>
<content type='text'>
Leaving only the function definitions and declarations so that any
new topic in flight can still make use of the old functions, replace
existing uses of the prefixcmp() and suffixcmp() with new API
functions.

The change can be recreated by mechanically applying this:

    $ git grep -l -e prefixcmp -e suffixcmp -- \*.c |
      grep -v strbuf\\.c |
      xargs perl -pi -e '
        s|!prefixcmp\(|starts_with\(|g;
        s|prefixcmp\(|!starts_with\(|g;
        s|!suffixcmp\(|ends_with\(|g;
        s|suffixcmp\(|!ends_with\(|g;
      '

on the result of preparatory changes in this series.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bc/http-100-continue'</title>
<updated>2013-12-05T20:58:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-12-05T20:58:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c5a77e8f9293674e9a936f01cc1719a316f87d24'/>
<id>urn:sha1:c5a77e8f9293674e9a936f01cc1719a316f87d24</id>
<content type='text'>
Issue "100 Continue" responses to help use of GSS-Negotiate
authentication scheme over HTTP transport when needed.

* bc/http-100-continue:
  remote-curl: fix large pushes with GSSAPI
  remote-curl: pass curl slot_results back through run_slot
  http: return curl's AUTHAVAIL via slot_results
</content>
</entry>
<entry>
<title>http: return curl's AUTHAVAIL via slot_results</title>
<updated>2013-10-31T17:05:55Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2013-10-31T06:35:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0972ccd97cc8f913ea828a1e03ef3652fc1ff514'/>
<id>urn:sha1:0972ccd97cc8f913ea828a1e03ef3652fc1ff514</id>
<content type='text'>
Callers of the http code may want to know which auth types
were available for the previous request. But after finishing
with the curl slot, they are not supposed to look at the
curl handle again. We already handle returning other
information via the slot_results struct; let's add a flag to
check the available auth.

Note that older versions of curl did not support this, so we
simply return 0 (something like "-1" would be worse, as the
value is a bitflag and we might accidentally set a flag).
This is sufficient for the callers planned in this series,
who only trigger some optional behavior if particular bits
are set, and can live with a fake "no bits" answer.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/http-auth-redirects'</title>
<updated>2013-10-30T19:09:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-10-30T19:09:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=177f0a400955f2345c73a5c8b0459d617429ffd9'/>
<id>urn:sha1:177f0a400955f2345c73a5c8b0459d617429ffd9</id>
<content type='text'>
Handle the case where http transport gets redirected during the
authorization request better.

* jk/http-auth-redirects:
  http.c: Spell the null pointer as NULL
  remote-curl: rewrite base url from info/refs redirects
  remote-curl: store url as a strbuf
  remote-curl: make refs_url a strbuf
  http: update base URLs when we see redirects
  http: provide effective url to callers
  http: hoist credential request out of handle_curl_result
  http: refactor options to http_get_*
  http_request: factor out curlinfo_strbuf
  http_get_file: style fixes
</content>
</entry>
<entry>
<title>Merge branch 'ew/keepalive'</title>
<updated>2013-10-28T17:43:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-10-28T17:43:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bb2fd90c7bbb4261aa1800a4c35b06dc5116a647'/>
<id>urn:sha1:bb2fd90c7bbb4261aa1800a4c35b06dc5116a647</id>
<content type='text'>
* ew/keepalive:
  http: use curl's tcp keepalive if available
  http: enable keepalive on TCP sockets
</content>
</entry>
<entry>
<title>http.c: Spell the null pointer as NULL</title>
<updated>2013-10-24T21:42:26Z</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2013-10-24T20:17:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=70900eda4a0ed473ab5a933940285ac3dda698c0'/>
<id>urn:sha1:70900eda4a0ed473ab5a933940285ac3dda698c0</id>
<content type='text'>
Commit 1bbcc224 ("http: refactor options to http_get_*", 28-09-2013)
changed the type of final 'options' argument of the http_get_file()
function from an int to an 'struct http_get_options' pointer.
However, it neglected to update the (single) call site. Since this
call was passing '0' to that argument, it was (correctly) being
interpreted as a null pointer. Change to argument to NULL.

Noticed by sparse. ("Using plain integer as NULL pointer")

Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Acked-by: Jeff King &lt;peff@peff.net&gt;
Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
