<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/http.c, branch v1.8.0.2</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.8.0.2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.8.0.2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2012-10-19T21:15:17Z</updated>
<entry>
<title>Fix potential hang in https handshake</title>
<updated>2012-10-19T21:15:17Z</updated>
<author>
<name>Stefan Zager</name>
<email>szager@google.com</email>
</author>
<published>2012-10-19T21:04:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=7202b81ffccf89605ce2726ff9d63202b5f1da7f'/>
<id>urn:sha1:7202b81ffccf89605ce2726ff9d63202b5f1da7f</id>
<content type='text'>
It has been observed that curl_multi_timeout may return a very long
timeout value (e.g., 294 seconds and some usec) just before
curl_multi_fdset returns no file descriptors for reading.  The
upshot is that select() will hang for a long time -- long enough for
an https handshake to be dropped.  The observed behavior is that
the git command will hang at the terminal and never transfer any
data.

This patch is a workaround for a probable bug in libcurl.  The bug
only seems to manifest around a very specific set of circumstances:

- curl version (from curl/curlver.h):

 #define LIBCURL_VERSION_NUM 0x071307

- git-remote-https running on an ubuntu-lucid VM.
- Connecting through squid proxy running on another VM.

Interestingly, the problem doesn't manifest if a host connects
through squid proxy running on localhost; only if the proxy is on
a separate VM (not sure if the squid host needs to be on a separate
physical machine).  That would seem to suggest that this issue
is timing-sensitive.

This patch is more or less in line with a recommendation in the
curl docs about how to behave when curl_multi_fdset doesn't return
and file descriptors:

http://curl.haxx.se/libcurl/c/curl_multi_fdset.html

Signed-off-by: Stefan Zager &lt;szager@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/maint-http-half-auth-push' into maint</title>
<updated>2012-10-17T17:29:24Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-10-17T17:29:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=e98fa647aa5673cc95b6e9be1fdc13c0afa2cb37'/>
<id>urn:sha1:e98fa647aa5673cc95b6e9be1fdc13c0afa2cb37</id>
<content type='text'>
* jk/maint-http-half-auth-push:
  http: fix segfault in handle_curl_result
</content>
</entry>
<entry>
<title>http: fix segfault in handle_curl_result</title>
<updated>2012-10-12T16:42:31Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2012-10-12T06:22:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=188923f0d1c8148415b3173986cd1e21871c947e'/>
<id>urn:sha1:188923f0d1c8148415b3173986cd1e21871c947e</id>
<content type='text'>
When we create an http active_request_slot, we can set its
"results" pointer back to local storage. The http code will
fill in the details of how the request went, and we can
access those details even after the slot has been cleaned
up.

Commit 8809703 (http: factor out http error code handling)
switched us from accessing our local results struct directly
to accessing it via the "results" pointer of the slot. That
means we're accessing the slot after it has been marked as
finished, defeating the whole purpose of keeping the results
storage separate.

Most of the time this doesn't matter, as finishing the slot
does not actually clean up the pointer. However, when using
curl's multi interface with the dumb-http revision walker,
we might actually start a new request before handing control
back to the original caller. In that case, we may reuse the
slot, zeroing its results pointer, and leading the original
caller to segfault while looking for its results inside the
slot.

Instead, we need to pass a pointer to our local results
storage to the handle_curl_result function, rather than
relying on the pointer in the slot struct. This matches what
the original code did before the refactoring (which did not
use a separate function, and therefore just accessed the
results struct directly).

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>Enable info/refs gzip decompression in HTTP client</title>
<updated>2012-09-20T17:26:50Z</updated>
<author>
<name>Shawn O. Pearce</name>
<email>spearce@spearce.org</email>
</author>
<published>2012-09-19T23:12:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=aa90b9697f9275e4f9cb10d274495e7587f217c0'/>
<id>urn:sha1:aa90b9697f9275e4f9cb10d274495e7587f217c0</id>
<content type='text'>
Some HTTP servers try to use gzip compression on the /info/refs
request to save transfer bandwidth. Repositories with many tags
may find the /info/refs request can be gzipped to be 50% of the
original size due to the few but often repeated bytes used (hex
SHA-1 and commonly digits in tag names).

