]> granicus.if.org Git - apache/commitdiff
Keep Greg happy.
authorBen Laurie <ben@apache.org>
Sun, 7 Jan 2001 23:04:15 +0000 (23:04 +0000)
committerBen Laurie <ben@apache.org>
Sun, 7 Jan 2001 23:04:15 +0000 (23:04 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87608 13f79535-47bb-0310-9956-ffa450edef68

server/config.c

index db15655c576e369acf47c17acb45703f03b37629..573591c592f7d25dd76fb17666103e580813c6e9 100644 (file)
@@ -280,7 +280,7 @@ int ap_invoke_handler(request_rec *r)
 {
     const char *handler;
     const char *p;
-    size_t handler_len;
+    char *p2;
     int result;
     char hbuf[MAX_STRING_LEN];
 
@@ -289,14 +289,14 @@ int ap_invoke_handler(request_rec *r)
     }
     else {
         handler = r->content_type ? r->content_type : ap_default_type(r);
-        if (ap_strchr_c(handler, ';') != NULL) {
+        if ((p=ap_strchr_c(handler, ';')) != NULL) {
            apr_cpystrn(hbuf, handler, sizeof hbuf);
+           p2 = hbuf+(handler-p);
            handler = hbuf;
-           p = ap_strchr_c(handler, ';');
            /* MIME type arguments */
-            while (p > handler && p[-1] == ' ')
-               --p           /* strip trailing spaces */
-           *p='\0';
+            while (p2 > handler && p2[-1] == ' ')
+               --p2;           /* strip trailing spaces */
+           *p2='\0';
        }
     }