Forráskód Böngészése

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

bel 11 éve
szülő
commit
c23dc3e6ea
1 módosított fájl, 5 hozzáadás és 0 törlés
  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);
+        }
 
     }