<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/git-http-backend.txt, branch v2.48.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.48.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.48.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2023-10-09T19:04:21Z</updated>
<entry>
<title>documentation: wording improvements</title>
<updated>2023-10-09T19:04:21Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2023-10-08T06:45:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cf6cac20059123d6ec3f867bb3692df62db52cf9'/>
<id>urn:sha1:cf6cac20059123d6ec3f867bb3692df62db52cf9</id>
<content type='text'>
Diff best viewed with --color-diff.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>docs/http-backend: mention v2 protocol</title>
<updated>2021-09-10T22:34:59Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2021-09-10T14:09:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=295d81b9e4c91517f4f436a16889027cb86cba57'/>
<id>urn:sha1:295d81b9e4c91517f4f436a16889027cb86cba57</id>
<content type='text'>
Historically there was a little bit of configuration needed at the
webserver level in order to get the client's v2 protocol probes to Git.
But when we introduced the v2 protocol, we never documented these.

As of the previous commit, this should mostly work out of the box
without any explicit configuration. But it's worth documenting this to
make it clear how we expect it to work, especially in the face of
webservers which don't provide all headers over the CGI interface. Or
anybody who runs across this documentation but has an older version of
Git (or _used_ to have an older version, and wonders why they still have
a SetEnvIf line in their Apache config and whether it's still
necessary).

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>Documentation: turn middle-of-line tabs into spaces</title>
<updated>2019-03-07T00:25:32Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2019-03-06T06:30:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8d75a1d183e2cbb4c56c14e59aeda64a87d86a34'/>
<id>urn:sha1:8d75a1d183e2cbb4c56c14e59aeda64a87d86a34</id>
<content type='text'>
These tabs happen to appear in columns where they don't stand out too
much, so the diff here is non-obvious. Some of these are rendered
differently by AsciiDoc and Asciidoctor (although the difference might
be invisible!), which is how I found a few of them. The remainder were
found using `git grep "[a-zA-Z.,)]$TAB[a-zA-Z]"`.

Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: more consistency in environment variables format</title>
<updated>2016-06-08T19:04:37Z</updated>
<author>
<name>Tom Russello</name>
<email>tom.russello@grenoble-inp.org</email>
</author>
<published>2016-06-07T22:35:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=47d81b5c7a3e7737d26b877a5cfebb772d75fa12'/>
<id>urn:sha1:47d81b5c7a3e7737d26b877a5cfebb772d75fa12</id>
<content type='text'>
Wrap with backticks (monospaced font) unwrapped or single-quotes wrapped
(italic type) environment variables which are followed by the word
"environment". It was obtained with:

perl -pi -e "s/\'?(\\\$?[0-9A-Z\_]+)\'?(?= environment ?)/\`\1\`/g" *.txt

