<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/http-backend.c, branch v2.19.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v2.19.0</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.19.0'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2018-09-10T17:35:42Z</updated>
<entry>
<title>Merge branch 'mk/http-backend-content-length'</title>
<updated>2018-09-10T17:35:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-09-10T17:29:16Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=fe468efff533c3c92c174ae4706532c1521c150c'/>
<id>urn:sha1:fe468efff533c3c92c174ae4706532c1521c150c</id>
<content type='text'>
The earlier attempt barfed when given a CONTENT_LENGTH that is
set to an empty string.  RFC 3875 is fairly clear that in this
case we should not read any message body, but we've been reading
through to the EOF in previous versions (which did not even pay
attention to the environment variable), so keep that behaviour for
now in this late update.

* mk/http-backend-content-length:
  http-backend: allow empty CONTENT_LENGTH
</content>
</entry>
<entry>
<title>http-backend: allow empty CONTENT_LENGTH</title>
<updated>2018-09-07T19:35:51Z</updated>
<author>
<name>Max Kirillov</name>
<email>max@max630.net</email>
</author>
<published>2018-09-07T03:36:07Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=574c513e8dda5598e9e08e8ca2a048bf120a5709'/>
<id>urn:sha1:574c513e8dda5598e9e08e8ca2a048bf120a5709</id>
<content type='text'>
According to RFC3875, empty environment variable is equivalent to unset,
and for CONTENT_LENGTH it should mean zero body to read.

However, unset CONTENT_LENGTH is also used for chunked encoding to indicate
reading until EOF. At least, the test "large fetch-pack requests can be split
across POSTs" from t5551 starts faliing, if unset or empty CONTENT_LENGTH is
treated as zero length body. So keep the existing behavior as much as possible.

Add a test for the case.

Reported-By: Jelmer Vernooĳ &lt;jelmer@jelmer.uk&gt;
Signed-off-by: Max Kirillov &lt;max@max630.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mk/http-backend-content-length'</title>
<updated>2018-08-17T20:09:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-08-17T20:09:57Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=c5d276cb184cc42fb90b60b14996253b855a3e06'/>
<id>urn:sha1:c5d276cb184cc42fb90b60b14996253b855a3e06</id>
<content type='text'>
The http-backend (used for smart-http transport) used to slurp the
whole input until EOF, without paying attention to CONTENT_LENGTH
that is supplied in the environment and instead expecting the Web
server to close the input stream.  This has been fixed.

* mk/http-backend-content-length:
  t5562: avoid non-portable "export FOO=bar" construct
  http-backend: respect CONTENT_LENGTH for receive-pack
  http-backend: respect CONTENT_LENGTH as specified by rfc3875
  http-backend: cleanup writing to child process
</content>
</entry>
<entry>
<title>http-backend: respect CONTENT_LENGTH for receive-pack</title>
<updated>2018-07-27T17:47:52Z</updated>
<author>
<name>Max Kirillov</name>
<email>max@max630.net</email>
</author>
<published>2018-07-27T03:48:59Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=6c213e863aeb0af078bf82deefb22da20427c2ab'/>
<id>urn:sha1:6c213e863aeb0af078bf82deefb22da20427c2ab</id>
<content type='text'>
Push passes to another commands, as described in
https://public-inbox.org/git/20171129032214.GB32345@sigill.intra.peff.net/

As it gets complicated to correctly track the data length, instead transfer
the data through parent process and cut the pipe as the specified length is
reached. Do it only when CONTENT_LENGTH is set, otherwise pass the input
directly to the forked commands.

Add tests for cases:

* CONTENT_LENGTH is set, script's stdin has more data, with all combinations
  of variations: fetch or push, plain or compressed body, correct or truncated
  input.

* CONTENT_LENGTH is specified to a value which does not fit into ssize_t.

Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Max Kirillov &lt;max@max630.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>tag: add repository argument to deref_tag</title>
<updated>2018-06-29T17:43:39Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-06-29T01:22:05Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=a74093da5ed601a09fa158e5ba6f6f14c1142a3e'/>
<id>urn:sha1:a74093da5ed601a09fa158e5ba6f6f14c1142a3e</id>
<content type='text'>
Add a repository argument to allow the callers of deref_tag
to be more specific about which repository to act on. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>object: add repository argument to parse_object</title>
<updated>2018-06-29T17:43:38Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-06-29T01:21:51Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=109cd76dd3467bd05f8d2145b857006649741d5c'/>
<id>urn:sha1:109cd76dd3467bd05f8d2145b857006649741d5c</id>
<content type='text'>
Add a repository argument to allow the callers of parse_object
to be more specific about which repository to act on. This is a small
mechanical change; it doesn't change the implementation to handle
repositories other than the_repository yet.

