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

Re: [PATCH] http-push: refactor lock-related headers creation for curl requests

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 24, 2009, 05:18 UTC
Message-ID
<7vy6x1nuxt.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.DEB.1.00.0901240507070.13232@racer>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 21 quoted lines
> Hi,
>
> On Sat, 24 Jan 2009, Ray Chuan wrote:
>
>> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> Make that an Acked-by:
>
>> +	if(options & DAV_HEADER_IF) {
>> +		strbuf_addf(&buf, "If: (<%s>)", lock->token);
>> +		dav_headers = curl_slist_append(dav_headers, buf.buf);
>> +		strbuf_reset(&buf);
>
> BTW in case anyone is puzzled (like I was): curl_slist_append() takes a 
> "char *" as second parameter, but does not take custody of the buffer; 
> instead, it strdup()s it.  See
> http://cool.haxx.se/cvs.cgi/curl/lib/sendf.c?rev=1.155&content-type=text/vnd.viewcvs-markup
> for details.
>
> BTNW this should be mentioned in the commit message, too, to spare other 
> people the puzzlement.

Yeah, but your advice is too late --- I already lost a few minutes solving my puzzlement with manpages.

Thanks, both.
Previous: Johannes Schindelin
Message 3 of 3 in “http-push: refactor lock-related headers creation for curl requests”
  1. http-push: refactor lock-related headers creation for curl requestsRay Chuan, Jan 24, 2009
  2. Johannes SchindelinJan 24, 2009
  3. Junio C HamanoJan 24, 2009

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.