From 1582e5890e1cb5a70f9de8a27619a2005df68534 Mon Sep 17 00:00:00 2001 From: Robert Spalek Date: Wed, 26 Sep 2001 16:46:41 +0000 Subject: [PATCH] added skeleton of not yet implemented function url_has_repeated_component() and its configuration items --- lib/url.c | 13 +++++++++++++ lib/url.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/lib/url.c b/lib/url.c index c345a784..3920aa59 100644 --- a/lib/url.c +++ b/lib/url.c @@ -2,6 +2,7 @@ * Sherlock Library -- URL Functions (according to RFC 1738 and 1808) * * (c) 1997--2001 Martin Mares + * (c) 2001 Robert Spalek */ #include "lib/lib.h" @@ -17,11 +18,17 @@ static uns url_ignore_spaces; static uns url_ignore_underflow; +static byte *url_component_separators = "/&?"; +static uns url_min_repeat_count = 0x7fffffff; +static uns url_max_repeat_length = 0; static struct cfitem url_config[] = { { "URL", CT_SECTION, NULL }, { "IgnoreSpaces", CT_INT, &url_ignore_spaces }, { "IgnoreUnderflow", CT_INT, &url_ignore_underflow }, + { "ComponentSeparators", CT_STRING, &url_component_separators }, + { "MinRepeatCount", CT_INT, &url_min_repeat_count }, + { "MaxRepeatLength", CT_INT, &url_max_repeat_length }, { NULL, CT_STOP, NULL } }; @@ -572,3 +579,9 @@ int main(int argc, char **argv) } #endif + +int +url_has_repeated_component(byte *url) +{ + return 0; +} diff --git a/lib/url.h b/lib/url.h index 8815da9b..0c275129 100644 --- a/lib/url.h +++ b/lib/url.h @@ -2,6 +2,7 @@ * Sherlock Library -- URL Functions * * (c) 1997 Martin Mares + * (c) 2001 Robert Spalek */ #ifndef _SHERLOCK_URL_H @@ -46,6 +47,7 @@ int url_canonicalize(struct url *); int url_pack(struct url *, byte *); int url_canon_split(byte *, byte *, byte *, struct url *); uns identify_protocol(byte *); +int url_has_repeated_component(byte *url); /* Error codes */ -- 2.39.2