[PATCH 01/10] viruri: Search params case insensitively

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Our URI handling code (doRemoteOpen() specifically), uses case
insensitive parsing of query part of URI. For instance:

  qemu:///system?socket=/some/path
  qemu:///system?SoCkEt=/some/path

are the same URI. Even though the latter is probably not used
anywhere, let's switch to STRCASEEQ() instead of STREQ() at two
places: virURIGetParam() and virURICheckUnixSocket().

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/util/viruri.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util/viruri.c b/src/util/viruri.c
index 88bb0cc1f8..53f85ed705 100644
--- a/src/util/viruri.c
+++ b/src/util/viruri.c
@@ -371,7 +371,7 @@ virURIGetParam(virURI *uri, const char *name)
     size_t i;
 
     for (i = 0; i < uri->paramsCount; i++) {
-        if (STREQ(uri->params[i].name, name))
+        if (STRCASEEQ(uri->params[i].name, name))
             return uri->params[i].value;
     }
 
@@ -403,7 +403,7 @@ virURICheckUnixSocket(virURI *uri)
         return false;
 
     for (i = 0; i < uri->paramsCount; i++) {
-        if (STREQ(uri->params[i].name, "socket"))
+        if (STRCASEEQ(uri->params[i].name, "socket"))
             return true;
     }
 
-- 
2.39.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux