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

Re: [PATCH v7 1/2] http.c: implement the GIT_TRACE_CURL environment variable

From
Junio C Hamano <gitster@pobox.com>
Date
May 25, 2016, 00:50 UTC
Message-ID
<CAPc5daXZU2oDHJnuwvaCO_C8VRFPNLiT_qei2NoDgHRFKVnZ=w@mail.gmail.com>
In-Reply-To
<20160523134403.43880-2-gitter.spiros@gmail.com>
On Mon, May 23, 2016 at 6:44 AM, Elia Pinto <gitter.spiros@gmail.com> wrote:
> +static void curl_dump_header(const char *text, unsigned char *ptr, size_t size, int hide_sensitive_header)
> +{
> +       struct strbuf out = STRBUF_INIT;
> +       const char *sensitive_header;
This variable now has become unused, so I'll remove it while queuing.
Thanks.
Show 21 quoted lines
> +       struct strbuf **headers, **header;
> +
> +       strbuf_addf(&out, "%s, %10.10ld bytes (0x%8.8lx)\n",
> +               text, (long)size, (long)size);
> +       trace_strbuf(&trace_curl, &out);
> +       strbuf_reset(&out);
> +       strbuf_add(&out, ptr, size);
> +       headers = strbuf_split_max(&out, '\n', 0);
> +
> +       for (header = headers; *header; header++) {
> +               if (hide_sensitive_header)
> +                       redact_sensitive_header(*header);
> +               strbuf_insert((*header), 0, text, strlen(text));
> +               strbuf_insert((*header), strlen(text), ": ", 2);
> +               strbuf_rtrim((*header));
> +               strbuf_addch((*header), '\n');
> +               trace_strbuf(&trace_curl, (*header));
> +       }
> +       strbuf_list_free(headers);
> +       strbuf_release(&out);
> +}
Previous: Elia PintoNext: Elia Pinto
Message 3 of 4 in “Implement the GIT_TRACE_CURL environment variable”
  1. 0/2 Implement the GIT_TRACE_CURL environment variableElia Pinto, May 23, 2016
  2. 1/2 http.c: implement the GIT_TRACE_CURL environment variableElia Pinto, May 23, 2016
  3. Junio C HamanoMay 25, 2016
  4. 2/2 imap-send.c: introduce the GIT_TRACE_CURL enviroment variableElia Pinto, May 23, 2016

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.