<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/http.c, branch v1.7.8.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v1.7.8.2</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v1.7.8.2'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2011-12-28T19:32:37Z</updated>
<entry>
<title>Merge branch 'jk/maint-push-over-dav' into maint</title>
<updated>2011-12-28T19:32:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-12-28T19:32:37Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=f1c12e1b4af2eec4eefff9350b74601b36f51d85'/>
<id>urn:sha1:f1c12e1b4af2eec4eefff9350b74601b36f51d85</id>
<content type='text'>
* jk/maint-push-over-dav:
  http-push: enable "proactive auth"
  t5540: test DAV push with authentication
</content>
</entry>
<entry>
<title>Merge branch 'mf/curl-select-fdset' into maint</title>
<updated>2011-12-14T06:03:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-12-14T06:03:17Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=fc545433bdab7ec17e6609d2249771d407370a4d'/>
<id>urn:sha1:fc545433bdab7ec17e6609d2249771d407370a4d</id>
<content type='text'>
* mf/curl-select-fdset:
  http: drop "local" member from request struct
  http.c: Rely on select instead of tracking whether data was received
  http.c: Use timeout suggested by curl instead of fixed 50ms timeout
  http.c: Use curl_multi_fdset to select on curl fds instead of just sleeping
</content>
</entry>
<entry>
<title>http-push: enable "proactive auth"</title>
<updated>2011-12-14T00:34:44Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2011-12-14T00:11:56Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=a4ddbc33d7906f0e10c68c140a9a1003d9715a77'/>
<id>urn:sha1:a4ddbc33d7906f0e10c68c140a9a1003d9715a77</id>
<content type='text'>
Before commit 986bbc08, git was proactive about asking for
http passwords. It assumed that if you had a username in
your URL, you would also want a password, and asked for it
before making any http requests.

However, this could interfere with the use of .netrc (see
986bbc08 for details). And it was also unnecessary, since
the http fetching code had learned to recognize an HTTP 401
and prompt the user then. Furthermore, the proactive prompt
could interfere with the usage of .netrc (see 986bbc08 for
details).

Unfortunately, the http push-over-DAV code never learned to
recognize HTTP 401, and so was broken by this change. This
patch does a quick fix of re-enabling the "proactive auth"
strategy only for http-push, leaving the dumb http fetch and
smart-http as-is.

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: remove unused function hex()</title>
<updated>2011-11-16T00:08:48Z</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>artagnon@gmail.com</email>
</author>
<published>2011-11-15T16:59:36Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=620771c83ec67c7f066d366acbc2efdfa75e7d14'/>
<id>urn:sha1:620771c83ec67c7f066d366acbc2efdfa75e7d14</id>
<content type='text'>
Signed-off-by: Ramkumar Ramachandra &lt;artagnon@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http: drop "local" member from request struct</title>
<updated>2011-11-04T19:05:01Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2011-11-04T17:53:33Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=093c44a3600323c3ca7a8d28a0d2ba2bc145dd47'/>
<id>urn:sha1:093c44a3600323c3ca7a8d28a0d2ba2bc145dd47</id>
<content type='text'>
This is a FILE pointer in the case that we are sending our
output to a file. We originally used it to run ftell() to
determine whether data had been written to our file during
our last call to curl. However, as of the last patch, we no
longer care about that flag anymore. All uses of this struct
member are now just book-keeping that can go away.

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: Rely on select instead of tracking whether data was received</title>
<updated>2011-11-04T17:47:13Z</updated>
<author>
<name>Mika Fischer</name>
<email>mika.fischer@zoopnet.de</email>
</author>
<published>2011-11-04T14:19:27Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=df26c471278f13ca6ad96b12a533ef4172323c13'/>
<id>urn:sha1:df26c471278f13ca6ad96b12a533ef4172323c13</id>
<content type='text'>
Since now select is used with the file descriptors of the http connections,
tracking whether data was received recently (and trying to read more in
that case) is no longer necessary. Instead, always call select and rely on
it to return as soon as new data can be read.

