]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Remove the last piece of the layered I/O code. I don't know why this didn't
authorRyan Bloom <rbb@apache.org>
Tue, 28 Mar 2000 18:36:34 +0000 (18:36 +0000)
committerRyan Bloom <rbb@apache.org>
Tue, 28 Mar 2000 18:36:34 +0000 (18:36 +0000)
get removed with the rest of it.

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

server/config.c

index d802504e1e4fec5b398a913a3577a8190beed6c2..4ea02c9f929d0ad7822a98aebba17e069182e5b8 100644 (file)
@@ -308,60 +308,53 @@ int ap_invoke_handler(request_rec *r)
     const char *handler;
     char *p;
     size_t handler_len;
-    int result;
+    int result = HTTP_INTERNAL_SERVER_ERROR;
 
-    do {
-        result = DECLINED;
-        if (r->handler) {
-           handler = r->handler;
+    if (r->handler) {
+        handler = r->handler;
+        handler_len = strlen(handler);
+    }
+    else {
+        handler = r->content_type ? r->content_type : ap_default_type(r);
+        if ((p = strchr(handler, ';')) != NULL) { /* MIME type arguments */
+            while (p > handler && p[-1] == ' ')
+               --p;            /* strip trailing spaces */
+           handler_len = p - handler;
+       }
+       else {
            handler_len = strlen(handler);
-        }
-        else {
-           handler = r->content_type ? r->content_type : ap_default_type(r);
-           if ((p = strchr(handler, ';')) != NULL) { /* MIME type arguments */
-               while (p > handler && p[-1] == ' ')
-                   --p;                /* strip trailing spaces */
-               handler_len = p - handler;
-           }
-           else {
-               handler_len = strlen(handler);
-           }
-        }
+       }
+    }
 
-        /* Pass one --- direct matches */
-        for (handp = handlers; handp->hr.content_type; ++handp) {
-           if (handler_len == handp->len
-               && !strncmp(handler, handp->hr.content_type, handler_len)) {
-                result = (*handp->hr.handler) (r);
+    /* Pass one --- direct matches */
 
-                if (result != DECLINED)
-                    break;
-            }
+    for (handp = handlers; handp->hr.content_type; ++handp) {
+        if (handler_len == handp->len
+            && !strncmp(handler, handp->hr.content_type, handler_len)) {
+            result = (*handp->hr.handler) (r);
+
+            if (result != DECLINED)
+                return result;
         }
+    }
 
-        /* Pass two --- wildcard matches */
+    /* Pass two --- wildcard matches */
 
-        if (result == DECLINED) {
-            for (handp = wildhandlers; handp->hr.content_type; ++handp) {
-               if (handler_len >= handp->len
-                   && !strncmp(handler, handp->hr.content_type, handp->len)) {
-                    result = (*handp->hr.handler) (r);
+    for (handp = wildhandlers; handp->hr.content_type; ++handp) {
+        if (handler_len >= handp->len
+            && !strncmp(handler, handp->hr.content_type, handp->len)) {
+            result = (*handp->hr.handler) (r);
 
-                    if (result != DECLINED)
-                        break;
-                 }
-            }
-        }
-    } while (result == RERUN_HANDLERS);
+            if (result != DECLINED)
+                return result;
+         }
+    }
 
     if (result == HTTP_INTERNAL_SERVER_ERROR && r->handler && r->filename) {
         ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, r,
             "handler \"%s\" not found for: %s", r->handler, r->filename);
-        return HTTP_INTERNAL_SERVER_ERROR;
     }
-    return result;
+    return HTTP_INTERNAL_SERVER_ERROR;
 }
 
 int g_bDebugHooks;