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

[PATCH v7 0/4] config: add support for http.<url>.* settings

From
Kyle J. McKay <mackyle@gmail.com>
Date
Jul 22, 2013, 03:18 UTC
Message-ID
<f1109cf05979890ea9441fae7881586@f74d39fa044aa309eaea14b9f57fe79>
NOTE: This patch requires the following preparatory change:
 f1ff763 http.c: fix parsing of http.sslCertPasswordProtected variable
which is currently in pu.

This patch series adds support for http.<url>.* settings. The patch is organized as a series of improvements on the functionality:

1/4 - adds basic textual matching support 2/4 - adds URL normalization before matching 3/4 - adds a test for the URL normalization function 4/4 - adds any user matching

With-Feedback-From-jh: Junio C Hamano <gitster@pobox.com>
Differences from v6:
1/4 - Updated from v6's 1/4:
* Added an http_init memset for http_option_max_matched_len (feedback-jh)
2/4 - Updated from v6's 2/4:
* Reduce use of strchr (feedback-jh)
* Correctly handle characters with high bit set during normalization
* Detect some additional invalid scheme names
3/4 - Updated from v6's 3/4:
* Add several additional tests for high bit set characters and invalid schemes
4/4 - Updated from v6's 4/4:
* Added an http_init memset for http_option_user_matched (feedback-jh)
Applicable comments from earlier cover:

To better support matching URLs that are equivalent but spelled differently, a url_normalize function has been added. Currently this patch leaves it in http.c as http_options_url_normalize as I am unclear whether it should go into url.{h,c} at this time since only http.c uses it.

Since the url_normalize function's behavior is non-trivial, it is presented as a separate patch on top of the basic http.<url>.* settings support. A new test for it has also been included as a separate patch. I am unclear on the proper number for this test, but have gone ahead and put it with the other http tests since this patch series places the url_normalize function into http.c.

Kyle J. McKay (4):
  config: add support for http.<url>.* settings
  config: improve support for http.<url>.* settings
  tests: add new test for the url_normalize function
  config: allow http.<url>.* any user matching
 .gitignore               |   1 +
 Documentation/config.txt |  19 ++
 Makefile                 |   5 +
 http.c                   | 666 +++++++++++++++++++++++++++++++++++++++++++++--
 t/t5200-url-normalize.sh | 182 +++++++++++++
 t/t5200/README           |   9 +
 t/t5200/url-1            |   1 +
 t/t5200/url-10           |   1 +
 t/t5200/url-11           |   1 +
 t/t5200/url-2            |   1 +
 t/t5200/url-3            |   1 +
 t/t5200/url-4            |   1 +
 t/t5200/url-5            |   1 +
 t/t5200/url-6            |   1 +
 t/t5200/url-7            |   1 +
 t/t5200/url-8            |   1 +
 t/t5200/url-9            |   1 +
 test-url-normalize.c     |  62 +++++
 18 files changed, 938 insertions(+), 17 deletions(-)
 create mode 100755 t/t5200-url-normalize.sh
 create mode 100644 t/t5200/README
 create mode 100644 t/t5200/url-1
 create mode 100644 t/t5200/url-10
 create mode 100644 t/t5200/url-11
 create mode 100644 t/t5200/url-2
 create mode 100644 t/t5200/url-3
 create mode 100644 t/t5200/url-4
 create mode 100644 t/t5200/url-5
 create mode 100644 t/t5200/url-6
 create mode 100644 t/t5200/url-7
 create mode 100644 t/t5200/url-8
 create mode 100644 t/t5200/url-9
 create mode 100644 test-url-normalize.c
-- 
1.8.3
Next: Kyle J. McKay
Message 1 of 11 in “config: add support for http.<url>.* settings”
  1. 0/4 config: add support for http.<url>.* settingsKyle J. McKay, Jul 22, 2013
  2. 1/4 config: add support for http.<url>.* settingsKyle J. McKay, Jul 22, 2013
  3. 2/4 config: improve support for http.<url>.* settingsKyle J. McKay, Jul 22, 2013
  4. 3/4 tests: add new test for the url_normalize functionKyle J. McKay, Jul 22, 2013
  5. Junio C HamanoJul 22, 2013
  6. Kyle J. McKayJul 22, 2013
  7. Junio C HamanoJul 22, 2013
  8. Kyle J. McKayJul 22, 2013
  9. 4/4 config: allow http.<url>.* any user matchingKyle J. McKay, Jul 22, 2013
  10. Junio C HamanoJul 22, 2013
  11. Kyle J. McKayJul 22, 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.