Git Mailing List Archive on lore.kernel.org
 help / color / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: "Jelmer Vernooij" <jelmer@jelmer.uk>
Cc: git@vger.kernel.org, Max Kirillov <max@max630.net>
Subject: Re: CONTENT_LENGTH can no longer be empty
Date: Wed, 5 Sep 2018 23:10:38 -0700
Message-ID: <20180906061038.GA94045@aiede.svl.corp.google.com> (raw)
In-Reply-To: <20180905202613.GA20473@blodeuwedd>

Hi,

Jelmer Vernooij wrote[1]:

> Git's http-backend has become slightly stricter about the content
> of the CONTENT_LENGTH variable. Previously, Dulwich would leave this
> variable empty but git now expects it to be set to 0 for GET requests
> without a body.
>
> I'm uploading a fixed version of dulwich.

Thanks for tracking it down!  This is likely due to v2.19.0-rc0~45^2~2
(http-backend: respect CONTENT_LENGTH as specified by rfc3875,
2018-06-10).

Max, RFC 3875 appears to allow a CONTENT_LENGTH of "" when no data is
attached to the request.  Should we check for this case (e.g. inserting
a *str check in

	if (str && !git_parse_ssize_t(str, &val))
		die("failed to parse CONTENT_LENGTH: %s", str);

?

Thanks,
Jonathan

[1] https://bugs.debian.org/907587

           reply index

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20180905202613.GA20473@blodeuwedd>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180906061038.GA94045@aiede.svl.corp.google.com \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jelmer@jelmer.uk \
    --cc=max@max630.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Mailing List Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/git/0 git/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 git git/ https://lore.kernel.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.git


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git