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

[PATCH v5 0/5] urlmatch: allow wildcard-based matches

From
Patrick Steinhardt <ps@pks.im>
Date
Jan 31, 2017, 09:01 UTC
Message-ID
<cover.1485853153.git.ps@pks.im>
In-Reply-To
<20170123130635.29577-1-patrick.steinhardt@elego.de>
Hi,

this is version 5 of my patch series. The previous version can be found at [1]. The use case is to be able to configure an HTTP proxy for all subdomains of a domain where there are hundreds of subdomains.

This includes only a single change, interdiff is included below. The previous version had an embarassing bug because a variable was not properly initialized in all cases, leading to undefined behavior. I also verified that the patches work on top of 4e59582ff (Seventh batch for 2.12, 2017-01-23), where Junio reported the test failures.

Regards Patrick

Patrick Steinhardt (5):
  mailmap: add Patrick Steinhardt's work address
  urlmatch: enable normalization of URLs with globs
  urlmatch: split host and port fields in `struct url_info`
  urlmatch: include host in urlmatch ranking
  urlmatch: allow globbing for the URL host part
 .mailmap                 |   1 +
 Documentation/config.txt |   5 +-
 t/t1300-repo-config.sh   | 105 ++++++++++++++++++++++++++++++++++++
 urlmatch.c               | 138 +++++++++++++++++++++++++++++++++++------------
 urlmatch.h               |  12 +++--
 5 files changed, 220 insertions(+), 41 deletions(-)
-- 
2.11.0

diff --git a/urlmatch.c b/urlmatch.c
index bb5267732..6c12f1a48 100644
--- a/urlmatch.c
+++ b/urlmatch.c
@@ -552,7 +552,7 @@ int urlmatch_config_entry(const char *var, const char *value, void *cb)
 {
 	struct string_list_item *item;
 	struct urlmatch_config *collect = cb;
-	struct urlmatch_item matched;
+	struct urlmatch_item matched = {0};
 	struct url_info *url = &collect->url;
 	const char *key, *dot;
 	struct strbuf synthkey = STRBUF_INIT;
Next: Patrick Steinhardt
Message 1 of 6 in “urlmatch: allow wildcard-based matches”
  1. 0/5 urlmatch: allow wildcard-based matchesPatrick Steinhardt, Jan 31, 2017
  2. 5/5 urlmatch: allow globbing for the URL host partPatrick Steinhardt, Jan 31, 2017
  3. 2/5 urlmatch: enable normalization of URLs with globsPatrick Steinhardt, Jan 31, 2017
  4. 1/5 mailmap: add Patrick Steinhardt's work addressPatrick Steinhardt, Jan 31, 2017
  5. 3/5 urlmatch: split host and port fields in `struct url_info`Patrick Steinhardt, Jan 31, 2017
  6. 4/5 urlmatch: include host in urlmatch rankingPatrick Steinhardt, Jan 31, 2017

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.