client: fix compilation error with GCC 12
[project/uhttpd.git] / client.c
index 2be8f22a8eef89f7398c785ac21e6692e8a80676..06336eb39046a18da75981a46e248793ed22d3a9 100644 (file)
--- a/client.c
+++ b/client.c
@@ -263,10 +263,10 @@ static bool tls_redirect_check(struct client *cl)
                return true;
 
        blob_for_each_attr(cur, cl->hdr.head, rem) {
-               if (!strcmp(blobmsg_name(cur), "host"))
+               if (!strncmp(blobmsg_name(cur), "host", 4))
                        host = blobmsg_get_string(cur);
 
-               if (!strcmp(blobmsg_name(cur), "URL"))
+               if (!strncmp(blobmsg_name(cur), "URL", 3))
                        url = blobmsg_get_string(cur);
 
                if (url && host)