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

Re: [PATCH v5 4/5] config: improve support for http.<url>.* settings

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jul 15, 2013, 23:12 UTC
Message-ID
<CAPig+cQTNXgPyD4qiQPyQeSHWY0Y=_Qnd2i9LfVqQDA1DJNDxg@mail.gmail.com>
In-Reply-To
<dcbaa11c8595f48814aa39a75ad18ea@f74d39fa044aa309eaea14b9f57fe79>
On Mon, Jul 15, 2013 at 5:51 AM, Kyle J. McKay <mackyle@gmail.com> wrote:
Show 19 quoted lines
> Improve on the http.<url>.* url matching behavior by first
> normalizing the urls before they are compared.
>
> diff --git a/http.c b/http.c
> index 758e5b1..d04386e 100644
> --- a/http.c
> +++ b/http.c
> @@ -169,6 +169,210 @@ static void process_curl_messages(void)
>  }
>  #endif
>
> +static int append_normalized_escapes(struct strbuf *buf,
> +                                    const char *from,
> +                                    size_t from_len,
> +                                    const char *esc_extra,
> +                                    const char *esc_ok)
> +{
> +       /*
> +        * Append to strbuf buf characters from string from with length from_len
s/from string from/from string/
Show 15 quoted lines
> +        * while unescaping characters that do not need to be escaped and
> +        * escaping characters that do.  The set of characters to escape (the
> +        * complement of which is unescaped) starts out as the RFC 3986 unsafe
> +        * characters (0x00-0x1F,0x7F-0xFF," <>\"#%{}|\\^`").  If esc_extra
> +        * is not NULL, those additional characters will also always be escaped.
> +        * If esc_ok is not NULL, those characters will be left escaped if found
> +        * that way, but will not be unescaped otherwise (used for delimiters).
> +        * If a %-escape sequence is encountered that is not followed by 2
> +        * hexadecimal digits, the sequence is invalid and false (0) will be
> +        * returned.  Otherwise true (1) will be returned for success.
> +        *
> +        * Note that all %-escape sequences will be normalized to UPPERCASE
> +        * as indicated in RFC 3986.  Unless included in esc_extra or esc_ok
> +        * alphanumerics and "-._~" will always be unescaped as per RFC 3986.
> +        */
Previous: Kyle J. McKayNext: Kyle J. McKay
Message 6 of 9 in “config: add support for http.<url>.* settings”
  1. 0/5 config: add support for http.<url>.* settingsKyle J. McKay, Jul 15, 2013
  2. 1/5 http.c: fix parsing of http.sslCertPasswordProtected variableKyle J. McKay, Jul 15, 2013
  3. 2/5 http.c: fix parsing of GIT_SSL_CERT_PASSWORD_PROTECTED variableKyle J. McKay, Jul 15, 2013
  4. 3/5 config: add support for http.<url>.* settingsKyle J. McKay, Jul 15, 2013
  5. 4/5 config: improve support for http.<url>.* settingsKyle J. McKay, Jul 15, 2013
  6. Eric SunshineJul 15, 2013
  7. Kyle J. McKayJul 16, 2013
  8. Eric SunshineJul 16, 2013
  9. 5/5 tests: add new test for the url_normalize functionKyle J. McKay, Jul 15, 2013

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.