994{
998 unsigned int f,
i,
j;
1002
1004 {
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021 {"//", 0, "///"},
1022 {"//a", 0, "//a/"},
1023 {"//a/", 0, "//a/"},
1024 {"//a/b", 0, "//a/b"},
1025 {"//a/b/", 0, "//a/b/"},
1026 {"//.", 0, "//./"},
1027 {"//./", 0, "//./"},
1028 {"//./a", 0, "//./a"},
1029 {"//././a", 0, "//./a"},
1030 {"//a/.", 0, "//a/"},
1031 {"//a/./", 0, "//a/"},
1032 {"//a/./b", 0, "//a/b"},
1033 {"///./a", 0, "///a"},
1034 {"//a/.b/", 0, "//a/.b/"},
1035 {"//a/b./", 0, "//a/b./"},
1036
1037 {"//..", 0, "//../"},
1038 {"//../", 0, "//../"},
1039 {"//../a", 0, "//../a"},
1040 {"//../a/..", 0, "//../"},
1041 {"//.././..", 0, "//../../"},
1042 {"//../a/../..", 0, "//../../"},
1043 {"//./a/../..", 0, "//./../"},
1044 {"//a/..", 0, "//a/../"},
1045 {"//a/../../b/./c/..", 0, "//a/../../b/"},
1046 {"//a/b/..", 0, "//a/"},
1047 {"//a/b/...", 0, "//a/b/..."},
1048 {"//a/b/../", 0, "//a/"},
1049 {"//a/b/../c", 0, "//a/c"},
1050 {"//a/b/../c/..", 0, "//a/"},
1051 {"//a/b/../c/../..", 0, "//a/../"},
1052 {"//a/b/../../../c", 0, "//a/../../c"},
1053 {"///..", 0, "///../"},
1054 {"////..", 0, "///"},
1055 {"//a/..b/", 0, "//a/..b/"},
1056 {"//a/b../", 0, "//a/b../"},
1057 {"//A/B", 0, "//A/B"},
1058
1064
1082
1083
1084 {"//a/b?c/./d", 0, "//a/b?c/./d"},
1085 {"//a/b#c/./d", 0, "//a/b#c/./d"},
1086 {"//a/b#c/.", 0, "//a/b#c/."},
1087
1088 {"//a/b/.?", 0, "//a/b/?"},
1089 {"//a/b/..?", 0, "//a/?"},
1091 {"//a/b/.#", 0, "//a/b/#"},
1092 {"//a/b/..#", 0, "//a/#"},
1094 {"//a/..?", 0, "//a/../?"},
1095 {"//a/..#", 0, "//a/../#"},
1096 {"//..?", 0, "//../?"},
1097 {"//..#", 0, "//../#"},
1098 {"//?/a/./", 0, "///?/a/./"},
1099 {"//#/a/./", 0, "///#/a/./"},
1100
1101 {"//a/b#c?d", 0, "//a/b?d#c"},
1102 {"//a/b?c#d?e", 0, "//a/b?c#d?e"},
1103 {"//a/b#c?d#e", 0, "//a/b?d#e#c"},
1104 {"//a/b#c#d?e", 0, "//a/b?e#c#d"},
1105 {"//a/b#c?d?e", 0, "//a/b?d?e#c"},
1106
1107
1108 {"//a/b\\c/../.\\", 0, "//a/.\\"},
1109 {"//a\\b/../", 0, "//a\\b/../"},
1110 {"//a/b\\../", 0, "//a/b\\../"},
1111 {"//a/b/..\\", 0, "//a/b/..\\"},
1112
1113
1114 {"//a/b &c", 0, "//a/b &c"},
1115
1116
1117
1118
1119
1120 {"/a", 0, "/a"},
1121 {"/a/", 0, "/a/"},
1122 {"/.", 0, "/"},
1123 {"/./", 0, "/"},
1124 {"/././a", 0, "/a"},
1125 {"/a/.", 0, "/a/"},
1126 {"/a/./", 0, "/a/"},
1127 {"/a/./b", 0, "/a/b"},
1128
1129 {"/..", 0, "/../"},
1130 {"/../", 0, "/../"},
1131 {"/../a", 0, "/../a"},
1132 {"/../a/..", 0, "/../"},
1133 {"/a/..", 0, "/"},
1134 {"/a/../..", 0, "/../"},
1135 {"/a/b/..", 0, "/a/"},
1136 {"/a/b/../", 0, "/a/"},
1137 {"/a/b/../c", 0, "/a/c"},
1138 {"/a/b/../c/..", 0, "/a/"},
1139 {"/a/b/../c/../..", 0, "/"},
1140
1141 {"/a/b?c/./d", 0, "/a/b?c/./d"},
1142 {"/a/b#c/./d", 0, "/a/b#c/./d"},
1143 {"/a/b#c?d", 0, "/a/b?d#c"},
1144
1145
1146 {"/a/b\\c/../.\\", 0, "/a/.\\"},
1147 {"/a/b\\/c", 0, "/a/b\\/c"},
1148 {"/a/b\\.c", 0, "/a/b\\.c"},
1149
1150
1151
1152
1153 {"/\\././a", 0, "/a"},
1154
1155
1156 {"/\\/././a", 0, "//a"},
1157 {"/\\/././a/", 0, "//a/"},
1158 {"/\\/..", 0, "/"},
1159 {"//a/\\b", 0, "//a/\\b"},
1160
1161 {"/a/b &c", 0, "/a/b &c"},
1162
1164 };
1165
1166 static const struct
1167 {
1171 const char *expect_ftp;
1172 }
1173 http_tests[] =
1174 {
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186 {"//", 0, "///"},
1187 {"//a", 0, "//a/"},
1188 {"//a/", 0, "//a/"},
1189 {"//a/b", 0, "//a/b"},
1190 {"//a/b/", 0, "//a/b/"},
1191 {"//.", 0, "//./"},
1192 {"//./", 0, "//./"},
1193 {"//././a/.", 0, "//././a/."},
1194 {"//a/.", 0, "//a/."},
1195 {"//a/./b/./../", 0, "//a/./b/./../"},
1196 {"//a/b/.", 0, "//a/b/"},
1198 {"//a/b/./", 0, "//a/b/"},
1199 {"//a/b/./c", 0, "//a/b/c"},
1200 {"///./a", 0, "///./a"},
1201 {"////./a", 0, "////a"},
1202
1203 {"//..", 0, "//../"},
1204 {"//../", 0, "//../"},
1205 {"//../a", 0, "//../a"},
1206 {"//../a/..", 0, "//../"},
1207 {"//../a/../..", 0, "//../"},
1208 {"//./a/../..", 0, "//./"},
1209 {"//a/../", 0, "//a/../"},
1210 {"//a/../../b/./../", 0, "//a/../../b/./../"},
1211 {"//a/.././", 0, "//a/.././"},
1212 {"//a/b/..", 0, "//a/"},
1214 {"//a/b/../", 0, "//a/"},
1215 {"//a/b/.././", 0, "//a/"},
1216 {"//a/b/../c", 0, "//a/c"},
1217 {"//a/b/../c/..", 0, "//a/"},
1218 {"//a/b/../c/../..", 0, "//a/"},
1219 {"//a/b/../../../c", 0, "//a/c"},
1220 {"///a/.", 0, "///a/"},
1221 {"///..", 0, "///.."},
1222 {"////..", 0, "///"},
1223 {"//a//../../..", 0, "//a/"},
1224
1225 {"//a/b?c/./d", 0, "//a/b?c/./d"},
1226 {"//a/b#c/./d", 0, "//a/b#c/./d"},
1227 {"//a/b#c?d", 0, "//a/b#c?d"},
1228 {"//a/b?c#d", 0, "//a/b?c#d"},
1229
1230 {"//localhost/b", 0, "//localhost/b"},
1231
1232
1233
1234
1235
1236
1237
1238
1239 {"//a/b\\", 0, "//a/b/", "//a/b\\"},
1240 {"//a/b\\./c", 0, "//a/b/c", "//a/b\\c"},
1241 {"//a/b/.\\c", 0, "//a/b/c"},
1242 {"//a/b\\c/../.\\", 0, "//a/b/", "//a/b\\"},
1243 {"//a\\b", 0, "//a/b", "//a\\b/"},
1244 {"//a\\b/..", 0, "//a/", "//a\\b/.."},
1245 {"//a/b\\c", 0, "//a/b/c", "//a/b\\c"},
1246 {"/\\a\\..", 0, "//a/..", "/\\a\\../"},
1247 {"\\/a\\..", 0, "//a/..", "\\/a\\../"},
1248
1249 {"//a/b &c", 0, "//a/b &c"},
1250
1251
1252
1253
1254
1255
1256 {"a", 0, "a"},
1257 {"a/", 0, "a/"},
1258 {"a/.", 0, "a/"},
1259 {"a/..", 0, ""},
1260 {"a/../..", 0, ""},
1262 {"", 0, ""},
1263 {"/", 0, "/"},
1264 {"/.", 0, "/"},
1265 {"/..", 0, ""},
1266 {"/../..", 0, ""},
1267 {".", 0, ""},
1268 {"..", 0, ""},
1269 {"./", 0, ""},
1270 {"../", 0, ""},
1271
1272 {"a/b?c/.\\d", 0, "a/b?c/.\\d"},
1273 {"a/b#c/.\\d", 0, "a/b#c/.\\d"},
1274
1275 {"a\\b\\", 0, "a/b/", "a\\b\\"},
1276
1277 {"a/b &c", 0, "a/b &c"},
1278
1281
1285 {"//www.winehq.org/tests/foo%20bar", 0, "//www.winehq.org/tests/foo%20bar"},
1286 {
"//www.winehq.org/tests/foo%20bar",
URL_UNESCAPE,
"//www.winehq.org/tests/foo bar"},
1287 {"//www.winehq.org/%E6%A1%9C.html", 0, "//www.winehq.org/%E6%A1%9C.html"},
1288 };
1289
1291 {
1292
1293
1294 {"//a/b/./c/../d\\e", 0, "//a/b/./c/../d\\e"},
1295 {"/a/b/./c/../d\\e", 0, "/a/b/./c/../d\\e"},
1296 {"a/b/./c/../d\\e", 0, "a/b/./c/../d\\e"},
1297 {"", 0, ""},
1298 {"//a/b &c", 0, "//a/b &c"},
1300 };
1301
1303 {
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313 {"file://", 0, "file:///"},
1314 {"file://a", 0, "file://a/"},
1315 {"file://a/", 0, "file://a/"},
1316 {"file://a//", 0, "file://a//"},
1317 {"file://a/b", 0, "file://a/b"},
1318 {"file://a/b/", 0, "file://a/b/"},
1319 {"file://.", 0, "file://./"},
1320 {"file://./", 0, "file://./"},
1321 {"file://././a/.", 0, "file://././a/."},
1322 {"file://a/.", 0, "file://a/."},
1323 {"file://a/./b/./../", 0, "file://a/./b/./../"},
1324 {"file://a/b/.", 0, "file://a/b/"},
1326 {"file://a/b/./", 0, "file://a/b/"},
1327 {"file://a/b/./c", 0, "file://a/b/c"},
1328 {"file:///./a", 0, "file:///./a"},
1329 {"file:////./a", 0, "file://./a"},
1330
1331 {"file://..", 0, "file://../"},
1332 {"file://../", 0, "file://../"},
1333 {"file://../a", 0, "file://../a"},
1334 {"file://../a/..", 0, "file://../"},
1335 {"file://../a/../..", 0, "file://../"},
1336 {"file://./a/../..", 0, "file://./"},
1337 {"file://a/../", 0, "file://a/../"},
1338 {"file://a/../../b/./../", 0, "file://a/../../b/./../"},
1339 {"file://a/.././", 0, "file://a/.././"},
1340 {"file://a/b/..", 0, "file://a/"},
1341 {"file://a/b/../", 0, "file://a/"},
1342 {"file://a/b/.././", 0, "file://a/"},
1343 {"file://a/b/../c", 0, "file://a/c"},
1344 {"file://a/b/../c/..", 0, "file://a/"},
1345 {"file://a/b/../c/../..", 0, "file://a/"},
1346 {"file://a/b/../../../c", 0, "file://a/c"},
1347 {"file:///.", 0, "file:///."},
1348 {"file:///..", 0, "file:///.."},
1349 {"file:///a/.", 0, "file:///a/"},
1350
1351 {"file:////", 0, "file:///"},
1352 {"file:////a/./b/../c", 0, "file://a/./b/../c"},
1353 {"file://///a/./b/../c", 0, "file://a/./b/../c"},
1354 {"file://////a/./b/../c", 0, "file://a/./b/../c"},
1355 {"file:////a/b/./../c", 0, "file://a/c"},
1356 {"file:////a/b/./../..", 0, "file://a/"},
1357 {"file://///a/b/./../c", 0, "file://a/c"},
1358 {"file://////a/b/./../c", 0, "file://a/c"},
1359 {"file:////.", 0, "file://./"},
1360 {"file:////..", 0, "file://../"},
1361 {"file:////./b/./../c", 0, "file://./c"},
1362 {"file:////./b/./../..", 0, "file://./"},
1363 {"file://///./b/./../c", 0, "file://./c"},
1364 {"file://////./b/./../c", 0, "file://./c"},
1365
1366
1367
1368
1369 {"file://a:", 0, "file:///a:"},
1370 {"file://a:/b", 0, "file:///a:/b"},
1371 {"file://a:/b/../..", 0, "file:///a:/"},
1372 {"file://a:/./../..", 0, "file:///a:/./../.."},
1373 {"file://a|/b", 0, "file:///a|/b"},
1374 {"file://ab:/c", 0, "file://ab:/c"},
1375 {"file:///a:", 0, "file:///a:"},
1376 {"file:////a:", 0, "file:///a:"},
1377 {"file://///a:", 0, "file:///a:"},
1378 {"file://host/a:/b/../..", 0, "file://host/a:/"},
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1407
1413
1419
1427
1428
1429
1430
1431
1432
1433
1434
1435
1447
1453
1459
1461
1463
1464 {"file://localhost/a", 0, "file://localhost/a"},
1465 {"file://localhost//a", 0, "file://localhost//a"},
1466 {"file://localhost/a:", 0, "file://localhost/a:"},
1467 {"file://localhost/a:/b/../..", 0, "file://localhost/a:/"},
1468 {"file://localhost/a:/./../..", 0, "file://localhost/a:/./../.."},
1483
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519 {"file://a/b#c/../d\\e", 0, "file://a/d/e"},
1520 {"file://a/b#c/./d\\e", 0, "file://a/b#c/d/e"},
1521 {"file://a/b.htm#c/../d\\e", 0, "file://a/b.htm#c/../d\\e"},
1522 {"file://a/b.html#c/../d\\e", 0, "file://a/b.html#c/../d\\e"},
1523 {"file://a/b.hTmL#c/../d\\e", 0, "file://a/b.hTmL#c/../d\\e"},
1524 {"file://a/b.xhtml#c/../d\\e", 0, "file://a/d/e"},
1525 {"file://a/b.php#c/../d\\e", 0, "file://a/d/e"},
1526 {"file://a/b.asp#c/../d\\e", 0, "file://a/d/e"},
1527 {"file://a/b.aspx#c/../d\\e", 0, "file://a/d/e"},
1528 {"file://a/b.ht#c/../d\\e", 0, "file://a/d/e"},
1529 {"file://a/b.txt#c/../d\\e", 0, "file://a/d/e"},
1530 {"file://a/b.htmlq#c/../d\\e", 0, "file://a/d/e"},
1531 {"file://a/b.html/q#c/../d\\e", 0, "file://a/b.html/d/e"},
1532 {"file://a/.html#c/../d\\e", 0, "file://a/.html#c/../d\\e"},
1533 {"file://a/html#c/../d\\e", 0, "file://a/d/e"},
1534 {"file://a/b#c/./d.html#e/../f", 0, "file://a/b#c/d.html#e/../f"},
1535 {"file://a.html#/b/../c", 0, "file://a.html#/c"},
1543 {"file://a/c#/../d", 0, "file://a/d"},
1546 {"file://a/#c/../d\\e", 0, "file://a/#c/../d\\e"},
1549 {"file://a//#c/../d", 0, "file://a//#c/../d"},
1552 {"file://a/\\#c/../d", 0, "file://a//#c/../d"},
1553 {"file://a///#c/../d", 0, "file://a///d"},
1554 {"file://a/b/#c/../d", 0, "file://a/b/d"},
1555 {"file://a/b/.#c", 0, "file://a/b/#c"},
1556 {"file://a/b/..#c", 0, "file://a/#c"},
1561 {"file://a/b#../c", 0, "file://a/b#../c"},
1562 {"file://a/b/#../c", 0, "file://a/b/#../c"},
1565 {"file://#/b\\./", 0, "file://#/b/"},
1566 {"file://#/./b\\./", 0, "file://#/./b/./"},
1569 {"file://a#/b\\./", 0, "file://a#/b/"},
1570 {"file://a#/./b\\./", 0, "file://a#/./b/./"},
1575 {"file://a#/b/../../", 0, "file://a#/"},
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588 {"file://a/b?c/../d\\e", 0, "file://a/d/e"},
1589 {"file://a/b.html?c/../d\\e", 0, "file://a/d/e"},
1595 {"file://a/?c/../d", 0, "file://a/?c/../d"},
1598 {"file://a//?c/../d", 0, "file://a//?c/../d"},
1601 {"file://a/\\?c/../d", 0, "file://a//?c/../d"},
1602 {"file://a///?c/../d", 0, "file://a///d"},
1603 {"file://a/b/?c/../d", 0, "file://a/b/d"},
1604 {"file://a/b/.?c", 0, "file://a/b/?c"},
1605 {"file://a/b/..?c", 0, "file://a/?c"},
1610 {"file://?/a\\./", 0, "file://?/a/"},
1611 {"file://?/./a\\./", 0, "file://?/./a/./"},
1614 {"file://a?/a\\./", 0, "file://a?/a/"},
1615 {"file://a?/./a\\./", 0, "file://a?/./a/./"},
1618
1619 {"file://a/b.html?c#d/..", 0, "file://a/"},
1620 {"file://a/b.html?c.html#d/..", 0, "file://a/b.html?c.html#d/.."},
1621 {"file://a/b?\\#c\\d", 0, "file://a/b?/#c/d"},
1624 {"file://a/b#\\?c\\d", 0, "file://a/b#/?c/d"},
1628
1629
1630
1631 {"file://a/b\\", 0, "file://a/b/"},
1632 {"file://a/b\\c/../.\\", 0, "file://a/b/"},
1633 {"file://a\\b", 0, "file://a/b"},
1634 {"file:/\\a\\..", 0, "file://a/.."},
1635 {"file:\\/a\\..", 0, "file://a/.."},
1638 {"file:\\///a/./b/../c", 0, "file://a/./b/../c"},
1639 {"file:/\\//a/./b/../c", 0, "file://a/./b/../c"},
1640 {"file://\\/a/./b/../c", 0, "file://a/./b/../c"},
1641 {"file:///\\a/./b/../c", 0, "file://a/./b/../c"},
1642
1643 {"file://a/b &c", 0, "file://a/b &c"},
1646 {
"file://a/b !\"$%&'()*+,-:;<=>@[]^_`{|}~c",
URL_ESCAPE_UNSAFE,
"file://a/b%20!%22$%%26'()*+,-:;%3C=%3E@%5B%5D%5E_%60%7B%7C%7D~c"},
1647 {"file://a/b%20%26c", 0, "file://a/b%20%26c"},
1650
1651
1652
1653
1654 {"file:/", 0, "file:///"},
1655 {"file:/a", 0, "file:///a"},
1656 {"file:/./a", 0, "file:///./a"},
1657 {"file:/../a/..", 0, "file:///../a/.."},
1658 {"file:/./..", 0, "file:///./.."},
1659 {"file:/a/.", 0, "file:///a/"},
1660 {"file:/a/../..", 0, "file:///"},
1661 {"file:/a:", 0, "file:///a:"},
1662 {"file:/a:/b/../..", 0, "file:///a:/"},
1663
1664
1665
1675
1680
1681 {"file:/a/b#c/../d", 0, "file:///a/d"},
1682 {"file:/a/b?c/../d", 0, "file:///a/d"},
1683
1684 {"file:/a\\b\\", 0, "file:///a/b/"},
1685 {"file:\\a/b/", 0, "file:///a/b/"},
1688
1689 {"file:/a/b &c", 0, "file:///a/b &c"},
1690
1691
1692
1693
1694 {"file:a", 0, "file:a"},
1695 {"file:a/", 0, "file:a/"},
1696 {"file:a/.", 0, "file:a/"},
1697 {"file:a/..", 0, "file:"},
1698 {"file:a/../..", 0, "file:"},
1699 {"file:", 0, "file:"},
1700 {"file:.", 0, "file:"},
1701 {"file:..", 0, "file:"},
1702 {"file:./", 0, "file:"},
1703 {"file:../", 0, "file:"},
1704
1705 {"file:a:", 0, "file:///a:"},
1706
1707
1708
1709
1718
1719
1726
1727 {"file:a/b?c/../d", 0, "file:a/d"},
1728 {"file:a/b#c/../d", 0, "file:a/d"},
1729
1730 {"file:a\\b\\", 0, "file:a/b/"},
1731
1732 {"file:a/b &c", 0, "file:a/b &c"},
1733
1734 {"fIlE://A/B", 0, "file://A/B"},
1737 {"fIlE:A:/B", 0, "file:///A:/B"},
1740 {"fIlE://lOcAlHoSt/B", 0, "file://lOcAlHoSt/B"},
1742
1743
1744
1745
1746 {"q:a", 0, "file:///q:a"},
1747 {"q:a/.", 0, "file:///q:a/"},
1748 {"q:a/..", 0, "file:///q:"},
1749 {"q:a/../..", 0, "file:///q:"},
1750 {"q:./a/..", 0, "file:///q:./a/.."},
1751 {"q:../a/..", 0, "file:///q:../a/.."},
1752 {"q:/", 0, "file:///q:/"},
1753 {"q:/a", 0, "file:///q:/a"},
1754 {"q:/a/.", 0, "file:///q:/a/"},
1755 {"q:/a/..", 0, "file:///q:/"},
1756 {"q:/./a/..", 0, "file:///q:/./a/.."},
1757 {"q:/../a/..", 0, "file:///q:/../a/.."},
1758 {"q://./a", 0, "file:///q://a"},
1759 {"q://../a", 0, "file:///q:/a"},
1760
1761
1762
1763
1772
1773 {"q:/a/b?c/../d", 0, "file:///q:/a/d"},
1774 {"q:/a/b#c/../d", 0, "file:///q:/a/d"},
1776
1777 {"q:a\\b\\", 0, "file:///q:a/b/"},
1778 {"q:\\a/b", 0, "file:///q:/a/b"},
1779
1780
1781
1782
1783 {"q:/a/b !\"$%&'()*+,-:;<=>@[]^_`{|}~c", 0, "file:///q:/a/b%20!%22$%25%26'()*+,-:;%3C=%3E@%5B%5D%5E_%60%7B%7C%7D~c"},
1786
1787 {"q:/a/b%20%26c", 0, "file:///q:/a/b%2520%2526c"},
1794
1795 {"q|a", 0, "file:///q%7Ca"},
1796 {"-:a", 0, "-:a"},
1797 {"Q:A", 0, "file:///Q:A"},
1798
1799
1800
1801
1802 {"\\\\", 0, "file:///"},
1803 {"\\\\a", 0, "file://a/"},
1804 {"\\\\../a\\b/..\\c/.\\", 0, "file://../a/c/"},
1805 {"\\\\a/./b/../c", 0, "file://a/./b/../c"},
1806
1807 {"\\\\//./b/./../c", 0, "file://./c"},
1808 {"\\\\///./b/./../c", 0, "file://./c"},
1809
1810 {"\\\\a/b?c/../d", 0, "file://a/d"},
1811 {"\\\\a/b#c/../d", 0, "file://a/d"},
1812
1813
1814
1815
1816 {"\\\\a:/b", 0, "file:///a:/b"},
1817
1826
1827
1828 {"\\\\a/b !\"$%&'()*+,-:;<=>@[]^_`{|}~c", 0, "file://a/b%20!%22$%25%26'()*+,-:;%3C=%3E@%5B%5D%5E_%60%7B%7C%7D~c"},
1831
1832 {"\\\\/b", 0, "file:///b"},
1838
1839 {"\\\\A/B", 0, "file://A/B"},
1840
1841 {
"file:///c:/tests/foo%20bar",
URL_UNESCAPE,
"file:///c:/tests/foo bar"},
1842 {
"file:///c:/tests\\foo%20bar",
URL_UNESCAPE,
"file:///c:/tests/foo bar"},
1843 {"file:///c:/tests/foo%20bar", 0, "file:///c:/tests/foo%20bar"},
1845 {
"file://localhost/c:/tests/../tests/foo%20bar",
URL_FILE_USE_PATHURL,
"file://c:\\tests\\foo bar"},
1846 {
"file://localhost\\c:/tests/../tests/foo%20bar",
URL_FILE_USE_PATHURL,
"file://c:\\tests\\foo bar"},
1847 {
"file://localhost\\\\c:/tests/../tests/foo%20bar",
URL_FILE_USE_PATHURL,
"file://c:\\tests\\foo bar"},
1848 {
"file://localhost\\c:\\tests/../tests/foo%20bar",
URL_FILE_USE_PATHURL,
"file://c:\\tests\\foo bar"},
1853 {"file:///c:\\tests\\foo bar", 0, "file:///c:/tests/foo bar"},
1855 {"file:///c:\\tests\\foobar", 0, "file:///c:/tests/foobar"},
1857 {"file://home/user/file", 0, "file://home/user/file"},
1858 {"file:///home/user/file", 0, "file:///home/user/file"},
1859 {"file:////home/user/file", 0, "file://home/user/file"},
1864 {"file://C:/user/file", 0, "file:///C:/user/file"},
1865 {"file://C:/user/file/../asdf", 0, "file:///C:/user/asdf"},
1866 {"file:///C:/user/file", 0, "file:///C:/user/file"},
1867 {"file:////C:/user/file", 0, "file:///C:/user/file"},
1871 };
1872
1874 {
1875 {"", 0, ""},
1876
1877
1878
1879
1880
1881 {"wine:.", 0, "wine:"},
1883 {"wine:./", 0, "wine:./"},
1884 {"wine:..", 0, "wine:.."},
1885 {"wine:../", 0, "wine:../"},
1886 {"wine:a", 0, "wine:a"},
1887 {"wine:a/", 0, "wine:a/"},
1888 {"wine:a/b/./../c", 0, "wine:a/b/./../c"},
1889
1890 {"wine:a/b?c/./d", 0, "wine:a/b?c/./d"},
1891 {"wine:a/b#c/./d", 0, "wine:a/b#c/./d"},
1892 {"wine:a/b#c?d", 0, "wine:a/b?d#c"},
1893 {"wine:.#c?d", 0, "wine:?d#c"},
1894
1895
1896 {"wine:\\././a", 0, "wine:\\././a"},
1897
1898 {"wine:a/b &c", 0, "wine:a/b &c"},
1899
1900
1901
1902
1903
1904 {"a", 0, "a"},
1905 {"a/", 0, "a/"},
1906 {".", 0, "/"},
1908 {"./", 0, "/"},
1909 {"./.", 0, "/"},
1910 {"././a", 0, "a"},
1911 {"a/.", 0, "a/"},
1912 {"a/./", 0, "a/"},
1913 {"a/./b", 0, "a/b"},
1914
1915 {"..", 0, "../"},
1916 {"../", 0, "../"},
1917 {"../a", 0, "../a"},
1918 {"../a/..", 0, "../"},
1919 {"a/..", 0, "/"},
1920 {"a/../..", 0, "../"},
1921 {"a/b/..", 0, "a/"},
1922 {"a/b/../", 0, "a/"},
1923 {"a/b/../c", 0, "a/c"},
1924 {"a/b/../c/..", 0, "a/"},
1925 {"a/b/../c/../..", 0, "/"},
1926
1927 {"a/b?c/./d", 0, "a/b?c/./d"},
1928 {"a/b#c/./d", 0, "a/b#c/./d"},
1929 {"a/b#c?d", 0, "a/b?d#c"},
1930 {"?c", 0, "?c"},
1931 {".?c", 0, "/?c"},
1932
1933 {"?c/./d", 0, "?c/./d"},
1934 {"#c/./d", 0, "#c/./d"},
1935
1936 {"a\\b/..", 0, "/"},
1937
1938 {"a/b &c", 0, "a/b &c"},
1939
1940
1941 {"://../../a", 0, "a"},
1942
1943
1944
1945
1946 {"mk:", 0, "mk:"},
1947 {"mk:.", 0, "mk:"},
1948 {"mk:..", 0, "mk:"},
1949 {"mk:/", 0, "mk:/"},
1950 {"mk:/.", 0, "mk:/"},
1951 {"mk:/..", 0, "mk:"},
1952 {"mk:a", 0, "mk:a"},
1953 {"mk:a:", 0, "mk:a:"},
1954 {"mk://", 0, "mk://"},
1955 {"mk://.", 0, "mk://"},
1956 {"mk://..", 0, "mk:/"},
1957 {"mk://../..", 0, "mk:"},
1959 {"mk://../../..", 0, "mk:"},
1960
1961
1962
1963
1964
1965 {"mk:a/.\\", 0, "mk:a/.\\"},
1966 {"mk:a/.\\b", 0, "mk:a/.\\b"},
1967 {"mk:a\\.\\b", 0, "mk:a\\.\\b"},
1968 {"mk:a\\./b", 0, "mk:a\\b"},
1969 {"mk:a./b", 0, "mk:a./b"},
1970 {"mk:a\\b/..\\c", 0, "mk:a\\b/..\\c"},
1971 {"mk:a\\b\\..\\c", 0, "mk:a\\b\\..\\c"},
1972 {"mk:a/b\\../c", 0, "mk:a/c"},
1973 {"mk:a\\b../c", 0, "mk:a\\b../c"},
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983 {"mk:@", 0, "mk:@/"},
1984 {"mk:@progid", 0, "mk:@progid/"},
1985 {"mk:@progid:a", 0, "mk:@progid:a/"},
1986 {"mk:@progid:a/b", 0, "mk:@progid:a/b"},
1987 {"mk:@Progid:a/b/../..", 0, "mk:@Progid:a/"},
1988 {"mk:@progid/a", 0, "mk:@progid/a"},
1989 {"mk:@progid\\a", 0, "mk:@progid\\a/"},
1990 {"mk:@progid/a/../..", 0, "mk:@progid/"},
1991 {"mk:@progid/.", 0, "mk:@progid/."},
1992 {"mk:@progid/.?", 0, "mk:@progid/.?"},
1993 {"mk:@progid/./..", 0, "mk:@progid/./.."},
1994 {"mk:@progid/../..", 0, "mk:@progid/../.."},
1995 {"mk:@progid/a\\.\\b", 0, "mk:@progid/a\\.\\b"},
1996 {"mk:@progid/a\\..\\b", 0, "mk:@progid/a\\..\\b"},
1997 {"mk:@progid/.\\..", 0, "mk:@progid/"},
1998
1999 {"mk:a/b?c/../d", 0, "mk:a/b?c/../d"},
2000 {"mk:a/b#c/../d", 0, "mk:a/b#c/../d"},
2001 {"mk:a/b#c?d", 0, "mk:a/b#c?d"},
2002 {"mk:@progid/a/b?c/../d", 0, "mk:@progid/a/b?c/../d"},
2003 {"mk:@progid?c/d/..", 0, "mk:@progid?c/"},
2004
2005 {"mk:a/b &c", 0, "mk:a/b &c"},
2006
2007 {"mk:@MSITStore:dir/test.chm::/file.html/..", 0, "mk:@MSITStore:dir/test.chm::/"},
2008 {"mk:@MSITStore:dir/test.chm::/file.html/../..", 0, "mk:@MSITStore:dir/"},
2009
2010
2011 {" \t\n\rwi\t\n\rne\t\n\r:\t\n\r/\t\n\r/\t\n\r./../a/.\t\n\r./ \t\n\r", 0, "wine://./../"},
2012
2013
2014 {" \a\t\x01 wine://./.. \x1f\n\v ", 0, "wine://./../"},
2015 {" wine ://./..", 0, "wine :/"},
2016 {" wine: //a/../b", 0, "wine: //a/../b"},
2017 {" wine://a/b c/.. ", 0, "wine://a/"},
2018 {"\x7f/\a/\v/\x01/\x1f/\x80", 0, "\x7f/\a/\v/\x01/\x1f/\x80"},
2019
2020
2021
2022
2023 {"wInE://A/B", 0, "wine://A/B"},
2024 {"hTtP://A/b/../../C", 0, "http://a/C"},
2025 {"fTP://A/B\\./C", 0, "ftp://a/B\\C"},
2026 {"aBoUT://A/B/./", 0, "about://A/B/./"},
2027 {"mK://..", 0, "mk:/"},
2028
2029
2030 {"0Aa+-.://./..", 0, "0aa+-.://./../"},
2031 {"a_://./..", 0, "a_:/"},
2032 {"a,://./..", 0, "a,:/"},
2033
2035 {"mk:@MSITStore:C:\\Program Files/AutoCAD 2008\\Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm", 0,
2036 "mk:@MSITStore:C:\\Program Files/AutoCAD 2008\\Help/acad_acg.chm::/WSfacf1429558a55de1a7524c1004e616f8b-322b.htm"},
2037 };
2038
2040
2042
2043
2048
2053
2056
2061
2062
2064 memset(szReturnUrl,
'#', urllen+4);
2065 szReturnUrl[urllen+4] = '\0';
2069 "got 0x%lx with %lu and size %lu for '%s' and %u (expected 'E_POINTER' and size %lu)\n",
2071
2072
2074 memset(szReturnUrl,
'#', urllen+4);
2075 szReturnUrl[urllen+4] = '\0';
2079 "got 0x%lx with %lu and size %lu for '%s' and %u (expected 'E_POINTER' and size %lu)\n",
2081
2082
2084 memset(szReturnUrl,
'#', urllen+4);
2085 szReturnUrl[urllen+4] = '\0';
2089 "got 0x%lx with %lu and size %lu for '%s' and %u (expected 'S_OK' and size %lu)\n",
2091
2092
2094 memset(szReturnUrl,
'#', urllen+4);
2095 szReturnUrl[urllen+4] = '\0';
2099 "got 0x%lx with %lu and size %lu for '%s' and %u (expected 'S_OK' and size %lu)\n",
2101
2102
2104 memset(szReturnUrl,
'#', urllen+4);
2105 szReturnUrl[urllen+4] = '\0';
2109 "got 0x%lx with %lu and size %lu for '%s' and %u (expected 'E_INVALIDARG' and size %u)\n",
2111
2112
2113 dwSize=
sizeof(szReturnUrl);
2114 memset(longurl,
'a',
sizeof(longurl));
2116 longurl[sizeof(longurl)-1] = '\0';
2120
2122 {
2124 {
2126 unk_scheme_tests[
i].
flags | file_flags[
f], unk_scheme_tests[
i].
expect);
2130 }
2131
2133 {
2134 static const struct
2135 {
2138 }
2140 {
2142 {"gopher"},
2143 {"http"},
2144 {"https"},
2146 {"news"},
2147 {"nntp"},
2149 {"snews"},
2150 {"telnet"},
2152 };
2153
2155 {
2157 if (
prefixes[
j].ftp_like && http_tests[
i].expect_ftp)
2159 else
2161
2163 }
2164 }
2165
2167 {
2168 static const char *
const prefixes[] = {
"about",
"javascript",
"mailto",
"shell",
"vbscript"};
2169
2171 {
2175 }
2176 }
2177
2180 }
2181
2184}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define memcpy(s1, s2, n)
static void check_url_canonicalize(const char *url, DWORD flags, const char *expect)
static const char winehqA[]
#define URL_ESCAPE_UNSAFE
#define URL_WININET_COMPATIBILITY
#define URL_DONT_ESCAPE_EXTRA_INFO
#define URL_ESCAPE_SPACES_ONLY
#define URL_ESCAPE_SEGMENT_ONLY
#define URL_DONT_SIMPLIFY
#define URL_FILE_USE_PATHURL
Character const *const prefix
DWORD WINAPI GetLastError(void)