diff mbox series

[V3,09/21] mongoose: Replace deprecated mg_http_match_uri() with mg_match()

Message ID 20240709111440.8215-10-Michael.Glembotzki@iris-sensing.com
State Accepted
Headers show
Series mongoose: Update to version 7.14 | expand

Commit Message

Michael Glembotzki July 9, 2024, 11:08 a.m. UTC
mongoose rev-id: a025577b30be2fe0a90358702b41b7d8e5afe69f

Signed-off-by: Michael Glembotzki <Michael.Glembotzki@iris-sensing.com>
---
 mongoose/mongoose_interface.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/mongoose/mongoose_interface.c b/mongoose/mongoose_interface.c
index b3ebc62f..ba2e8d35 100644
--- a/mongoose/mongoose_interface.c
+++ b/mongoose/mongoose_interface.c
@@ -692,7 +692,7 @@  static void ev_handler(struct mg_connection *nc, int ev, void *ev_data)
 			mg_http_send_digest_auth_request(nc, global_auth_domain);
 		else if (mg_http_get_header(hm, "Sec-WebSocket-Key") != NULL)
 			websocket_handler(nc, ev_data);
-		else if (mg_http_match_uri(hm, "/restart"))
+		else if (mg_match(hm->uri, mg_str("/restart"), NULL))
 			restart_handler(nc, ev_data);
 		else
 			mg_http_serve_dir(nc, ev_data, &s_http_server_opts);
@@ -700,7 +700,7 @@  static void ev_handler(struct mg_connection *nc, int ev, void *ev_data)
 		struct mg_http_message hm;
 		int hlen = mg_http_parse((char *) nc->recv.buf, nc->recv.len, &hm);
 		if (hlen > 0) {
-			if (mg_http_match_uri(&hm, "/upload")) {
+			if (mg_match(hm.uri, mg_str("/upload"), NULL)) {
 				if (!mg_http_is_authorized(&hm, global_auth_domain, global_auth_file)) {
 					if (nc->pfn != NULL)
 						mg_http_send_digest_auth_request(nc, global_auth_domain);