git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] http-push.c: make CURLOPT_IOCTLDATA a usable pointer

From
Jeff King <peff@peff.net>
Date
Jul 12, 2014, 04:46 UTC
Message-ID
<20140712044646.GA20675@sigill.intra.peff.net>
In-Reply-To
<53b89d7a.030d320a.0760.206f@mx.google.com>
On Sat, Jul 05, 2014 at 08:43:48PM -0400, Abbaad Haider wrote:
> Fixes a small bug affecting push to remotes which use some sort of
> multi-pass authentication. In particular the bug affected SabreDAV as
> configured by Box.com [1].

Thanks. This looks like it was caused by the refactor in ebaaf31 (http-push: refactor curl_easy_setup madness, 2011-05-03), which moved the curl_easy call into a sub-function which took the buffer as a pointer, rather than accessing it as a local variable.

> It must be a weird server configuration for the bug to have survived
> this long. Someone should write a test for it.

I think both dumb-http push-over-DAV and multi-pass authentication are rare, so finding a combination of the two took a while. I do not know enough about the server setup to know whether we could replicate this in our test apache setup (and nor do I particularly want to spend a lot of time figuring it out for the sake of testing push-over-DAV).

Show 10 quoted lines
> diff --git a/http-push.c b/http-push.c
> index f2c56c8..bd42895 100644
> --- a/http-push.c
> +++ b/http-push.c
> @@ -199,7 +199,7 @@ static void curl_setup_http(CURL *curl, const char *url,
>  	curl_easy_setopt(curl, CURLOPT_READFUNCTION, fread_buffer);
>  #ifndef NO_CURL_IOCTL
>  	curl_easy_setopt(curl, CURLOPT_IOCTLFUNCTION, ioctl_buffer);
> -	curl_easy_setopt(curl, CURLOPT_IOCTLDATA, &buffer);
> +	curl_easy_setopt(curl, CURLOPT_IOCTLDATA, buffer);
Patch looks obviously correct.
Previous: Abbaad Haider
Message 3 of 3 in “[BUG] Push fails with dumb http to SabreDAV”
  1. Abbaad HaiderJul 6, 2014
  2. http-push.c: make CURLOPT_IOCTLDATA a usable pointerAbbaad Haider, Jul 6, 2014
  3. Jeff KingJul 12, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.