Signed-off-by: Mika Fischer &lt;mika.fischer@zoopnet.de&gt;
Helped-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: Use timeout suggested by curl instead of fixed 50ms timeout</title>
<updated>2011-11-04T17:46:56Z</updated>
<author>
<name>Mika Fischer</name>
<email>mika.fischer@zoopnet.de</email>
</author>
<published>2011-11-04T14:19:26Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=eb56c82163487fe07ba04f2b365a557282cbd766'/>
<id>urn:sha1:eb56c82163487fe07ba04f2b365a557282cbd766</id>
<content type='text'>
Recent versions of curl can suggest a period of time the library user
should sleep and try again, when curl is blocked on reading or writing
(or connecting). Use this timeout instead of always sleeping for 50ms.

Signed-off-by: Mika Fischer &lt;mika.fischer@zoopnet.de&gt;
Helped-by: Daniel Stenberg &lt;daniel@haxx.se&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http.c: Use curl_multi_fdset to select on curl fds instead of just sleeping</title>
<updated>2011-11-04T17:46:25Z</updated>
<author>
<name>Mika Fischer</name>
<email>mika.fischer@zoopnet.de</email>
</author>
<published>2011-11-04T14:19:25Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=6f9dd67ffea3e86276a73e522ce1186a99bbe65d'/>
<id>urn:sha1:6f9dd67ffea3e86276a73e522ce1186a99bbe65d</id>
<content type='text'>
Instead of sleeping unconditionally for a 50ms, when no data can be read
from the http connection(s), use curl_multi_fdset() to obtain the actual
file descriptors of the open connections and use them in the select call.
This way, the 50ms sleep is interrupted when new data arrives.

Signed-off-by: Mika Fischer &lt;mika.fischer@zoopnet.de&gt;
Helped-by: Daniel Stenberg &lt;daniel@haxx.se&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http: don't always prompt for password</title>
<updated>2011-11-04T16:47:18Z</updated>
<author>
<name>Stefan Naewe</name>
<email>stefan.naewe@gmail.com</email>
</author>
<published>2011-11-04T07:03:08Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=986bbc0842334f0e07731fa37f2a55d2930a5b8c'/>
<id>urn:sha1:986bbc0842334f0e07731fa37f2a55d2930a5b8c</id>
<content type='text'>
When a username is already specified at the beginning of any HTTP
transaction (e.g. "git push https://user@hosting.example.com/project.git"
or "git ls-remote https://user@hosting.example.com/project.git"), the code
interactively asks for a password before calling into the libcurl library.
It is very likely that the reason why user included the username in the
URL is because the user knows that it would require authentication to
access the resource. Asking for the password upfront would save one
roundtrip to get a 401 response, getting the password and then retrying
the request. This is a reasonable optimization.

HOWEVER.

This is done even when $HOME/.netrc might have a corresponding entry to
access the site, or the site does not require authentication to access the
resource after all. But neither condition can be determined until we call
into libcurl library (we do not read and parse $HOME/.netrc ourselves). In
these cases, the user is forced to respond to the password prompt, only to
give a password that is not used in the HTTP transaction. If the password
is in $HOME/.netrc, an empty input would later let the libcurl layer to
pick up the password from there, and if the resource does not require
authentication, any input would be taken and then discarded without
getting used. It is wasteful to ask this unused information to the end
user.

Reduce the confusion by not trying to optimize for this case and always
incur roundtrip penalty. An alternative might be to document this and keep
this round-trip optimization as-is.

Signed-off-by: Stefan Naewe &lt;stefan.naewe@gmail.com&gt;
Helped-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 'jk/http-auth'</title>
<updated>2011-10-18T04:37:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-10-18T04:37:15Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=963838402a94e7fcbd1a73019f80aff708972af8'/>
<id>urn:sha1:963838402a94e7fcbd1a73019f80aff708972af8</id>
<content type='text'>
* jk/http-auth:
  http_init: accept separate URL parameter
  http: use hostname in credential description
  http: retry authentication failures for all http requests
  remote-curl: don't retry auth failures with dumb protocol
  improve httpd auth tests
  url: decode buffers that are not NUL-terminated
</content>
</entry>
</feed>
