From d19beed1bf1e2c8be6e34d4f7ef9630fff218822 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 11 Feb 2012 19:28:01 +0100 Subject: [PATCH] URL: Removed CONFIG_URL_ESCAPE_COMPAT --- ucw/default.cfg | 3 --- ucw/url.c | 7 +------ ucw/url.h | 8 -------- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/ucw/default.cfg b/ucw/default.cfg index 1504f8df..91e0289e 100644 --- a/ucw/default.cfg +++ b/ucw/default.cfg @@ -49,9 +49,6 @@ UnSet("DEFAULT_CONFIG"); # Environment variable with configuration file UnSet("ENV_VAR_CONFIG"); -# Use obsolete URL escaping rules (if you need behavior identical to the older versions of libucw) -UnSet("CONFIG_URL_ESCAPE_COMPAT"); - # Allow use of direct IO on files Set("CONFIG_DIRECT_IO"); Set("CONFIG_UCW_FB_DIRECT"); diff --git a/ucw/url.c b/ucw/url.c index 39e52946..a14d5e49 100644 --- a/ucw/url.c +++ b/ucw/url.c @@ -92,14 +92,12 @@ url_deescape(const char *s, char *d) val = NCC_AND; break; case '#': val = NCC_HASH; break; -#ifndef CONFIG_URL_ESCAPE_COMPAT case '$': val = NCC_DOLLAR; break; case '+': val = NCC_PLUS; break; case ',': val = NCC_COMMA; break; -#endif } *d++ = val; s += 3; @@ -142,10 +140,7 @@ url_enescape(const char *s, char *d) c == '!' || c == '*' || c == '\'' || c == '(' || c == ')' || /* ... and some exceptions and reserved chars */ c == '$' || c == '-' || c == '_' || c == '.' || c == '+' || c == ',' || c == '=' || c == '&' || c == '#' || c == ';' || - c == '/' || c == '?' || c == ':' || c == '@' -#ifndef CONFIG_URL_ESCAPE_COMPAT - || c == '~' -#endif + c == '/' || c == '?' || c == ':' || c == '@' || c == '~' ) *d++ = *s++; else diff --git a/ucw/url.h b/ucw/url.h index c389fb16..d2689be5 100644 --- a/ucw/url.h +++ b/ucw/url.h @@ -24,23 +24,15 @@ enum { NCC_EQUAL = 6, NCC_AND = 7, NCC_HASH = 8, -#ifdef CONFIG_URL_ESCAPE_COMPAT - NCC_MAX = 9 -#else // Avoid 9 (\t) and 10 (\n) NCC_DOLLAR = 11, NCC_PLUS = 12, // Avoid 13 (\r) NCC_COMMA = 14, NCC_MAX = 15 -#endif }; -#ifdef CONFIG_URL_ESCAPE_COMPAT -#define NCC_CHARS " ;/?:@=&#" -#else #define NCC_CHARS " ;/?:@=&#\t\n$+\r," -#endif /* Remove/Introduce '%' escapes */ -- 2.39.5