提交 c721cc16 编写于 作者: P Peter Krempa

util: buffer: Encode URIs with upper case hex characters

rfc3986 uses uppercase characters so switch to using them as well.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 5fdad0db
......@@ -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;
......
......@@ -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[] = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册