This patch simply provides two alternative versions of the 2/6 and 4/6
patches previously sent as part of the:
[PATCH v6 0/6] http.<url>.<key> and friends
series. They are intended simply as complete alternatives to parts 2 and 4
that include the following changes:
2/4 - Include 1-line documentation update in log comment and rename static
function from http_options_url_match_prefix to url_match_prefix.
4/4 - Include 1-line documentation update together with Peff's previously
provided Signed-off-by for the copious amount of documentation text he
has provided that has been included verbatim. Also include the minor
fixes from Ramsay Jones for compilation of test-url-normalize when
NO_CURL is defined.
If simply squashing the patches in instead is desired, here's the patch for
part 2/4:
diff --git a/urlmatch.c b/urlmatch.c
index e1b03ee7..4f38cc7b 100644
--- a/urlmatch.c
+++ b/urlmatch.c
@@ -376,9 +376,9 @@ char *url_normalize(const char *url, struct url_info
*out_info)
return result;
}
-static size_t http_options_url_match_prefix(const char *url,
- const char *url_prefix,
- size_t url_prefix_len)
+static size_t url_match_prefix(const char *url,
+ const char *url_prefix,
+ size_t url_prefix_len)
{
/*
* url_prefix matches url if url_prefix is an exact match for url or it
@@ -457,7 +457,7 @@ int match_urls(const struct url_info *url,
return 0; /* host names and/or ports do not match */
/* check the path */
- pathmatchlen = http_options_url_match_prefix(
+ pathmatchlen = url_match_prefix(
url->url + url->path_off,
url_prefix->url + url_prefix->path_off,
url_prefix->url_len - url_prefix->path_off);
---
And here's the patch for part 4/4:
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 60c140f1..8cc0fd78 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -1542,6 +1542,8 @@ http.<url>.*::
the config key has a user name it must match the user name in the
URL exactly. If the config key does not have a user name, that
config key will match a URL with any user name (including none).
+ config key will match a URL with any user name (including none),
+ but at a lower precedence than a config key with a user name.
--
+
The list above is ordered by decreasing precedence; a URL that matches
diff --git a/test-url-normalize.c b/test-url-normalize.c
index 81d3da90..80437217 100644
--- a/test-url-normalize.c
+++ b/test-url-normalize.c
@@ -1,6 +1,6 @@
#ifdef NO_CURL
-int main()
+int main(void)
{
return 125;
}
@@ -52,8 +52,10 @@ static int run_http_options(const char *file,
printf("%s\n", curl_ssl_try ? "true" : "false");
else if (!strcmp("minsessions", opt_lc.buf))
printf("%d\n", min_curl_sessions);
+#ifdef USE_CURL_MULTI
else if (!strcmp("maxrequests", opt_lc.buf))
printf("%d\n", max_requests);
+#endif
else if (!strcmp("lowspeedlimit", opt_lc.buf))
printf("%ld\n", curl_low_speed_limit);
else if (!strcmp("lowspeedtime", opt_lc.buf))
---
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html