]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
extension_methods directive is now obsolete.
authoramosjeffries <>
Tue, 12 Feb 2008 07:05:11 +0000 (07:05 +0000)
committeramosjeffries <>
Tue, 12 Feb 2008 07:05:11 +0000 (07:05 +0000)
METHOD_OTHER type now cleanly handles unknown methods in squid.

Part 1:
  - removes the directive from squid default config.
  - removes the placeholder EXT methods enumerations
  - deprecates the code which previously handled config parsing.

part 2: (TODO)
 - needs to cleanup the remaining enumerated methods to reduce
   memory footprint

src/HttpRequestMethod.cc
src/HttpRequestMethod.h
src/cf.data.pre

index 208e41369f64deab51c66be608e0ad01a2340408..a846db22e5890ac95358c52166dd12e3fe7ceac2 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpRequestMethod.cc,v 1.6 2008/02/03 10:00:29 amosjeffries Exp $
+ * $Id: HttpRequestMethod.cc,v 1.7 2008/02/12 00:05:11 amosjeffries Exp $
  *
  * DEBUG: section 73    HTTP Request
  * AUTHOR: Duane Wessels
@@ -70,26 +70,6 @@ const char* HttpRequestMethod::RequestMethodStr[] =
         "MKACTIVITY",
         "CHECKOUT",
         "MERGE",
-        "%EXT00",
-        "%EXT01",
-        "%EXT02",
-        "%EXT03",
-        "%EXT04",
-        "%EXT05",
-        "%EXT06",
-        "%EXT07",
-        "%EXT08",
-        "%EXT09",
-        "%EXT10",
-        "%EXT11",
-        "%EXT12",
-        "%EXT13",
-        "%EXT14",
-        "%EXT15",
-        "%EXT16",
-        "%EXT17",
-        "%EXT18",
-        "%EXT19",
         "ERROR"
     };
 
@@ -148,6 +128,7 @@ HttpRequestMethod::HttpRequestMethod(char const *begin, char const *end) : theMe
 void
 HttpRequestMethod::AddExtension(const char *mstr)
 {
+#if 0 /* obsolete now that we have METHOD_OTHER always enabled */
     _method_t method = METHOD_NONE;
 
     for (++method; method < METHOD_ENUM_END; ++method) {
@@ -168,11 +149,13 @@ HttpRequestMethod::AddExtension(const char *mstr)
     }
 
     debugs(23, 1, "WARNING: Could not add new extension method '" << mstr << "' due to lack of array space");
+#endif
 }
 
 void
 HttpRequestMethod::Configure(SquidConfig &Config)
 {
+#if 0 /* extension methods obsolete now that we have METHOD_OTHER always enabled */
     wordlist *w = Config.ext_methods;
 
     while (w) {
@@ -185,6 +168,7 @@ HttpRequestMethod::Configure(SquidConfig &Config)
 
         w = w->next;
     }
+#endif
 }
 
 char const* 
index 57bd3517d89cc0d4eff757255e5017af669b7cf9..1f8aa6fd9eb398de8dd48ba68ae3aff0a0010943 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: HttpRequestMethod.h,v 1.8 2008/02/03 10:00:29 amosjeffries Exp $
+ * $Id: HttpRequestMethod.h,v 1.9 2008/02/12 00:05:11 amosjeffries Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -67,26 +67,6 @@ enum _method_t {
     METHOD_MKACTIVITY,
     METHOD_CHECKOUT,
     METHOD_MERGE,
-    METHOD_EXT00,
-    METHOD_EXT01,
-    METHOD_EXT02,
-    METHOD_EXT03,
-    METHOD_EXT04,
-    METHOD_EXT05,
-    METHOD_EXT06,
-    METHOD_EXT07,
-    METHOD_EXT08,
-    METHOD_EXT09,
-    METHOD_EXT10,
-    METHOD_EXT11,
-    METHOD_EXT12,
-    METHOD_EXT13,
-    METHOD_EXT14,
-    METHOD_EXT15,
-    METHOD_EXT16,
-    METHOD_EXT17,
-    METHOD_EXT18,
-    METHOD_EXT19,
     METHOD_OTHER,
     METHOD_ENUM_END  // MUST be last, (yuck) this is used as an array-initialization index constant!
 };
index f4b6c784711afcfc0e19a200c06303060450dce5..e53a553937039571f17e2de6488d6da6f4d7e2cc 100644 (file)
@@ -1,6 +1,6 @@
 
 #
-# $Id: cf.data.pre,v 1.501 2008/02/11 22:28:47 rousskov Exp $
+# $Id: cf.data.pre,v 1.502 2008/02/12 00:05:11 amosjeffries Exp $
 #
 # SQUID Web Proxy Cache                http://www.squid-cache.org/
 # ----------------------------------------------------------
@@ -3011,15 +3011,6 @@ DOC_START
        objects not intended for caching to get cached.
 DOC_END
 
-NAME: extension_methods
-TYPE: wordlist
-LOC: Config.ext_methods
-DEFAULT: none
-DOC_START
-       Squid only knows about standardized HTTP request methods.
-       You can add up to 20 additional "extension" methods here.
-DOC_END
-
 NAME: request_entities
 TYPE: onoff
 LOC: Config.onoff.request_entities