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

Re: [PATCH] smart-http: Don't use Expect: 100-Continue

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 15, 2011, 19:42 UTC
Message-ID
<7vr5b9nkzb.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1297789044-17978-1-git-send-email-spearce@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> writes:
Show 18 quoted lines
> diff --git a/remote-curl.c b/remote-curl.c
> index 04d4813..3d82dc2 100644
> --- a/remote-curl.c
> +++ b/remote-curl.c
> @@ -356,14 +356,59 @@ static size_t rpc_in(const void *ptr, size_t eltsize,
> ...
> +static int probe_rpc(struct rpc_state *rpc)
> +{
> +...
> +	curl_easy_setopt(slot->curl, CURLOPT_WRITEFUNCTION, fwrite_buffer);
> +	curl_easy_setopt(slot->curl, CURLOPT_FILE, buf);
> +
> +	err = run_slot(slot);
> +
> +	curl_slist_free_all(headers);
> +	strbuf_release(&buf);
> +	return err;
> +}
Hmm, I am getting
    remote-curl.c:403: error: call to '_curl_easy_setopt_err_cb_data' declared
    with attribute warning: curl_easy_setopt expects a private data pointer as
    argument for this option
Shouldn't the above be giving a pointer to buf anyway?
 remote-curl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/remote-curl.c b/remote-curl.c
index 297ecf7..256326a 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -400,7 +400,7 @@ static int probe_rpc(struct rpc_state *rpc)
 	curl_easy_setopt(slot->curl, CURLOPT_POSTFIELDSIZE, 4);
 	curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, headers);
 	curl_easy_setopt(slot->curl, CURLOPT_WRITEFUNCTION, fwrite_buffer);
-	curl_easy_setopt(slot->curl, CURLOPT_FILE, buf);
+	curl_easy_setopt(slot->curl, CURLOPT_FILE, &buf);
 
 	err = run_slot(slot);
 
Previous: Shawn O. PearceNext: Shawn Pearce
Message 2 of 5 in “smart-http: Don't use Expect: 100-Continue”
  1. smart-http: Don't use Expect: 100-ContinueShawn O. Pearce, Feb 15, 2011
  2. Junio C HamanoFeb 15, 2011
  3. Shawn PearceFeb 15, 2011
  4. Daniel StenbergFeb 16, 2011
  5. Junio C HamanoFeb 16, 2011

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.