]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Remove CGI block on OPTIONS method so that scripts can
authorRoy T. Fielding <fielding@apache.org>
Tue, 18 Oct 2005 21:27:57 +0000 (21:27 +0000)
committerRoy T. Fielding <fielding@apache.org>
Tue, 18 Oct 2005 21:27:57 +0000 (21:27 +0000)
respond to OPTIONS directly rather than via server default.

PR: 15242
Reviewed-by: Paul Querna, Andre Malo, William A. Rowe, Jr.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@326253 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/generators/mod_cgi.c
modules/generators/mod_cgid.c

diff --git a/CHANGES b/CHANGES
index 4d17685c15580de793702e9ec4428e007b5b5598..ecab93d9d7276a6d18b419fce94d73cc41593757 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.0.56
 
+  *) mod_cgi(d): Remove block on OPTIONS method so that scripts can
+     respond to OPTIONS directly rather than via server default.
+     [Roy Fielding] PR 15242
+
   *) Added new module mod_version, which provides version dependent
      configuration containers.  [AndrĂ© Malo]
 
index 3a8ae8ef6b674a593cabc96426c3ea2958e894a6..46e35575150f556ad8f7e951adf3a5b42f35abe3 100644 (file)
@@ -746,13 +746,6 @@ static int cgi_handler(request_rec *r)
 
     p = r->main ? r->main->pool : r->pool;
 
-    if (r->method_number == M_OPTIONS) {
-        /* 99 out of 100 CGI scripts, this is all they support */
-        r->allowed |= (AP_METHOD_BIT << M_GET);
-        r->allowed |= (AP_METHOD_BIT << M_POST);
-        return DECLINED;
-    }
-
     argv0 = apr_filename_of_pathname(r->filename);
     nph = !(strncmp(argv0, "nph-", 4));
     conf = ap_get_module_config(r->server->module_config, &cgi_module);
index 5dd50704ddeeb2ca7de9c84f48a70cb0e864802a..038a33a6cc4313d68fa4e24f26269fd51d271b34 100644 (file)
@@ -1261,13 +1261,6 @@ static int cgid_handler(request_rec *r)
     if (strcmp(r->handler,CGI_MAGIC_TYPE) && strcmp(r->handler,"cgi-script"))
         return DECLINED;
 
-    if (r->method_number == M_OPTIONS) { 
-        /* 99 out of 100 cgid scripts, this is all they support */ 
-        r->allowed |= (AP_METHOD_BIT << M_GET); 
-        r->allowed |= (AP_METHOD_BIT << M_POST); 
-        return DECLINED; 
-    } 
-
     conf = ap_get_module_config(r->server->module_config, &cgid_module); 
     is_included = !strcmp(r->protocol, "INCLUDED");