From: Roy T. Fielding <fielding@apache.org>
Date: Tue, 2 Oct 2007 20:36:47 +0000 (+0000)
Subject: Reduce the last change to a minimum, since OPTIONS * does not
X-Git-Tag: 2.3.0~1362
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=97f37ce377dc0af08a485425f361dd4ab9421920;p=apache

Reduce the last change to a minimum, since OPTIONS * does not
include an Allow header field (* is not a resource).



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@581374 13f79535-47bb-0310-9956-ffa450edef68
---

diff --git a/modules/http/http_core.c b/modules/http/http_core.c
index 687dc06efe..bb78d03996 100644
--- a/modules/http/http_core.c
+++ b/modules/http/http_core.c
@@ -236,22 +236,12 @@ static int http_create_request(request_rec *r)
 
 static int http_send_options(request_rec *r)
 {
-    int rv;
-    if ((r->method_number != M_OPTIONS) || !r->uri || strcmp(r->uri, "*")) {
-        return DECLINED;
+    if ((r->method_number == M_OPTIONS) && r->uri && (r->uri[0] == '*')) {
+        return OK;           /* Send HTTP pong, without Allow header */
     }
-
-    ap_allow_standard_methods(r, MERGE_ALLOW, M_GET, M_OPTIONS, M_POST, -1);
-    rv = ap_send_http_options(r);
-
-    if (rv == OK) {
-        rv = DONE;
-    }
-
-    return rv;
+    return DECLINED;
 }
 
-
 static void register_hooks(apr_pool_t *p)
 {
     /**