Web lists-archives.com

Re: CONTENT_LENGTH can no longer be empty




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