urlmon: Implemented IUri_GetPathAndQuery.

This commit is contained in:
Thomas Mullaly 2010-07-27 20:43:10 -04:00 committed by Alexandre Julliard
parent 45069a3330
commit b5e70534c6
2 changed files with 154 additions and 110 deletions

View File

@ -103,7 +103,7 @@ static const uri_properties uri_tests[] = {
{"www.winehq.org",S_OK,FALSE}, /* HOST */
{"",S_FALSE,FALSE}, /* PASSWORD */
{"/",S_OK,FALSE}, /* PATH */
{"/",S_OK,TRUE}, /* PATH_AND_QUERY */
{"/",S_OK,FALSE}, /* PATH_AND_QUERY */
{"",S_FALSE,FALSE}, /* QUERY */
{"http://www.winehq.org/tests/../tests/../..",S_OK,FALSE}, /* RAW_URI */
{"http",S_OK,FALSE}, /* SCHEME_NAME */
@ -132,7 +132,7 @@ static const uri_properties uri_tests[] = {
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/tests",S_OK,FALSE},
{"/tests",S_OK,TRUE},
{"/tests",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://winehq.org/tests/.././tests",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -161,7 +161,7 @@ static const uri_properties uri_tests[] = {
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/?query=x&return=y",S_OK,TRUE},
{"/?query=x&return=y",S_OK,FALSE},
{"?query=x&return=y",S_OK,FALSE},
{"HtTp://www.winehq.org/tests/..?query=x&return=y",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -190,7 +190,7 @@ static const uri_properties uri_tests[] = {
{"example.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/path/a/Forbidden'%3C%7C%3E%20Characters",S_OK,FALSE},
{"/path/a/Forbidden'%3C%7C%3E%20Characters",S_OK,TRUE},
{"/path/a/Forbidden'%3C%7C%3E%20Characters",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"hTTp://us%45r%3Ainfo@examp%4CE.com:80/path/a/b/./c/../%2E%2E/Forbidden'<|> Characters",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -220,7 +220,7 @@ static const uri_properties uri_tests[] = {
{"ftp.winehq.org",S_OK,FALSE},
{"wine",S_OK,FALSE},
{"/dir/foo%20bar.txt",S_OK,FALSE},
{"/dir/foo%20bar.txt",S_OK,TRUE},
{"/dir/foo%20bar.txt",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"ftp://winepass:wine@ftp.winehq.org:9999/dir/foo bar.txt",S_OK,FALSE},
{"ftp",S_OK,FALSE},
@ -248,7 +248,7 @@ static const uri_properties uri_tests[] = {
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"/c:/tests/foo%2520bar.mp3",S_OK,FALSE},
{"/c:/tests/foo%2520bar.mp3",S_OK,TRUE},
{"/c:/tests/foo%2520bar.mp3",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"file://c:\\tests\\../tests/foo%20bar.mp3",S_OK,FALSE},
{"file",S_OK,FALSE},
@ -276,7 +276,7 @@ static const uri_properties uri_tests[] = {
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"/tests/test%20file.README.txt",S_OK,FALSE},
{"/tests/test%20file.README.txt",S_OK,TRUE},
{"/tests/test%20file.README.txt",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"FILE://localhost/test dir\\../tests/test%20file.README.txt",S_OK,FALSE},
{"file",S_OK,FALSE},
@ -304,7 +304,7 @@ static const uri_properties uri_tests[] = {
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"nothing:should:happen here",S_OK,FALSE},
{"nothing:should:happen here",S_OK,TRUE},
{"nothing:should:happen here",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"urn:nothing:should:happen here",S_OK,FALSE},
{"urn",S_OK,FALSE},
@ -333,7 +333,7 @@ static const uri_properties uri_tests[] = {
{"127.0.0.1",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/test%20dir/test.txt",S_OK,FALSE},
{"/test%20dir/test.txt",S_OK,TRUE},
{"/test%20dir/test.txt",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://127.0.0.1/tests/../test dir/./test.txt",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -362,7 +362,7 @@ static const uri_properties uri_tests[] = {
{"fedc:ba98:7654:3210:fedc:ba98:7654:3210",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -391,7 +391,7 @@ static const uri_properties uri_tests[] = {
{"::13.1.68.3",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"ftp://[::13.1.68.3]",S_OK,FALSE},
{"ftp",S_OK,FALSE},
@ -420,7 +420,7 @@ static const uri_properties uri_tests[] = {
{"fedc:ba98::3210",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://[FEDC:BA98:0:0:0:0:0:3210]",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -449,7 +449,7 @@ static const uri_properties uri_tests[] = {
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"1234://www.winehq.org",S_OK,FALSE},
{"1234",S_OK,FALSE},
@ -478,7 +478,7 @@ static const uri_properties uri_tests[] = {
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"/C:/test/test.mp3",S_OK,FALSE},
{"/C:/test/test.mp3",S_OK,TRUE},
{"/C:/test/test.mp3",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"C:/test/test.mp3",S_OK,FALSE},
{"file",S_OK,FALSE},
@ -508,7 +508,7 @@ static const uri_properties uri_tests[] = {
{"server",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/test.mp3",S_OK,FALSE},
{"/test.mp3",S_OK,TRUE},
{"/test.mp3",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"\\\\Server/test.mp3",S_OK,FALSE},
{"file",S_OK,FALSE},
@ -537,7 +537,7 @@ static const uri_properties uri_tests[] = {
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/test",S_OK,FALSE},
{"/test",S_OK,TRUE},
{"/test",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"www.winehq.org/test",S_OK,FALSE},
{"*",S_OK,FALSE},
@ -567,7 +567,7 @@ static const uri_properties uri_tests[] = {
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/test",S_OK,FALSE},
{"/test",S_OK,TRUE},
{"/test",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"*:www.winehq.org/test",S_OK,FALSE},
{"*",S_OK,FALSE},
@ -595,7 +595,7 @@ static const uri_properties uri_tests[] = {
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"/../some dir/test.ext",S_OK,FALSE},
{"/../some dir/test.ext",S_OK,TRUE},
{"/../some dir/test.ext",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/../some dir/test.ext",S_OK,FALSE},
{"",S_FALSE,FALSE},
@ -623,7 +623,7 @@ static const uri_properties uri_tests[] = {
{"",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"//implicit/wildcard/uri%20scheme",S_OK,FALSE},
{"//implicit/wildcard/uri%20scheme",S_OK,TRUE},
{"//implicit/wildcard/uri%20scheme",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"//implicit/wildcard/uri scheme",S_OK,FALSE},
{"*",S_OK,FALSE},
@ -653,7 +653,7 @@ static const uri_properties uri_tests[] = {
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"/.//google.com",S_OK,FALSE},
{"/.//google.com",S_OK,TRUE},
{"/.//google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"zip://google.com",S_OK,FALSE},
{"zip",S_OK,FALSE},
@ -684,7 +684,7 @@ static const uri_properties uri_tests[] = {
{"winehq.org",S_OK,FALSE},
{"pass:word",S_OK,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"ftp://user:pass:word@winehq.org/",S_OK,FALSE},
{"ftp",S_OK,FALSE},
@ -715,7 +715,7 @@ static const uri_properties uri_tests[] = {
{"ftp.google.com",S_OK,FALSE},
{"PASS",S_OK,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"ftp://w%49%4Ee:PA%53%53@ftp.google.com/",S_OK,FALSE},
{"ftp",S_OK,FALSE},
@ -746,7 +746,7 @@ static const uri_properties uri_tests[] = {
{"ftp.google.com",S_OK,FALSE},
{"PA%7B%7D",S_OK,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"ftp://w%5D%5Be:PA%7B%7D@ftp.google.com/",S_OK,FALSE},
{"ftp",S_OK,FALSE},
@ -777,7 +777,7 @@ static const uri_properties uri_tests[] = {
{"ftp.google.com",S_OK,FALSE},
{"",S_OK,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"ftp://empty:@ftp.google.com/",S_OK,FALSE},
{"ftp",S_OK,FALSE},
@ -808,7 +808,7 @@ static const uri_properties uri_tests[] = {
{"ftp.google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"ftp://\" \"weird@ftp.google.com/",S_OK,FALSE},
{"ftp",S_OK,FALSE},
@ -839,7 +839,7 @@ static const uri_properties uri_tests[] = {
{"ftp.google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"ftp://\" \"weird@ftp.google.com/",S_OK,FALSE},
{"ftp",S_OK,FALSE},
@ -869,7 +869,7 @@ static const uri_properties uri_tests[] = {
{"winehq.org",S_OK,FALSE},
{"word",S_OK,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"zip://%xy:word@winehq.org/",S_OK,FALSE},
{"zip",S_OK,FALSE},
@ -901,7 +901,7 @@ static const uri_properties uri_tests[] = {
{"winehq.org",S_OK,FALSE},
{"%52%53ord",S_OK,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"zip://%2E:%52%53ord@winehq.org/",S_OK,FALSE},
{"zip",S_OK,FALSE},
@ -931,7 +931,7 @@ static const uri_properties uri_tests[] = {
{"winehq.org",S_OK,FALSE},
{"word",S_OK,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"ftp://[](),'test':word@winehq.org/",S_OK,FALSE},
{"ftp",S_OK,FALSE},
@ -960,7 +960,7 @@ static const uri_properties uri_tests[] = {
{"test",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/?:word@winehq.org/",S_OK,TRUE},
{"/?:word@winehq.org/",S_OK,FALSE},
{"?:word@winehq.org/",S_OK,FALSE},
{"ftp://test?:word@winehq.org/",S_OK,FALSE},
{"ftp",S_OK,FALSE},
@ -989,7 +989,7 @@ static const uri_properties uri_tests[] = {
{"test",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"ftp://test#:word@winehq.org/",S_OK,FALSE},
{"ftp",S_OK,FALSE},
@ -1019,7 +1019,7 @@ static const uri_properties uri_tests[] = {
{"winehq.org",S_OK,FALSE},
{"word",S_OK,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"zip://test\\:word@winehq.org/",S_OK,FALSE},
{"zip",S_OK,FALSE},
@ -1049,7 +1049,7 @@ static const uri_properties uri_tests[] = {
{"127.0.0.100",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://127.000.000.100/",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -1079,7 +1079,7 @@ static const uri_properties uri_tests[] = {
{"127.0.0.0",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://127.0/",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -1109,7 +1109,7 @@ static const uri_properties uri_tests[] = {
{"0.1.226.64",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://123456/",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -1139,7 +1139,7 @@ static const uri_properties uri_tests[] = {
{"255.255.255.255",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://4294967295/",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -1169,7 +1169,7 @@ static const uri_properties uri_tests[] = {
{"4294967296",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://4294967296/",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -1199,7 +1199,7 @@ static const uri_properties uri_tests[] = {
{"4294967295",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"1234://4294967295/",S_OK,FALSE},
{"1234",S_OK,FALSE},
@ -1229,7 +1229,7 @@ static const uri_properties uri_tests[] = {
{"127.001",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"1234://127.001/",S_OK,FALSE},
{"1234",S_OK,FALSE},
@ -1258,7 +1258,7 @@ static const uri_properties uri_tests[] = {
{"fedc:ba98::3210",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://[FEDC:BA98::3210]",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -1287,7 +1287,7 @@ static const uri_properties uri_tests[] = {
{"::",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://[::]",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -1316,7 +1316,7 @@ static const uri_properties uri_tests[] = {
{"fedc:ba98::",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://[FEDC:BA98::]",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -1346,7 +1346,7 @@ static const uri_properties uri_tests[] = {
{"1:0:3:4:5:6:7:8",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://[1::3:4:5:6:7:8]",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -1375,7 +1375,7 @@ static const uri_properties uri_tests[] = {
{"[v2.34]",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://[v2.34]/",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -1405,7 +1405,7 @@ static const uri_properties uri_tests[] = {
{"[xyz:12345.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/test",S_OK,FALSE},
{"/test",S_OK,TRUE},
{"/test",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://[xyz:12345.com/test",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -1437,7 +1437,7 @@ static const uri_properties uri_tests[] = {
{"www.[works].com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"ftp://www.[works].com/",S_OK,FALSE},
{"ftp",S_OK,FALSE},
@ -1467,7 +1467,7 @@ static const uri_properties uri_tests[] = {
{"www.google.com]",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://www.google.com]:12345/",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -1497,7 +1497,7 @@ static const uri_properties uri_tests[] = {
{"w%XXw%GEw.google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"zip://w%XXw%GEw.google.com/",S_OK,FALSE},
{"zip",S_OK,FALSE},
@ -1527,7 +1527,7 @@ static const uri_properties uri_tests[] = {
{"GOOGLE.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"zip://GOOGLE.com/",S_OK,FALSE},
{"zip",S_OK,FALSE},
@ -1557,7 +1557,7 @@ static const uri_properties uri_tests[] = {
{"www.google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://WWW.GOOGLE.com/",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -1589,7 +1589,7 @@ static const uri_properties uri_tests[] = {
{"www.%7cgoogle%7c.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://www.%7Cgoogle|.com/",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -1619,7 +1619,7 @@ static const uri_properties uri_tests[] = {
{"1:2:3:4:5:6::",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://[1:2:3:4:5:6:0.0.0.0]",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -1649,7 +1649,7 @@ static const uri_properties uri_tests[] = {
{"::1.2.3.0",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://[::001.002.003.000]",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -1679,7 +1679,7 @@ static const uri_properties uri_tests[] = {
{"0001:0:000:0004:0005:0006:001.002.003.000",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"zip://[0001:0:000:0004:0005:0006:001.002.003.000]",S_OK,FALSE},
{"zip",S_OK,FALSE},
@ -1709,7 +1709,7 @@ static const uri_properties uri_tests[] = {
{"ffff::c0de:6f20",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://[ffff::192.222.111.32]",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -1739,7 +1739,7 @@ static const uri_properties uri_tests[] = {
{"google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://google.com:65535",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -1768,7 +1768,7 @@ static const uri_properties uri_tests[] = {
{"google.com:65536",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"zip://google.com:65536",S_OK,FALSE},
{"zip",S_OK,FALSE},
@ -1797,7 +1797,7 @@ static const uri_properties uri_tests[] = {
{"google.com:65536:25",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"zip://google.com:65536:25",S_OK,FALSE},
{"zip",S_OK,FALSE},
@ -1826,7 +1826,7 @@ static const uri_properties uri_tests[] = {
{"[::ffff]:abcd",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"zip://[::ffff]:abcd",S_OK,FALSE},
{"zip",S_OK,FALSE},
@ -1855,7 +1855,7 @@ static const uri_properties uri_tests[] = {
{"127.0.0.1:abcd",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"zip://127.0.0.1:abcd",S_OK,FALSE},
{"zip",S_OK,FALSE},
@ -1884,7 +1884,7 @@ static const uri_properties uri_tests[] = {
{"google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"http://google.com:00035",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -1913,7 +1913,7 @@ static const uri_properties uri_tests[] = {
{"google.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"http://google.com:80",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -1942,7 +1942,7 @@ static const uri_properties uri_tests[] = {
{"google.com.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://google.com.uk",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -1971,7 +1971,7 @@ static const uri_properties uri_tests[] = {
{"google.com.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://google.com.com",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -2000,7 +2000,7 @@ static const uri_properties uri_tests[] = {
{"google.uk.1",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://google.uk.1",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -2030,7 +2030,7 @@ static const uri_properties uri_tests[] = {
{"google.foo.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://google.foo.uk",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -2059,7 +2059,7 @@ static const uri_properties uri_tests[] = {
{".com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://.com",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -2088,7 +2088,7 @@ static const uri_properties uri_tests[] = {
{".uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://.uk",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -2117,7 +2117,7 @@ static const uri_properties uri_tests[] = {
{"www.co.google.com.[]",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://www.co.google.com.[]",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -2146,7 +2146,7 @@ static const uri_properties uri_tests[] = {
{"co.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://co.uk",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -2175,7 +2175,7 @@ static const uri_properties uri_tests[] = {
{"www.co.google.us.test",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://www.co.google.us.test",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -2204,7 +2204,7 @@ static const uri_properties uri_tests[] = {
{"gov.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://gov.uk",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -2232,7 +2232,7 @@ static const uri_properties uri_tests[] = {
{"www.google.com\\test",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"zip://www.google.com\\test",S_OK,FALSE},
{"zip",S_OK,FALSE},
@ -2260,7 +2260,7 @@ static const uri_properties uri_tests[] = {
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"excepts:bad:%XY:encoded",S_OK,FALSE},
{"excepts:bad:%XY:encoded",S_OK,TRUE},
{"excepts:bad:%XY:encoded",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"urn:excepts:bad:%XY:encoded",S_OK,FALSE},
{"urn",S_OK,FALSE},
@ -2291,7 +2291,7 @@ static const uri_properties uri_tests[] = {
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"/C:/te%253Es%252Et/tes%25t.mp3",S_OK,FALSE},
{"/C:/te%253Es%252Et/tes%25t.mp3",S_OK,TRUE},
{"/C:/te%253Es%252Et/tes%25t.mp3",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"file://C:/te%3Es%2Et/tes%t.mp3",S_OK,FALSE},
{"file",S_OK,FALSE},
@ -2322,7 +2322,7 @@ static const uri_properties uri_tests[] = {
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"/C:/te%3Es.t/t#es%25t.mp3",S_OK,FALSE},
{"/C:/te%3Es.t/t#es%25t.mp3",S_OK,TRUE},
{"/C:/te%3Es.t/t#es%25t.mp3",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"file:///C:/te%3Es%2Et/t%23es%t.mp3",S_OK,FALSE},
{"file",S_OK,FALSE},
@ -2352,7 +2352,7 @@ static const uri_properties uri_tests[] = {
{"::1.2.3.0",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/%3F%23.T/test",S_OK,FALSE},
{"/%3F%23.T/test",S_OK,TRUE},
{"/%3F%23.T/test",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://[::001.002.003.000]/%3F%23%2E%54/test",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -2381,7 +2381,7 @@ static const uri_properties uri_tests[] = {
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"/C:/%22test%22/test.mp3",S_OK,FALSE},
{"/C:/%22test%22/test.mp3",S_OK,TRUE},
{"/C:/%22test%22/test.mp3",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"file:///C:/\"test\"/test.mp3",S_OK,FALSE},
{"file",S_OK,FALSE},
@ -2411,7 +2411,7 @@ static const uri_properties uri_tests[] = {
{"4294967295",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/<|>\" test<|>",S_OK,FALSE},
{"/<|>\" test<|>",S_OK,TRUE},
{"/<|>\" test<|>",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"1234://4294967295/<|>\" test<|>",S_OK,FALSE},
{"1234",S_OK,FALSE},
@ -2441,7 +2441,7 @@ static const uri_properties uri_tests[] = {
{"gov.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/%3C%7C%3E%20test%3C%7C%3E",S_OK,FALSE},
{"/%3C%7C%3E%20test%3C%7C%3E",S_OK,TRUE},
{"/%3C%7C%3E%20test%3C%7C%3E",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://gov.uk/<|> test<|>",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -2470,7 +2470,7 @@ static const uri_properties uri_tests[] = {
{"gov.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://gov.uk/test/../test2/././../test3/.././././",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -2499,7 +2499,7 @@ static const uri_properties uri_tests[] = {
{"gov.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://gov.uk/test/test2/../../..",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -2528,7 +2528,7 @@ static const uri_properties uri_tests[] = {
{"gov.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://gov.uk/test/test2/../../.",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -2556,7 +2556,7 @@ static const uri_properties uri_tests[] = {
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"/c:/foo%2520bar.mp3",S_OK,FALSE},
{"/c:/foo%2520bar.mp3",S_OK,TRUE},
{"/c:/foo%2520bar.mp3",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"file://c:\\tests\\../tests\\./.\\..\\foo%20bar.mp3",S_OK,FALSE},
{"file",S_OK,FALSE},
@ -2586,7 +2586,7 @@ static const uri_properties uri_tests[] = {
{"gov.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/",S_OK,TRUE},
{"/",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"zip://gov.uk/test/test2/../../.",S_OK,FALSE},
{"zip",S_OK,FALSE},
@ -2616,7 +2616,7 @@ static const uri_properties uri_tests[] = {
{"gov.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/test/test2/../../.",S_OK,FALSE},
{"/test/test2/../../.",S_OK,TRUE},
{"/test/test2/../../.",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"http://gov.uk/test/test2/../../.",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -2646,7 +2646,7 @@ static const uri_properties uri_tests[] = {
{"gov.uk",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/test/test2/../../.",S_OK,FALSE},
{"/test/test2/../../.",S_OK,TRUE},
{"/test/test2/../../.",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"*:gov.uk/test/test2/../../.",S_OK,FALSE},
{"*",S_OK,FALSE},
@ -2675,7 +2675,7 @@ static const uri_properties uri_tests[] = {
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"%22acco%3C%7C%3Eunt@example.com%22",S_OK,FALSE},
{"%22acco%3C%7C%3Eunt@example.com%22",S_OK,TRUE},
{"%22acco%3C%7C%3Eunt@example.com%22",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"mailto:\"acco<|>unt@example.com\"",S_OK,FALSE},
{"mailto",S_OK,FALSE},
@ -2703,7 +2703,7 @@ static const uri_properties uri_tests[] = {
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"test.tes%3C%7C%3Et.com",S_OK,FALSE},
{"test.tes%3C%7C%3Et.com",S_OK,TRUE},
{"test.tes%3C%7C%3Et.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"news:test.tes<|>t.com",S_OK,FALSE},
{"news",S_OK,FALSE},
@ -2732,7 +2732,7 @@ static const uri_properties uri_tests[] = {
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"test.tes<|>t.com",S_OK,FALSE},
{"test.tes<|>t.com",S_OK,TRUE},
{"test.tes<|>t.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"news:test.tes<|>t.com",S_OK,FALSE},
{"news",S_OK,FALSE},
@ -2761,7 +2761,7 @@ static const uri_properties uri_tests[] = {
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"test.tes<|>t.com",S_OK,FALSE},
{"test.tes<|>t.com",S_OK,TRUE},
{"test.tes<|>t.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"urn:test.tes<|>t.com",S_OK,FALSE},
{"urn",S_OK,FALSE},
@ -2790,7 +2790,7 @@ static const uri_properties uri_tests[] = {
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"test.test.com",S_OK,FALSE},
{"test.test.com",S_OK,TRUE},
{"test.test.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"news:test.%74%65%73%74.com",S_OK,FALSE},
{"news",S_OK,FALSE},
@ -2819,7 +2819,7 @@ static const uri_properties uri_tests[] = {
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"test.test.com",S_OK,FALSE},
{"test.test.com",S_OK,TRUE},
{"test.test.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"news:test.%74%65%73%74.com",S_OK,FALSE},
{"news",S_OK,FALSE},
@ -2848,7 +2848,7 @@ static const uri_properties uri_tests[] = {
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"test.%74%65%73%74.com",S_OK,FALSE},
{"test.%74%65%73%74.com",S_OK,TRUE},
{"test.%74%65%73%74.com",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"urn:test.%74%65%73%74.com",S_OK,FALSE},
{"urn",S_OK,FALSE},
@ -2878,7 +2878,7 @@ static const uri_properties uri_tests[] = {
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/?query=%xx&return=y",S_OK,TRUE},
{"/?query=%xx&return=y",S_OK,FALSE},
{"?query=%xx&return=y",S_OK,FALSE},
{"zip://www.winehq.org/tests/..?query=%xx&return=y",S_OK,FALSE},
{"zip",S_OK,FALSE},
@ -2908,7 +2908,7 @@ static const uri_properties uri_tests[] = {
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/?query=%xx&return=y",S_OK,TRUE},
{"/?query=%xx&return=y",S_OK,FALSE},
{"?query=%xx&return=y",S_OK,FALSE},
{"http://www.winehq.org/tests/..?query=%xx&return=y",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -2938,7 +2938,7 @@ static const uri_properties uri_tests[] = {
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/?query=<|>&return=y",S_OK,TRUE},
{"/?query=<|>&return=y",S_OK,FALSE},
{"?query=<|>&return=y",S_OK,FALSE},
{"http://www.winehq.org/tests/..?query=<|>&return=y",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -2968,7 +2968,7 @@ static const uri_properties uri_tests[] = {
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/?query=<|>&return=y",S_OK,TRUE},
{"/?query=<|>&return=y",S_OK,FALSE},
{"?query=<|>&return=y",S_OK,FALSE},
{"http://www.winehq.org/tests/..?query=<|>&return=y",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -2998,7 +2998,7 @@ static const uri_properties uri_tests[] = {
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/?query=%3C%7C%3E&return=y",S_OK,TRUE},
{"/?query=%3C%7C%3E&return=y",S_OK,FALSE},
{"?query=%3C%7C%3E&return=y",S_OK,FALSE},
{"http://www.winehq.org/tests/..?query=<|>&return=y",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -3028,7 +3028,7 @@ static const uri_properties uri_tests[] = {
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/?query=<|>&return=y",S_OK,TRUE},
{"/?query=<|>&return=y",S_OK,FALSE},
{"?query=<|>&return=y",S_OK,FALSE},
{"zip://www.winehq.org/tests/..?query=<|>&return=y",S_OK,FALSE},
{"zip",S_OK,FALSE},
@ -3058,7 +3058,7 @@ static const uri_properties uri_tests[] = {
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/?query=01&return=y",S_OK,TRUE},
{"/?query=01&return=y",S_OK,FALSE},
{"?query=01&return=y",S_OK,FALSE},
{"http://www.winehq.org/tests/..?query=%30%31&return=y",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -3088,7 +3088,7 @@ static const uri_properties uri_tests[] = {
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/?query=%30%31&return=y",S_OK,TRUE},
{"/?query=%30%31&return=y",S_OK,FALSE},
{"?query=%30%31&return=y",S_OK,FALSE},
{"zip://www.winehq.org/tests/..?query=%30%31&return=y",S_OK,FALSE},
{"zip",S_OK,FALSE},
@ -3118,7 +3118,7 @@ static const uri_properties uri_tests[] = {
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"/",S_OK,FALSE},
{"/?query=%30%31&return=y",S_OK,TRUE},
{"/?query=%30%31&return=y",S_OK,FALSE},
{"?query=%30%31&return=y",S_OK,FALSE},
{"http://www.winehq.org/tests/..?query=%30%31&return=y",S_OK,FALSE},
{"http",S_OK,FALSE},
@ -3131,6 +3131,35 @@ static const uri_properties uri_tests[] = {
{URL_SCHEME_HTTP,S_OK,FALSE},
{URLZONE_INVALID,E_NOTIMPL,FALSE},
}
},
{ "http://www.winehq.org?query=12&return=y", Uri_CREATE_NO_CANONICALIZE, S_OK, FALSE,
Uri_HAS_ABSOLUTE_URI|Uri_HAS_AUTHORITY|Uri_HAS_DISPLAY_URI|Uri_HAS_DOMAIN|Uri_HAS_HOST|
Uri_HAS_DOMAIN|Uri_HAS_PATH_AND_QUERY|Uri_HAS_PORT|Uri_HAS_QUERY|Uri_HAS_RAW_URI|
Uri_HAS_SCHEME_NAME|Uri_HAS_HOST_TYPE|Uri_HAS_SCHEME,
TRUE,
{
{"http://www.winehq.org?query=12&return=y",S_OK,TRUE},
{"www.winehq.org",S_OK,FALSE},
{"http://www.winehq.org?query=12&return=y",S_OK,TRUE},
{"winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,TRUE},
{"www.winehq.org",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE},
{"?query=12&return=y",S_OK,FALSE},
{"?query=12&return=y",S_OK,FALSE},
{"http://www.winehq.org?query=12&return=y",S_OK,FALSE},
{"http",S_OK,FALSE},
{"",S_FALSE,FALSE},
{"",S_FALSE,FALSE}
},
{
{Uri_HOST_DNS,S_OK,FALSE},
{80,S_OK,FALSE},
{URL_SCHEME_HTTP,S_OK,FALSE},
{URLZONE_INVALID,E_NOTIMPL,FALSE},
}
}
};

View File

@ -3010,6 +3010,22 @@ static HRESULT WINAPI Uri_GetPropertyBSTR(IUri *iface, Uri_PROPERTY uriProp, BST
hres = S_FALSE;
}
if(!(*pbstrProperty))
hres = E_OUTOFMEMORY;
break;
case Uri_PROPERTY_PATH_AND_QUERY:
if(This->path_start > -1) {
*pbstrProperty = SysAllocStringLen(This->canon_uri+This->path_start, This->path_len+This->query_len);
hres = S_OK;
} else if(This->query_start > -1) {
*pbstrProperty = SysAllocStringLen(This->canon_uri+This->query_start, This->query_len);
hres = S_OK;
} else {
*pbstrProperty = SysAllocStringLen(NULL, 0);
hres = S_FALSE;
}
if(!(*pbstrProperty))
hres = E_OUTOFMEMORY;
@ -3148,6 +3164,10 @@ static HRESULT WINAPI Uri_GetPropertyLength(IUri *iface, Uri_PROPERTY uriProp, D
*pcchProperty = This->path_len;
hres = (This->path_start > -1) ? S_OK : S_FALSE;
break;
case Uri_PROPERTY_PATH_AND_QUERY:
*pcchProperty = This->path_len+This->query_len;
hres = (This->path_start > -1 || This->query_start > -1) ? S_OK : S_FALSE;
break;
case Uri_PROPERTY_QUERY:
*pcchProperty = This->query_len;
hres = (This->query_start > -1) ? S_OK : S_FALSE;
@ -3310,13 +3330,8 @@ static HRESULT WINAPI Uri_GetPath(IUri *iface, BSTR *pstrPath)
static HRESULT WINAPI Uri_GetPathAndQuery(IUri *iface, BSTR *pstrPathAndQuery)
{
Uri *This = URI_THIS(iface);
FIXME("(%p)->(%p)\n", This, pstrPathAndQuery);
if(!pstrPathAndQuery)
return E_POINTER;
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", iface, pstrPathAndQuery);
return Uri_GetPropertyBSTR(iface, Uri_PROPERTY_PATH_AND_QUERY, pstrPathAndQuery, 0);
}
static HRESULT WINAPI Uri_GetQuery(IUri *iface, BSTR *pstrQuery)