Переглянути джерело

mg_set_request_handler() mod to use pattern (Patch from Toni Wilk)

bel 11 роки тому
батько
коміт
c23dc3e6ea
1 змінених файлів з 5 додано та 0 видалено
  1. 5 0
      src/civetweb.c

+ 5 - 0
src/civetweb.c

@@ -5146,6 +5146,11 @@ static int use_request_handler(struct mg_connection *conn)
 
             return tmp_rh->handler(conn, tmp_rh->cbdata);
         }
+
+        /* try for pattern match */
+        if (match_prefix(tmp_rh->uri, tmp_rh->uri_len, uri) > 0) {
+           return tmp_rh->handler(conn, tmp_rh->cbdata);
+        }
 
     }