From: Junio C Hamano <gitster@pobox.com>
To: Elia Pinto <gitter.spiros@gmail.com>
Cc: "Git Mailing List" <git@vger.kernel.org>,
"Torsten Bögershausen" <tboegi@web.de>,
"Ramsay Jones" <ramsay@ramsayjones.plus.com>,
"Eric Sunshine" <sunshine@sunshineco.com>,
"Jeff King" <peff@peff.net>
Subject: Re: [PATCH v7 1/2] http.c: implement the GIT_TRACE_CURL environment variable
Date: Tue, 24 May 2016 17:50:30 -0700 [thread overview]
Message-ID: <CAPc5daXZU2oDHJnuwvaCO_C8VRFPNLiT_qei2NoDgHRFKVnZ=w@mail.gmail.com> (raw)
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.
> + 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);
> +}
next prev parent reply other threads:[~2016-05-25 0:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-23 13:44 [PATCH v7 0/2] Implement the GIT_TRACE_CURL environment variable Elia Pinto
2016-05-23 13:44 ` [PATCH v7 1/2] http.c: implement " Elia Pinto
2016-05-25 0:50 ` Junio C Hamano [this message]
2016-05-23 13:44 ` [PATCH v7 2/2] imap-send.c: introduce the GIT_TRACE_CURL enviroment variable Elia Pinto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPc5daXZU2oDHJnuwvaCO_C8VRFPNLiT_qei2NoDgHRFKVnZ=w@mail.gmail.com' \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitter.spiros@gmail.com \
--cc=peff@peff.net \
--cc=ramsay@ramsayjones.plus.com \
--cc=sunshine@sunshineco.com \
--cc=tboegi@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).