]> granicus.if.org Git - apache/commitdiff
Reduce the last change to a minimum, since OPTIONS * does not
authorRoy T. Fielding <fielding@apache.org>
Tue, 2 Oct 2007 20:36:47 +0000 (20:36 +0000)
committerRoy T. Fielding <fielding@apache.org>
Tue, 2 Oct 2007 20:36:47 +0000 (20:36 +0000)
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

modules/http/http_core.c

index 687dc06efebb665c807ac875d1ff8e2744ca42e9..bb78d03996fbd7cef0522ee8784bdc64e0516605 100644 (file)
@@ -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)
 {
     /**