[PATCH 14/19] util: buffer: Encode URIs with upper case hex characters

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

 



rfc3986 uses uppercase characters so switch to using them as well.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/util/virbuffer.c | 2 +-
 tests/viruritest.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util/virbuffer.c b/src/util/virbuffer.c
index bde118a248..2256bd5de5 100644
--- a/src/util/virbuffer.c
+++ b/src/util/virbuffer.c
@@ -663,7 +663,7 @@ virBufferURIEncodeString(virBufferPtr buf, const char *str)
     int grow_size = 0;
     const char *p;
     unsigned char uc;
-    const char *hex = "0123456789abcdef";
+    const char *hex = "0123456789ABCDEF";

     if ((buf == NULL) || (str == NULL))
         return;
diff --git a/tests/viruritest.c b/tests/viruritest.c
index a11587e52b..07cf7261d1 100644
--- a/tests/viruritest.c
+++ b/tests/viruritest.c
@@ -184,7 +184,7 @@ mymain(void)
         { NULL, NULL, false },
     };
     TEST_FULL("spice://[3ffe::104]:5900/?tlsSubject=C=XX,L=Testtown,O=Test%20Company,CN=tester.test",
-              "spice://[3ffe::104]:5900/?tlsSubject=C%3dXX%2cL%3dTesttown%2cO%3dTest%20Company%2cCN%3dtester.test",
+              "spice://[3ffe::104]:5900/?tlsSubject=C%3DXX%2CL%3DTesttown%2CO%3DTest%20Company%2CCN%3Dtester.test",
               "spice", "3ffe::104", 5900, "/", "tlsSubject=C=XX,L=Testtown,O=Test%20Company,CN=tester.test", NULL, NULL, spiceparams);

     virURIParam params1[] = {
-- 
2.21.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list





[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