Pārlūkot izejas kodu

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

bel 11 gadi atpakaļ
vecāks
revīzija
c23dc3e6ea
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  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);
+        }
 
     }