One of the main purposes is to stick to the CodingGuidelines as possible so
that people writting new documentation by mimicking the existing are more likely
to have it right (even if they didn't read the CodingGuidelines).

Signed-off-by: Tom Russello &lt;tom.russello@grenoble-inp.org&gt;
Signed-off-by: Erwan Mathoniere &lt;erwan.mathoniere@grenoble-inp.org&gt;
Signed-off-by: Samuel Groot &lt;samuel.groot@grenoble-inp.org&gt;
Signed-off-by: Matthieu Moy &lt;matthieu.moy@grenoble-inp.fr&gt;
Reviewed-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/http-backend-deadlock'</title>
<updated>2015-06-01T19:45:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-06-01T19:45:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=777e75b60568b613e452ebbb30a1fb27c4fd7d8a'/>
<id>urn:sha1:777e75b60568b613e452ebbb30a1fb27c4fd7d8a</id>
<content type='text'>
Communication between the HTTP server and http_backend process can
lead to a dead-lock when relaying a large ref negotiation request.
Diagnose the situation better, and mitigate it by reading such a
request first into core (to a reasonable limit).

* jk/http-backend-deadlock:
  http-backend: spool ref negotiation requests to buffer
  t5551: factor out tag creation
  http-backend: fix die recursion with custom handler
</content>
</entry>
<entry>
<title>http-backend: spool ref negotiation requests to buffer</title>
<updated>2015-05-26T03:43:18Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-05-20T07:37:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6bc0cb5176a5e42ca4a74e3558e8f0790ed09bb1'/>
<id>urn:sha1:6bc0cb5176a5e42ca4a74e3558e8f0790ed09bb1</id>
<content type='text'>
When http-backend spawns "upload-pack" to do ref
negotiation, it streams the http request body to
upload-pack, who then streams the http response back to the
client as it reads. In theory, git can go full-duplex; the
client can consume our response while it is still sending
the request.  In practice, however, HTTP is a half-duplex
protocol. Even if our client is ready to read and write
simultaneously, we may have other HTTP infrastructure in the
way, including the webserver that spawns our CGI, or any
intermediate proxies.

In at least one documented case[1], this leads to deadlock
when trying a fetch over http. What happens is basically:

  1. Apache proxies the request to the CGI, http-backend.

  2. http-backend gzip-inflates the data and sends
     the result to upload-pack.

  3. upload-pack acts on the data and generates output over
     the pipe back to Apache. Apache isn't reading because
     it's busy writing (step 1).

This works fine most of the time, because the upload-pack
output ends up in a system pipe buffer, and Apache reads
it as soon as it finishes writing. But if both the request
and the response exceed the system pipe buffer size, then we
deadlock (Apache blocks writing to http-backend,
http-backend blocks writing to upload-pack, and upload-pack
blocks writing to Apache).

We need to break the deadlock by spooling either the input
or the output. In this case, it's ideal to spool the input,
because Apache does not start reading either stdout _or_
stderr until we have consumed all of the input. So until we
do so, we cannot even get an error message out to the
client.

The solution is fairly straight-forward: we read the request
body into an in-memory buffer in http-backend, freeing up
Apache, and then feed the data ourselves to upload-pack. But
there are a few important things to note:

  1. We limit the in-memory buffer to prevent an obvious
     denial-of-service attack. This is a new hard limit on
     requests, but it's unlikely to come into play. The
     default value is 10MB, which covers even the ridiculous
     100,000-ref negotation in the included test (that
     actually caps out just over 5MB). But it's configurable
     on the off chance that you don't mind spending some
     extra memory to make even ridiculous requests work.

  2. We must take care only to buffer when we have to. For
     pushes, the incoming packfile may be of arbitrary
     size, and we should connect the input directly to
     receive-pack. There's no deadlock problem here, though,
     because we do not produce any output until the whole
     packfile has been read.

     For upload-pack's initial ref advertisement, we
     similarly do not need to buffer. Even though we may
     generate a lot of output, there is no request body at
     all (i.e., it is a GET, not a POST).

[1] http://article.gmane.org/gmane.comp.version-control.git/269020

Test-adapted-from: Dennis Kaarsemaker &lt;dennis@kaarsemaker.net&gt;
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>doc: put example URLs and emails inside literal backticks</title>
<updated>2015-05-13T05:14:46Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-05-13T05:06:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d595bdc17f65f6503e18669b055d05bd500788d3'/>
<id>urn:sha1:d595bdc17f65f6503e18669b055d05bd500788d3</id>
<content type='text'>
This makes sure that AsciiDoc does not turn them into links.
Regular AsciiDoc does not catch these cases, but AsciiDoctor
does treat them as links.

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 commit 'doc/http-backend: missing accent grave in literal mark-up'</title>
<updated>2014-04-09T18:45:04Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-04-09T18:45:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=efb4ec68b82aa003e18c1731e17503d3bf8d15f4'/>
<id>urn:sha1:efb4ec68b82aa003e18c1731e17503d3bf8d15f4</id>
<content type='text'>
* commit '5df05146d5cb94628a3dfc53063c802ee1152cec':
  doc/http-backend: missing accent grave in literal mark-up
</content>
</entry>
<entry>
<title>doc/http-backend: missing accent grave in literal mark-up</title>
<updated>2014-04-09T18:43:56Z</updated>
<author>
<name>Thomas Ackermann</name>
<email>th.acker@arcor.de</email>
</author>
<published>2014-04-09T18:17:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5df05146d5cb94628a3dfc53063c802ee1152cec'/>
<id>urn:sha1:5df05146d5cb94628a3dfc53063c802ee1152cec</id>
<content type='text'>
Signed-off-by: Thomas Ackermann &lt;th.acker@arcor.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: remote author/documentation sections from more pages</title>
<updated>2014-01-27T16:34:34Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2014-01-26T23:43:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=816900746839faaa1e346dde32abbce64ccbb3e5'/>
<id>urn:sha1:816900746839faaa1e346dde32abbce64ccbb3e5</id>
<content type='text'>
We decided at 48bb914e (doc: drop author/documentation sections from
most pages, 2011-03-11) to remove "author" and "documentation"
sections from our documentation.  Remove a few stragglers.

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
