summaryrefslogtreecommitdiff
path: root/src/ne_uri.c
diff options
context:
space:
mode:
authorjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2005-03-19 21:24:27 +0000
committerjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2005-03-19 21:24:27 +0000
commit66b15c0b7a65ec2b9e9e1514b5114790d2c6f320 (patch)
tree47c53efbd8d210eebc6b79b6d815e3740ee1b53b /src/ne_uri.c
parentd0e48b6b244e81dddf91b14afab5547331cbe6e8 (diff)
downloadneon-66b15c0b7a65ec2b9e9e1514b5114790d2c6f320.tar.gz
* src/ne_uri.c (uri_paths): Fix URI encoding default.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@529 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Diffstat (limited to 'src/ne_uri.c')
-rw-r--r--src/ne_uri.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/ne_uri.c b/src/ne_uri.c
index be78f79..3eb370e 100644
--- a/src/ne_uri.c
+++ b/src/ne_uri.c
@@ -189,24 +189,27 @@ char *ne_path_unescape(const char *uri)
#define SL (0) /* forward-slash = "/" */
#define UN (0) /* unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" */
+#define OT (1) /* others */
+
/* Lookup table for percent-encoding logic: value is non-zero if
* character should be percent-encoded. */
static const unsigned char uri_chars[128] = {
/* 0xXX x0 x2 x4 x6 x8 xA xC xE */
-/* 0x */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 1x */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-/* 2x */ 0, SD, 0, GD, SD, 0, SD, SD, SD, SD, SD, SD, SD, UN, UN, SL,
-/* 3x */ UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, GD, SD, 0, SD, 0, GD,
+/* 0x */ OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT,
+/* 1x */ OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT,
+/* 2x */ OT, SD, OT, GD, SD, OT, SD, SD, SD, SD, SD, SD, SD, UN, UN, SL,
+/* 3x */ UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, GD, SD, OT, SD, OT, GD,
/* 4x */ GD, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN,
-/* 5x */ UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, GD, 0, GD, 0, 0,
-/* 6x */ 0, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN,
-/* 7x */ UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, 0, 0, 0, UN, 0
+/* 5x */ UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, GD, OT, GD, OT, OT,
+/* 6x */ OT, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN,
+/* 7x */ UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, UN, OT, OT, OT, UN, OT
};
#undef SD
#undef GD
#undef SL
#undef UN
+#undef OT
/* CH must be an unsigned char; evaluates to 1 if CH should be
* percent-encoded. */