Skip to content

Commit 96eca02

Browse files
committed
Merge branch 'jk/loosen-urlmatch'
Treat "_" as any other URL-valid characters in an URL when matching the per-URL configuration variable names. * jk/loosen-urlmatch: urlmatch: add underscore to URL_HOST_CHARS
2 parents 35151cf + e4c497a commit 96eca02

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

t/t0110-urlmatch-normalization.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ test_expect_success 'url authority' '
4747
test-tool urlmatch-normalization "scheme://@host" &&
4848
test-tool urlmatch-normalization "scheme://%00@host" &&
4949
! test-tool urlmatch-normalization "scheme://%%@host" &&
50-
! test-tool urlmatch-normalization "scheme://host_" &&
50+
test-tool urlmatch-normalization "scheme://host_" &&
5151
test-tool urlmatch-normalization "scheme://user:pass@host/" &&
5252
test-tool urlmatch-normalization "scheme://@host/" &&
5353
test-tool urlmatch-normalization "scheme://host/" &&

urlmatch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#define URL_DIGIT "0123456789"
66
#define URL_ALPHADIGIT URL_ALPHA URL_DIGIT
77
#define URL_SCHEME_CHARS URL_ALPHADIGIT "+.-"
8-
#define URL_HOST_CHARS URL_ALPHADIGIT ".-[:]" /* IPv6 literals need [:] */
8+
#define URL_HOST_CHARS URL_ALPHADIGIT ".-_[:]" /* IPv6 literals need [:] */
99
#define URL_UNSAFE_CHARS " <>\"%{}|\\^`" /* plus 0x00-0x1F,0x7F-0xFF */
1010
#define URL_GEN_RESERVED ":/?#[]@"
1111
#define URL_SUB_RESERVED "!$&'()*+,;="

0 commit comments

Comments
 (0)