As with the previous commits, use a macro to catch callers passing a
repository other than the_repository at compile time.

Signed-off-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http-backend: respect CONTENT_LENGTH as specified by rfc3875</title>
<updated>2018-06-11T20:21:38Z</updated>
<author>
<name>Max Kirillov</name>
<email>max@max630.net</email>
</author>
<published>2018-06-10T15:05:20Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=c79edf73f4b018310428632887f9ce2ce32d839a'/>
<id>urn:sha1:c79edf73f4b018310428632887f9ce2ce32d839a</id>
<content type='text'>
http-backend reads whole input until EOF. However, the RFC 3875 specifies
that a script must read only as many bytes as specified by CONTENT_LENGTH
environment variable. Web server may exercise the specification by not closing
the script's standard input after writing content. In that case http-backend
would hang waiting for the input. The issue is known to happen with
IIS/Windows, for example.

Make http-backend read only CONTENT_LENGTH bytes, if it's defined, rather than
the whole input until EOF. If the variable is not defined, keep older behavior
of reading until EOF because it is used to support chunked transfer-encoding.

This commit only fixes buffered input, whcih reads whole body before
processign it. Non-buffered input is going to be fixed in subsequent commit.

Signed-off-by: Florian Manschwetus &lt;manschwetus@cs-software-gmbh.de&gt;
[mk: fixed trivial build failures and polished style issues]
Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Max Kirillov &lt;max@max630.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http-backend: cleanup writing to child process</title>
<updated>2018-06-11T20:21:36Z</updated>
<author>
<name>Max Kirillov</name>
<email>max@max630.net</email>
</author>
<published>2018-06-10T15:05:19Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=6b1fae1dfbbdb6dc352567c0fc45a9e87474192d'/>
<id>urn:sha1:6b1fae1dfbbdb6dc352567c0fc45a9e87474192d</id>
<content type='text'>
As explained in [1], we should not assume the reason why the writing has
failed, and even if the reason is that child has existed not the reason
why it have done so. So instead just say that writing has failed.

[1] https://public-inbox.org/git/20180604044408.GD14451@sigill.intra.peff.net/

Signed-off-by: Max Kirillov &lt;max@max630.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bw/protocol-v2'</title>
<updated>2018-05-08T06:59:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-05-08T06:59:15Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=9bfa0f9be3e718f701200a242ea04259a4dc4dfc'/>
<id>urn:sha1:9bfa0f9be3e718f701200a242ea04259a4dc4dfc</id>
<content type='text'>
The beginning of the next-gen transfer protocol.

* bw/protocol-v2: (35 commits)
  remote-curl: don't request v2 when pushing
  remote-curl: implement stateless-connect command
  http: eliminate "# service" line when using protocol v2
  http: don't always add Git-Protocol header
  http: allow providing extra headers for http requests
  remote-curl: store the protocol version the server responded with
  remote-curl: create copy of the service name
  pkt-line: add packet_buf_write_len function
  transport-helper: introduce stateless-connect
  transport-helper: refactor process_connect_service
  transport-helper: remove name parameter
  connect: don't request v2 when pushing
  connect: refactor git_connect to only get the protocol version once
  fetch-pack: support shallow requests
  fetch-pack: perform a fetch using v2
  upload-pack: introduce fetch server command
  push: pass ref prefixes when pushing
  fetch: pass ref prefixes when fetching
  ls-remote: pass ref prefixes when requesting a remote's refs
  transport: convert transport_get_remote_refs to take a list of ref prefixes
  ...
</content>
</entry>
<entry>
<title>exec_cmd: rename to use dash in file name</title>
<updated>2018-04-11T09:11:00Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2018-04-10T21:26:18Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=d807c4a01db2b06db047fc6d5d18ac25c8f05bd7'/>
<id>urn:sha1:d807c4a01db2b06db047fc6d5d18ac25c8f05bd7</id>
<content type='text'>
This is more consistent with the project style. The majority of Git's
source files use dashes in preference to underscores in their file names.

Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
</content>
</entry>
</feed>
