summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2015-11-07 15:00:15 +0000
committerStefan Bühler <stbuehler@web.de>2015-11-07 15:00:15 +0000
commit3943de280e9966e064ae704e0e11aff155e875a9 (patch)
treea5d9ecce4e97ed73314a4eaaf9550b71a346fe08
parenta06954837051eccf0952ec0b3ed2b7ffbed5792a (diff)
downloadlighttpd-git-3943de280e9966e064ae704e0e11aff155e875a9.tar.gz
[core] add '~' to safe characters in ENCODING_REL_URI/ENCODING_REL_URI_PART encoding
From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3051 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r--NEWS1
-rw-r--r--src/buffer.c8
2 files changed, 5 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index af391340..8e2ff1d4 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,7 @@ NEWS
* [mod_secdownload] use a hopefully constant time comparison to check hash (fixes #2679)
* [config] check config option scope; warn if server option is given in conditional
* [core] revert increase of temp file size back to 1MB, provide a configure option "server.upload-temp-file-size" instead (fixes #2680)
+ * [core] add '~' to safe characters in ENCODING_REL_URI/ENCODING_REL_URI_PART encoding
- 1.4.37 - 2015-08-30
* [mod_proxy] remove debug log line from error log (fixes #2659)
diff --git a/src/buffer.c b/src/buffer.c
index 36995a01..e5c1d578 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -503,7 +503,7 @@ void buffer_copy_string_hex(buffer *b, const char *in, size_t in_len) {
li_tohex(b->ptr, in, in_len);
}
-/* everything except: ! ( ) * - . 0-9 A-Z _ a-z */
+/* everything except: ! ( ) * - . 0-9 A-Z _ a-z ~ */
static const char encoded_chars_rel_uri_part[] = {
/*
0 1 2 3 4 5 6 7 8 9 A B C D E F
@@ -515,7 +515,7 @@ static const char encoded_chars_rel_uri_part[] = {
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 40 - 4F @ */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, /* 50 - 5F [ \ ] ^ */
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 60 - 6F ` */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, /* 70 - 7F { | } ~ DEL */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, /* 70 - 7F { | } ~ DEL */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 80 - 8F */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 90 - 9F */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* A0 - AF */
@@ -526,7 +526,7 @@ static const char encoded_chars_rel_uri_part[] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* F0 - FF */
};
-/* everything except: ! ( ) * - . / 0-9 A-Z _ a-z */
+/* everything except: ! ( ) * - . / 0-9 A-Z _ a-z ~ */
static const char encoded_chars_rel_uri[] = {
/*
0 1 2 3 4 5 6 7 8 9 A B C D E F
@@ -538,7 +538,7 @@ static const char encoded_chars_rel_uri[] = {
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 40 - 4F @ */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, /* 50 - 5F [ \ ] ^ */
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 60 - 6F ` */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, /* 70 - 7F { | } ~ DEL */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, /* 70 - 7F { | } ~ DEL */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 80 - 8F */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 90 - 9F */
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* A0 - AF */