For most HTTP requests enable "Accept-Encoding: gzip" ensuring
the /info/refs payload can use this encoding format.

Only request gzip encoding from servers. Although deflate is
supported by libcurl, most servers have standardized on gzip
encoding for compression as that is what most browsers support.
Asking for deflate increases request sizes by a few bytes, but is
unlikely to ever be used by a server.

Disable the Accept-Encoding header on probe RPCs as response bodies
are supposed to be exactly 4 bytes long, "0000". The HTTP headers
requesting and indicating compression use more space than the data
transferred in the body.

Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'maint-1.7.11' into maint</title>
<updated>2012-09-12T21:08:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-09-12T21:08:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=3503e9ab32c7a478d0d985171c50a901a2695162'/>
<id>urn:sha1:3503e9ab32c7a478d0d985171c50a901a2695162</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'jk/maint-http-half-auth-push' into maint-1.7.11</title>
<updated>2012-09-12T20:58:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2012-09-12T20:58:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=7d9483c299b4467fb4c6d32ade8207232235528c'/>
<id>urn:sha1:7d9483c299b4467fb4c6d32ade8207232235528c</id>
<content type='text'>
Pushing to smart HTTP server with recent Git fails without having
the username in the URL to force authentication, if the server is
configured to allow GET anonymously, while requiring authentication
for POST.

* jk/maint-http-half-auth-push:
  http: prompt for credentials on failed POST
  http: factor out http error code handling
  t: test http access to "half-auth" repositories
  t: test basic smart-http authentication
  t/lib-httpd: recognize */smart/* repos as smart-http
  t/lib-httpd: only route auth/dumb to dumb repos
  t5550: factor out http auth setup
  t5550: put auth-required repo in auth/dumb
</content>
</entry>
<entry>
<title>http: factor out http error code handling</title>
<updated>2012-08-27T17:49:09Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2012-08-27T13:26:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=88097030725bf68d1801559cfb4785b93a50f5f8'/>
<id>urn:sha1:88097030725bf68d1801559cfb4785b93a50f5f8</id>
<content type='text'>
Most of our http requests go through the http_request()
interface, which does some nice post-processing on the
results. In particular, it handles prompting for missing
credentials as well as approving and rejecting valid or
invalid credentials. Unfortunately, it only handles GET
requests. Making it handle POSTs would be quite complex, so
let's pull result handling code into its own function so
that it can be reused from the POST code paths.

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>http.c: don't use curl_easy_strerror prior to curl-7.12.0</title>
<updated>2012-08-23T21:23:18Z</updated>
<author>
<name>Joachim Schmitz</name>
<email>jojo@schmitz-digital.de</email>
</author>
<published>2012-08-23T07:33:55Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=4246b0bd900e72dbe83fd07cdfc946483a76214c'/>
<id>urn:sha1:4246b0bd900e72dbe83fd07cdfc946483a76214c</id>
<content type='text'>
Reverts be22d92 (http: avoid empty error messages for some curl
errors, 2011-09-05) on platforms with older versions of libcURL
where the function is not available.

Signed-off-by: Joachim Schmitz &lt;jojo@schmitz-digital.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http: get default user-agent from git_user_agent</title>
<updated>2012-06-03T20:11:54Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2012-06-02T19:03:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=745c7c8e6252ba41430a1442e1fa8da2ec40e9c2'/>
<id>urn:sha1:745c7c8e6252ba41430a1442e1fa8da2ec40e9c2</id>
<content type='text'>
This means we will respect the GIT_USER_AGENT build-time
configuration and run-time environment variable.

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>remove superfluous newlines in error messages</title>
<updated>2012-04-30T22:45:51Z</updated>
<author>
<name>Pete Wyckoff</name>
<email>pw@padd.com</email>
</author>
<published>2012-04-30T00:28:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=82247e9bd5f7c90c4eac9674fb7518845cd3e432'/>
<id>urn:sha1:82247e9bd5f7c90c4eac9674fb7518845cd3e432</id>
<content type='text'>
The error handling routines add a newline.  Remove
the duplicate ones in error messages.

Signed-off-by: Pete Wyckoff &lt;pw@padd.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
