[0001] [0002] [0003] [0004] [0005] [0006] [0007] [0008] [0009] [0010] [0011] [0012] [0013] [0014] [0015] [0016] [0017] [0018] [0019] [0020] [0021] [0022] [0023] [0024] [0025] [0026] [0027] [0028] [0029] [0030] [0031] [0032] [0033] [0034] [0035] [0036] [0037] [0038] [0039] [0040] [0041] [0042] [0043] [0044] [0045] [0046] [0047] [0048] [0049] [0050] [0051] [0052] [0053] [0054] [0055] [0056] [0057] [0058] [0059] [0060] [0061] [0062] [0063] [0064] [0065] [0066] [0067] [0068] [0069] [0070] [0071] [0072] [0073] [0074] [0075] [0076] [0077] [0078] [0079] [0080] [0081] [0082] [0083] [0084] [0085] [0086] [0087] [0088] [0089] [0090] [0091] [0092] [0093] [0094] [0095] [0096] [0097] [0098] [0099] [0100] [0101] [0102] [0103] [0104] [0105] [0106] [0107] [0108] [0109] [0110] [0111] [0112] [0113] [0114] [0115] [0116] [0117] [0118] [0119] [0120] [0121] [0122] [0123] [0124] [0125] [0126] [0127] [0128] [0129] [0130] [0131] [0132] [0133] [0134] [0135] [0136] [0137] [0138] [0139] [0140] [0141] [0142] [0143] [0144] [0145] [0146] [0147] [0148] [0149] [0150] [0151] [0152] [0153] [0154] [0155] [0156] [0157] [0158] [0159] [0160] [0161] [0162] [0163] [0164] [0165] [0166] [0167] [0168] [0169] [0170] [0171] [0172] [0173] [0174] [0175] [0176] [0177] [0178] [0179] [0180] [0181] [0182] [0183] [0184] [0185] [0186] [0187] [0188] [0189] [0190] [0191] [0192] [0193] [0194] [0195] [0196] [0197] [0198] [0199] [0200] [0201] [0202] [0203] [0204] [0205] [0206] [0207] [0208] [0209] [0210] [0211] [0212] [0213] [0214] [0215] [0216] [0217] [0218] [0219] [0220] [0221] [0222] [0223] [0224] [0225] [0226] [0227] [0228] [0229] [0230] [0231] [0232] [0233] [0234] [0235] [0236] [0237] [0238] [0239] [0240] [0241] [0242] [0243] [0244] [0245] [0246] [0247] [0248] [0249] [0250] [0251] [0252] [0253] [0254] [0255] [0256] [0257] [0258] [0259] [0260] [0261] [0262] [0263] [0264] [0265] [0266] [0267] [0268] [0269] [0270] [0271] [0272] [0273] [0274] [0275] [0276] [0277] [0278] [0279] [0280] [0281] [0282] [0283] [0284] [0285] [0286] [0287] [0288] [0289] [0290] [0291] [0292] [0293] [0294] [0295] [0296] [0297] [0298] [0299] [0300] [0301] [0302] [0303] [0304] [0305] [0306] [0307] [0308] [0309] [0310] [0311] [0312] [0313] [0314] [0315] [0316] [0317] [0318] [0319] [0320] [0321] [0322] [0323] [0324] [0325] [0326] [0327] [0328] [0329] [0330] [0331] [0332] [0333] [0334] [0335] [0336] [0337] [0338] [0339] [0340] [0341] [0342] [0343] [0344] [0345] [0346] [0347] [0348] [0349] [0350] [0351] [0352] [0353] [0354] [0355] [0356] [0357] [0358] [0359] [0360] [0361] [0362] [0363] [0364] [0365] [0366] [0367] [0368] [0369] [0370] [0371] [0372] [0373] [0374] [0375] [0376] [0377] [0378] [0379] [0380] [0381] [0382] [0383] [0384] [0385] [0386] [0387] [0388] [0389] [0390] [0391] [0392] [0393] [0394] [0395] [0396] [0397] [0398] [0399] [0400] [0401] [0402] [0403] [0404] [0405] [0406] [0407] [0408] [0409] [0410] [0411] [0412] [0413] [0414] [0415] [0416] [0417] [0418] [0419] [0420] [0421] [0422] [0423] [0424] [0425] [0426] [0427] [0428] [0429] [0430] [0431] [0432] [0433] [0434] [0435] [0436] [0437] [0438] [0439] [0440] [0441] [0442] [0443] [0444] [0445] [0446] [0447] [0448] [0449] [0450] [0451] [0452] [0453] [0454] [0455] [0456] [0457] [0458] [0459] [0460] [0461] [0462] [0463] [0464] [0465] [0466] [0467] [0468] [0469] [0470] [0471] [0472] [0473] [0474] [0475] [0476] [0477] [0478] [0479] [0480] [0481] [0482] [0483] [0484] [0485] [0486] [0487] [0488] [0489] [0490] [0491] [0492] [0493] [0494] [0495] [0496] [0497] [0498] [0499] [0500] [0501] [0502] [0503] [0504] [0505] [0506] [0507] [0508] [0509] [0510] [0511] [0512] [0513] [0514] [0515] [0516] [0517] [0518] [0519] [0520] [0521] [0522] [0523] [0524] [0525] [0526] [0527] [0528] [0529] [0530] [0531] [0532] [0533] [0534] [0535] [0536] [0537] [0538] [0539] [0540] [0541] [0542] [0543] [0544] [0545] [0546] [0547] [0548] [0549] [0550] [0551] [0552] [0553] [0554] [0555] [0556] [0557] [0558] [0559] [0560] [0561] [0562] [0563] [0564] [0565] [0566] [0567] [0568] [0569] [0570] [0571] [0572] [0573] [0574] [0575] [0576] [0577] [0578] [0579] [0580] [0581] [0582] [0583] [0584] [0585] [0586] [0587] [0588] [0589] [0590] [0591] [0592] [0593] [0594] [0595] [0596] [0597] [0598] [0599] [0600] [0601] [0602] [0603] [0604] [0605] [0606] [0607] [0608] [0609] [0610] [0611] [0612] [0613] [0614] [0615] [0616] [0617] [0618] [0619] [0620] [0621] [0622] [0623] [0624] [0625] [0626] [0627] [0628] [0629] [0630] [0631] [0632] [0633] [0634] [0635] [0636] [0637] [0638] [0639] [0640] [0641] [0642] [0643] [0644] [0645] [0646] [0647] [0648] [0649] [0650] [0651] [0652] [0653] [0654] [0655] [0656] [0657] [0658] [0659] [0660] [0661] [0662] [0663] [0664] [0665] [0666] [0667] [0668] [0669] [0670] [0671] [0672] [0673] [0674] [0675] [0676] [0677] [0678] [0679] [0680] [0681] [0682] [0683] [0684] [0685] [0686] [0687] [0688] [0689] [0690] [0691] [0692] [0693] [0694] [0695] [0696] [0697] [0698] [0699] [0700] [0701] [0702] [0703] [0704] [0705] [0706] [0707] [0708] [0709] [0710] [0711] [0712] [0713] [0714] [0715] [0716] [0717] [0718] [0719] [0720] [0721] [0722] [0723] [0724] [0725] [0726] [0727] [0728] [0729] [0730] [0731] [0732] [0733] [0734] [0735] [0736] [0737] [0738] [0739] [0740] [0741] [0742] [0743] [0744] [0745] [0746] [0747] [0748] [0749] [0750] [0751] [0752] [0753] [0754] [0755] [0756] [0757] [0758] [0759] [0760] [0761] [0762] [0763] [0764] [0765] [0766] [0767] [0768] [0769] [0770] [0771] [0772] [0773] [0774] [0775] [0776] [0777] [0778] [0779] [0780] [0781] [0782] [0783] [0784] [0785] [0786] [0787] [0788] [0789] [0790] [0791] [0792] [0793] [0794] [0795] [0796] [0797] [0798] [0799] [0800] [0801] [0802] [0803] [0804] [0805] [0806] [0807] [0808] [0809] [0810] [0811] [0812] [0813] [0814] [0815] [0816] [0817] [0818] [0819] [0820] [0821] [0822] [0823] [0824] [0825] [0826] [0827] [0828] [0829] [0830] [0831] [0832] [0833] [0834] [0835] [0836] [0837] [0838] [0839] [0840] [0841] [0842] [0843] [0844] [0845] [0846] [0847] [0848] [0849] [0850] [0851] [0852] [0853] [0854] [0855] [0856] [0857] [0858] [0859] [0860] [0861] [0862] [0863] [0864] [0865] [0866] [0867] [0868] [0869] [0870] [0871] [0872] [0873] [0874] [0875] [0876] [0877] [0878] [0879] [0880] [0881] [0882] [0883] [0884] [0885] [0886] [0887] [0888] [0889] [0890] [0891] [0892] [0893] [0894] [0895] [0896] [0897] [0898] [0899] [0900] [0901] [0902] [0903] [0904] [0905] [0906] [0907] [0908] [0909] [0910] [0911] [0912] [0913] [0914] [0915] [0916] [0917] [0918] [0919] [0920] [0921] [0922] [0923] [0924] [0925] [0926] [0927] [0928] [0929] [0930] [0931] [0932] [0933] [0934] [0935] [0936] [0937] [0938] [0939] [0940] [0941] [0942] [0943] [0944] [0945] [0946] [0947] [0948] [0949] [0950] [0951] [0952] [0953] [0954] [0955] [0956] [0957] [0958] [0959] [0960] [0961] [0962] [0963] [0964] [0965] [0966] [0967] [0968] [0969] [0970] [0971] [0972] [0973] [0974] [0975] [0976] [0977] [0978] [0979] [0980] [0981] [0982] [0983] [0984] [0985] [0986] [0987] [0988] [0989] [0990] [0991] [0992] [0993] [0994] [0995] [0996] [0997] [0998] [0999] [1000] [1001] [1002] [1003] [1004] [1005] [1006] [1007] [1008] [1009] [1010] [1011] [1012] [1013] [1014] [1015] [1016] [1017] [1018] [1019] [1020] [1021] [1022] [1023] [1024] [1025] [1026] [1027] [1028] [1029] [1030] [1031] [1032] [1033] [1034] [1035] [1036] [1037] [1038] [1039] [1040] [1041] [1042] [1043] [1044] [1045] [1046] [1047] [1048] [1049] [1050] [1051] [1052] [1053] [1054] [1055] [1056] [1057] [1058] [1059] [1060] [1061] [1062] [1063] [1064] [1065] [1066] [1067] [1068] [1069] [1070] [1071] [1072] [1073] [1074] [1075] [1076] [1077] [1078] [1079] [1080] [1081] [1082] [1083] [1084] [1085] [1086] [1087] [1088] [1089] [1090] [1091] [1092] [1093] [1094] [1095] [1096] [1097] [1098] [1099] [1100] [1101] [1102] [1103] [1104] [1105] [1106] [1107] [1108] [1109] [1110] [1111] [1112] [1113] [1114] [1115] [1116] [1117] [1118] [1119] [1120] [1121] [1122] [1123] [1124] [1125] [1126] [1127] [1128] [1129] [1130] [1131] [1132] [1133] [1134] [1135] [1136] [1137] [1138] [1139] [1140] [1141] [1142] [1143] [1144] [1145] [1146] [1147] [1148] [1149] [1150] [1151] [1152] [1153] [1154] [1155] [1156] [1157] [1158] [1159] [1160] [1161] [1162] [1163] [1164] [1165] [1166] [1167] [1168] [1169] [1170] [1171] [1172] [1173] [1174] [1175] [1176] [1177] [1178] [1179] [1180] [1181] [1182] [1183] [1184] [1185] [1186] [1187] [1188] [1189] [1190] [1191] [1192] [1193] [1194] [1195] [1196] [1197] [1198] [1199] [1200] [1201] [1202] [1203] [1204] [1205] [1206] [1207] [1208] [1209] [1210] [1211] [1212] [1213] [1214] [1215] [1216] [1217] [1218] [1219] [1220] [1221] [1222] [1223] [1224] [1225] [1226] [1227] [1228] [1229] [1230] [1231] [1232] [1233] [1234] [1235] [1236] [1237] [1238] [1239] [1240] [1241] [1242] [1243] [1244] [1245] [1246] [1247] [1248] [1249] [1250] [1251] [1252] [1253] [1254] [1255] [1256] [1257] [1258] [1259] [1260] [1261] [1262] [1263] [1264] [1265] [1266] [1267] [1268] [1269] [1270] [1271] [1272] [1273] [1274] [1275] [1276] [1277] [1278] [1279] [1280] [1281] [1282] [1283] [1284] [1285] [1286] [1287] [1288] [1289] [1290] [1291] [1292] [1293] [1294] [1295] [1296] [1297] [1298] [1299] [1300] [1301] [1302] [1303] [1304] [1305] [1306] [1307] [1308] [1309] [1310] [1311] [1312] [1313] [1314] [1315] [1316] [1317] [1318] [1319] [1320] [1321] [1322] [1323] [1324] [1325] [1326] [1327] [1328] [1329] [1330] [1331] [1332] [1333] [1334] [1335] [1336] [1337] [1338] [1339] [1340] [1341] [1342] [1343] [1344] [1345] [1346] [1347] [1348] [1349] [1350] [1351] [1352] [1353] [1354] [1355] [1356] [1357] [1358] [1359] [1360] [1361] [1362] [1363] [1364] [1365] [1366] [1367] [1368] [1369] [1370] [1371] [1372] [1373] [1374] [1375] [1376] [1377] [1378] [1379] [1380] [1381] [1382] [1383] [1384] [1385] [1386] [1387] [1388] [1389] [1390] [1391] [1392] [1393] [1394] [1395] [1396] [1397] [1398] [1399] [1400] [1401] [1402] [1403] [1404] [1405] [1406] [1407] [1408] [1409] [1410] [1411] [1412] [1413] [1414] [1415] [1416] [1417] [1418] [1419] [1420] [1421] [1422] [1423] [1424] [1425] [1426] [1427] [1428] [1429] [1430] [1431] [1432] [1433] [1434] [1435] [1436] [1437] [1438] [1439] [1440] [1441] [1442] [1443] [1444] [1445] [1446] [1447] [1448] [1449] [1450] [1451] [1452] [1453] [1454] [1455] [1456] [1457] [1458] [1459] [1460] [1461] [1462] [1463] [1464] [1465] [1466] [1467] [1468] [1469] [1470] [1471] [1472] [1473] [1474] [1475] [1476] [1477] [1478] [1479] [1480] [1481] [1482] [1483] [1484] [1485] [1486] [1487] [1488] [1489] [1490] [1491] [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] [1520] [1521] [1522] [1523] [1524] [1525] [1526] [1527] [1528] [1529] [1530] [1531] [1532] [1533] [1534] [1535] [1536] [1537] [1538] [1539] [1540] [1541] [1542] [1543] [1544] [1545] [1546] [1547] [1548] [1549] [1550] [1551] [1552] [1553] [1554] [1555] [1556] [1557] [1558] [1559] [1560] [1561] [1562] [1563] [1564] [1565] [1566] [1567] [1568] [1569] [1570] [1571] [1572] [1573] [1574] [1575] [1576] [1577] [1578] [1579] [1580] [1581] [1582] [1583] [1584] [1585] [1586] [1587] [1588] [1589] [1590] [1591] [1592] [1593] [1594] [1595] [1596] [1597] [1598] [1599] [1600] [1601] [1602] [1603] [1604] [1605] [1606] [1607] [1608] [1609] [1610] [1611] [1612] [1613] [1614] [1615] [1616] [1617] [1618] [1619] [1620] [1621] [1622] [1623] [1624] [1625] [1626] [1627] [1628] [1629] [1630] [1631] [1632] [1633] [1634] [1635] [1636] [1637] [1638] [1639] [1640] [1641] [1642] [1643] [1644] [1645] [1646] [1647] [1648] [1649] [1650] [1651] [1652] [1653] [1654] [1655] [1656] [1657] [1658] [1659] [1660] [1661] [1662] [1663] [1664] [1665] [1666] [1667] [1668] [1669] [1670] [1671] [1672] [1673] [1674] [1675] [1676] [1677] [1678] [1679] [1680] [1681] [1682] [1683] [1684] [1685] [1686] [1687] [1688] [1689] [1690] [1691] [1692] [1693] [1694] [1695] [1696] [1697] [1698] [1699] [1700] [1701] [1702] [1703] [1704] [1705] [1706] [1707] [1708] [1709] [1710] [1711] [1712] [1713] [1714] [1715] [1716] [1717] [1718] [1719] [1720] [1721] [1722] [1723] [1724] [1725] [1726] [1727] [1728] [1729] [1730] [1731] [1732] [1733] [1734] [1735] [1736] [1737] [1738] [1739] [1740] [1741] [1742] [1743] [1744] [1745] [1746] [1747] [1748] [1749] [1750] [1751] [1752] [1753] [1754] [1755] [1756] [1757] [1758] [1759] [1760] [1761] [1762] [1763] [1764] [1765] [1766] [1767] [1768] [1769] [1770] [1771] [1772] [1773] [1774] [1775] [1776] [1777] [1778] [1779] [1780] [1781] [1782] [1783] [1784] [1785] [1786] [1787] [1788] [1789] [1790] [1791] [1792] [1793] [1794] [1795] [1796] [1797] [1798] [1799] [1800] [1801] [1802] [1803] [1804] [1805] [1806] [1807] [1808] [1809] [1810] [1811] [1812] [1813] [1814] [1815] [1816] [1817] [1818] [1819] [1820] [1821] [1822] [1823] [1824] [1825] [1826] [1827] [1828] [1829] [1830] [1831] [1832] [1833] [1834] [1835] [1836] [1837] [1838] [1839] [1840] [1841] [1842] [1843] [1844] [1845] [1846] [1847] [1848] [1849] [1850] [1851] [1852] [1853] [1854] [1855] [1856] [1857] [1858] [1859] [1860] [1861] [1862] [1863] [1864] [1865] [1866] [1867] [1868] [1869] [1870] [1871] [1872] [1873] [1874] [1875] [1876] [1877] [1878] [1879] [1880] [1881] [1882] [1883] [1884] [1885] [1886] [1887] [1888] [1889] [1890] [1891] [1892] [1893] [1894] [1895] [1896] [1897] [1898] [1899] [1900] [1901] [1902] [1903] [1904] [1905] [1906] [1907] [1908] [1909] [1910] [1911] [1912] [1913] [1914] [1915] [1916] [1917] [1918] [1919] [1920] [1921] [1922] [1923] [1924] [1925] [1926] [1927] [1928] [1929] [1930] [1931] [1932] [1933] [1934] [1935] [1936] [1937] [1938] [1939] [1940] [1941] [1942] [1943] [1944] [1945] [1946] [1947] [1948] [1949] [1950] [1951] [1952] [1953] [1954] [1955] [1956] [1957] [1958] [1959] [1960] [1961] [1962] [1963] [1964] [1965] [1966] [1967] [1968] [1969] [1970] [1971] [1972] [1973] [1974] [1975] [1976] [1977] [1978] [1979] [1980] [1981] [1982] [1983] [1984] [1985] [1986] [1987] [1988] [1989] [1990] [1991] [1992] [1993] [1994] [1995] [1996] [1997] [1998] [1999] [2000] [2001] [2002] [2003] [2004] [2005] [2006] [2007] [2008] [2009] [2010] [2011] [2012] [2013] [2014] [2015] [2016] [2017] [2018] [2019] [2020] [2021] [2022] [2023] [2024] [2025] [2026] [2027] [2028] [2029] [2030] [2031] [2032] [2033] [2034] [2035] [2036] [2037] [2038] [2039] [2040] [2041] [2042] [2043] [2044] [2045] [2046] [2047] [2048] [2049] [2050] [2051] [2052] [2053] [2054] [2055] [2056] [2057] [2058] [2059] [2060] [2061] [2062] [2063] [2064] [2065] [2066] [2067] [2068] [2069] [2070] [2071] [2072] [2073] [2074] [2075] [2076] [2077] [2078] [2079] [2080] [2081] [2082] [2083] [2084] [2085] [2086] [2087] [2088] [2089] [2090] [2091] [2092] [2093] [2094] [2095] [2096] [2097] [2098] [2099] [2100] [2101] [2102] [2103] [2104] [2105] [2106] [2107] [2108] [2109] [2110] [2111] [2112] [2113] [2114] [2115] [2116] [2117] [2118] [2119] [2120] [2121] [2122] [2123] [2124] [2125] [2126] [2127] [2128] [2129] [2130] [2131] [2132] [2133] [2134] [2135] [2136] [2137] [2138] [2139] [2140] [2141] [2142] [2143] [2144] [2145] [2146] [2147] [2148] [2149] [2150] [2151] [2152] [2153] [2154] [2155] [2156] [2157] [2158] [2159] [2160] [2161] [2162] [2163] [2164] [2165] [2166] [2167] [2168] [2169] [2170] [2171] [2172] [2173] [2174] [2175] [2176] [2177] [2178] [2179] [2180] [2181] [2182] [2183] [2184] [2185] [2186] [2187] [2188] [2189] [2190] [2191] [2192] [2193] [2194] [2195] [2196] [2197] [2198] [2199] [2200] [2201] [2202] [2203] [2204] [2205] [2206] [2207] [2208] [2209] [2210] [2211] [2212] [2213] [2214] [2215] [2216] [2217] [2218] [2219] [2220] [2221] [2222] [2223] [2224] [2225] [2226] [2227] [2228] [2229] [2230] [2231] [2232] [2233] [2234] [2235] [2236] [2237] [2238] [2239] [2240] [2241] [2242] [2243] [2244] [2245] [2246] [2247] [2248] [2249] [2250] [2251] [2252] [2253] [2254] [2255] [2256] [2257] [2258] [2259] [2260] [2261] [2262] [2263] [2264] [2265] [2266] [2267] [2268] [2269] [2270] [2271] [2272] [2273] [2274] [2275] [2276] [2277] [2278] [2279] [2280] [2281] [2282] [2283] [2284] [2285] [2286] [2287] [2288] [2289] [2290] [2291] [2292] [2293] [2294] [2295] [2296] [2297] [2298] [2299] [2300] [2301] [2302] [2303] [2304] [2305] [2306] [2307] [2308] [2309] [2310] [2311] [2312] [2313] [2314] [2315] [2316] [2317] [2318] [2319] [2320] [2321] [2322] [2323] [2324] [2325] [2326] [2327] [2328] [2329] [2330] [2331] [2332] [2333] [2334] [2335] [2336] [2337] [2338] [2339] [2340] [2341] [2342] [2343] [2344] [2345] [2346] [2347] [2348] [2349] [2350] [2351] [2352] [2353] [2354] [2355] [2356] [2357] [2358] [2359] [2360] [2361] [2362] [2363] [2364] [2365] [2366] [2367] [2368] [2369] [2370] [2371] [2372] [2373] [2374] [2375] [2376] [2377] [2378] [2379] [2380] [2381] [2382] [2383] [2384] [2385] [2386] [2387] [2388] [2389] [2390] [2391] [2392] [2393] [2394] [2395] [2396] [2397] [2398] [2399] [2400] [2401] [2402] [2403] [2404] [2405] [2406] [2407] [2408] [2409] [2410] [2411] [2412] [2413] [2414] [2415] [2416] [2417] [2418] [2419] [2420] [2421] [2422] [2423] [2424] [2425] [2426] [2427] [2428] [2429] [2430] [2431] [2432] [2433] [2434] [2435] [2436] [2437] [2438] [2439] [2440] [2441] [2442] [2443] [2444] [2445] [2446] [2447] [2448] [2449] [2450] [2451] [2452] [2453] [2454] [2455] [2456] [2457] [2458] [2459] [2460] [2461] [2462] [2463] [2464] [2465] [2466] [2467] [2468] [2469] [2470] [2471] [2472] [2473] [2474] [2475] [2476] [2477] [2478] [2479] [2480] [2481] [2482] [2483] [2484] [2485] [2486] [2487] [2488] [2489] [2490] [2491] [2492] [2493] [2494] [2495] [2496] [2497] [2498] [2499] [2500] [2501] [2502] [2503] [2504] [2505] [2506] [2507] [2508] [2509] [2510] [2511] [2512] [2513] [2514] [2515] [2516] [2517] [2518] [2519] [2520] [2521] [2522] [2523] [2524] [2525] [2526] [2527] [2528] [2529] [2530] [2531] [2532] [2533] [2534] [2535] [2536] [2537] [2538] [2539] [2540] [2541] [2542] [2543] [2544] [2545] [2546] [2547] [2548] [2549] [2550] [2551] [2552] [2553] [2554] [2555] [2556] [2557] [2558] [2559] [2560] [2561] [2562] [2563] [2564] [2565] [2566] [2567] [2568] [2569] [2570] [2571] [2572] [2573] [2574] [2575] [2576] [2577] [2578] [2579] [2580] [2581] [2582] [2583] [2584] [2585] [2586] [2587] [2588] [2589] [2590] [2591] [2592] [2593] [2594] [2595] [2596] [2597] [2598] [2599] [2600] [2601] [2602] [2603] [2604] [2605] [2606] [2607] [2608] [2609] [2610] [2611] [2612] [2613] [2614] [2615] [2616] [2617] [2618] [2619] [2620] [2621] [2622] [2623] [2624] [2625] [2626] [2627] [2628] [2629] [2630] [2631] [2632] [2633] [2634] [2635] [2636] [2637] [2638] [2639] [2640] [2641] [2642] [2643] [2644] [2645] [2646] [2647] [2648] [2649] [2650] [2651] [2652] [2653] [2654] [2655] [2656] [2657] [2658] [2659] [2660] [2661] [2662] [2663] [2664] [2665] [2666] [2667] [2668] [2669] [2670] [2671] [2672] [2673] [2674] [2675] [2676] [2677] [2678] [2679] [2680] [2681] [2682] [2683] [2684] [2685] [2686] [2687] [2688] [2689] [2690] [2691] [2692] [2693] [2694] [2695] [2696] [2697] [2698] [2699] [2700] [2701] [2702] [2703] [2704] [2705] [2706] [2707] [2708] [2709] [2710] [2711] [2712] [2713] [2714] [2715] [2716] [2717] [2718] [2719] [2720] [2721] [2722] [2723] [2724] [2725] [2726] [2727] [2728] [2729] [2730] [2731] [2732] [2733] [2734] [2735] [2736] [2737] [2738] [2739] [2740] [2741] [2742] [2743] [2744] [2745] [2746] [2747] [2748] [2749] [2750] [2751] [2752] [2753] [2754] [2755] [2756] [2757] [2758] [2759] [2760] [2761] [2762] [2763] [2764] [2765] [2766] [2767] [2768] [2769] [2770] [2771] [2772] [2773] [2774] [2775] [2776] [2777] [2778] [2779] [2780] [2781] [2782] [2783] [2784] [2785] [2786] [2787] [2788] [2789] [2790] [2791] [2792] [2793] [2794] [2795] [2796] [2797] [2798] [2799] [2800] [2801] [2802] [2803] [2804] [2805] [2806] [2807] [2808] [2809] [2810] [2811] [2812] [2813] [2814] [2815] [2816] [2817] [2818] [2819] [2820] [2821] [2822] [2823] [2824] [2825] [2826] [2827] [2828] [2829] [2830] [2831] [2832] [2833] [2834] [2835] [2836] [2837] [2838] [2839] [2840] [2841] [2842] [2843] [2844] [2845] [2846] [2847] [2848] [2849] [2850] [2851] [2852] [2853] [2854] [2855] [2856] [2857] [2858] [2859] [2860] [2861] [2862] [2863] [2864] [2865] [2866] [2867] [2868] [2869] [2870] [2871] [2872] [2873] [2874] [2875] [2876] [2877] [2878] [2879] [2880] [2881] [2882] [2883] [2884] [2885] [2886] [2887] [2888] [2889] [2890] [2891] [2892] [2893] [2894] [2895] [2896] [2897] [2898] [2899] [2900] [2901] [2902] [2903] [2904] [2905] [2906] [2907] [2908] [2909] [2910] [2911] [2912] [2913] [2914] [2915] [2916] [2917] [2918] [2919] [2920] [2921] [2922] [2923] [2924] [2925] [2926] [2927] [2928] [2929] [2930] [2931] [2932] [2933] [2934] [2935] [2936] [2937] [2938] [2939] [2940] [2941] [2942] [2943] [2944] [2945] [2946] [2947] [2948] [2949] [2950] [2951] [2952] [2953] [2954] [2955] [2956] [2957] [2958] [2959] [2960] [2961] [2962] [2963] [2964] [2965] [2966] [2967] [2968] [2969] [2970] [2971] [2972] [2973] [2974] [2975] [2976] [2977] [2978] [2979] [2980] [2981] [2982] [2983] [2984] [2985] [2986] [2987] [2988] [2989] [2990] [2991] [2992] [2993] [2994] [2995] [2996] [2997] [2998] [2999] [3000] [3001] [3002] [3003] [3004] [3005] [3006] [3007] [3008] [3009] [3010] [3011] [3012] [3013] [3014] [3015] [3016] [3017] [3018] [3019] [3020] [3021] [3022] [3023] [3024] [3025] [3026] [3027] [3028] [3029] [3030] [3031] [3032] [3033] [3034] [3035] [3036] [3037] [3038] [3039] [3040] [3041] [3042] [3043] [3044] [3045] [3046] [3047] [3048] [3049] [3050] [3051] [3052] [3053] [3054] [3055] [3056] [3057] [3058] [3059] [3060] [3061] [3062] [3063] [3064] [3065] [3066] [3067] [3068] [3069] [3070] [3071] [3072] [3073] [3074] [3075] [3076] [3077] [3078] [3079] [3080] [3081] [3082] [3083] [3084] [3085] [3086] [3087] [3088] [3089] [3090] [3091] [3092] [3093] [3094] [3095] [3096] [3097] [3098] [3099] [3100] [3101] [3102] [3103] [3104] [3105] [3106] [3107] [3108] [3109] [3110] [3111] [3112] [3113] [3114] [3115] [3116] [3117] [3118] [3119] [3120] [3121] [3122] [3123] [3124] [3125] [3126] [3127] [3128] [3129] [3130] [3131] [3132] [3133] [3134] [3135] [3136] [3137] [3138] [3139] [3140] [3141] [3142] [3143] [3144] [3145] [3146] [3147] [3148] [3149] [3150] [3151] [3152] [3153] [3154] [3155] [3156] [3157] [3158] [3159] [3160] [3161] [3162] [3163] [3164] [3165] [3166] [3167] [3168] [3169] [3170] [3171] [3172] [3173] [3174] [3175] [3176] [3177] [3178] [3179] [3180] [3181] [3182] [3183] [3184] [3185] [3186] [3187] [3188] [3189] [3190] [3191] [3192] [3193] [3194] [3195] [3196] [3197] [3198] [3199] [3200] [3201] [3202] [3203] [3204] [3205] [3206] [3207] [3208] [3209] [3210] [3211] [3212] [3213] [3214] [3215] [3216] [3217] [3218] [3219] [3220] [3221] [3222] [3223] [3224] [3225] [3226] [3227] [3228] [3229] [3230] [3231] [3232] [3233] [3234] [3235] [3236] [3237] [3238] [3239] [3240] [3241] [3242] [3243] [3244] [3245] [3246] [3247] [3248] [3249] [3250] [3251] [3252] [3253] [3254] [3255] [3256] [3257] [3258] [3259] [3260] [3261] [3262] [3263] [3264] [3265] [3266] [3267] [3268] [3269] [3270] [3271] [3272] [3273] [3274] [3275] [3276] [3277] [3278] [3279] [3280] [3281] [3282] [3283] [3284] [3285] [3286] [3287] [3288] [3289] [3290] [3291] [3292] [3293] [3294] [3295] [3296] [3297] [3298] [3299] [3300] [3301] [3302] [3303] [3304] [3305] [3306] [3307] [3308] [3309] [3310] [3311] [3312] [3313] [3314] [3315] [3316] [3317] [3318] [3319] [3320] [3321] [3322] [3323] [3324] [3325] [3326] [3327] [3328] [3329] [3330] [3331] [3332] [3333] [3334] [3335] [3336] [3337] [3338] [3339] [3340] [3341] [3342] [3343] [3344] [3345] [3346] [3347] [3348] [3349] [3350] [3351] [3352] [3353] [3354] [3355] [3356] [3357] [3358] [3359] [3360] [3361] [3362] [3363] [3364] [3365] [3366] [3367] [3368] [3369] [3370] [3371] [3372] [3373] [3374] [3375] [3376] [3377] [3378] [3379] [3380] [3381] [3382] [3383] [3384] [3385] [3386] [3387] [3388] [3389] [3390] [3391] [3392] [3393] [3394] [3395] [3396] [3397] [3398] [3399] [3400] [3401] [3402] [3403] [3404] [3405] [3406] [3407] [3408] [3409] [3410] [3411] [3412] [3413] [3414] [3415] [3416] [3417] [3418] [3419] [3420] [3421] [3422] [3423] [3424] [3425] [3426] [3427] [3428] [3429] [3430] [3431] [3432] [3433] [3434] [3435] [3436] [3437] [3438] [3439] [3440] [3441] [3442] [3443] [3444] [3445] [3446] [3447] [3448] [3449] [3450] [3451] [3452] [3453] [3454] [3455] [3456] [3457] [3458] [3459] [3460] [3461] [3462] [3463] [3464] [3465] [3466] [3467] [3468] [3469] [3470] [3471] [3472] [3473] [3474] [3475] [3476] [3477] [3478] [3479] [3480] [3481] [3482] [3483] [3484] [3485] [3486] [3487] [3488] [3489] [3490] [3491] [3492] [3493] [3494] [3495] [3496] [3497] [3498] [3499] [3500] [3501] [3502] [3503] [3504] [3505] [3506] [3507] [3508] [3509] [3510] [3511] [3512] [3513] [3514] [3515] [3516] [3517] [3518] [3519] [3520] [3521] [3522] [3523] [3524] [3525] [3526] [3527] [3528] [3529] [3530] [3531] [3532] [3533] [3534] [3535] [3536] [3537] [3538] [3539] [3540] [3541] [3542] [3543] [3544] [3545] [3546] [3547] [3548] [3549] [3550] [3551] [3552] [3553] [3554] [3555] [3556] [3557] [3558] [3559] [3560] [3561] [3562] [3563] [3564] [3565] [3566] [3567] [3568] [3569] [3570] [3571] [3572] [3573] [3574] [3575] [3576] [3577] [3578] [3579] [3580] [3581] [3582] [3583] [3584] [3585] [3586] [3587] [3588] [3589] [3590] [3591] [3592] [3593] [3594] [3595] [3596] [3597] [3598] [3599] [3600] [3601] [3602] [3603] [3604] [3605] [3606] [3607] [3608] [3609] [3610] [3611] [3612] [3613] [3614] [3615] [3616] [3617] [3618] [3619] [3620] [3621] [3622] [3623] [3624] [3625] [3626] [3627] [3628] [3629] [3630] [3631] [3632] [3633] [3634] [3635] [3636] [3637] [3638] [3639] [3640] [3641] [3642] [3643] [3644] [3645] [3646] [3647] [3648] [3649] [3650] [3651] [3652] [3653] [3654] [3655] [3656] [3657] [3658] [3659] [3660] [3661] [3662] [3663] [3664] [3665] [3666] [3667] [3668] [3669] [3670] [3671] [3672] [3673] [3674] [3675] [3676] [3677] [3678] [3679] [3680] [3681] [3682] [3683] [3684] [3685] [3686] [3687] [3688] [3689] [3690] [3691] [3692] [3693] [3694] [3695] [3696] [3697] [3698] [3699] [3700] [3701] [3702] [3703] [3704] [3705] [3706] [3707] [3708] [3709] [3710] [3711] [3712] [3713] [3714] [3715] [3716] [3717] [3718] [3719] [3720] [3721] [3722] [3723] [3724] [3725] [3726] [3727] [3728] [3729] [3730] [3731] [3732] [3733] [3734] [3735] [3736] [3737] [3738] [3739] [3740] [3741] [3742] [3743] [3744] [3745] [3746] [3747] [3748] [3749] [3750] [3751] [3752] [3753] [3754] [3755] [3756] [3757] [3758] [3759] [3760] [3761] [3762] [3763] [3764] [3765] [3766] [3767] [3768] [3769] [3770] [3771] [3772] [3773] [3774] [3775] [3776] [3777] [3778] [3779] [3780] [3781] [3782] [3783] [3784] [3785] [3786] [3787] [3788] [3789] [3790] [3791] [3792] [3793] [3794] [3795] [3796] [3797] [3798] [3799] [3800] [3801] [3802] [3803] [3804] [3805] [3806] [3807] [3808] [3809] [3810] [3811] [3812] [3813] [3814] [3815] [3816] [3817] [3818] [3819] [3820] [3821] [3822] [3823] [3824] [3825] [3826] [3827] [3828] [3829] [3830] [3831] [3832] [3833] [3834] [3835] [3836] [3837] [3838] [3839] [3840] [3841] [3842] [3843] [3844] [3845] [3846] [3847] [3848] [3849] [3850] [3851] [3852] [3853] [3854] [3855] [3856] [3857] [3858] [3859] [3860] [3861] [3862] [3863] [3864] [3865] [3866] [3867] [3868] [3869] [3870] [3871] [3872] [3873] [3874] [3875] [3876] [3877] [3878] [3879] [3880] [3881] [3882] [3883] [3884] [3885] [3886] [3887] [3888] [3889] [3890] [3891] [3892] [3893] [3894] [3895] [3896] [3897] [3898] [3899] [3900] [3901] [3902] [3903] [3904] [3905] [3906] [3907] [3908] [3909] [3910] [3911] [3912] [3913] [3914] [3915] [3916] [3917] [3918] [3919] [3920] [3921] [3922] [3923] [3924] [3925] [3926] [3927] [3928] [3929] [3930] [3931] [3932] [3933] [3934] [3935] [3936] [3937] [3938] [3939] [3940] [3941] [3942] [3943] [3944] [3945] [3946] [3947] [3948] [3949] [3950] [3951] [3952] [3953] [3954] [3955] [3956] [3957] [3958] [3959] [3960] [3961] [3962] [3963] [3964] [3965] [3966] [3967] [3968] [3969] [3970] [3971] [3972] [3973] [3974] [3975] [3976] [3977] [3978] [3979] [3980] [3981] [3982] [3983] [3984] [3985] [3986] [3987] [3988] [3989] [3990] [3991] [3992] [3993] [3994] [3995] [3996] [3997] [3998] [3999] [4000] [4001] [4002] [4003] [4004] [4005] [4006] [4007] [4008] [4009] [4010] [4011] [4012] [4013] [4014] [4015] [4016] [4017] [4018] [4019] [4020] [4021] [4022] [4023] [4024] [4025] [4026] [4027] [4028] [4029] [4030] [4031] [4032] [4033] [4034] [4035] [4036] [4037] [4038] [4039] [4040] [4041] [4042] [4043] [4044] [4045] [4046] [4047] [4048] [4049] [4050] [4051] [4052] [4053] [4054] [4055] [4056] [4057] [4058] [4059] [4060] [4061] [4062] [4063] [4064] [4065] [4066] [4067] [4068] [4069] [4070] [4071] [4072] [4073] [4074] [4075] [4076] [4077] [4078] [4079] [4080] [4081] [4082] [4083] [4084] [4085] [4086] [4087] [4088] [4089] [4090] [4091] [4092] [4093] [4094] [4095] [4096] [4097] [4098] [4099] [4100] [4101] [4102] [4103] [4104] [4105] [4106] [4107] [4108] [4109] [4110] [4111] [4112] [4113] [4114] [4115] [4116] [4117] [4118] [4119] [4120] [4121] [4122] [4123] [4124] [4125] [4126] [4127] [4128] [4129] [4130] [4131] [4132] [4133] [4134] [4135] [4136] [4137] [4138] [4139] [4140] [4141] [4142] [4143] [4144] [4145] [4146] [4147] [4148] [4149] [4150] [4151] [4152] [4153] [4154] [4155] [4156] [4157] [4158] [4159] [4160] [4161] [4162] [4163] [4164] [4165] [4166] [4167] [4168] [4169] [4170] [4171] [4172] [4173] [4174] [4175] [4176] [4177] [4178] [4179] [4180] [4181] [4182] [4183] [4184] [4185] [4186] [4187] [4188] [4189] [4190] [4191] [4192] [4193] [4194] [4195] [4196] [4197] [4198] [4199] [4200] [4201] [4202] [4203] [4204] [4205] [4206] [4207] [4208] [4209] [4210] [4211] [4212] [4213] [4214] [4215] [4216] [4217] [4218] [4219] [4220] [4221] [4222] [4223] [4224] [4225] [4226] [4227] [4228] [4229] [4230] [4231] [4232] [4233] [4234] [4235] [4236] [4237] [4238] [4239] [4240] [4241] [4242] [4243] [4244] [4245] [4246] [4247] [4248] [4249] [4250] [4251] [4252] [4253] [4254] [4255] [4256] [4257] [4258] [4259] [4260] [4261] [4262] [4263] [4264] [4265] [4266] [4267] [4268] [4269] [4270] [4271] [4272] [4273] [4274] [4275] [4276] [4277] [4278] [4279] [4280] [4281] [4282] [4283] [4284] [4285] [4286] [4287] [4288] [4289] [4290] [4291] [4292] [4293] [4294] [4295] [4296] [4297] [4298] [4299] [4300] [4301] [4302] [4303] [4304] [4305] [4306] [4307] [4308] [4309] [4310] [4311] [4312] [4313] [4314] [4315] [4316] [4317] [4318] [4319] [4320] [4321] [4322] [4323] [4324] [4325] [4326] [4327] [4328] [4329] [4330] [4331] [4332] [4333] [4334] [4335] [4336] [4337] [4338] [4339] [4340] [4341] [4342] [4343] [4344] [4345] [4346] [4347] [4348] [4349] [4350] [4351] [4352] [4353] [4354] [4355] [4356] [4357] [4358] [4359] [4360] [4361] [4362] [4363] [4364] [4365] [4366] [4367] [4368] [4369] [4370] [4371] [4372] [4373] [4374] [4375] [4376] [4377] [4378] [4379] [4380] [4381] [4382] [4383] [4384] [4385] [4386] [4387] [4388] [4389] [4390] [4391] [4392] [4393] [4394] [4395] [4396] [4397] [4398] [4399] [4400] [4401] [4402] [4403] [4404] [4405] [4406] [4407] [4408] [4409] [4410] [4411] [4412] [4413] [4414] [4415] [4416] [4417] [4418] [4419] [4420] [4421] [4422] [4423] [4424] [4425] [4426] [4427] [4428] [4429] [4430] [4431] [4432] [4433] [4434] [4435] [4436] [4437] [4438] [4439] [4440] [4441] [4442] [4443] [4444] [4445] [4446] [4447] [4448] [4449] [4450] [4451] [4452] [4453] [4454] [4455] [4456] [4457] [4458] [4459] [4460] [4461] [4462] [4463] [4464] [4465] [4466] [4467] [4468] [4469] [4470] [4471] [4472] [4473] [4474] [4475] [4476] [4477] [4478] [4479] [4480] [4481] [4482] [4483] [4484] [4485] [4486] [4487] [4488] [4489] [4490] [4491] [4492] [4493] [4494] [4495] [4496] [4497] [4498] [4499] [4500] [4501] [4502] [4503] [4504] [4505] [4506] [4507] [4508] [4509] [4510] [4511] [4512] [4513] [4514] [4515] [4516] [4517] [4518] [4519] [4520] [4521] [4522] [4523] [4524] [4525] [4526] [4527] [4528] [4529] [4530] [4531] [4532] [4533] [4534] [4535] [4536] [4537] [4538] [4539] [4540] [4541] [4542] [4543] [4544] [4545] [4546] [4547] [4548] [4549] [4550] [4551] [4552] [4553] [4554] [4555] [4556] [4557] [4558] [4559] [4560] [4561] [4562] [4563] [4564] [4565] [4566] [4567] [4568] [4569] [4570] [4571] [4572] [4573] [4574] [4575] [4576] [4577] [4578] [4579] [4580] [4581] [4582] [4583] [4584] [4585] [4586] [4587] [4588] [4589] [4590] [4591] [4592] [4593] [4594] [4595] [4596] [4597] [4598] [4599] [4600] [4601] [4602] [4603] [4604] [4605] [4606] [4607] [4608] [4609] [4610] [4611] [4612] [4613] [4614] [4615] [4616] [4617] [4618] [4619] [4620] [4621] [4622] [4623] [4624] [4625] [4626] [4627] [4628] [4629] [4630] [4631] [4632] [4633] [4634] [4635] [4636] [4637] [4638] [4639] [4640] [4641] [4642] [4643] [4644] [4645] [4646] [4647] [4648] [4649] [4650] [4651] [4652] [4653] [4654] [4655] [4656] [4657] [4658] [4659] [4660] [4661] [4662] [4663] [4664] [4665] [4666] [4667] [4668] [4669] [4670] [4671] [4672] [4673] [4674] [4675] [4676] [4677] [4678] [4679] [4680] [4681] [4682] [4683] [4684] [4685] [4686] [4687] [4688] [4689] [4690] [4691] [4692] [4693] [4694] [4695] [4696] [4697] [4698] [4699] [4700] [4701] [4702] [4703] [4704] [4705] [4706] [4707] [4708] [4709] [4710] [4711] [4712] [4713] [4714] [4715] [4716] [4717] [4718] [4719] [4720] [4721] [4722] [4723] [4724] [4725] [4726] [4727] [4728] [4729] [4730] [4731] [4732] [4733] [4734] [4735] [4736] [4737] [4738] [4739] [4740] [4741] [4742] [4743] [4744] [4745] [4746] [4747] [4748] [4749] [4750] [4751] [4752] [4753] [4754] [4755] [4756] [4757] [4758] [4759] [4760] [4761] [4762] [4763] [4764] [4765] [4766] [4767] [4768] [4769] [4770] [4771] [4772] [4773] [4774] [4775] [4776] [4777] [4778] [4779] [4780] [4781] [4782] [4783] [4784] [4785] [4786] [4787] [4788] [4789] [4790] [4791] [4792] [4793] [4794] [4795] [4796] [4797] [4798] [4799] [4800] [4801] [4802] [4803] [4804] [4805] [4806] [4807] [4808] [4809] [4810] [4811] [4812] [4813] [4814] [4815] [4816] [4817] [4818] [4819] [4820] [4821] [4822] [4823] [4824] [4825] [4826] [4827] [4828] [4829] [4830] [4831] [4832] [4833] [4834] [4835] [4836] [4837] [4838] [4839] [4840] [4841] [4842] [4843] [4844] [4845] [4846] [4847] [4848] [4849] [4850] [4851] [4852] [4853] [4854] [4855] [4856] [4857] [4858] [4859] [4860] [4861] [4862] [4863] [4864] [4865] [4866] [4867] [4868] [4869] [4870] [4871] [4872] [4873] [4874] [4875] [4876] [4877] [4878] [4879] [4880] [4881] [4882] [4883] [4884] [4885] [4886] [4887] [4888] [4889] [4890] [4891] [4892] [4893] [4894] [4895] [4896] [4897] [4898] [4899] [4900] [4901] [4902] [4903] [4904] [4905] [4906] [4907] [4908] [4909] [4910] [4911] [4912] [4913] [4914] [4915] [4916] [4917] [4918] [4919] [4920] [4921] [4922] [4923] [4924] [4925] [4926] [4927] [4928] [4929] [4930] [4931] [4932] [4933] [4934] [4935] [4936] [4937] [4938] [4939] [4940] [4941] [4942] [4943] [4944] [4945] [4946] [4947] [4948] [4949] [4950] [4951] [4952] [4953] [4954] [4955] [4956] [4957] [4958] [4959] [4960] [4961] [4962] [4963] [4964] [4965] [4966] [4967] [4968] [4969] [4970] [4971] [4972] [4973] [4974] [4975] [4976] [4977] [4978] [4979] [4980] [4981] [4982] [4983] [4984] [4985] [4986] [4987] [4988] [4989] [4990] [4991] [4992] [4993] [4994] [4995] [4996] [4997] [4998] [4999] [5000] [5001] [5002] [5003] [5004] [5005] [5006] [5007] [5008] [5009] [5010] [5011] [5012] [5013] [5014] [5015] [5016] [5017] [5018] [5019] [5020] [5021] [5022] [5023] [5024] [5025] [5026] [5027] [5028] [5029] [5030] [5031] [5032] [5033] [5034] [5035] [5036] [5037] [5038] [5039] [5040] [5041] [5042] [5043] [5044] [5045] [5046] [5047] [5048] [5049] [5050] [5051] [5052] [5053] [5054] [5055] [5056] [5057] [5058] [5059] [5060] [5061] [5062] [5063] [5064] [5065] [5066] [5067] [5068] [5069] [5070] [5071] [5072] [5073] [5074] [5075] [5076] [5077] [5078] [5079] [5080] [5081] [5082] [5083] [5084] [5085] [5086] [5087] [5088] [5089] [5090] [5091] [5092] [5093] [5094] [5095] [5096] [5097] [5098] [5099] [5100] [5101] [5102] [5103] [5104] [5105] [5106] [5107] [5108] [5109] [5110] [5111] [5112] [5113] [5114] [5115] [5116] [5117] [5118] [5119] [5120] [5121] [5122] [5123] [5124] [5125] [5126] [5127] [5128] [5129] [5130] [5131] [5132] [5133] [5134] [5135] [5136] [5137] [5138] [5139] [5140] [5141] [5142] [5143] [5144] [5145] [5146] [5147] [5148] [5149] [5150] [5151] [5152] [5153] [5154] [5155] [5156] [5157] [5158] [5159] [5160] [5161] [5162] [5163] [5164] [5165] [5166] [5167] [5168] [5169] [5170] [5171] [5172] [5173] [5174] [5175] [5176] [5177] [5178] [5179] [5180] [5181] [5182] [5183] [5184] [5185] [5186] [5187] [5188] [5189] [5190] [5191] [5192] [5193] [5194] [5195] [5196] [5197] [5198] [5199] [5200] [5201] [5202] [5203] [5204] [5205] [5206] [5207] [5208] [5209] [5210] [5211] [5212] [5213] [5214] [5215] [5216] [5217] [5218] [5219] [5220] [5221] [5222] [5223] [5224] [5225] [5226] [5227] [5228] [5229] [5230] [5231] [5232] [5233] [5234] [5235] [5236] [5237] [5238] [5239] [5240] [5241] [5242] [5243] [5244] [5245] [5246] [5247] [5248] [5249] [5250] [5251] [5252] [5253] [5254] [5255] [5256] [5257] [5258] [5259] [5260] [5261] [5262] [5263] [5264] [5265] [5266] [5267] [5268] [5269] [5270] [5271] [5272] [5273] [5274] [5275] [5276] [5277] [5278] [5279] [5280] [5281] [5282] [5283] [5284] [5285] [5286] [5287] [5288] [5289] [5290] [5291] [5292] [5293] [5294] [5295] [5296] [5297] [5298] [5299] [5300] [5301] [5302] [5303] [5304] [5305] [5306] [5307] [5308] [5309] [5310] [5311] [5312] [5313] [5314] [5315] [5316] [5317] [5318] [5319] [5320] [5321] [5322] [5323] [5324] [5325] [5326] [5327] [5328] [5329] [5330] [5331] [5332] [5333] [5334] [5335] [5336] [5337] [5338] [5339] [5340] [5341] [5342] [5343] [5344] [5345] [5346] [5347] [5348] [5349] [5350] [5351] [5352] [5353] [5354] [5355] [5356] [5357] [5358] [5359] [5360] [5361] [5362] [5363] [5364] [5365] [5366] [5367] [5368] [5369] [5370] [5371] [5372] [5373] [5374] [5375] [5376] [5377] [5378] [5379] [5380] [5381] [5382] [5383] [5384] [5385] [5386] [5387] [5388] [5389] [5390] [5391] [5392] [5393] [5394] [5395] [5396] [5397] [5398] [5399] [5400] [5401] [5402] [5403] [5404] [5405] [5406] [5407] [5408] [5409] [5410] [5411] [5412] [5413] [5414] [5415] [5416] [5417] [5418] [5419] [5420] [5421] [5422] [5423] [5424] [5425] [5426] [5427] [5428] [5429] [5430] [5431] [5432] [5433] [5434] [5435] [5436] [5437] [5438] [5439] [5440] [5441] [5442] [5443] [5444] [5445] [5446] [5447] [5448] [5449] [5450] [5451] [5452] [5453] [5454] [5455] [5456] [5457] [5458] [5459] [5460] [5461] [5462] [5463] [5464] [5465] [5466] [5467] [5468] [5469] [5470] [5471] [5472] [5473] [5474] [5475] [5476] [5477] [5478] [5479] [5480] [5481] [5482] [5483] [5484] [5485] [5486] [5487] [5488] [5489] [5490] [5491] [5492] [5493] [5494] [5495] [5496] [5497] [5498] [5499] [5500] [5501] [5502] [5503] [5504] [5505] [5506] [5507] [5508] [5509] [5510] [5511] [5512] [5513] [5514] [5515] [5516] [5517] [5518] [5519] [5520] [5521] [5522] [5523] [5524] [5525] [5526] [5527] [5528] [5529] [5530] [5531] [5532] [5533] [5534] [5535] [5536] [5537] [5538] [5539] [5540] [5541] [5542] [5543] [5544] [5545] [5546] [5547] [5548] [5549] [5550] [5551] [5552] [5553] [5554] [5555] [5556] [5557] [5558] [5559] [5560] [5561] [5562] [5563] [5564] [5565] [5566] [5567] [5568] [5569] [5570] [5571] [5572] [5573] [5574] [5575] [5576] [5577] [5578] [5579] [5580] [5581] [5582] [5583] [5584] [5585] [5586] [5587] [5588] [5589] [5590] [5591] [5592] [5593] [5594] [5595] [5596] [5597] [5598] [5599] [5600] [5601] [5602] [5603] [5604] [5605] [5606] [5607] [5608] [5609] [5610] [5611] [5612] [5613] [5614] [5615] [5616] [5617] [5618] [5619] [5620] [5621] [5622] [5623] [5624] [5625] [5626] [5627] [5628] [5629] [5630] [5631] [5632] [5633] [5634] [5635] [5636] [5637] [5638] [5639] [5640] [5641] [5642] [5643] [5644] [5645] [5646] [5647] [5648] [5649] [5650] [5651] [5652] [5653] [5654] [5655] [5656] [5657] [5658] [5659] [5660] [5661] [5662] [5663] [5664] [5665] [5666] [5667] [5668] [5669] [5670] [5671] [5672] [5673] [5674] [5675] [5676] [5677] [5678] [5679] [5680] [5681] [5682] [5683] [5684] [5685] [5686] [5687] [5688] [5689] [5690] [5691] [5692] [5693] [5694] [5695] [5696] [5697] [5698] [5699] [5700] [5701] [5702] [5703] [5704] [5705] [5706] [5707] [5708] [5709] [5710] [5711] [5712] [5713] [5714] [5715] [5716] [5717] [5718] [5719] [5720] [5721] [5722] [5723] [5724] [5725] [5726] [5727] [5728] [5729] [5730] [5731] [5732] [5733] [5734] [5735] [5736] [5737] [5738] [5739] [5740] [5741] [5742] [5743] [5744] [5745] [5746] [5747] [5748] [5749] [5750] [5751] [5752] [5753] [5754] [5755] [5756] [5757] [5758] [5759] [5760] [5761] [5762] [5763] [5764] [5765] [5766] [5767] [5768] [5769] [5770] [5771] [5772] [5773] [5774] [5775] [5776] [5777] [5778] [5779] [5780] [5781] [5782] [5783] [5784] [5785] [5786] [5787] [5788] [5789] [5790] [5791] [5792] [5793] [5794] [5795] [5796] [5797] [5798] [5799] [5800] [5801] [5802] [5803] [5804] [5805] [5806] [5807] [5808] [5809] [5810] [5811] [5812] [5813] [5814] [5815] [5816] [5817] [5818] [5819] [5820] [5821] [5822] [5823] [5824] [5825] [5826] [5827] [5828] [5829] [5830] [5831] [5832] [5833] [5834] [5835] [5836] [5837] [5838] [5839] [5840] [5841] [5842] [5843] [5844] [5845] [5846] [5847] [5848] [5849] [5850] [5851] [5852] [5853] [5854] [5855] [5856] [5857] [5858] [5859] [5860] [5861] [5862] [5863] [5864] [5865] [5866] [5867] [5868] [5869] [5870] [5871] [5872] [5873] [5874] [5875] [5876] [5877] [5878] [5879] [5880] [5881] [5882] [5883] [5884] [5885] [5886] [5887] [5888] [5889] [5890] [5891] [5892] [5893] [5894] [5895] [5896] [5897] [5898] [5899] [5900] [5901] [5902] [5903] [5904] [5905] [5906] [5907] [5908] [5909] [5910] [5911] [5912] [5913] [5914] [5915] [5916] [5917] [5918] [5919] [5920] [5921] [5922] [5923] [5924] [5925] [5926] [5927] [5928] [5929] [5930] [5931] [5932] [5933] [5934] [5935] [5936] [5937] [5938] [5939] [5940] [5941] [5942] [5943] [5944] [5945] [5946] [5947] [5948] [5949] [5950] [5951] [5952] [5953] [5954] [5955] [5956] [5957] [5958] [5959] [5960] [5961] [5962] [5963] [5964] [5965] [5966] [5967] [5968] [5969] [5970] [5971] [5972] [5973] [5974] [5975] [5976] [5977] [5978] [5979] [5980] [5981] [5982] [5983] [5984] [5985] [5986] [5987] [5988] [5989] [5990] [5991] [5992] [5993] [5994] [5995] [5996] [5997] [5998] [5999] [6000] [6001] [6002] [6003] [6004] [6005] [6006] [6007] [6008] [6009] [6010] [6011] [6012] [6013] [6014] [6015] [6016] [6017] [6018] [6019] [6020] [6021] [6022] [6023] [6024] [6025] [6026] [6027] [6028] [6029] [6030] [6031] [6032] [6033] [6034] [6035] [6036] [6037] [6038] [6039] [6040] [6041] [6042] [6043] [6044] [6045] [6046] [6047] [6048] [6049] [6050] [6051] [6052] [6053] [6054] [6055] [6056] [6057] [6058] [6059] [6060] [6061] [6062] [6063] [6064] [6065] [6066] [6067] [6068] [6069] [6070] [6071] [6072] [6073] [6074] [6075] [6076] [6077] [6078] [6079] [6080] [6081] [6082] [6083] [6084] [6085] [6086] [6087] [6088] [6089] [6090] [6091] [6092] [6093] [6094] [6095] [6096] [6097] [6098] [6099] [6100] [6101] [6102] [6103] [6104] [6105] [6106] [6107] [6108] [6109] [6110] [6111] [6112] [6113] [6114] [6115] [6116] [6117] [6118] [6119] [6120] [6121] [6122] [6123] [6124] [6125] [6126] [6127] [6128] [6129] [6130] [6131] [6132] [6133] [6134] [6135] [6136] [6137] [6138] [6139] [6140] [6141] [6142] [6143] [6144] [6145] [6146] [6147] [6148] [6149] [6150] [6151] [6152] [6153] [6154] [6155] [6156] [6157] [6158] [6159] [6160] [6161] [6162] [6163] [6164] [6165] [6166] [6167] [6168] [6169] [6170] [6171] [6172] [6173] [6174] [6175] [6176] [6177] [6178] [6179] [6180] [6181] [6182] [6183] [6184] [6185] [6186] [6187] [6188] [6189] [6190] [6191] [6192] [6193] [6194] [6195] [6196] [6197] [6198] [6199] [6200] [6201] [6202] [6203] [6204] [6205] [6206] [6207] [6208] [6209] [6210] [6211] [6212] [6213] [6214] [6215] [6216] [6217] [6218] [6219] [6220] [6221] [6222] [6223] [6224] [6225] [6226] [6227] [6228] [6229] [6230] [6231] [6232] [6233] [6234] [6235] [6236] [6237] [6238] [6239] [6240] [6241] [6242] [6243] [6244] [6245] [6246] [6247] [6248] [6249] [6250] [6251] [6252] [6253] [6254] [6255] [6256] [6257] [6258] [6259] [6260] [6261] [6262] [6263] [6264] [6265] [6266] [6267] [6268] [6269] [6270] [6271] [6272] [6273] [6274] [6275] [6276] [6277] [6278] [6279] [6280] [6281] [6282] [6283] [6284] [6285] [6286] [6287] [6288] [6289] [6290] [6291] [6292] [6293] [6294] [6295] [6296] [6297] [6298] [6299] [6300] [6301] [6302] [6303] [6304] [6305] [6306] [6307] [6308] [6309] [6310] [6311] [6312] [6313] [6314] [6315] [6316] [6317] [6318] [6319] [6320] [6321] [6322] [6323] [6324] [6325] [6326] [6327] [6328] [6329] [6330] [6331] [6332] [6333] [6334] [6335] [6336] [6337] [6338] [6339] [6340] [6341] [6342] [6343] [6344] [6345] [6346] [6347] [6348] [6349] [6350] [6351] [6352] [6353] [6354] [6355] [6356] [6357] [6358] [6359] [6360] [6361] [6362] [6363] [6364] [6365] [6366] [6367] [6368] [6369] [6370] [6371] [6372] [6373] [6374] [6375] [6376] [6377] [6378] [6379] [6380] [6381] [6382] [6383] [6384] [6385] [6386] [6387] [6388] [6389] [6390] [6391] [6392] [6393] [6394] [6395] [6396] [6397] [6398] [6399] [6400] [6401] [6402] [6403] [6404] [6405] [6406] [6407] [6408] [6409] [6410] [6411] [6412] [6413] [6414] [6415] [6416] [6417] [6418] [6419] [6420] [6421] [6422] [6423] [6424] [6425] [6426] [6427] [6428] [6429] [6430] [6431] [6432] [6433] [6434] [6435] [6436] [6437] [6438] [6439] [6440] [6441] [6442] [6443] [6444] [6445] [6446] [6447] [6448] [6449] [6450] [6451] [6452] [6453] [6454] [6455] [6456] [6457] [6458] [6459] [6460] [6461] [6462] [6463] [6464] [6465] [6466] [6467] [6468] [6469] [6470] [6471] [6472] [6473] [6474] [6475] [6476] [6477] [6478] [6479] [6480] [6481] [6482] [6483] [6484] [6485] [6486] [6487] [6488] [6489] [6490] [6491] [6492] [6493] [6494] [6495] [6496] [6497] [6498] [6499] [6500] [6501] [6502] [6503] [6504] [6505] [6506] [6507] [6508] [6509] [6510] [6511] [6512] [6513] [6514] [6515] [6516] [6517] [6518] [6519] [6520] [6521] [6522] [6523] [6524] [6525] [6526] [6527] [6528] [6529] [6530] [6531] [6532] [6533] [6534] [6535] [6536] [6537] [6538] [6539] [6540] [6541] [6542] [6543] [6544] [6545] [6546] [6547] [6548] [6549] [6550] [6551] [6552] [6553] [6554] [6555] [6556] [6557] [6558] [6559] [6560] [6561] [6562] [6563] [6564] [6565] [6566] [6567] [6568] [6569] [6570] [6571] [6572] [6573] [6574] [6575] [6576] [6577] [6578] [6579] [6580] [6581] [6582] [6583] [6584] [6585] [6586] [6587] [6588] [6589] [6590] [6591] [6592] [6593] [6594] [6595] [6596] [6597] [6598] [6599] [6600] [6601] [6602] [6603] [6604] [6605] [6606] [6607] [6608] [6609] [6610] [6611] [6612] [6613] [6614] [6615] [6616] [6617] [6618] [6619] [6620] [6621] [6622] [6623] [6624] [6625] [6626] [6627] [6628] [6629] [6630] [6631] [6632] [6633] [6634] [6635] [6636] [6637] [6638] [6639] [6640] [6641] [6642] [6643] [6644] [6645] [6646] [6647] [6648] [6649] [6650] [6651] [6652] [6653] [6654] [6655] [6656] [6657] [6658] [6659] [6660] [6661] [6662] [6663] [6664] [6665] [6666] [6667] [6668] [6669] [6670] [6671] [6672] [6673] [6674] [6675] [6676] [6677] [6678] [6679] [6680] [6681] [6682] [6683] [6684] [6685] [6686] [6687] [6688] [6689] [6690] [6691] [6692] [6693] [6694] [6695] [6696] [6697] [6698] [6699] [6700] [6701] [6702] [6703] [6704] [6705] [6706] [6707] [6708] [6709] [6710] [6711] [6712] [6713] [6714] [6715] [6716] [6717] [6718] [6719] [6720] [6721] [6722] [6723] [6724] [6725] [6726] [6727] [6728] [6729] [6730] [6731] [6732] [6733] [6734] [6735] [6736] [6737] [6738] [6739] [6740] [6741] [6742] [6743] [6744] [6745] [6746] [6747] [6748] [6749] [6750] [6751] [6752] [6753] [6754] [6755] [6756] [6757] [6758] [6759] [6760] [6761] [6762] [6763] [6764] [6765] [6766] [6767] [6768] [6769] [6770] [6771] [6772] [6773] [6774] [6775] [6776] [6777] [6778] [6779] [6780] [6781] [6782] [6783] [6784] [6785] [6786] [6787] [6788] [6789] [6790] [6791] [6792] [6793] [6794] [6795] [6796] [6797] [6798] [6799] [6800] [6801] [6802] [6803] [6804] [6805] [6806] [6807] [6808] [6809] [6810] [6811] [6812] [6813] [6814] [6815] [6816] [6817] [6818] [6819] [6820] [6821] [6822] [6823] [6824] [6825] [6826] [6827] [6828] [6829] [6830] [6831] [6832] [6833] [6834] [6835] [6836] [6837] [6838] [6839] [6840] [6841] [6842] [6843] [6844] [6845] [6846] [6847] [6848] [6849] [6850] [6851] [6852] [6853] [6854] [6855] [6856] [6857] [6858] [6859] [6860] [6861] [6862] [6863] [6864] [6865] [6866] [6867] [6868] [6869] [6870] [6871] [6872] [6873] [6874] [6875] [6876] [6877] [6878] [6879] [6880] [6881] [6882] [6883] [6884] [6885] [6886] [6887] [6888] [6889] [6890] [6891] [6892] [6893] [6894] [6895] [6896] [6897] [6898] [6899] [6900] [6901] [6902] [6903] [6904] [6905] [6906] [6907] [6908] [6909] [6910] [6911] [6912] [6913] [6914] [6915] [6916] [6917] [6918] [6919] [6920] [6921] [6922] [6923] [6924] [6925] [6926] [6927] [6928] [6929] [6930] [6931] [6932] [6933] [6934] [6935] [6936] [6937] [6938] [6939] [6940] [6941] [6942] [6943] [6944] [6945] [6946]
/*****************************************************************************/ /* Config.c This module performs three functions. 1. It reads the HTTPD configuration file, converting the directives into internal representations. 2. Provides functions, accessed by other modules, returning the original directive information as appropriate. 3. Provides HTML form-based configuration and reports. Configuration can only be performed at server startup. To reset the configuration the server must be restarted. WASD HTTPd Configuration is a relevant subset of the CERN configuration directives (sort-of, well it started that way anyhow!) Although there are some differences (beware!) the CERN documentation can be consulted for a general discussion of the purpose and functioning some of these directives. The file formats may be IN ONE OF TWO possible formats (not mixed). The older format contains one directive at the start of a line, followed by a mandatory parameter. The newer format (in part to support forms-based configuration) has the directive contained within square brackets (e.g. "[accept]") followed on the same line, or by one or more lines containing comments, containing parameter information, or empty. The directive applies to all lines following up until another directive (square bracket in column one) is encountered. DIRECTIVES ---------- o Accept <host/domain> o ActivityDays <integer> o AddType <.type> <content> [rfm:] [ftp:] [</script>] [<descript>] o AddMimeTypesFile <filename> o AddIcon <URL> <alternative-text> <content-type-template> o AddDefaultIcon <URL> <alternative-text> o AddDirIcon <URL> <alternative-text> o AddBlankIcon <URL> <alternative-text> o AddUnknownIcon <URL> <alternative-text> o AddParentIcon <URL> <alternative-text> o AuthBasic DISABLED | ENABLED o AuthCacheEntriesMax <integer> o AuthCacheEntrySize <integer> o AuthCacheMinutes <integer> o AuthDigest DISABLED | ENABLED o AuthDigestGetLife <integer> o AuthDigestPutLife <integer> o AuthFailureLimit <integer> o AuthFailurePeriod <integer> o AuthFailureTimeout <integer> o AuthRevalidateUserMinutes <integer> o AuthSYSUAFlogonType <keyword> o AuthSYSUAFacceptExpPwd DISABLED | ENABLED o AuthSYSUAFpwdExpUrl <string> o AuthTokenEntriesMax <integer> o BufferSizeDclCgiHeader <integer> o BufferSizeDclCgiPlusIn <integer> o BufferSizeDclCommand <integer> o BufferSizeDclOutput <integer> o BufferQuotaDclOutput <integer> o BufferSizeNetFile <integer> o BufferSizeNetMTU <integer> o BufferSizeNetRead <integer> o BufferSizeNetWrite <integer> o Cache DISABLED | ENABLED o CacheEntriesMax <integer> o CacheFileKBytesMax <integer> o CacheFrequentHits <integer> o CacheFrequentPeriod <hh:mm:ss> o CacheGuardPeriod <hh:mm:ss> o CacheTotalKBytesMax <integer> o CacheValidatePeriod <hh:mm:ss> o CgiStrictOutput DISABLED | ENABLED o CharsetDefault <string> o CharsetConvert <string> o ConnectMax <integer> o DclBitBucketTimeout <hh:mm:ss> o DclCgiPlusLifeTime <hh:mm:ss> o DclCleanupScratchMinutesMax <integer> o DclCleanupScratchMinutesOld <integer> o DclDetachProcess DISABLED | ENABLED o DclDetachProcessPriority <string> o DclGatewayBg DISABLED | ENABLED o DclHardLimit <integer> o DclScriptProctor <string> o DclScriptRunTime <string> o DclSoftLimit <integer> o DclSpawnAuthPriv DISABLED | ENABLED o DclZombieLifeTime <hh:mm:ss> o DECnetReuseLifeTime <hh:mm:ss> o DECnetConnectListMax <integer> o DirAccess DISABLED | ENABLED | SELECTIVE o DirBodyTag <string> o DirDescription <integer> o DirLayout <string> o DirMetaInfo DISABLED | ENABLED o DirOwner DISABLED | ENABLED o DirPreExpired DISABLED | ENABLED o DirReadMe DISABLED | TOP | BOTTOM o DirReadMeFile <file.suffix> o DirNoImpliedWildcard DISABLED | ENABLED o DirNoPrivIgnore DISABLED | ENABLED o DirWildcard DISABLED | ENABLED o DNSLookupClient DISABLED | ENABLED o DNSLookupLifeTime <hh:mm:ss> o DNSLookupRetry <integer> o EntityTag DISABLED | ENABLED o ErrorRecommend DISABLED | ENABLED o ErrorReportPath <path-to-report> o GzipAccept <integer> o GzipFlushSeconds <integer>[,<integer>] o GzipResponse <integer>[,<integer>,<integer>] o Http2Protocol DISABLED | ENABLED o Http2FrameSizeMax <integer> o Http2HeaderListMax <integer> o Http2HeaderTableMax <integer> o Http2InitWindowSize <integer> o Http2PingSeconds <hh:mm:ss> o Http2StreamsMax <integer> o HttpTrace DISABLED | ENABLED o IncludeFile <filename> o InstanceMax <integer> | CPU o InstancePassive DISABLED | ENABLED o Logging DISABLED | ENABLED o LogExcludeHosts <string> o LogFile <string> o LogFileExtend <integer> o LogFormat <string> o LogNaming <string> o LogPeriod <string> o LogPerInstance DISABLED | ENABLED o LogPerService DISABLED | ENABLED o LogPerServiceHostOnly DISABLED | ENABLED o LogWriteFail503 DISABLED | ENABLED o MapUserNameCacheEntries <integer> o Monitor DISABLED | ENABLED o OpcomAdmin DISABLED | ENABLED o OpcomAuthorization DISABLED | ENABLED o OpcomControl DISABLED | ENABLED o OpcomProxyMaint obsolete from v12.0.0 o OpcomTarget <string> o PersonaCacheEntries <integer> o PipelineRequests DISABLED | ENABLED o Port <integer> o ProcessMax <integer> o ProxyCache obsolete as of v12.0.0 o ProxyCacheDeviceCheckMinutes obsolete as of v12.0.0 o ProxyCacheDeviceDirOrg obsolete as of v12.0.0 o ProxyCacheDeviceMaxPercent obsolete as of v12.0.0 o ProxyCacheDevicePurgePercent obsolete as of v12.0.0 o ProxyCacheFileKBytesMax obsolete as of v12.0.0 o ProxyCacheNegativeSeconds obsolete as of v12.0.0 o ProxyCacheNoReloadSeconds obsolete as of v12.0.0 o ProxyCachePurgeList obsolete as of v12.0.0 o ProxyCacheReloadList obsolete as of v12.0.0 o ProxyCacheRoutineHourOfDay obsolete as of v12.0.0 o ProxyConnectPersistMax <integer> o ProxyConnectPersistSeconds <integer> o ProxyConnectTimeoutSeconds <integer> o ProxyForwarded DISABLED | BY | FOR | ADDRESS o ProxyHostLookupRetryCount <integer> o ProxyReportCacheLog DISABLED | ENABLED o ProxyReportLog DISABLED | ENABLED o ProxyServing DISABLED | ENABLED o ProxyUnknownRequestFields DISABLED | ENABLED o ProxyVerifyRecordMax <integer> o ProxyXForwardedFor DISABLED | ENABLED | UNKNOWN | ADDRESS o PutBinaryRFM FIX512|STM|STMCR|STMLF|UDF (default is UDF) o PutMaxKbytes <integer> o PutVersionLimit <integer> o RegEx DISABLED | ENABLED or <keyword> AWK, ED, EGREP, GREP, POSIX_AWK, POSIX_BASIC, POSIX_EGREP, POSIX_EXTENDED, POSIX_MINIMAL_BASIC, POSIX_MINIMAL_EXTENDED, SED, WASD o Reject <host/domain> o ReportBasicOnly DISABLED | ENABLED o ReportMetaInfo DISABLED | ENABLED o RequestHistory <integer> o Scripting DISABLED | ENABLED o SearchScript <path-to-search-script> o SearchScriptExclude <string> o SecureSocket DISABLED | ENABLED o ServerAdmin <string> o ServerAdminBodyTag <string> o ServerReportBodyTag <string> o ServerSignature DISABLED | ENABLED o Service <string> o ServiceListenBacklog <integer> o ServiceNotFoundURL <string> o SocketSizeRcvBuf <integer> o SocketSizeSndBuf <integer> o SSI | Shtml DISABLED | ENABLED o SSIAccesses | ShtmlAccesses DISABLED | ENABLED o SSIExec | ShtmlExec DISABLED | ENABLED o SSISizeMax <integer> o SSLcert <string> o SSLcipherList <string> o SSLinstanceCacheMax <integer> o SSLinstanceCacheSize <integer> o SSLkey <string> o SSLoptions <string> o SSLsessionCacheMax <integer> o SSLsessionLifetime <hh:mm:ss> o SSLstrictTransSec <integer> [<string>] o SSLverifyPeer DISABLED | ENABLED o SSLverifyPeerCAFile <string> o SSLverifyPeerDataMax <integer> o SSLverifyPeerDepth <integer> o SSLversion <string> o StreamLf <integer> o TimeoutHttp2Idle <hh:mm:ss> o TimeoutInput <hh:mm:ss> o TimeoutNoProgress <hh:mm:ss> o TimeoutOutput <hh:mm:ss> o TimeoutPersistent <hh:mm:ss> o WebDAV DISABLED | ENABLED o WebDAVlocking DISABLED | ENABLED o WebDAVlockCollectionDepth <integer> o WebDAVlockTimeoutDefault <hh:mm:ss> o WebDAVlockTimeoutMax <hh:mm:ss> o WebDAVquota DISABLED | ENABLED o WebDAVmetaDir <string> o Welcome <file.suffix> o WwwImplied DISABLED | ENABLED VERSION HISTORY --------------- 14-MAR-2021 MGD proxy caching obsolete 27-DEC-2020 MGD ConfigControlProctorLoad() 17-MAR-2018 MGD [BufferQuotaDclOutput] BUFQUO value for SYS$OUTPUT mailbox 05-JUN-2016 MGD [SSLsessionLifetime] lifetime of session ticket or ID [SSLverifyPeerDataMax] maximum application data buffered 09-APR-2016 MGD [Track..] obsolete with WASD v11.0 05-AUG-2015 MGD [Http2...] HTTP/2 configuration [TimeoutHttp2Idle] <seconds> 22-FEB-2015 MGD [SSLstrictTransSec] <string> 17-JAN-2015 MGD ConfigLoadCallback() StringBuffer[4096] 20-DEC-2014 MGD bugfix; ConfigReportSecureSocket() FaoVector[32] 18-OCT-2014 MGD [SecureSocket] and [SSL...] (overridden by /SSL=) 21-JUN-2014 MGD [WebDAVmetaDir] (sub)directory 17-AUG-2013 MGD [PutBinaryRFM] add STM and STMCR [AddType] add RFM: keyword after content type 25-MAY-2013 MGD [AuthRevalidateLoginCookie] deprecated 09-SEP-2012 MGD [AuthTokenEntriesMax] 02-JAN-2011 MGD [RegEx] enabled/disabled/<keyword> 30-OCT-2010 MGD [WwwImplied] "Host:" www.host.name and host.name are treated as equivalent (implemented by ServiceFindVirtual()) 13-JUN-2010 MGD [DclScriptProctor] and ConfigSetScriptProctor() manages proactive scripting ConfigSetScriptRunTime() minor rework 10-JUN-2010 MGD bugfix; allow METACON_TOKEN_INCLUDE for [IncludeFile] 17-DEC-2009 MGD bugfix; ConfigAcceptClientHostName() reject 11-OCT-2009 MGD [AuthSYSUAFlogonType] sets logon source (NETWORK, etc.) [BufferSizeNetFile] tailors file transfer size [BufferSizeNetMTU] adjusts buffer to even number of MTUs 21-JUN-2009 MGD [PutBinaryRFM] 09-JAN-2009 MGD [HttpTrace] 24-NOV-2007 MGD [AuthSYSUAFuseACME] obsolete 04-OCT-2007 MGD [SocketSizeRcvBuf] and [SocketSizeSndBuf] 17-FEB-2007 MGD bugfix; ConfigLoadCallback() post-process sanity checking for 'NetConcurrentMax' and 'NetConcurrentProcessMax' 29-DEC-2006 MGD WebDAV support starts with [WebDAV] 05-OCT-2006 MGD ConfigReviseNow() ensure icon alt text contains no spaces 12-JUL-2006 MGD [InstancePassive] 20-JUL-2005 MGD [ProxyConnectTimeoutSeconds] 04-FEB-2005 MGD [GzipFlushSeconds] 01-NOV-2004 MGD [ConnectMax] (supercedes [Busy]) max concurrent connections [ProcessMax] max requests concurrently being processed 16-OCT-2004 MGD [GzipAccept] windows-bits, [GzipResponse] comp-level[,mem-level,window-bits], [LogWriteFail503] suspends server processing on access log write failure (returns 503 service unavailable) 20-SEP-2004 MGD [EntityTag] enables the generation of file "ETag:", [PipelineRequests] enables pipeline processing [ProxyCacheNegativeSeconds] for non-success responses [ProxyConnectPersistMax] and [ProxyConnectPersistSeconds] for controlling proxy->server connection persistence [ServiceProxyTunnel] connect | firewall | raw [ServiceClientSSLcert] and others allow outgoing SSL config [TimeoutPersistent] supercedes [TimeoutKeepAlive] 22-MAR-2004 MGD [AuthSYSUAFuseACME] 22-NOV-2003 MGD [ProxyVerifyRecordMax] 15-AUG-2003 MGD where CDATA constraints make using entity impossible use a field name of hidden$lf and ^ substituted for it 07-JUL-2003 MGD [CacheGuardPeriod] 08-JUL-2003 MGD [CacheChunkKBytes] obsolete 15-MAY-2003 MGD [AuthFailurePeriod], [AuthFailureTimeout], [ProxyUnknownRequestFields] 02-APR-2003 MGD [ProxyXForwardedFor], [ProxyForwarded] supercedes [ProxyAddForwardedBy] (with backward compatibility) 08-MAR-2003 MGD ConfigAddIcon() just exit if empty string 12-OCT-2002 MGD refine metacon reporting 10-SEP-2002 MGD bugfix; ConfigIconFor() terminate on content-type 26-MAY-2002 MGD [LogPerInstance] 13-MAY-2002 MGD [AuthSysUafPwdExpUrl], [AuthSysUafAllowdExpPwd] 27-APR-2002 MGD use sys$setprv() 11-MAR-2002 MGD content-type include FTP transfer mode (WASD and MIME.TYPES) 10-NOV-2001 MGD [CharsetConvert] 29-SEP-2001 MGD instance support, [AuthCacheEntriesMax], [AuthCacheEntrySize] 15-SEP-2001 MGD meta-config, [SsiSizeMax] and [ProxyCacheNoReloadSeconds] 04-AUG-2001 MGD support module WATCHing, [CacheHashTableEntries] obsolete 13-APR-2001 MGD [DclBitBucketTimeout] 20-MAR-2001 MGD [LogFileExtend] (DEQ blocks) see LOGGING.C same date, "hh:mm:ss" for providing a more versatile period 28-FEB-2001 MGD [AddMimeTypesFile], [AddDefaultIcon], [AddType] autoscript now indicated by leading '/', OdsLoadTextFile(), OdsParseTextFile(), [IncludeFile] 06-DEC-2000 MGD [DclCleanupScratchMinutes...] 01-NOV-2000 MGD [DclDetachProcessPriority] 02-OCT-2000 MGD [DclDetachProcess], [PersonaCacheEntries] 01-SEP-2000 MGD [AuthRequestPath] (pre-7.1 compatibility) 19-AUG-2000 MGD [DclGatewayBg] to enable raw socket, [DclFullRequest] removed (HTTPD_DCL_FULL_REQUEST environment variable can be defined for backward compatbility) 15-JUN-2000 MGD [ServiceListenBacklog] for TCP/IP v5.0 or greater 06-MAY-2000 MGD reorganise configuration data structures, allow continuation lines ('\') in comma lists, [AuthRevalidateLoginCookie], [Track...] 07-APR-2000 MGD [ServerAdmin], [ServerSignature], [CgiStrictOutput], [DirMetaInfo], [Scripting], [ReportBasicOnly] and [ReportMetaInfo] (which replaces [IncludedCommentedInfo] and [ErrorSourceInfo]). 04-MAR-2000 MGD use FaolToNet(), et.al. 16-FEB-2000 MGD [SearchScriptExclude] directive, [LogPerServiceHostOnly] directive, allow wildcards in content-type file suffix specifications 02-JAN-2000 MGD [Opcom...] directives, config file opened via ODS module 30-OCT-1999 MGD include IP address for services in ConfigReportNow(), 'Buffer...', 'MapUserNameCacheEntries', 'ServiceNotFoundURL', 'Timeout...' directives (with backward compatibility), increase buffer space for ConfigCommaList() 03-MAR-1999 MGD improve [AddType] and [AddIcon] directive checking 18-JAN-1999 MGD [Proxy...] configuration parameters bugfix; ignore empty lines (even with spaces in them!) 17-OCT-1998 MGD [ErrorReportPath] added, [Search] changed to [SearchScript], [StreamLfPaths] obsoleted in favour of SET mapping rule 29-SEP-1998 MGD [AddType] now allows "text/html; charset=ISO8859-5", [CharsetDefault] text and server character set 27-AUG-1998 MGD generic ConfigSetCommaList(), add [AuthRevalidateUserMinutes], [LogExcludeHosts], [DECnetReuseLifeTime], [DECnetConnectListMax], [StreamLfPaths] 08-AUG-1998 MGD add [DirNoImpliedWildcard] 17-JUN-1998 MGD add [LogNaming], [LogPerService] 28-FEB-1998 MGD improved icon handling efficiency 07-FEB-1998 MGD v5.0 hash table for content-type suffix and icon searches, default content type (for unknowns) configurable, HTTP protocol name in [service] (for SSL), [DirDescription] changed from boolean to integer 05-OCT-1997 MGD cache parameters, DCL script run-time parameter, additional logging parameters 09-AUG-1997 MGD v4.4 retired "ErrorInfo", "ErrorSysAdmin" (now in messages) and AuthVMS (now /SYSUAF qualifier); introduced "DirDescription", "DirNoPrivIgnore", "ErrorSourceInfo", bugfix; memory leak in file-based report and revise 01-AUG-1997 MGD v4.3 activity number of days, DCL supply full request, bugfix; annoying repeated instances of "unknown" content type 01-JUN-1997 MGD v4.2 required additional DCL/scripting parameters 01-FEB-1997 MGD HTTPd version 4; major changes for form-based config; added error message URLs 01-OCT-1996 MGD HTML configuration report 01-AUG-1996 MGD StreamLF conversion directive; AuthBasic and AuthDigest directives; 12-APR-1996 MGD file record/binary now determined by record format (has removed the need of the text/binary, etc., in "AddType") 01-DEC-1995 MGD HTTPd version 3 27-SEP-1995 MGD added auto-scripting funtionality 07-AUG-1995 MGD added support for VMS-style directory listing 16-JUN-1995 MGD file contents description in 'AddType' (also see DIR.C) 20-DEC-1994 MGD developed for multi-threaded HTTP daemon */ /*****************************************************************************/ #ifdef WASD_VMS_V7 #undef _VMS__V6__SOURCE #define _VMS__V6__SOURCE #undef __VMS_VER #define __VMS_VER 70000000 #undef __CRTL_VER #define __CRTL_VER 70000000 #endif /* standard C header files */ #include <ctype.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> /* VMS related header files */ #include <opcdef.h> #include <ssdef.h> #include <stsdef.h> /* application related header */ #include "wasd.h" #include "gzip.h" #define WASD_MODULE "CONFIG" /******************/ /* global storage */ /******************/ CONFIG_STRUCT Config; CONFIG_STRUCT *ConfigMetaPtr; struct OpcomStruct { int Number; char *Name; } ConfigOpcomTarget [] = { 0, "none", OPC$M_NM_CARDS, "CARDS", OPC$M_NM_CENTRL, "CENTRAL", OPC$M_NM_CLUSTER, "CLUSTER", OPC$M_NM_DEVICE, "DEVICE", OPC$M_NM_DISKS, "DISKS", OPC$M_NM_NTWORK, "NETWORK", OPC$M_NM_PRINT, "PRINT", OPC$M_NM_SECURITY, "SECURITY", OPC$M_NM_TAPES, "TAPES", OPC$M_NM_OPER1, "OPER1", OPC$M_NM_OPER2, "OPER2", OPC$M_NM_OPER3, "OPER3", OPC$M_NM_OPER4, "OPER4", OPC$M_NM_OPER5, "OPER5", OPC$M_NM_OPER6, "OPER6", OPC$M_NM_OPER7, "OPER7", OPC$M_NM_OPER8, "OPER8", OPC$M_NM_OPER9, "OPER9", OPC$M_NM_OPER10, "OPER10", OPC$M_NM_OPER11, "OPER11", OPC$M_NM_OPER12, "OPER12", -1, NULL }; int ConfigDnsLookupRetryCount; #define CONFIG_NOTE_NONE "<i>(none)</i>" char ConfigContentTypeBlank [] = "x-internal/blank", ConfigContentTypeDefaultIcon [] = "x-internal/default-icon", ConfigContentTypeDir [] = "x-internal/directory", ConfigContentTypeParent [] = "x-internal/parent", ConfigContentTypeSsi [] = "text/x-shtml", ConfigContentTypeUnknown [] = "x-internal/unknown", ConfigContentTypeUrl [] = "x-internal/url", ConfigNoteDefault [] = " <i>(default)</i>", ConfigNoteNone [] = " <i>(none)</i>", ConfigNoteSystem [] = " <i>(system)</i>", ConfigDefaultFileContentType [] = "application/octet-stream", ConfigStringOverflow [] = "*ERROR* string overflow"; char *ConfigBlankIconPtr, *ConfigDirIconPtr, *ConfigDefaultIconPtr, *ConfigParentIconPtr, *ConfigUnknownIconPtr; /********************/ /* external storage */ /********************/ extern BOOL DclProctorEnabled, HttpdServerStartup, NetInstancePassive, ProtocolHttpsAvailable; extern int AuthFailureLimit, AuthFailurePeriodSeconds, AuthFailureTimeoutSeconds, DclCgiHeaderSize, DclCgiPlusInSize, DclSysCommandSize, DclSysOutputSize, DclSysOutputQuota, NetConcurrentMax, NetConcurrentProcessMax, MapUrlUserNameCacheEntries, NetReadBufferSize, OpcomMessages, OpcomTarget, OutputBufferSize, OutputFileBufferSize, PersonaCacheEntries, ServiceLoadFromConfigFile, SsiSizeMax, TcpIpSocketRcvBufSize, TcpIpSocketSndBufSize; extern int ToLowerCase[], ToUpperCase[]; extern unsigned long SysPrvMask[]; extern char *CliAcceptHostsPtr, *CliRejectHostsPtr; extern char SesolaAvailableVersions[], SoftwareID[], TimeGmtString[]; extern HTTPD_PROCESS HttpdProcess; extern MSG_STRUCT Msgs; extern META_CONFIG *MetaGlobalConfigPtr; extern WATCH_STRUCT Watch; /*****************************************************************************/ /* */ int ConfigLoad (META_CONFIG **MetaConPtrPtr) { int status; /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigLoad()"); status = MetaConLoad (MetaConPtrPtr, v10orPrev10(CONFIG_FILE_NAME,-1), &ConfigLoadCallback, true, false); if (*MetaConPtrPtr == MetaGlobalConfigPtr) { /* server startup */ MetaConStartupReport (MetaGlobalConfigPtr, "CONFIG"); if (VMSnok (status)) exit (status); } return (status); } /*****************************************************************************/ /* Called by MetaConUnload() to free resources allocated during service configuration. */ ConfigUnload (META_CONFIG *mcptr) { int status; MAPPING_META *mmptr; /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigUnload()"); if (mcptr->ConfigMetaPtr && mcptr->ConfigMetaPtr != ConfigMetaPtr) { VmFree (mcptr->ConfigMetaPtr, FI_LI); mcptr->ConfigMetaPtr = NULL; } } /*****************************************************************************/ /* For each non-meta-config directive line read by MetaConLoad() this function is called to parse the line text's contents and to configure the private data structure associated with each rule. */ BOOL ConfigLoadCallback (META_CONFIG *mcptr) { static char ProblemMixed [] = "Mixed directive formats", ProblemObsolete [] = "Directive is obsolete", ProblemOverflow [] = "Storage overflow", ProblemParameter [] = "Parameter confusing", ProblemDirective [] = "Unknown directive", ProblemUsage [] = "Cannot use during global configuration"; int idx, status, ProctorTotal; char *cptr, *sptr, *zptr; char StringBuffer [4096]; CONFIG_STRUCT *cfptr; METACON_LINE *mclptr; /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) { WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigLoadCallback() !&F !&X", &ConfigLoadCallback, mcptr); if (WATCH_MODULE(WATCH_MOD__DETAIL)) { mclptr = mcptr->ParsePtr; WatchDataFormatted ("!&X !UL !UL !UL !UL !&X !&Z !&Z\n", mclptr, mclptr->Size, mclptr->Token, mclptr->Number, mclptr->Length, mclptr->LineDataPtr, mclptr->TextPtr, mclptr->InlineTextPtr); } } /* get a pointer to the current "line" */ mclptr = mcptr->ParsePtr; /* if this is during server startup then set the global service pointer */ if (HttpdServerStartup) cfptr = mcptr->ConfigMetaPtr = ConfigMetaPtr = &Config; else /* if a report then conjure one up ex cathedra */ if (!mcptr->ConfigMetaPtr) cfptr = mcptr->ConfigMetaPtr = VmGet (sizeof(CONFIG_STRUCT)); else /* not the first time through */ cfptr = mcptr->ConfigMetaPtr; if (mclptr->Token == METACON_TOKEN_PRE) { /******************/ /* pre-initialize */ /******************/ /* must be explicitly enabled in the configuration file */ cfptr->cfHttp2.Enabled = false; cfptr->cfMisc.EntityTag = cfptr->cfMisc.PipelineRequests = cfptr->cfScript.Enabled = true; cfptr->BracketDirectives = cfptr->EquateDirectives = false; cfptr->cfAuth.CacheMinutes = cfptr->cfAuth.RevalidateUserMinutes = 60; cfptr->cfMisc.GzipFlushSeconds = GZIP_DEFAULT_FLUSH_SECONDS; cfptr->cfMisc.GzipFlushInitialSeconds = GZIP_INITIAL_FLUSH_SECONDS; cfptr->cfDir.PreExpired = PRE_EXPIRE_INDEX_OF; strcpy (cfptr->cfDir.DefaultLayout, DEFAULT_DIR_LAYOUT); cfptr->cfServer.AcceptHostsPtr = cfptr->cfContent.ContentInfoListHeadPtr = cfptr->cfContent.IconListHeadPtr = cfptr->cfLog.ExcludeHostsPtr = cfptr->cfServer.RejectHostsPtr = NULL; cfptr->cfContent.ContentTypeStructOverhead = sizeof(CONTENT_TYPE); cfptr->cfContent.IconStructOverhead = sizeof(ICON_TYPE); cfptr->cfContent.ContentTypeDefaultPtr = ""; cfptr->cfProxy.ConnectPersistMax = PROXY_CONNECT_PERSIST_MAX; cfptr->cfProxy.ConnectPersistSeconds = PROXY_CONNECT_PERSIST_SECONDS; return (true); } if (mclptr->Token == METACON_TOKEN_POST) { /****************/ /* post-process */ /****************/ if (!cfptr->cfMisc.PutMaxKbytes) cfptr->cfMisc.PutMaxKbytes = PUT_DEFAULT_KBYTES_MAX; if (!cfptr->cfMisc.PutVersionLimit) cfptr->cfMisc.PutVersionLimit = PUT_DEFAULT_VERSION_LIMIT; if (cfptr->cfAuth.CacheMinutes > CONFIG_REVALIDATE_MINUTES_MAX) cfptr->cfAuth.CacheMinutes = CONFIG_REVALIDATE_MINUTES_MAX; if (cfptr->cfAuth.RevalidateUserMinutes > CONFIG_REVALIDATE_MINUTES_MAX) cfptr->cfAuth.RevalidateUserMinutes = CONFIG_REVALIDATE_MINUTES_MAX; if (CliAcceptHostsPtr) cfptr->cfServer.AcceptHostsPtr = CliAcceptHostsPtr; if (CliRejectHostsPtr) cfptr->cfServer.RejectHostsPtr = CliRejectHostsPtr; /* push these to all upper case (just cause it looks uniform) */ if (cfptr->cfScript.DefaultSearchExcludePtr) for (cptr = cfptr->cfScript.DefaultSearchExcludePtr; *cptr; cptr++) *cptr = TOUP(*cptr); ConfigContentTypeIcon (mcptr); if (!cfptr->cfDir.BodyTag[0]) strcpy (cfptr->cfDir.BodyTag, CONFIG_DEFAULT_DIR_BODY_TAG); if (cfptr->cfServer.ListenBacklog <= 0 || cfptr->cfServer.ListenBacklog > 999) cfptr->cfServer.ListenBacklog = DEFAULT_LISTEN_BACKLOG; /* for backward compatibility with pre-v4.3 behaviour (see DCL.C) */ if (getenv ("HTTPD_DCL_FULL_REQUEST")) cfptr->cfScript.FullRequest = true; ProctorTotal = 0; for (idx = 0; idx < cfptr->cfScript.ProctorCount; idx++) { ProctorTotal += cfptr->cfScript.Proctor[idx].NumberMin; ProctorTotal += cfptr->cfScript.Proctor[idx].NumberIdle; } if (ProctorTotal > cfptr->cfScript.ScriptProcessSoftLimit || ProctorTotal > cfptr->cfScript.ScriptProcessHardLimit) MetaConReport (mcptr, METACON_REPORT_ERROR, "Total proctored exceeds DCL soft/hard-limit - DISABLED"); if (HttpdServerStartup) { /*************************/ /* during server startup */ /*************************/ if (Config.cfServer.ConnectMax) NetConcurrentMax = Config.cfServer.ConnectMax; if (NetConcurrentMax <= 0) NetConcurrentMax = DEFAULT_CONCURRENT_CONNECT_MAX; if (Config.cfServer.ProcessMax) NetConcurrentProcessMax = Config.cfServer.ProcessMax; if (NetConcurrentProcessMax <= 0) NetConcurrentProcessMax = DEFAULT_CONCURRENT_PROCESS_MAX; if (OpcomTarget = Config.cfOpcom.Target) OpcomMessages = Config.cfOpcom.Messages; else OpcomMessages = 0; /* command line overrides configuration, default fallbacks */ if (!NetReadBufferSize) NetReadBufferSize = Config.cfBuffer.SizeNetRead; if (!NetReadBufferSize) NetReadBufferSize = DEFAULT_NET_READ_BUFFER_SIZE; if (NetReadBufferSize < 1024) NetReadBufferSize = DEFAULT_NET_READ_BUFFER_SIZE; if (!OutputBufferSize) OutputBufferSize = Config.cfBuffer.SizeNetWrite; if (!OutputBufferSize) OutputBufferSize = DEFAULT_OUTPUT_BUFFER_SIZE; if (Config.cfBuffer.SizeNetMTU) { /* MTU has been specified, adjust to an even number of MTUs */ OutputBufferSize /= Config.cfBuffer.SizeNetMTU; OutputBufferSize++; OutputBufferSize *= Config.cfBuffer.SizeNetMTU; /* Chunked output is so common allow for the overhead. The trade-off is losing 8 bytes from non-chunked MTU. */ if (OutputBufferSize > 8) OutputBufferSize -= 8; } /* let's not get too silly */ if (OutputBufferSize < 1024) OutputBufferSize = DEFAULT_OUTPUT_BUFFER_SIZE; if (!OutputFileBufferSize) OutputFileBufferSize = Config.cfBuffer.SizeNetFile; if (!OutputFileBufferSize) OutputFileBufferSize = OutputBufferSize; if (Config.cfBuffer.SizeNetMTU) { /* MTU has been specified, adjust to an even number of MTUs. File buffers are rounded down to 512 byte blocks - maximise! */ while (OutputFileBufferSize % Config.cfBuffer.SizeNetMTU > 512) OutputFileBufferSize += 512; OutputFileBufferSize /= Config.cfBuffer.SizeNetMTU; OutputFileBufferSize *= Config.cfBuffer.SizeNetMTU; } /* again, let reason prevail */ if (OutputFileBufferSize < 1024) OutputFileBufferSize = OutputBufferSize; TcpIpSocketRcvBufSize = Config.cfBuffer.SizeSocketRcvBuf; TcpIpSocketSndBufSize = Config.cfBuffer.SizeSocketSndBuf; SsiSizeMax = cfptr->cfSsi.SizeMax * 1024; if (!SsiSizeMax) SsiSizeMax = FILE_TYPE_SSI_SIZE_MAX; if (Config.cfContent.CharsetConvertPtr) ResponseCharsetConfig (mcptr); if (Config.cfMisc.DnsLookupRetryCount) ConfigDnsLookupRetryCount = Config.cfMisc.DnsLookupRetryCount; else ConfigDnsLookupRetryCount = TCPIP_LOOKUP_RETRY_COUNT; if (ConfigDnsLookupRetryCount < 0 || ConfigDnsLookupRetryCount > 100) ConfigDnsLookupRetryCount = TCPIP_LOOKUP_RETRY_COUNT; if (ProctorTotal <= cfptr->cfScript.ScriptProcessSoftLimit && ProctorTotal <= cfptr->cfScript.ScriptProcessHardLimit) DclProctorEnabled = true; } return (true); } if (mclptr->Token == METACON_TOKEN_INCLUDE) return (true); if (mclptr->Token == METACON_TOKEN_VERSION) return (true); if (mclptr->Token != METACON_TOKEN_TEXT) { /* only interested in directive text */ MetaConReport (mcptr, METACON_REPORT_ERROR, ProblemUsage); return (true); } /***********/ /* process */ /***********/ /* buffer the text associated with the current "line" */ zptr = (sptr = StringBuffer) + sizeof(StringBuffer); cptr = mclptr->TextPtr; while (*cptr && sptr < zptr) *sptr++ = *cptr++; if (sptr >= zptr) { MetaConReport (mcptr, METACON_REPORT_ERROR, ProblemOverflow); return (false); } *sptr = '\0'; cptr = StringBuffer; while (*cptr && ISLWS(*cptr)) cptr++; if (*cptr == '[') { if (cfptr->EquateDirectives) { MetaConReport (mcptr, METACON_REPORT_ERROR, ProblemMixed); return (false); } cfptr->BracketDirectives = true; cptr++; zptr = (sptr = cfptr->DirectiveName) + sizeof(cfptr->DirectiveName)-1; while (*cptr && *cptr != ']' && sptr < zptr) *sptr++ = *cptr++; if (sptr > zptr) { MetaConReport (mcptr, METACON_REPORT_ERROR, ProblemOverflow); return (false); } *sptr = '\0'; if (*cptr) cptr++; while (*cptr && ISLWS(*cptr)) cptr++; } else if (!cfptr->BracketDirectives) { cfptr->EquateDirectives = true; zptr = (sptr = cfptr->DirectiveName) + sizeof(cfptr->DirectiveName)-1; while (*cptr && !ISLWS(*cptr) && *cptr != '=' && sptr < zptr) *sptr++ = *cptr++; while (*cptr && *cptr != '=') cptr++; if (sptr > zptr) { MetaConReport (mcptr, METACON_REPORT_ERROR, ProblemOverflow); return (false); } *sptr = '\0'; if (*cptr) cptr++; while (*cptr && ISLWS(*cptr)) cptr++; } sptr = cptr; cptr = cfptr->DirectiveName; if (cfptr->BracketDirectives && !*sptr) return (true); if (!*sptr) { MetaConReport (mcptr, METACON_REPORT_WARNING, ProblemParameter); return (true); } /**************/ /* directives */ /**************/ if (strsame (cptr, "Accept", -1)) StringListAdd (sptr, &cfptr->cfServer.AcceptHostsPtr, &cfptr->cfServer.AcceptHostsLength); else if (strsame (cptr, "ActivityDays", -1)) cfptr->cfMisc.ActivityNumberOfDays = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "AddType", -1)) ConfigAddType (mcptr, sptr); else if (strsame (cptr, "AddMimeTypesFile", -1)) ConfigAddMimeTypesFile (mcptr, sptr); else if (strsame (cptr, "AddIcon", -1)) ConfigAddIcon (mcptr, sptr, NULL, false); else if (strsame (cptr, "AddBlankIcon", -1)) ConfigAddIcon (mcptr, sptr, ConfigContentTypeBlank, false); else if (strsame (cptr, "AddDirIcon", -1)) ConfigAddIcon (mcptr, sptr, ConfigContentTypeDir, false); else if (strsame (cptr, "AddDefaultIcon", -1)) ConfigAddIcon (mcptr, sptr, ConfigContentTypeDefaultIcon, false); else if (strsame (cptr, "AddParentIcon", -1)) ConfigAddIcon (mcptr, sptr, ConfigContentTypeParent, false); else if (strsame (cptr, "AddUnknownIcon", -1)) ConfigAddIcon (mcptr, sptr, ConfigContentTypeUnknown, false); else if (strsame (cptr, "AuthBasic", -1)) cfptr->cfAuth.BasicEnabled = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "AuthCacheEntriesMax", -1)) cfptr->cfAuth.CacheEntriesMax = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "AuthCacheEntrySize", -1)) cfptr->cfAuth.CacheEntrySize = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "AuthCacheMinutes", -1)) cfptr->cfAuth.CacheMinutes = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "AuthDigestGetLife", -1)) cfptr->cfAuth.DigestNonceGetLifeTime = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "AuthDigestPutLife", -1)) cfptr->cfAuth.DigestNoncePutLifeTime = MetaConSetInteger (mcptr, sptr); else /* "AuthDigest" MUST come after other AuthDigests for obvious reasons */ if (strsame (cptr, "AuthDigest", -1)) cfptr->cfAuth.DigestEnabled = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "AuthFailureLimit", -1)) cfptr->cfAuth.FailureLimit = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "AuthFailurePeriod", -1)) cfptr->cfAuth.FailurePeriodSeconds = MetaConSetSeconds (mcptr, sptr, 1); else if (strsame (cptr, "AuthFailureTimeout", -1)) cfptr->cfAuth.FailureTimeoutSeconds = MetaConSetSeconds (mcptr, sptr, 1); else if (strsame (cptr, "AuthRevalidateUserMinutes", -1)) cfptr->cfAuth.RevalidateUserMinutes = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "AuthRevalidateLoginCookie", -1)) MetaConReport (mcptr, METACON_REPORT_INFORM, ProblemObsolete); else if (strsame (cptr, "AuthSYSUAFlogonType", -1)) { if (strsame (sptr, "NETWORK", -1)) cfptr->cfAuth.SysUafLogonType = AUTH_LOGON_TYPE_NETWORK; else if (strsame (sptr, "BATCH", -1)) cfptr->cfAuth.SysUafLogonType = AUTH_LOGON_TYPE_BATCH; else if (strsame (sptr, "LOCAL", -1)) cfptr->cfAuth.SysUafLogonType = AUTH_LOGON_TYPE_LOCAL; else if (strsame (sptr, "DIALUP", -1)) cfptr->cfAuth.SysUafLogonType = AUTH_LOGON_TYPE_DIALUP; else if (strsame (sptr, "REMOTE", -1)) cfptr->cfAuth.SysUafLogonType = AUTH_LOGON_TYPE_REMOTE; else { cfptr->cfAuth.SysUafLogonType = 0; MetaConReport (mcptr, METACON_REPORT_ERROR, ProblemParameter); } } else if (strsame (cptr, "AuthSYSUAFacceptExpPwd", -1)) cfptr->cfAuth.SysUafAcceptExpPwd = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "AuthSYSUAFpwdExpUrl", -1)) MetaConSetString (mcptr, sptr, cfptr->cfAuth.SysUafPwdExpUrl, sizeof(cfptr->cfAuth.SysUafPwdExpUrl)); else if (strsame (cptr, "AuthSYSUAFuseACME", -1)) MetaConReport (mcptr, METACON_REPORT_INFORM, ProblemObsolete); else if (strsame (cptr, "AuthTokenEntriesMax", -1)) cfptr->cfAuth.TokenEntriesMax = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "BufferQuotaDclOutput", -1)) cfptr->cfBuffer.QuotaDclOutput = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "BufferSizeDclCommand", -1)) cfptr->cfBuffer.SizeDclCommand = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "BufferSizeDclOutput", -1)) cfptr->cfBuffer.SizeDclOutput = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "BufferSizeDclCgiHeader", -1)) cfptr->cfBuffer.SizeDclCgiHeader = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "BufferSizeDclCgiPlusIn", -1)) cfptr->cfBuffer.SizeDclCgiPlusIn = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "BufferSizeNetFile", -1)) cfptr->cfBuffer.SizeNetFile = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "BufferSizeNetMTU", -1)) cfptr->cfBuffer.SizeNetMTU = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "BufferSizeNetRead", -1)) cfptr->cfBuffer.SizeNetRead = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "BufferSizeNetWrite", -1)) cfptr->cfBuffer.SizeNetWrite = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "CacheChunkKBytes", -1)) MetaConReport (mcptr, METACON_REPORT_INFORM, ProblemObsolete); else if (strsame (cptr, "CacheEntriesMax", -1)) cfptr->cfCache.EntriesMax = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "CacheFileKBytesMax", -1)) cfptr->cfCache.FileKBytesMax = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "CacheFrequentHits", -1)) cfptr->cfCache.FrequentHits = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "CacheFrequentPeriod", -1)) cfptr->cfCache.FrequentSeconds = MetaConSetSeconds (mcptr, sptr, 1); else /* "CacheFrequentSeconds" for backward compatibility */ if (strsame (cptr, "CacheFrequentSeconds", -1)) cfptr->cfCache.FrequentSeconds = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "CacheGuardPeriod", -1)) cfptr->cfCache.GuardSeconds = MetaConSetSeconds (mcptr, sptr, 1); else if (strsame (cptr, "CacheTotalKBytesMax", -1)) cfptr->cfCache.TotalKBytesMax = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "CacheValidatePeriod", -1)) cfptr->cfCache.ValidateSeconds = MetaConSetSeconds (mcptr, sptr, 1); else /* "CacheValidateSeconds" for backward compatibility */ if (strsame (cptr, "CacheValidateSeconds", -1)) cfptr->cfCache.ValidateSeconds = MetaConSetInteger (mcptr, sptr); else /* "cache" must follow all the others for the obvious reason */ if (strsame (cptr, "Cache", -1)) cfptr->cfCache.Enabled = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "CgiStrictOutput", -1)) cfptr->cfScript.CgiStrictOutput = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "CharsetDefault", -1)) MetaConSetString (mcptr, sptr, cfptr->cfContent.CharsetDefault, sizeof(cfptr->cfContent.CharsetDefault)); else if (strsame (cptr, "CharsetConvert", -1)) StringListAdd (sptr, &cfptr->cfContent.CharsetConvertPtr, &cfptr->cfContent.CharsetConvertLength); else /* "Busy" for backward compatibility */ if (strsame (cptr, "ConnectMax", -1) || strsame (cptr, "Busy", -1)) cfptr->cfServer.ConnectMax = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "DclDetachProcess", -1)) cfptr->cfScript.DetachProcess = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "DclDetachProcessPriority", -1)) MetaConSetString (mcptr, sptr, cfptr->cfScript.DetachProcessPriority, sizeof(cfptr->cfScript.DetachProcessPriority)); else if (strsame (cptr, "DclGatewayBg", -1)) cfptr->cfScript.GatewayBg = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "DclHardLimit", -1)) cfptr->cfScript.ScriptProcessHardLimit = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "DclScriptProctor", -1)) ConfigSetScriptProctor (mcptr, sptr); else if (strsame (cptr, "DclScriptRunTime", -1)) ConfigSetScriptRunTime (mcptr, sptr); else if (strsame (cptr, "DclSoftLimit", -1)) cfptr->cfScript.ScriptProcessSoftLimit = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "DclBitBucketTimeout", -1)) cfptr->cfScript.BitBucketTimeout = MetaConSetSeconds (mcptr, sptr, 60); else if (strsame (cptr, "DclCgiPlusLifeTime", -1)) cfptr->cfScript.CgiPlusLifeTime = MetaConSetSeconds (mcptr, sptr, 60); else if (strsame (cptr, "DclCleanupScratchMinutesMax", -1)) cfptr->cfScript.CleanupScratchMinutesMax = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "DclCleanupScratchMinutesOld", -1)) cfptr->cfScript.CleanupScratchMinutesOld = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "DclZombieLifeTime", -1)) cfptr->cfScript.ZombieLifeTime = MetaConSetSeconds (mcptr, sptr, 60); else if (strsame (cptr, "DclSpawnAuthPriv", -1)) cfptr->cfScript.SpawnAuthPriv = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "DECnetReuseLifeTime", -1)) cfptr->cfScript.DECnetReuseLifeTime = MetaConSetSeconds (mcptr, sptr, 60); else if (strsame (cptr, "DECnetConnectListMax", -1)) cfptr->cfScript.DECnetConnectListMax = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "DirAccess", -1)) ConfigSetDirAccess (mcptr, sptr); else if (strsame (cptr, "DirBodyTag", -1)) MetaConSetString (mcptr, sptr, cfptr->cfDir.BodyTag, sizeof(cfptr->cfDir.BodyTag)); else if (strsame (cptr, "DirDescription", -1)) { /* [DirDescription] boolean deprecated in v5.0, noow using integer [DirDescriptionLines], provide fallback behaviour. */ if (MetaConSetBoolean (mcptr, sptr)) cfptr->cfDir.DescriptionLines = 30; else cfptr->cfDir.DescriptionLines = 0; } else if (strsame (cptr, "DirDescriptionLines", -1)) cfptr->cfDir.DescriptionLines = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "DirLayout", -1)) MetaConSetString (mcptr, sptr, cfptr->cfDir.DefaultLayout, sizeof(cfptr->cfDir.DefaultLayout)); else if (strsame (cptr, "DirMetaInfo", -1)) cfptr->cfDir.MetaInfoEnabled = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "DirOwner", -1)) cfptr->cfDir.OwnerEnabled = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "DirPreExpired", -1)) cfptr->cfDir.PreExpired = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "DirNoImpliedWildcard", -1)) cfptr->cfDir.NoImpliedWildcard = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "DirNoPrivIgnore", -1)) cfptr->cfDir.NoPrivIgnore = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "DirReadMeFile", -1)) ConfigSetDirReadMeFile (mcptr, sptr); else /* "ReadMe" MUST come after the other ReadMes for obvious reasons */ if (strsame (cptr, "DirReadMe", -1)) ConfigSetDirReadMe (mcptr, sptr); else if (strsame (cptr, "DirWildcard", -1)) cfptr->cfDir.WildcardEnabled = MetaConSetBoolean (mcptr, sptr); else /* "DNSLookup" for backward compatibility */ if (strsame (cptr, "DNSLookupClient", -1) || strsame (cptr, "DNSLookup", -1)) cfptr->cfMisc.DnsLookupClient = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "DNSLookupRetry", -1)) cfptr->cfMisc.DnsLookupRetryCount = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "DNSLookupLifeTime", -1)) cfptr->cfMisc.DnsLookupLifeTimeSeconds = MetaConSetSeconds (mcptr, sptr, 1); else if (strsame (cptr, "EntityTag", -1)) cfptr->cfMisc.EntityTag = MetaConSetBoolean (mcptr, sptr); else /* "Recommend" for backward compatibility */ if (strsame (cptr, "ErrorRecommend", -1) || strsame (cptr, "Recommend", -1)) cfptr->cfReport.ErrorRecommend = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "ErrorReportPath", -1)) { MetaConSetString (mcptr, sptr, cfptr->cfReport.ErrorReportPath, sizeof(cfptr->cfReport.ErrorReportPath)); cfptr->cfReport.ErrorReportPathLength = strlen(cfptr->cfReport.ErrorReportPath); } else if (strsame (cptr, "GzipAccept", -1)) cfptr->cfMisc.GzipAcceptWindowBits = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "GzipFlushSeconds", -1)) { /* <interval>[,<initial-interval>] */ cfptr->cfMisc.GzipFlushSeconds = MetaConSetInteger (mcptr, sptr); while (*sptr && isdigit(*sptr)) sptr++; while (*sptr && (*sptr == ',' || ISLWS(*sptr))) sptr++; if (isdigit(*sptr)) cfptr->cfMisc.GzipFlushInitialSeconds = MetaConSetInteger (mcptr, sptr); } else if (strsame (cptr, "GzipResponse", -1)) { /* <compression-level>[,<memory-level>,<window-bits>] */ cfptr->cfMisc.GzipResponseCompLevel = MetaConSetInteger (mcptr, sptr); while (*sptr && isdigit(*sptr)) sptr++; while (*sptr && (*sptr == ',' || ISLWS(*sptr))) sptr++; if (isdigit(*sptr)) cfptr->cfMisc.GzipResponseMemLevel = MetaConSetInteger (mcptr, sptr); while (*sptr && isdigit(*sptr)) sptr++; while (*sptr && (*sptr == ',' || ISLWS(*sptr))) sptr++; if (isdigit(*sptr)) cfptr->cfMisc.GzipResponseWindowBits = MetaConSetInteger (mcptr, sptr); } else if (strsame (cptr, "Http2Protocol", -1)) cfptr->cfHttp2.Enabled = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "Http2FrameSizeMax", -1)) cfptr->cfHttp2.MaxFrameSize = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "Http2HeaderListMax", -1)) cfptr->cfHttp2.MaxHeaderListSize = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "Http2HeaderTableMax", -1)) cfptr->cfHttp2.MaxHeaderTableSize = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "Http2PingSeconds", -1)) cfptr->cfHttp2.PingTimerSeconds = MetaConSetSeconds (mcptr, sptr, 1); else if (strsame (cptr, "Http2StreamsMax", -1)) cfptr->cfHttp2.MaxConcurrentStreams = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "Http2InitWindowSize", -1)) cfptr->cfHttp2.InitialWindowSize = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "HttpTrace", -1)) cfptr->cfMisc.HttpTraceEnabled = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "WwwImplied", -1)) cfptr->cfMisc.WwwImplied = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "InstanceMax", -1)) { if (strsame (sptr, "CPU", 3)) cfptr->cfServer.InstanceMax = INSTANCE_PER_CPU; else cfptr->cfServer.InstanceMax = MetaConSetInteger (mcptr, sptr); } else if (strsame (cptr, "InstancePassive", -1)) cfptr->cfServer.InstancePassive = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "Logging", -1)) cfptr->cfLog.Enabled = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "LogExcludeHosts", -1)) StringListAdd (sptr, &cfptr->cfLog.ExcludeHostsPtr, &cfptr->cfLog.ExcludeHostsLength); else if (strsame (cptr, "LogFile", -1)) MetaConSetString (mcptr, sptr, cfptr->cfLog.FileName, sizeof(cfptr->cfLog.FileName)); else if (strsame (cptr, "LogFileExtend", -1)) cfptr->cfLog.ExtendBlocks = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "LogFormat", -1)) MetaConSetString (mcptr, sptr, cfptr->cfLog.Format, sizeof(cfptr->cfLog.Format)); else if (strsame (cptr, "LogNaming", -1)) MetaConSetString (mcptr, sptr, cfptr->cfLog.Naming, sizeof(cfptr->cfLog.Naming)); else if (strsame (cptr, "LogPeriod", -1)) MetaConSetString (mcptr, sptr, cfptr->cfLog.Period, sizeof(cfptr->cfLog.Period)); else if (strsame (cptr, "LogPerInstance", -1)) cfptr->cfLog.PerInstance = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "LogPerService", -1)) cfptr->cfLog.PerService = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "LogPerServiceHostOnly", -1)) cfptr->cfLog.PerServiceHostOnly = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "LogWriteFail503", -1)) cfptr->cfLog.WriteFail503 = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "MapUserNameCacheEntries", -1)) cfptr->cfMisc.MapUserNameCacheEntries = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "Monitor", -1)) cfptr->cfMisc.MonitorEnabled = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "OpcomTarget", -1) || strsame (cptr, "OpcomAdmin", -1) || strsame (cptr, "OpcomAuthorization", -1) || strsame (cptr, "OpcomControl", -1) || strsame (cptr, "OpcomHTTPd", -1)) ConfigSetOpcom (mcptr, cptr, sptr); else if (strsame (cptr, "PersonaCacheEntries", -1)) cfptr->cfMisc.PersonaCacheEntries = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "PipelineRequests", -1)) cfptr->cfMisc.PipelineRequests = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "ProcessMax", -1)) cfptr->cfServer.ProcessMax = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "ProxyCache", -1)) MetaConReport (mcptr, METACON_REPORT_INFORM, ProblemObsolete); else if (strsame (cptr, "ProxyCacheDeviceCheckMinutes", -1)) MetaConReport (mcptr, METACON_REPORT_INFORM, ProblemObsolete); else if (strsame (cptr, "ProxyCacheDeviceDirOrg", -1)) MetaConReport (mcptr, METACON_REPORT_INFORM, ProblemObsolete); else if (strsame (cptr, "ProxyCacheDeviceMaxPercent", -1)) MetaConReport (mcptr, METACON_REPORT_INFORM, ProblemObsolete); else if (strsame (cptr, "ProxyCacheDevicePurgePercent", -1)) MetaConReport (mcptr, METACON_REPORT_INFORM, ProblemObsolete); else if (strsame (cptr, "ProxyCacheFileKBytesMax", -1)) MetaConReport (mcptr, METACON_REPORT_INFORM, ProblemObsolete); else if (strsame (cptr, "ProxyCacheNegativeSeconds", -1)) MetaConReport (mcptr, METACON_REPORT_INFORM, ProblemObsolete); else if (strsame (cptr, "ProxyCacheNoReloadSeconds", -1)) MetaConReport (mcptr, METACON_REPORT_INFORM, ProblemObsolete); else if (strsame (cptr, "ProxyCacheRoutineHourOfDay", -1)) MetaConReport (mcptr, METACON_REPORT_INFORM, ProblemObsolete); else if (strsame (cptr, "ProxyCachePurgeList", -1)) MetaConReport (mcptr, METACON_REPORT_INFORM, ProblemObsolete); else if (strsame (cptr, "ProxyCacheReloadList", -1)) MetaConReport (mcptr, METACON_REPORT_INFORM, ProblemObsolete); else if (strsame (cptr, "ProxyConnectPersistMax", -1)) cfptr->cfProxy.ConnectPersistMax = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "ProxyConnectPersistSeconds", -1)) cfptr->cfProxy.ConnectPersistSeconds = MetaConSetSeconds (mcptr, sptr, 1); else if (strsame (cptr, "ProxyConnectTimeoutSeconds", -1)) cfptr->cfProxy.ConnectTimeoutSeconds = MetaConSetSeconds (mcptr, sptr, 1); else if (strsame (cptr, "ProxyForwarded", -1)) { if (strsame (sptr, "BY", 2)) cfptr->cfProxy.ForwardedBy = PROXY_FORWARDED_BY; else if (strsame (sptr, "DISABLED", 8)) cfptr->cfProxy.ForwardedBy = PROXY_FORWARDED_DISABLED; else if (strsame (sptr, "FOR", 3)) cfptr->cfProxy.ForwardedBy = PROXY_FORWARDED_FOR; else if (strsame (sptr, "ADDRESS", 7)) cfptr->cfProxy.ForwardedBy = PROXY_FORWARDED_ADDRESS; else { cfptr->cfProxy.ForwardedBy = PROXY_FORWARDED_DISABLED; MetaConReport (mcptr, METACON_REPORT_ERROR, ProblemParameter); } } else /* "ProxyAddForwardedBy" for backward compatibility with 'ProxyForwarded' */ if (strsame (cptr, "ProxyAddForwardedBy", -1)) { if (MetaConSetBoolean (mcptr, sptr)) cfptr->cfProxy.ForwardedBy = PROXY_FORWARDED_BY; else cfptr->cfProxy.ForwardedBy = PROXY_FORWARDED_DISABLED; } else if (strsame (cptr, "ProxyHostCachePurgeHours", -1)) MetaConReport (mcptr, METACON_REPORT_INFORM, ProblemObsolete); else if (strsame (cptr, "ProxyHostLookupRetryCount", -1)) cfptr->cfProxy.HostLookupRetryCount = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "ProxyReportCacheLog", -1)) cfptr->cfProxy.ReportCacheLog = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "ProxyReportLog", -1)) cfptr->cfProxy.ReportLog = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "ProxyServing", -1)) cfptr->cfProxy.ServingEnabled = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "ProxyUnknownRequestFields", -1)) cfptr->cfProxy.UnknownRequestFields = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "ProxyVerifyRecordMax", -1)) cfptr->cfProxy.VerifyRecordMax = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "ProxyXForwardedFor", -1)) { if (strsame (sptr, "ENABLED", 7)) cfptr->cfProxy.XForwardedFor = PROXY_XFORWARDEDFOR_ENABLED; else if (strsame (sptr, "UNKNOWN", 7)) cfptr->cfProxy.XForwardedFor = PROXY_XFORWARDEDFOR_UNKNOWN; else if (strsame (sptr, "ADDRESS", 7)) cfptr->cfProxy.XForwardedFor = PROXY_XFORWARDEDFOR_ADDRESS; else if (strsame (sptr, "DISABLED", 8)) cfptr->cfProxy.XForwardedFor = PROXY_XFORWARDEDFOR_DISABLED; else { cfptr->cfProxy.XForwardedFor = PROXY_XFORWARDEDFOR_DISABLED; MetaConReport (mcptr, METACON_REPORT_ERROR, ProblemParameter); } } else if (strsame (cptr, "Port", -1)) cfptr->cfServer.DefaultPort = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "PutRFM", -1)) { if (*sptr) { if (strsame (sptr, "FIX512", -1)) cfptr->cfMisc.PutBinaryRFM = PUT_RFM_FIX512; else if (strsame (sptr, "STM", -1)) cfptr->cfMisc.PutBinaryRFM = PUT_RFM_STM; else if (strsame (sptr, "STMCR", -1)) cfptr->cfMisc.PutBinaryRFM = PUT_RFM_STMCR; else if (strsame (sptr, "STMLF", -1)) cfptr->cfMisc.PutBinaryRFM = PUT_RFM_STMLF; else if (strsame (sptr, "UDF", -1)) cfptr->cfMisc.PutBinaryRFM = PUT_RFM_UDF; else MetaConReport (mcptr, METACON_REPORT_WARNING, ProblemDirective); } } else if (strsame (cptr, "PutMaxKbytes", -1)) cfptr->cfMisc.PutMaxKbytes = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "PutVersionLimit", -1)) cfptr->cfMisc.PutVersionLimit = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "RegEx", -1)) { if (strsame (sptr, "ENABLED", 7)) cfptr->cfMisc.RegexSyntax = REGEX_C_FLAGS; else if (strsame (sptr, "DISABLED", 8)) cfptr->cfMisc.RegexSyntax = 0; else if (isdigit(*sptr)) cfptr->cfMisc.RegexSyntax = atoi(sptr); else if (strsame (sptr, "AWK", 3)) cfptr->cfMisc.RegexSyntax = RE_SYNTAX_AWK; else if (strsame (sptr, "ED", 2)) cfptr->cfMisc.RegexSyntax = RE_SYNTAX_ED; else if (strsame (sptr, "EGREP", 5)) cfptr->cfMisc.RegexSyntax = RE_SYNTAX_EGREP; else if (strsame (sptr, "GREP", 4)) cfptr->cfMisc.RegexSyntax = RE_SYNTAX_GREP; else if (strsame (sptr, "POSIX_AWK", 9)) cfptr->cfMisc.RegexSyntax = RE_SYNTAX_POSIX_AWK; else if (strsame (sptr, "POSIX_BASIC", 11)) cfptr->cfMisc.RegexSyntax = RE_SYNTAX_POSIX_BASIC; else if (strsame (sptr, "POSIX_EGREP", 11)) cfptr->cfMisc.RegexSyntax = RE_SYNTAX_POSIX_EGREP; else if (strsame (sptr, "POSIX_EXTENDED", 14)) cfptr->cfMisc.RegexSyntax = RE_SYNTAX_POSIX_EXTENDED; else if (strsame (sptr, "POSIX_MINIMAL_BASIC", 19)) cfptr->cfMisc.RegexSyntax = RE_SYNTAX_POSIX_MINIMAL_BASIC; else if (strsame (sptr, "POSIX_MINIMAL_EXTENDED", 22)) cfptr->cfMisc.RegexSyntax = RE_SYNTAX_POSIX_MINIMAL_EXTENDED; else if (strsame (sptr, "SED", 3)) cfptr->cfMisc.RegexSyntax = RE_SYNTAX_SED; else if (strsame (sptr, "WASD", 10)) cfptr->cfMisc.RegexSyntax = REGEX_C_FLAGS; else cfptr->cfMisc.RegexSyntax = 0; } else if (strsame (cptr, "Reject", -1)) StringListAdd (sptr, &cfptr->cfServer.RejectHostsPtr, &cfptr->cfServer.RejectHostsLength); else if (strsame (cptr, "ReportBasicOnly", -1)) cfptr->cfReport.BasicOnly = MetaConSetBoolean (mcptr, sptr); else /* "CommentedInfo" & "ErrorSourceInfo" for backward compatibility */ if (strsame (cptr, "ReportMetaInfo", -1) || strsame (cptr, "CommentedInfo", -1) || strsame (cptr, "ErrorSourceInfo", -1)) cfptr->cfReport.MetaInfoEnabled = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "RequestHistory", -1)) cfptr->cfMisc.RequestHistory = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "Scripting", -1)) cfptr->cfScript.Enabled = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "Search", -1) || strsame (cptr, "SearchScript", -1)) { MetaConSetString (mcptr, sptr, cfptr->cfScript.DefaultSearch, sizeof(cfptr->cfScript.DefaultSearch)); cfptr->cfScript.DefaultSearchLength = strlen(cfptr->cfScript.DefaultSearch); } else if (strsame (cptr, "SearchScriptExclude", -1)) StringListAdd (sptr, &cfptr->cfScript.DefaultSearchExcludePtr, &cfptr->cfScript.DefaultSearchExcludeLength); else if (strsame (cptr, "ServerAdmin", -1)) MetaConSetString (mcptr, sptr, cfptr->cfServer.AdminEmail, sizeof(cfptr->cfServer.AdminEmail)); else if (strsame (cptr, "ServerAdminBodyTag", -1)) MetaConReport (mcptr, METACON_REPORT_INFORM, ProblemObsolete); else if (strsame (cptr, "ServerReportBodyTag", -1)) MetaConReport (mcptr, METACON_REPORT_INFORM, ProblemObsolete); else if (strsame (cptr, "ServerSignature", -1)) cfptr->cfProxy.ServingEnabled = ConfigSetServerSignature (mcptr, sptr); else if (strsame (cptr, "Service", -1)) StringListAdd (sptr, &cfptr->cfServer.ServicePtr, &cfptr->cfServer.ServiceLength); else if (strsame (cptr, "ServiceListenBacklog", -1)) cfptr->cfServer.ListenBacklog = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "ServiceNotFoundURL", -1)) MetaConSetString (mcptr, sptr, cfptr->cfServer.ServiceNotFoundUrl, sizeof(cfptr->cfServer.ServiceNotFoundUrl)); else if (strsame (cptr, "SocketSizeRcvBuf", -1)) cfptr->cfBuffer.SizeSocketRcvBuf = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "SocketSizeSndBuf", -1)) cfptr->cfBuffer.SizeSocketSndBuf = MetaConSetInteger (mcptr, sptr); else /* "ShtmlAccesses" for backward compatibility */ if (strsame (cptr, "SSIAccesses", -1) || strsame (cptr, "ShtmlAccesses", -1)) cfptr->cfSsi.AccessesEnabled = MetaConSetBoolean (mcptr, sptr); else /* "ShtmlExec" for backward compatibility */ if (strsame (cptr, "SSIExec", -1) || strsame (cptr, "ShtmlExec", -1)) cfptr->cfSsi.ExecEnabled = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "SSISizeMax", -1)) cfptr->cfSsi.SizeMax = MetaConSetInteger (mcptr, sptr); else /* "SSI" MUST come after the other SSIs for obvious reasons */ /* "Shtml" for backward compatibility */ if (strsame (cptr, "SSI", -1) || strsame (cptr, "Shtml", -1)) cfptr->cfSsi.Enabled = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "SecureSocket", -1) || strsame (cptr, "SecureSockets", -1)) { /* somewhat back-to-front from the usual and if empty ignored */ for (zptr = sptr; *zptr && isspace(*zptr); zptr++); if (*zptr) cfptr->cfSesola.Disabled = !MetaConSetBoolean (mcptr, sptr); } else if (strsame (cptr, "SSLcipherList", -1)) MetaConSetString (mcptr, sptr, cfptr->cfSesola.CipherList, sizeof(cfptr->cfSesola.CipherList)); else if (strsame (cptr, "SSLcert", -1)) MetaConSetString (mcptr, sptr, cfptr->cfSesola.ServerCert, sizeof(cfptr->cfSesola.ServerCert)); else if (strsame (cptr, "SSLkey", -1)) MetaConSetString (mcptr, sptr, cfptr->cfSesola.PrivateKey, sizeof(cfptr->cfSesola.PrivateKey)); else if (strsame (cptr, "SSLoptions", -1)) MetaConSetString (mcptr, sptr, cfptr->cfSesola.ProtocolOptions, sizeof(cfptr->cfSesola.ProtocolOptions)); else if (strsame (cptr, "SSLsessionCacheMax", -1)) cfptr->cfSesola.SessionCacheMax = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "SSLsessionLifetime", -1)) cfptr->cfSesola.SessionLifetime = MetaConSetSeconds (mcptr, sptr, 1); else if (strsame (cptr, "SSLstrictTransSec", -1)) MetaConSetString (mcptr, sptr, cfptr->cfSesola.StrictTransSec, sizeof(cfptr->cfSesola.StrictTransSec)); else if (strsame (cptr, "SSLinstanceCacheMax", -1)) cfptr->cfSesola.InstanceSessionCacheMax = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "SSLinstanceCacheSize", -1)) cfptr->cfSesola.InstanceSessionCacheSize = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "SSLverifyPeer", -1)) cfptr->cfSesola.VerifyPeer = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "SSLverifyPeerCAFile", -1)) MetaConSetString (mcptr, sptr, cfptr->cfSesola.VerifyPeerCAFile, sizeof(cfptr->cfSesola.VerifyPeerCAFile)); else if (strsame (cptr, "SSLverifyPeerDepth", -1)) cfptr->cfSesola.VerifyPeerDepth = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "SSLversion", -1)) MetaConSetString (mcptr, sptr, cfptr->cfSesola.ProtocolVersion, sizeof(cfptr->cfSesola.ProtocolVersion)); else if (strsame (cptr, "SSLverifyPeerDataMax", -1)) cfptr->cfSesola.VerifyPeerDataMax = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "StreamLF", -1)) cfptr->cfMisc.StreamLfConversionMaxKbytes = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "TimeoutHttp2Idle", -1)) cfptr->cfTimeout.Http2Idle = MetaConSetSeconds (mcptr, sptr, 60); else if (strsame (cptr, "TimeoutInput", -1) || strsame (cptr, "InputTimeout", -1)) cfptr->cfTimeout.Input = MetaConSetSeconds (mcptr, sptr, 60); else if (strsame (cptr, "TimeoutNoProgress", -1)) cfptr->cfTimeout.NoProgress = MetaConSetSeconds (mcptr, sptr, 60); else if (strsame (cptr, "TimeoutOutput", -1) || strsame (cptr, "OutputTimeout", -1)) cfptr->cfTimeout.Output = MetaConSetSeconds (mcptr, sptr, 60); else if (strsame (cptr, "TimeoutPersistent", -1) || strsame (cptr, "TimeoutKeepAlive", -1) || strsame (cptr, "KeepAliveTimeout", -1)) cfptr->cfTimeout.Persistent = MetaConSetSeconds (mcptr, sptr, 1); else if (strsame (cptr, "Track", -1)) MetaConReport (mcptr, METACON_REPORT_INFORM, ProblemObsolete); else if (strsame (cptr, "TrackDomain", -1)) MetaConReport (mcptr, METACON_REPORT_INFORM, ProblemObsolete); else if (strsame (cptr, "TrackMultiSession", -1)) MetaConReport (mcptr, METACON_REPORT_INFORM, ProblemObsolete); else if (strsame (cptr, "WebDav", -1)) cfptr->cfWebDav.DavEnabled = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "WebDavLocking", -1)) cfptr->cfWebDav.LockingEnabled = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "WebDavQuota", -1)) cfptr->cfWebDav.QuotaEnabled = MetaConSetBoolean (mcptr, sptr); else if (strsame (cptr, "WebDavLockCollectionDepth", -1)) cfptr->cfWebDav.LockCollectionDepth = MetaConSetInteger (mcptr, sptr); else if (strsame (cptr, "WebDAVlockTimeoutDefault", -1)) cfptr->cfWebDav.LockTimeoutDefaultSeconds = MetaConSetSeconds (mcptr, sptr, 1); else if (strsame (cptr, "WebDAVlockTimeoutMax", -1)) cfptr->cfWebDav.LockTimeoutMaxSeconds = MetaConSetSeconds (mcptr, sptr, 1); else if (strsame (cptr, "WebDAVmetaDir", -1)) { MetaConSetString (mcptr, sptr, cfptr->cfWebDav.MetaFileDirectory, sizeof(cfptr->cfWebDav.MetaFileDirectory)); cfptr->cfWebDav.MetaFileDirectoryLength = strlen(cfptr->cfWebDav.MetaFileDirectory); } else if (strsame (cptr, "Welcome", -1)) ConfigSetWelcome (mcptr, sptr); else MetaConReport (mcptr, METACON_REPORT_WARNING, ProblemDirective); return (true); #undef REP_ENDIS } /*****************************************************************************/ /* Free all memory allocated for a configuration. Only used after file-based configuration report or revision. */ ConfigFree (META_CONFIG *mcptr) { int Count; char *cptr; CONFIG_STRUCT *cfptr; CONTENT_TYPE *ctptr; ICON_TYPE *itptr; /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigFree()"); /* get a pointer to the meta-config data */ cfptr = mcptr->ConfigMetaPtr; ctptr = cfptr->cfContent.ContentInfoListHeadPtr; while (ctptr) { cptr = (char*)ctptr; ctptr = ctptr->NextPtr; VmFree (cptr, FI_LI); } itptr = cfptr->cfContent.IconListHeadPtr; while (itptr) { cptr = (char*)itptr; itptr = itptr->NextPtr; VmFree (cptr, FI_LI); } for (Count = 0; Count < cfptr->cfContent.HomePageCount; Count++) if (cfptr->cfContent.HomePageArray[Count]) VmFree (cfptr->cfContent.HomePageArray[Count], FI_LI); if (cfptr->cfContent.CharsetConvertPtr) VmFree (cfptr->cfContent.CharsetConvertPtr, FI_LI); if (cfptr->cfServer.AcceptHostsPtr) VmFree (cfptr->cfServer.AcceptHostsPtr, FI_LI); if (cfptr->cfLog.ExcludeHostsPtr) VmFree (cfptr->cfLog.ExcludeHostsPtr, FI_LI); if (cfptr->cfServer.RejectHostsPtr) VmFree (cfptr->cfServer.RejectHostsPtr, FI_LI); if (cfptr->cfScript.DefaultSearchExcludePtr) VmFree (cfptr->cfScript.DefaultSearchExcludePtr, FI_LI); if (cfptr->cfServer.ServicePtr) VmFree (cfptr->cfServer.ServicePtr, FI_LI); } /*****************************************************************************/ /* Add a mime content type corresponding to the file suffix (extension, type). The file suffix can contain the asterisk wildcard character, matching zero or more characters. The content-type can be quoted and can include additional characteristics, including an FTP transfer mode (ASCII - 'A', binary/Image - 'B'/'I' as shown in the final example), and a PUT Record Format (RFM:blah). Format: "AddType <.suffix> <type[;forw charset=]> [</script>] [<description>]" Examples: "AddType .html text/html HTML" "AddType .html text/html;charset=ISO8859-5 HTML" "AddType .html "text/html; charset=ISO8859-5" HTML" "AddType .txt text/plain plain text" "AddType .read* text/plain plain text" "AddType .hlb text/x-script /cgi-bin/conan VMS help library" "AddType .gif image/gif GIF image" "AddType .ps application/postscript(FTP:A) Postscript document" "AddType .ps application/postscript RFM:STMCR Postscript doc" "AddType .ps application/postscript FTP:A RFM:STMCR Postscript doc" The directive is stored as a linked list of structures of dynamically allocated memory containing a reformatted version of the directive string. Function ConfigContentType() searches this list to get pointers to the content type, any auto-script, and description, into the client request data structure. A hash table is used to more rapidy index into the list. */ ConfigAddType ( META_CONFIG *mcptr, char *pptr ) { static char ProblemFtpMode [] = "unknown FTP mode", ProblemPutRFM [] = "unknown PUT RFM"; int PutRFM; char FtpMode; char *AutoScriptPtr, *DescriptionPtr, *MimeTypePtr, *SuffixPtr; CONFIG_STRUCT *cfptr; /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigAddType() !&Z", pptr); /* get a pointer to the meta-config data */ cfptr = mcptr->ConfigMetaPtr; AutoScriptPtr = DescriptionPtr = MimeTypePtr = SuffixPtr = ""; FtpMode = PutRFM = 0; for (SuffixPtr = pptr; *pptr && !ISLWS(*pptr); pptr++); if (*pptr) *pptr++ = '\0'; /* content type (can include quotes, e.g. "text/html; charset=ISO-8859-5" */ while (*pptr && ISLWS(*pptr)) pptr++; if (*pptr == '\"') { pptr++; MimeTypePtr = pptr; while (*pptr && *pptr != '\"') pptr++; } else { MimeTypePtr = pptr; while (*pptr && !ISLWS(*pptr) && *pptr != '(') pptr++; } if (*pptr == '\"') *pptr++ = '\0'; if (*pptr == '(') { /* backward compatibility */ *pptr++ = '\0'; if (strsame (pptr, "FTP:", 4)) { pptr += 4; if (*pptr == 'A' || *pptr == 'B' || *pptr == 'I') FtpMode = *pptr++; if (!FtpMode) MetaConReport (mcptr, METACON_REPORT_ERROR, ProblemFtpMode); } } while (*pptr && !ISLWS(*pptr)) pptr++; if (ISLWS(*pptr)) *pptr++ = '\0'; while (strsame (pptr, "RFM:", 4) || strsame (pptr, "FTP:", 4)) { if (strsame (pptr, "RFM:", 4)) { pptr += 4; PutRFM = 0; if (strsame (pptr, "FIX512", 6)) PutRFM = PUT_RFM_FIX512; else if (strsame (pptr, "STMCR", 5)) PutRFM = PUT_RFM_STMCR; else if (strsame (pptr, "STMLF", 5)) PutRFM = PUT_RFM_STMLF; else if (strsame (pptr, "STM", 3)) PutRFM = PUT_RFM_STM; else if (strsame (pptr, "UDF", 3)) PutRFM = PUT_RFM_UDF; if (!PutRFM) MetaConReport (mcptr, METACON_REPORT_ERROR, ProblemPutRFM); } else if (strsame (pptr, "FTP:", 4)) { pptr += 4; FtpMode = 0; if (*pptr == 'A' || *pptr == 'B' || *pptr == 'I') FtpMode = *pptr++; if (!FtpMode) MetaConReport (mcptr, METACON_REPORT_ERROR, ProblemFtpMode); } while (*pptr && !ISLWS(*pptr)) pptr++; while (*pptr && ISLWS(*pptr)) pptr++; } /* (optional) script activation indicated by leading slash */ while (*pptr && ISLWS(*pptr)) pptr++; if (*pptr == '/') { AutoScriptPtr = pptr; while (*pptr && !ISLWS(*pptr)) pptr++; if (*pptr) *pptr++ = '\0'; } else if (*pptr == '-') { /* backward compatibility for those still place-holding with '-' */ while (*pptr && !ISLWS(*pptr)) pptr++; AutoScriptPtr = ""; } else AutoScriptPtr = ""; /* (optional) description, to end of line */ while (*pptr && ISLWS(*pptr)) pptr++; DescriptionPtr = pptr; /* find the end-of-line */ while (*pptr) pptr++; if (*pptr) *pptr++ = '\0'; ConfigAddTypeNow (mcptr, MimeTypePtr, SuffixPtr, AutoScriptPtr, DescriptionPtr, FtpMode, PutRFM, false); } /*****************************************************************************/ /* MIME.TYPES file (with WASD 'commented' extensions). Format: mime/type file-ext [file-ext file-ext] #! optional descriptive text (applies to above) #!/optional/auto-script (applies to above) #[alt] /optional/icon.gif (applies to above) mime/type file-ext [file-ext file-ext] Examples: text/html html htm #! HTML markup text/plain asc txt #! plain text #[TXT] /httpd/-/text.gif application/x-script bks decw$bookshelf #/cgi-bin/hypershelf #! Bookreader shelf application/x-script bkb decw$book #/cgi-bin/hypershelf #! Bookreader book */ ConfigAddMimeTypesFile ( META_CONFIG *mcptr, char *pptr ) { static char ProblemParameter [] = "Parameter confusing"; int status; char *cptr, *sptr, *zptr; CONFIG_STRUCT *cfptr; ODS_STRUCT MimeTypesFileOds; /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigAddMimeTypesFile() !&Z", pptr); /* get a pointer to the meta-config data */ cfptr = mcptr->ConfigMetaPtr; zptr = (sptr = cfptr->cfContent.MimeTypesFileName) + sizeof(cfptr->cfContent.MimeTypesFileName); for (cptr = pptr; *cptr && sptr < zptr; *sptr++ = *cptr++); if (sptr >= zptr) { MetaConReport (mcptr, METACON_REPORT_ERROR, ConfigStringOverflow); return (false); } /* use SYSPRV to allow access to possibly protected file */ sys$setprv (1, &SysPrvMask, 0, 0); status = OdsLoadTextFile (&MimeTypesFileOds, cfptr->cfContent.MimeTypesFileName); sys$setprv (0, &SysPrvMask, 0, 0); if (VMSnok (status)) { MetaConReport (mcptr, METACON_REPORT_WARNING, ProblemParameter); return (true); } while ((cptr = OdsParseTextFile (&MimeTypesFileOds, '*'))) ConfigAddMimeType (mcptr, cptr); VmFree (MimeTypesFileOds.DataPtr, FI_LI); /* ensure the final MIME type and file suffix(es) is configured */ ConfigAddMimeType (mcptr, NULL); } /*****************************************************************************/ /* Process a single line from a MIME.TYPES file (with WASD extensions). "#!/" ... an auto-script/presentation-script (e.g. "#!/cgi-bin/script-name") "#![" ... an icon specification (e.g. "#![ALT] /httpd/-/icon.gif") "#! " ... a file suffix (file type) description (e.g. "#! plain text") "#!%" ... reserved for local viewers (ignored by WASD) "#!+A ... FTP transfer mode ASCII "#!+B ... FTP transfer mode binary (Image) "#!+I ... FTP transfer mode binary (Image) "#!!" ... WASD-specific MIME type (should be ignored by non-WASD) This function expects the WASD-specific information to follow a MIME type and it's file suffixes. The detection of another MIME type causes the previous one and any following WASD-specifics to be configured. */ ConfigAddMimeType ( META_CONFIG *mcptr, char *pptr ) { static char ProblemAutoScript [] = "autoscript too large", ProblemDescription [] = "description too large", ProblemFtpMode [] = "unknown FTP mode", ProblemIcon [] = "icon too large", ProblemMimeType [] = "MIME type too large"; static char FtpMode; static char AutoScript [64], CurrentMimeType [128], Description [64], IconUrl [64]; char *cptr, *sptr, *zptr, *MimeTypePtr, *SuffixPtr; CONFIG_STRUCT *cfptr; /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigAddMimeType() !&Z", pptr); /* get a pointer to the meta-config data */ cfptr = mcptr->ConfigMetaPtr; /* loop is never actually used, just somthing to break out of */ if (pptr) { while (*pptr && ISLWS(*pptr)) pptr++; if (!*pptr) return; if (*pptr == '#') { pptr++; if (SAME2(pptr,'!%')) return; else if (SAME2(pptr,'!/')) { /* autoscript */ pptr++; zptr = (sptr = AutoScript) + sizeof(AutoScript)-1; while (*pptr && !ISLWS(*pptr) && sptr < zptr) *sptr++ = *pptr++; if (sptr >= zptr) { AutoScript[0] = '\0'; MetaConReport (mcptr, METACON_REPORT_WARNING, ProblemAutoScript); } *sptr = '\0'; return; } else if (SAME2(pptr,'! ')) { /* descriptive text, begins with space */ pptr += 2; while (*pptr && ISLWS(*pptr)) pptr++; zptr = (sptr = Description) + sizeof(Description)-1; while (*pptr && sptr < zptr) *sptr++ = *pptr++; if (sptr >= zptr) { Description[0] = '\0'; MetaConReport (mcptr, METACON_REPORT_WARNING, ProblemDescription); return; } *sptr = '\0'; return; } else if (SAME2(pptr,'![')) { /* icon URL */ pptr++; /* must reverse the order of the string for WASD icon processing */ for (cptr = pptr; *cptr && !ISLWS(*cptr); cptr++); while (*cptr && ISLWS(*cptr)) cptr++; zptr = (sptr = IconUrl) + sizeof(IconUrl)-1; while (*cptr && sptr < zptr) *sptr++ = *cptr++; if (sptr < zptr) *sptr++ = ' '; while (*pptr && !ISLWS(*pptr) && sptr < zptr) *sptr++ = *pptr++; if (sptr >= zptr) { IconUrl[0] = '\0'; MetaConReport (mcptr, METACON_REPORT_WARNING, ProblemIcon); return; } *sptr = '\0'; return; } else if (SAME2(pptr,'!+')) { /* FTP transfer mode */ pptr += 2; if (*pptr == 'A' || *pptr == 'B' || *pptr == 'I') FtpMode = *pptr++; else { MetaConReport (mcptr, METACON_REPORT_WARNING, ProblemFtpMode); return; } return; } else if (SAME2(pptr,'!!')) { /* WASD-specific MIME type */ pptr += 2; /* to continue processing MIME type */ } else { /* nothing WASD is interested in */ return; } } } /*************/ /* MIME type */ /*************/ if (CurrentMimeType[0]) { /* new MIME type and file suffixes, configure the current one */ for (cptr = CurrentMimeType; *cptr && !ISLWS(*cptr); cptr++); if (*cptr) *cptr++ = '\0'; while (*cptr && ISLWS(*cptr)) cptr++; while (*cptr) { SuffixPtr = cptr; while (*cptr && !ISLWS(*cptr)) cptr++; if (*cptr) *cptr++ = '\0'; while (*cptr && ISLWS(*cptr)) cptr++; ConfigAddTypeNow (mcptr, CurrentMimeType, SuffixPtr, AutoScript, Description, FtpMode, 0, true); } if (IconUrl[0]) { /*******************/ /* associated icon */ /*******************/ ConfigAddIcon (mcptr, IconUrl, CurrentMimeType, true); } } AutoScript[0] = Description[0] = IconUrl[0] = CurrentMimeType[0] = '\0'; FtpMode = 0; if (pptr) { /* buffer this MIME type and file suffixes */ zptr = (sptr = CurrentMimeType) + sizeof(CurrentMimeType)-1; while (*pptr && sptr < zptr) *sptr++ = *pptr++; if (sptr >= zptr) { CurrentMimeType[0] = '\0'; MetaConReport (mcptr, METACON_REPORT_WARNING, ProblemMimeType); return; } *sptr = '\0'; } } /*****************************************************************************/ /* Add the following content-type to the list and hash table. Later definitions of the same file suffix supercedes earlier ones. */ ConfigAddTypeNow ( META_CONFIG *mcptr, char *MimeType, char *FileSuffix, char *AutoScript, char *Description, char FtpMode, int PutRFM, BOOL FromMimeTypes ) { BOOL ContainsWildcard; int Count; unsigned long HashValue; char *cptr, *sptr; char HtmlDescription [256]; CONTENT_TYPE *ctptr, *hctptr; CONFIG_STRUCT *cfptr; /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigAddTypeNow() !&Z !&Z !&Z !&Z !UL !UL", MimeType, FileSuffix, AutoScript, Description, FtpMode, PutRFM); /* get a pointer to the meta-config data */ cfptr = mcptr->ConfigMetaPtr; /* escape any HTML-forbidden characters */ FaoToBuffer (HtmlDescription, sizeof(HtmlDescription), NULL, "!&;AZ", Description); Count = strlen (MimeType); Count += strlen (FileSuffix); Count += strlen (AutoScript); Count += strlen (HtmlDescription); /* plus structure overhead, plus 4 x null terminators, plus possible '.' */ Count += cfptr->cfContent.ContentTypeStructOverhead + 5; ctptr = (CONTENT_TYPE*)VmGet (Count); sptr = (char*)ctptr + cfptr->cfContent.ContentTypeStructOverhead; ctptr->FromMimeTypes = FromMimeTypes; ContainsWildcard = false; ctptr->SuffixPtr = sptr; cptr = FileSuffix; if (*cptr != '.' && !SAME2(cptr,'*\0')) *sptr++ = '.'; while (*cptr) { if (*cptr == '*') ContainsWildcard = true; /* ensure suffix is in upper-case so we don't have to do it matching */ *sptr++ = TOUP(*cptr++); } *sptr++ = '\0'; ctptr->ContentTypePtr = sptr; cptr = MimeType; while (*cptr) *sptr++ = *cptr++; *sptr++ = '\0'; if (strsame (MimeType, "text/", 5)) ctptr->TypeText = true; ctptr->AutoScriptNamePtr = sptr; cptr = AutoScript; while (*cptr) *sptr++ = *cptr++; *sptr++ = '\0'; ctptr->DescriptionPtr = sptr; cptr = HtmlDescription; while (*cptr) *sptr++ = *cptr++; *sptr = '\0'; /* check if there is a previous entry of this suffix */ for (hctptr = cfptr->cfContent.ContentInfoListHeadPtr; hctptr; hctptr = hctptr->NextPtr) { /* if a later type definition was loaded then ignore this one */ if (strsame (hctptr->SuffixPtr, ctptr->SuffixPtr, -1)) hctptr->Superceded = true; } /* add to list */ if (!cfptr->cfContent.ContentInfoListHeadPtr) cfptr->cfContent.ContentInfoListHeadPtr = ctptr; else cfptr->cfContent.ContentInfoListTailPtr->NextPtr = ctptr; cfptr->cfContent.ContentInfoListTailPtr = ctptr; ctptr->NextPtr = NULL; if (ContainsWildcard) { /* all wildcarded types are listed from hash value 0 */ HashValue = 0; } else { /* generates an upper-case hash */ HashValue = 1; for (cptr = ctptr->SuffixPtr; *cptr && *cptr != ';'; cptr++) HashValue = (((*cptr)*541)^(HashValue*3)) & CONTENT_TYPE_HASH_TABLE_MASK; } if (cfptr->cfContent.ContentInfoHashTable[HashValue]) { /* add to the hash-collision list */ for (hctptr = cfptr->cfContent.ContentInfoHashTable[HashValue]; hctptr->HashCollisionPtr; hctptr = hctptr->HashCollisionPtr); hctptr->HashCollisionPtr = ctptr; } else cfptr->cfContent.ContentInfoHashTable[HashValue] = ctptr; /* special case, default content-type for unknown suffixes */ if (SAME2(ctptr->SuffixPtr,'*\0')) { cfptr->cfContent.ContentTypeDefaultPtr = VmGet (strlen(HtmlDescription+1)); strcpy (cfptr->cfContent.ContentTypeDefaultPtr, HtmlDescription); ctptr->TypeUnknown = true; /* cancel type description */ *ctptr->DescriptionPtr = '\0'; } else ctptr->TypeUnknown = false; ctptr->FtpMode = FtpMode; ctptr->PutRFM = PutRFM; if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchDataFormatted ("!&Z !&Z !&Z !&Z !&B !&B !UL !UL\n", ctptr->SuffixPtr, ctptr->ContentTypePtr, ctptr->AutoScriptNamePtr, ctptr->DescriptionPtr, ctptr->TypeText, ctptr->TypeUnknown, ctptr->FtpMode, ctptr->PutRFM); } /*****************************************************************************/ /* After loading all content-types (i.e. after configuration) this function sets the corresponding icon for each type. */ ConfigContentTypeIcon (META_CONFIG *mcptr) { CONTENT_TYPE *ctptr; CONFIG_STRUCT *cfptr; /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigContentTypeIcon()"); /* get a pointer to the meta-config data */ cfptr = mcptr->ConfigMetaPtr; /* do the default icon first (needless-to-say) */ ConfigDefaultIconPtr = ConfigIconFor (ConfigContentTypeDefaultIcon, 0, 0); ConfigBlankIconPtr = ConfigIconFor (ConfigContentTypeBlank, 0, 0); ConfigDirIconPtr = ConfigIconFor (ConfigContentTypeDir, 0, 0); ConfigParentIconPtr = ConfigIconFor (ConfigContentTypeParent, 0, 0); ConfigUnknownIconPtr = ConfigIconFor (ConfigContentTypeUnknown, 0, 0); for (ctptr = cfptr->cfContent.ContentInfoListHeadPtr; ctptr; ctptr = ctptr->NextPtr) { if (ctptr->TypeUnknown) ctptr->IconPtr = ConfigIconFor (ConfigContentTypeUnknown, 0, 0); else ctptr->IconPtr = ConfigIconFor (ctptr->ContentTypePtr, 0, 0); } } /*****************************************************************************/ /* Using the hash table this function searches the list of file suffixes (types, extensions) and content-types, returning a pointer to the content-type string and if supplied with a content-type structure fills out the appropriate fields. Wildcarded file types are always stored in the list beginning with hash table zero (i.e. [0]). */ char* ConfigContentType ( CONTENT_TYPE *ciptr, char *SuffixPtr ) { BOOL CheckedForWildcards; char *cptr, *sptr; unsigned long HashValue; CONTENT_TYPE *ctptr; /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigContentType() !&Z", SuffixPtr); /* generate an upper-case hash */ if (*SuffixPtr != '.') SuffixPtr = "."; HashValue = 1; for (cptr = SuffixPtr; *cptr && *cptr != ';'; cptr++) HashValue = ((TOUP(*cptr)*541)^(HashValue*3)) & CONTENT_TYPE_HASH_TABLE_MASK; CheckedForWildcards = false; if (!(ctptr = Config.cfContent.ContentInfoHashTable[HashValue])) ctptr = Config.cfContent.ContentInfoHashTable[0]; while (ctptr) { /* if a later type definition was loaded then ignore this one */ if (ctptr->Superceded) { if ((ctptr = ctptr->HashCollisionPtr)) continue; /* end of collision list, check for wildcarded file types */ if (!CheckedForWildcards) { CheckedForWildcards = true; ctptr = Config.cfContent.ContentInfoHashTable[0]; } continue; } /* 'ctptr->SuffixPtr' has already been converted to upper case! */ cptr = ctptr->SuffixPtr; sptr = SuffixPtr; while (*cptr && *sptr && *sptr != ';' && *cptr == TOUP(*sptr)) { if (*cptr != '*') { /* not a wildcard */ cptr++; sptr++; if (*cptr != '*') continue; } /* consecutive wildcards are the same as a single wildcard */ while (*cptr && *cptr == '*') cptr++; if (*cptr) { /* find first matching the character following the wildcard */ while (*sptr && *sptr != ';' && TOUP(*sptr) != *cptr) sptr++; continue; } /* wildcard at end of list file type, matches all following */ while (*sptr && *sptr != ';') sptr++; } if (*cptr || (*sptr && *sptr != ';')) { /* didn't match, traversing the hash-collision list */ if ((ctptr = ctptr->HashCollisionPtr)) continue; /* end of collision list, check for wildcarded file types */ if (!CheckedForWildcards) { CheckedForWildcards = true; ctptr = Config.cfContent.ContentInfoHashTable[0]; } continue; } /**********/ /* match! */ /**********/ /* if just getting a pointer to a content type then just return that */ if (!ciptr) { if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "!&Z", ctptr->ContentTypePtr); return (ctptr->ContentTypePtr); } ciptr->TypeUnknown = false; ciptr->TypeText = ctptr->TypeText; ciptr->IconPtr = ctptr->IconPtr; ciptr->ContentTypePtr = ctptr->ContentTypePtr; ciptr->AutoScriptNamePtr = ctptr->AutoScriptNamePtr; ciptr->DescriptionPtr = ctptr->DescriptionPtr; ciptr->FtpMode = ctptr->FtpMode; ciptr->PutRFM = ctptr->PutRFM; if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "!UL !UL !&Z !&Z !&Z", ciptr->FtpMode, ciptr->PutRFM, ciptr->ContentTypePtr, ciptr->AutoScriptNamePtr, ciptr->DescriptionPtr); return (ctptr->ContentTypePtr); } /*************/ /* no match! */ /*************/ /* if just getting a pointer to a content type then just return that */ if (!ciptr) { if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "!&Z", ConfigContentTypeUnknown); return (ConfigContentTypeUnknown); } ciptr->TypeUnknown = true; ciptr->TypeText = false; ciptr->IconPtr = ConfigUnknownIconPtr; ciptr->ContentTypePtr = ConfigContentTypeUnknown; ciptr->FtpMode = ciptr->PutRFM = 0; ciptr->AutoScriptNamePtr = ciptr->DescriptionPtr = ""; return (ConfigContentTypeUnknown); } /****************************************************************************/ /* Compare two MIME content-types where only the type is compared (i.e. only the "text/html" from something like "text/html;charset=ISO8859-5"). It works much the same as strsame(), except a semi-colon or white-space in either string will terminate a comparison, as will an exhausted count value. */ BOOL ConfigSameContentType ( char *sptr1, char *sptr2, int count ) { /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigSameContentType() !&Z !&Z !SL", sptr1, sptr2, count); if (!sptr1 || !sptr2) return (false); while (*sptr1 && *sptr1 != ';' && !ISLWS(*sptr1) && *sptr2 && *sptr2 != ';' && !ISLWS(*sptr2)) { if (TOUP(*sptr1++) != TOUP(*sptr2++)) return (false); if (count) if (!--count) return (true); } if ((!*sptr1 && (!*sptr2 || *sptr2 == ';')) || (!*sptr2 && (!*sptr1 || *sptr1 == ';'))) return (true); else return (false); } /*****************************************************************************/ /* Add a URL for an icon corresponding to the mime content type. Format: "AddIcon <URL> <alternative-text> <content-type-template>" Examples: "AddIcon /icon/httpd/text.xbm [TXT] text/plain" "AddIcon /icon/httpd/doc.xbm [HTM] text/html" "AddIcon /icon/httpd/image.xbm [IMG] image/jpeg" The template can contain a wildcard in place of a string in either side of the template slash. In this case the wildcard matches any string on that side. The directive is stored as a linked-list of structures of dynamically allocated memory containing a reformatted version of the directive string, including a complete HTML anchor for the URL. Function ConfigIconFor() searches this list to return a pointer to the anchor. A hash table is used to more rapidy index into the list. */ ConfigAddIcon ( META_CONFIG *mcptr, char *pptr, char *TypePtr, BOOL FromMimeTypes ) { static char ProblemParameter [] = "Parameter confusing"; int Count = 0; unsigned long HashValue; char *cptr, *sptr, *AltTextPtr, *IconUrlPtr, *ContentTypePtr; CONFIG_STRUCT *cfptr; ICON_TYPE *itptr, *hitptr; /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigAddIcon() !&Z !&Z !UL", pptr, TypePtr, FromMimeTypes); /* get a pointer to the meta-config data */ cfptr = mcptr->ConfigMetaPtr; IconUrlPtr = pptr; while (*pptr && ISLWS(*pptr)) pptr++; if (!*pptr) return; while (*pptr && !ISLWS(*pptr)) pptr++; /* storing the icon URI twice, as the URI plus within the <IMG..> */ Count = (pptr - IconUrlPtr) * 2; if (*pptr) *pptr++ = '\0'; /* alternative text */ while (*pptr && ISLWS(*pptr)) pptr++; AltTextPtr = pptr; while (*pptr && !ISLWS(*pptr)) { /* underscores represent spaces! (especially for the "blank" icon) */ if (*pptr == '_') *pptr = ' '; pptr++; } /* storing the alternate text twice, as it is plus within the <IMG..> */ Count += (pptr - AltTextPtr) * 2; if (*pptr) *pptr++ = '\0'; /* content-type */ if (TypePtr) pptr = TypePtr; while (*pptr && ISLWS(*pptr)) pptr++; ContentTypePtr = pptr; /* force to lower case to save a TOLO() in ConfigIconFor() */ for ( /* above */ ; *pptr && !ISLWS(*pptr); pptr++) *pptr = TOLO(*pptr); Count += pptr - ContentTypePtr; if (*pptr) *pptr = '\0'; if (!*IconUrlPtr && *IconUrlPtr != '/' || !*AltTextPtr || !*ContentTypePtr || !strchr(ContentTypePtr, '/')) { MetaConReport (mcptr, METACON_REPORT_WARNING, ProblemParameter); return; } /* plus structure overhead, plus the HTML IMG element used below */ Count += cfptr->cfContent.IconStructOverhead + 48; itptr = (ICON_TYPE*)VmGet (Count); itptr->FromMimeTypes = FromMimeTypes; sptr = (char*)itptr + cfptr->cfContent.IconStructOverhead; itptr->ContentTypePtr = sptr; for (cptr = ContentTypePtr; *cptr; *sptr++ = *cptr++); *sptr++ = '\0'; itptr->IconUriPtr = sptr; for (cptr = IconUrlPtr; *cptr; *sptr++ = *cptr++); *sptr++ = '\0'; itptr->AltTextPtr = sptr; for (cptr = AltTextPtr; *cptr; *sptr++ = *cptr++); *sptr++ = '\0'; itptr->IconUrlPtr = sptr; sprintf (sptr, "<img align=\"top\" border=\"0\" src=\"%s\" alt=\"%s\">", IconUrlPtr, AltTextPtr); for (hitptr = Config.cfContent.IconListHeadPtr; hitptr; hitptr = hitptr->NextPtr) { if (strsame (hitptr->ContentTypePtr, ContentTypePtr, -1)) { hitptr->Superceded = true; break; } } /* add to list */ if (!cfptr->cfContent.IconListHeadPtr) cfptr->cfContent.IconListHeadPtr = itptr; else cfptr->cfContent.IconListTailPtr->NextPtr = itptr; cfptr->cfContent.IconListTailPtr = itptr; itptr->NextPtr = NULL; /* generates a lower-case hash */ HashValue = 1; for (cptr = ContentTypePtr; *cptr; cptr++) HashValue = (((*cptr)*541)^(HashValue*3)) & ICON_HASH_TABLE_MASK; if (cfptr->cfContent.IconHashTable[HashValue]) { /* add to the hash-collision list */ for (hitptr = cfptr->cfContent.IconHashTable[HashValue]; hitptr->HashCollisionPtr; hitptr = hitptr->HashCollisionPtr); hitptr->HashCollisionPtr = itptr; } else cfptr->cfContent.IconHashTable[HashValue] = itptr; } /*****************************************************************************/ /* Using the hash table this function searches the icons for one corresponding to the supplied mime content type. The directive content type and associated HTML anchor (containing the original configuration-supplied URL) is stored as an list of structures dynamically allocated memory containing a string. */ char* ConfigIconFor ( char *ContentType, char **IconUriPtrPtr, char **AltTextPtrPtr ) { static BOOL DefaultIconFlipFlop; static char IconNotFound [] = "<font color=\"#ff0000\"><b>[?]</b></font>"; char ch; char *cptr, *sptr, *AltTextPtr, *IconUriPtr; unsigned long HashValue; ICON_TYPE *itptr; /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigIconFor() !&Z !&X !&X", ContentType, IconUriPtrPtr, AltTextPtrPtr); /* generates a lower-case hash */ HashValue = 1; for (cptr = ContentType; *cptr && *cptr != ';' && !ISLWS(*cptr); cptr++) HashValue = ((TOLO(*cptr)*541)^(HashValue*3)) & ICON_HASH_TABLE_MASK; ch = *cptr; *cptr = '\0'; for (itptr = Config.cfContent.IconHashTable[HashValue]; itptr; itptr = itptr->HashCollisionPtr) { if (itptr->Superceded) continue; /* only need to match the content types if there was a collision */ if (itptr->HashCollisionPtr) if (!StringMatch (NULL, ContentType, itptr->ContentTypePtr)) continue; if (IconUriPtrPtr) *IconUriPtrPtr = itptr->IconUriPtr; if (AltTextPtrPtr) *AltTextPtrPtr = itptr->AltTextPtr; *cptr = ch; return (itptr->IconUrlPtr); } *cptr = ch; if (ConfigDefaultIconPtr && (IconUriPtrPtr || AltTextPtrPtr)) { if (DefaultIconFlipFlop = !DefaultIconFlipFlop) { ConfigIconFor (ConfigContentTypeDefaultIcon, &IconUriPtr, &AltTextPtr); if (IconUriPtrPtr) *IconUriPtrPtr = IconUriPtr; if (AltTextPtrPtr) *AltTextPtrPtr = AltTextPtr; return (ConfigDefaultIconPtr); } if (IconUriPtrPtr) *IconUriPtrPtr = ""; if (AltTextPtrPtr) *AltTextPtrPtr = ""; } if (ConfigDefaultIconPtr) return (ConfigDefaultIconPtr); return (IconNotFound); } /*****************************************************************************/ /* Accept or reject the client connection. Lists of hosts must be a comma- separated string. A wildcard '*' in a domain specification matches any string that occurs between the dots. Example: "host1.network1.domain1,*.network2.domain1,*.*.domain2". */ BOOL ConfigAcceptClientHostName ( char *ClientIpAddressString, char *ClientHostName ) { char *cptr, *sptr; /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigAcceptConnection() !&Z", ClientHostName); if (!Config.cfServer.AcceptHostsPtr && !Config.cfServer.RejectHostsPtr) return (true); if (!ClientHostName[0] || ClientHostName[0] == '?') return (false); /******************/ /* hosts accepted */ /******************/ if (Config.cfServer.AcceptHostsPtr) { sptr = Config.cfServer.AcceptHostsPtr; while (*sptr) { if (isdigit(*sptr)) cptr = ClientIpAddressString; else cptr = ClientHostName; while (*cptr) { if (*sptr == STRING_LIST_CHAR) break; if (*sptr == '*') { while (*sptr && *sptr == '*' && *sptr != STRING_LIST_CHAR) sptr++; while (*cptr && *cptr != *sptr) cptr++; } if (TOLO(*cptr) != TOLO(*sptr)) break; if (*cptr) cptr++; if (*sptr) sptr++; } if (!*cptr && (!*sptr || *sptr == STRING_LIST_CHAR)) break; while (*sptr && *sptr != STRING_LIST_CHAR) sptr++; if (*sptr) sptr++; } /* if it was NOT found then reject the connection request */ if (!(!*cptr && (!*sptr || *sptr == STRING_LIST_CHAR))) return (false); } /******************/ /* hosts rejected */ /******************/ if (Config.cfServer.RejectHostsPtr) { sptr = Config.cfServer.RejectHostsPtr; while (*sptr) { if (isdigit(*sptr)) cptr = ClientIpAddressString; else cptr = ClientHostName; while (*cptr) { if (*sptr == STRING_LIST_CHAR) break; if (*sptr == '*') { while (*sptr && *sptr == '*' && *sptr != STRING_LIST_CHAR) sptr++; while (*cptr && *cptr != *sptr) cptr++; } if (TOLO(*cptr) != TOLO(*sptr)) break; if (*cptr) cptr++; if (*sptr) sptr++; } if (!*cptr && (!*sptr || *sptr == STRING_LIST_CHAR)) break; while (*sptr && *sptr != STRING_LIST_CHAR) sptr++; if (*sptr) sptr++; } /* if it WAS found then reject the connection request */ if (!*cptr && (!*sptr || *sptr == STRING_LIST_CHAR)) return (false); } /* accept the connection */ return (true); } /*****************************************************************************/ /* Set directory access booleans. Allowed values OFF, ON, SELECTIVE. */ ConfigSetDirAccess ( META_CONFIG *mcptr, char *pptr ) { static char ProblemParameter [] = "Parameter confusing"; CONFIG_STRUCT *cfptr; /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigSetDirAccess() !&Z", pptr); /* get a pointer to the meta-config data */ cfptr = mcptr->ConfigMetaPtr; if (strsame (pptr, "YES", 3) || strsame (pptr, "ON", 2) || strsame (pptr, "ENABLED", 7)) { cfptr->cfDir.Access = true; cfptr->cfDir.AccessSelective = false; } else if (strsame (pptr, "NO", 2) || strsame (pptr, "OFF", 3) || strsame (pptr, "DISABLED", 8)) cfptr->cfDir.Access = cfptr->cfDir.AccessSelective = false; else if (strsame (pptr, "SELECTIVE", 9)) cfptr->cfDir.Access = cfptr->cfDir.AccessSelective = true; else MetaConReport (mcptr, METACON_REPORT_ERROR, ProblemParameter); } /*****************************************************************************/ /* Set directory README file booleans. Allowed values OFF, TOP, BOTTOM. */ ConfigSetDirReadMe ( META_CONFIG *mcptr, char *pptr ) { static char ProblemParameter [] = "Parameter confusing"; CONFIG_STRUCT *cfptr; /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigSetDirReadMe() !&Z", pptr); /* get a pointer to the meta-config data */ cfptr = mcptr->ConfigMetaPtr; if (strsame (pptr, "NO", 2) || strsame (pptr, "OFF", 3) || strsame (pptr, "DISABLED", 8)) cfptr->cfDir.ReadMeBottom = cfptr->cfDir.ReadMeTop = false; else if (strsame (pptr, "BOTTOM", 6)) { cfptr->cfDir.ReadMeTop = false; cfptr->cfDir.ReadMeBottom = true; } else if (strsame (pptr, "TOP", 3)) { cfptr->cfDir.ReadMeTop = true; cfptr->cfDir.ReadMeBottom = false; } else MetaConReport (mcptr, METACON_REPORT_WARNING, ProblemParameter); } /*****************************************************************************/ /* Add a "read-me" file name. Format: "ReadMeFile file.suffix" Examples: "ReadMeFile README.HTML" "ReadMeFile README.TXT" "ReadMeFile README." The directive is stored as an array of pointers to dynamically allocated memory containing the "read-me" file name. Function ConfigReadMeFile() gets these by index number. */ ConfigSetDirReadMeFile ( META_CONFIG *mcptr, char *pptr ) { static char ProblemParameter [] = "Parameter confusing", ProblemReadMeMax [] = "Maximum read-me exceeded"; int status, Count; char *NamePtr; CONFIG_STRUCT *cfptr; /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigSetDirReadMeFile() !&Z", pptr); /* get a pointer to the meta-config data */ cfptr = mcptr->ConfigMetaPtr; if (cfptr->cfDir.ReadMeFileCount >= CONFIG_README_FILES_MAX) { MetaConReport (mcptr, METACON_REPORT_WARNING, ProblemReadMeMax); return; } NamePtr = pptr; while (*pptr && !ISLWS(*pptr)) { *pptr = TOUP(*pptr); pptr++; } Count = pptr - NamePtr; *pptr = '\0'; if (!*NamePtr) { MetaConReport (mcptr, METACON_REPORT_WARNING, ProblemParameter); return; } cfptr->cfDir.ReadMeFileArray[cfptr->cfDir.ReadMeFileCount] = VmGet(Count+1); strcpy (cfptr->cfDir.ReadMeFileArray[cfptr->cfDir.ReadMeFileCount], NamePtr); cfptr->cfDir.ReadMeFileCount++; } /*****************************************************************************/ /* Return a pointer to the "read-me" file name stored against the index number of the array. If none exists return a null string. The calling function would use this by stepping through the index numbers 0 to n, until the null string was returned indicating the possible "read-me" file names were exhausted. */ char* ConfigReadMeFile (int Number) { /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigReadMeFile !UL", Number); if (Number >= 0 && Number < Config.cfDir.ReadMeFileCount) return (Config.cfDir.ReadMeFileArray[Number]); else return (""); } /*****************************************************************************/ /* Set OPCOM target and message categories. */ ConfigSetOpcom ( META_CONFIG *mcptr, char *cptr, char *sptr ) { static char ProblemParameter [] = "Parameter confusing"; int idx; CONFIG_STRUCT *cfptr; /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigSetOpcom() !&Z !&Z", cptr, sptr); /* get a pointer to the meta-config data */ cfptr = mcptr->ConfigMetaPtr; if (strsame (cptr, "OpcomTarget", -1)) { for (idx = 0; ConfigOpcomTarget[idx].Number >= 0; idx++) if (strsame (ConfigOpcomTarget[idx].Name, sptr, -1)) break; if (ConfigOpcomTarget[idx].Number >= 0) { cfptr->cfOpcom.Target = ConfigOpcomTarget[cfptr->cfOpcom.Index = idx].Number; return; } MetaConReport (mcptr, METACON_REPORT_WARNING, ProblemParameter); return; } if (strsame (cptr, "OpcomAdmin", -1)) { if (MetaConSetBoolean (mcptr, sptr)) cfptr->cfOpcom.Messages |= OPCOM_ADMIN; } else if (strsame (cptr, "OpcomAuthorization", -1)) { if (MetaConSetBoolean (mcptr, sptr)) cfptr->cfOpcom.Messages |= OPCOM_AUTHORIZATION; } else if (strsame (cptr, "OpcomControl", -1)) { if (MetaConSetBoolean (mcptr, sptr)) cfptr->cfOpcom.Messages |= OPCOM_CONTROL; } else if (strsame (cptr, "OpcomHTTPd", -1)) { if (MetaConSetBoolean (mcptr, sptr)) cfptr->cfOpcom.Messages |= OPCOM_HTTPD; } else MetaConReport (mcptr, METACON_REPORT_WARNING, ProblemParameter); } /*****************************************************************************/ /* Proctoring ensures a minimum number of a particular script or scripting environment (e.g. RTE) exists at all times. It is implemented by DclScriptProctor(). The format is <min-count>[+<idle-count>] <pattern> <activation> <notepad> 2+1 (*pyrte) /py-bin/proctor 1 (*pyrte)/py-bin/whatever /py-bin/proctor notepad-string 3 /cgiplus-bin/another /cgiplus-bin/another?proctor where min-count is the minimum number of the script or environment should be present at all times, the optional idle-count the minimum idle at any one time, pattern is a string matching pattern used to match with the script URL (e.g. "($cgi_exe:pyrte.exe)*"), activation is the 'do-nothing' URI used to activate the script or scripting environment, and notepad an optional string that can be detected using mapping. These are stored as four null-terminated strings. */ ConfigSetScriptProctor ( META_CONFIG *mcptr, char *pptr ) { static char ProblemParameter [] = "Proctor parameter confusing", ProblemProctorMax [] = "Maximum proctor exceeded"; int len; char *cptr, *sptr; CONFIG_STRUCT *cfptr; struct ConfigProctorStruct *psptr; /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigSetScriptProctor() !&Z", pptr); if (*pptr == '#') return; cfptr = mcptr->ConfigMetaPtr; if (cfptr->cfScript.ProctorCount >= CONFIG_SCRIPT_PROCTOR_MAX) { MetaConReport (mcptr, METACON_REPORT_WARNING, ProblemProctorMax); return; } psptr = &cfptr->cfScript.Proctor[cfptr->cfScript.ProctorCount]; sptr = psptr->VmPtr = VmGet(strlen(pptr)+4+1); if (*pptr == '+') psptr->NumberIdle = atoi(++pptr); else psptr->NumberMin = atoi(pptr); while (*pptr && isdigit(*pptr)) pptr++; if (*pptr == '+') { psptr->NumberIdle = atoi(++pptr); while (*pptr && isdigit(*pptr)) pptr++; } while (ISLWS(*pptr)) pptr++; psptr->RunTimePtr = sptr; if (*pptr == '(') { /* run-time pattern */ pptr++; while (*pptr && !ISLWS(*pptr) && *pptr != ')') *sptr++ = *pptr++; if (*pptr == ')') pptr++; } *sptr++ ='\0'; /* script pattern (no white-space between this and any run-time!) */ psptr->ScriptPtr = sptr; while (*pptr && !ISLWS(*pptr)) *sptr++ = *pptr++; *sptr++ ='\0'; /* activation script */ while (ISLWS(*pptr)) pptr++; psptr->ActivatePtr = sptr; while (*pptr && !ISLWS(*pptr)) *sptr++ = *pptr++; *sptr++ ='\0'; /* optional mapping notepad (to end of line) */ while (ISLWS(*pptr)) pptr++; psptr->NotePadPtr = sptr; while (*pptr) *sptr++ = *pptr++; *sptr = '\0'; psptr->NotePadLength = sptr - psptr->NotePadPtr; if (*psptr->ScriptPtr != '*' && ((!*psptr->RunTimePtr && !*psptr->ScriptPtr) || !*psptr->ActivatePtr)) { /* must have run-time and/or script along with activation */ MetaConReport (mcptr, METACON_REPORT_WARNING, ProblemParameter); psptr->Problem = true; } cfptr->cfScript.ProctorCount++; } /*****************************************************************************/ /* Implements the reconfiguration setp of /DO=DCL=PROCTOR=LOAD. */ ConfigControlProctorLoad (REQUEST_STRUCT *rqptr) { int count, status; char *cptr, *sptr, *zptr; char StringBuffer [4096]; struct ConfigProctorStruct *psptr; CONFIG_STRUCT *cfptr, *gcfptr; META_CONFIG *gmcptr, *mcptr; /*********/ /* begin */ /*********/ if (WATCHMOD (rqptr, WATCH_MOD_CONFIG)) WatchThis (WATCHITM(rqptr), WATCH_MOD_CONFIG, "ConfigProctorLoad()"); status = ConfigLoad (&mcptr); if (VMSnok (status)) { /* severe error reported */ rqptr->rqResponse.HttpStatus = 403; ErrorGeneral (rqptr, mcptr->LoadReport.TextPtr, FI_LI); } else { /* pointer to the global meta-config */ gmcptr = MetaGlobalConfigPtr; gcfptr = gmcptr->ConfigMetaPtr; /* pointer to the loaded meta-config */ cfptr = mcptr->ConfigMetaPtr; /* replace the global proctor config with the newly loaded */ gcfptr->cfScript.ProctorCount = cfptr->cfScript.ProctorCount; for (count = 0; count < CONFIG_SCRIPT_PROCTOR_MAX; count++) { if (gcfptr->cfScript.Proctor[count].VmPtr) VmFree (gcfptr->cfScript.Proctor[count].VmPtr, FI_LI); memcpy (&gcfptr->cfScript.Proctor[count], &cfptr->cfScript.Proctor[count], sizeof(gcfptr->cfScript.Proctor[0])); } } MetaConUnload (&mcptr, NULL); } /*****************************************************************************/ /* Add a script type. Format: "file-type verb" Examples: ".PL PERL" ".PL $PERL_EXE:PERL.EXE" ".CGI $HT_EXE:CGIPERLUS.EXE" Function DclFindScript() uses this information. The array entries comprise a reconstructed string from the directive. The verb part of the directive can have a leading '@' or '$' indicating that the verb should be created before invoking the script. If not having these leading characters the verb is considered to be globally available. The leading '@' and '$' verbs are reconstructed from "$perl_exe:perl.exe" into "PERL=\"$perl_exe:perl.exe\"". From this the DCL module creates an excecutable DCL command sequence. */ ConfigSetScriptRunTime ( META_CONFIG *mcptr, char *pptr ) { static char ProblemParameter [] = "Parameter confusing", ProblemRunTimeMax [] = "Maximum runtime exceeded"; char *cptr, *sptr; CONFIG_STRUCT *cfptr; struct ConfigRunTimeStruct *rtptr; /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigSetScriptRunTime() !&Z", pptr); if (*pptr == '#') return; cfptr = mcptr->ConfigMetaPtr; if (cfptr->cfScript.RunTimeCount >= CONFIG_SCRIPT_RUNTIME_MAX) { MetaConReport (mcptr, METACON_REPORT_WARNING, ProblemRunTimeMax); return; } rtptr = &cfptr->cfScript.RunTime[cfptr->cfScript.RunTimeCount]; sptr = rtptr->StringPtr = VmGet(strlen(pptr)+3+1); if (*pptr != '.') *sptr++ = '.'; while (*pptr && !ISLWS(*pptr) && *pptr != ';') *sptr++ = TOUP(*pptr++); *sptr++ = ';'; rtptr->FileTypeLength = sptr - rtptr->StringPtr; while (*pptr && (ISLWS(*pptr) || *pptr == ';')) pptr++; if (!*pptr) { MetaConReport (mcptr, METACON_REPORT_WARNING, ProblemParameter); return; } *sptr++ = ' '; while (*pptr) *sptr++ = *pptr++; *sptr = '\0'; cfptr->cfScript.RunTimeCount++; } /*****************************************************************************/ /* Set directory access booleans. Allowed values OFF, ON, EMAIL. */ ConfigSetServerSignature ( META_CONFIG *mcptr, char *pptr ) { static char ProblemParameter [] = "Parameter confusing"; CONFIG_STRUCT *cfptr; /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigSetServerSignature() !&Z", pptr); /* get a pointer to the meta-config data */ cfptr = mcptr->ConfigMetaPtr; if (strsame (pptr, "YES", 3) || strsame (pptr, "ON", 2) || strsame (pptr, "ENABLED", 7)) cfptr->cfServer.Signature = CONFIG_SERVER_SIGNATURE_ON; else if (strsame (pptr, "NO", 2) || strsame (pptr, "OFF", 3) || strsame (pptr, "DISABLED", 8)) cfptr->cfServer.Signature = CONFIG_SERVER_SIGNATURE_OFF; else if (strsame (pptr, "EMAIL", 5)) cfptr->cfServer.Signature = CONFIG_SERVER_SIGNATURE_EMAIL; else MetaConReport (mcptr, METACON_REPORT_WARNING, ProblemParameter); } /*****************************************************************************/ /* Add a welcome (home) page file name. Format: "Welcome file.suffix" Examples: "Welcome HOME.HTML" "Welcome HOME.HTM" "Welcome HOME.MENU" The directive is stored as an array of pointers to dynamically allocated memory containing the home page file name. Function ConfigHomePage() gets these by index number. */ ConfigSetWelcome ( META_CONFIG *mcptr, char *pptr ) { static char ProblemWelcomeMax [] = "Maximum welcome exceeded"; int status, Count; char *WelcomePtr; CONFIG_STRUCT *cfptr; /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigSetWelcome() !&Z", pptr); /* get a pointer to the meta-config data */ cfptr = mcptr->ConfigMetaPtr; if (cfptr->cfContent.HomePageCount >= CONFIG_HOME_PAGES_MAX) { MetaConReport (mcptr, METACON_REPORT_WARNING, ProblemWelcomeMax); return; } WelcomePtr = pptr; while (*pptr && !ISLWS(*pptr)) { *pptr = TOUP(*pptr); pptr++; } Count = pptr - WelcomePtr; *pptr = '\0'; cfptr->cfContent.HomePageArray[cfptr->cfContent.HomePageCount] = VmGet (Count+1); strcpy (cfptr->cfContent.HomePageArray[cfptr->cfContent.HomePageCount], WelcomePtr); cfptr->cfContent.HomePageCount++; } /*****************************************************************************/ /* Return a pointer to the home page (welcome) file name stored against the index number of the array. If none exists return a null string. The calling function would use this by stepping through the index numbers 0 to n, until the null string was returned indicating the possible home page file names were exhausted. */ char* ConfigHomePage (int Number) { /*********/ /* begin */ /*********/ if (WATCH_MODULE(WATCH_MOD_CONFIG)) WatchThis (WATCHALL, WATCH_MOD_CONFIG, "ConfigHomePage !UL", Number); if (Number >= 0 && Number < Config.cfContent.HomePageCount) return (Config.cfContent.HomePageArray[Number]); else return (""); } /*****************************************************************************/ /* A server administration report on the server's configuration. This function just wraps the reporting function, loading a temporary database if necessary for reporting from the configuration file. */ ConfigReport ( REQUEST_STRUCT *rqptr, BOOL UseServerDatabase ) { int count, status; CONFIG_STRUCT *cfptr; META_CONFIG *mcptr; /*********/ /* begin */ /*********/ if (WATCHMOD (rqptr, WATCH_MOD_CONFIG)) WatchThis (WATCHITM(rqptr), WATCH_MOD_CONFIG, "ConfigReport() !&F !UL", &ConfigReport, UseServerDatabase); if (UseServerDatabase) ConfigReportNow (rqptr, MetaGlobalConfigPtr); else { status = ConfigLoad (&mcptr); if (VMSnok (status)) { /* severe error reported */ rqptr->rqResponse.HttpStatus = 403; ErrorGeneral (rqptr, mcptr->LoadReport.TextPtr, FI_LI); } else ConfigReportNow (rqptr, mcptr); cfptr = mcptr->ConfigMetaPtr; for (count = 0; count < CONFIG_SCRIPT_PROCTOR_MAX; count++) if (cfptr->cfScript.Proctor[count].VmPtr) VmFree (cfptr->cfScript.Proctor[count].VmPtr, FI_LI); MetaConUnload (&mcptr, NULL); } AdminEnd (rqptr); } /*****************************************************************************/ /* Return a report on the HTTPd server's configuration ... now! This function blocks while executing. */ ConfigReportNow ( REQUEST_STRUCT *rqptr, META_CONFIG *mcptr ) { /* macro to push booleans onto the parameter list */ #define REP_ENDIS(b) \ if (b) *vecptr++ = "[enabled]"; else *vecptr++ = "[disabled]"; /* report a string, or if empty as "(none)" */ #define REP_NOTNONE(s) \ if (s[0]) *vecptr++ = s; else *vecptr++ = ConfigNoteNone; static char NoRestriction [] = "<i>(no restriction)</i>\n", ServerOnly [] = "<i>(this server only)</i>\n"; static char ReportGeneralFao [] = "<p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">GMT</th></tr>\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Offset:</th><td>!AZ</td></tr>\n\ <tr><th>Current:</th><td>!AZ</td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">General</th></tr>\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Instance Max:</th><td>!&@</td>\ <td><i>per-node servers</i></tr>\ <tr><th>Instance Passive:</th><td colspan=\"2\">!AZ</td></tr>\n\ <tr><th>Connect Max:</th><td>!UL</td>\ <td><i>connections</i></tr>\ <tr><th>Process Max:</th><td>!UL</td>\ <td><i>requests being processed</i></tr>\ <tr><th>Listen Backlog:</th><td>!UL</td>\ <td><i>at socket</i></tr>\ <tr><th>Request History:</th><td>!UL</td>\ <td><i>requests</i></td></tr>\n\ <tr><th>Activity History:</th><td>!UL</td>\ <td><i>days</i></td></tr>\n\ <tr><th>Charset Default:</th><td colspan=\"2\">!AZ</td></tr>\n\ <tr><th>Charset Convert:</th>\ <td colspan=\"2\">!AZ</td></tr>\ <tr><th>Monitor:</th><td colspan=\"2\">!AZ</td></tr>\n\ <tr><th>Regular Expressions:</th><td colspan=\"2\">!&@</td></tr>\n\ <tr><th>Entity Tag:</th><td colspan=\"2\">!AZ</td></tr>\n\ <tr><th>Pipeline Requests:</th><td colspan=\"2\">!AZ</td></tr>\n\ <tr><th>HTTP TRACE:</th><td colspan=\"2\">!AZ</td></tr>\n\ <tr><th>WWW Implied:</th><td colspan=\"2\">!AZ</td></tr>\n\ <tr><th>GZIP Accept:</th><td>!UL</td>\ <tr><th>GZIP Flush:</th><td>!&@</td>\ <td><i>interval[,initial] seconds</i></td></tr>\n\ <tr><th>GZIP Response:</th><td>!&@</td>\ <td><i>level[,memory,window]</i></td></tr>\n\ <tr><th>IP Port:</th><td>!UL</td></tr>\n\ <tr><th>StreamLF:</th><td>!UL</td>\ <td><i>kBytes</i></td></tr>\n\ <tr><th>Search Script:</th><td colspan=\"2\">!AZ</td></tr>\n\ <tr><th>Search Script Exclude:</th><td>!AZ</td>\n\ <td><i>file type</i></td></tr>\n\ <tr><th>PUT/POST Max:</th><td>!UL</td>\ <td><i>kBytes</i></td></tr>\n\ <tr><th>PUT/POST binary RFM:</th><td>!AZ</td></tr>\n\ <tr><th>PUT/POST Files:</th><td>!UL</td>\ <td><i>version limit</i></td></tr>\n\ <tr><th>/~username/ Cache Entries:</th><td>!UL</td>\ <td><i>user names</i></td></tr>\n\ <tr><th>Persona Cache Entries:</th><td>!UL</td>\ <td><i>users</i></td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Host Resolution</th></tr>\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Lookup Client:</th><td colspan=\"2\">!AZ</td></tr>\n\ <tr><th>Life-Time:</th><td colspan=\"2\">!AZ</td></tr>\n\ <tr><th>Retry:</th><td colspan=\"2\">!UL</td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Log</th></tr>\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Logging:</th><td>!AZ</td></tr>\n\ <tr><th>Format:</th><td>!AZ</td>\ <tr><th>Naming:</th><td>!AZ</td>\ <tr><th>Period:</th><td>!AZ</td>\ <tr><th>Per-Instance:</th><td>!AZ</td>\ <tr><th>Per-Service:</th><td>!AZ</td>\ <tr><th>Per-Service Host Only:</th><td>!AZ</td>\ <tr><th>Write Fail 503:</th><td>!AZ</td>\ <tr><th>File:</th><td>!AZ</td>\ <tr><th>Extend Blocks:</th><td>!UL</td>\ <tr><th>Exclude Hosts:</th><td>!AZ</td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">OPCOM</th></tr>\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Target:</th><td>!AZ</td></tr>\n\ <tr><th>Admin:</th><td>!AZ</td></tr>\ <tr><th>Authorization:</th><td>!AZ</td></tr>\ <tr><th>Control:</th><td>!AZ</td></tr>\ <tr><th>HTTPd:</th><td>!AZ</td></tr>\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">File Cache</th></tr>\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Caching:</th><td colspan=\"2\">!AZ</td></tr>\n\ <tr><th>Max Entries:</th><td>!UL</td>\ <td><i>files</i></td></tr>\n\ <tr><th>Max Cache Size:</th><td>!UL</td>\ <td><i>kBytes</i></td></tr>\n\ <tr><th>Max Entry Size:</th><td>!UL</td>\ <td><i>kBytes</i></td></tr>\n\ <tr><th>Guard:</th><td>!AZ</td>\ <td><i>hh:mm:ss</i></td></tr>\n\ <tr><th>Validate:</th><td>!AZ</td></tr>\n\ <tr><th>Frequent /Hits:</th><td>!UL</td></tr>\ <tr><th>/Within:</th><td>!AZ</td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Timeouts</th></tr>\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Input:</th><td>!AZ</td>\ <td><i>hh:mm:ss</i></td></tr>\n\ <tr><th>Output:</th><td>!AZ</td></tr>\n\ <tr><th>No-Progress:</th><td>!AZ</td></tr>\n\ <tr><th>Persistent Connection:</th><td>!AZ</td></tr>\n\ <tr><th>HTTP/2 Idle:</th><td>!AZ</td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Buffer Sizes !AZ</th></tr>\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>DCL <font size=\"-1\">SYS$COMMAND</font>:</th>\ <td>!UL</td></tr>\n\ <tr><th>DCL <font size=\"-1\">SYS$OUTPUT</font>:</th>\ <td>!UL</td><td>(!UL)</td></tr>\n\ <tr><th>DCL <font size=\"-1\">(SYS$OUTPUT) BUFQUO</font>:</th>\ <td>!UL</td><td>(!UL)</td></tr>\n\ <tr><th>DCL <font size=\"-1\">CGIPLUSIN</font>:</th>\ <td>!UL</td></tr>\n\ <tr><th>CGI Header:</th>\ <td>!UL</td></tr>\n\ <tr><th>Network Read:</th><td>!UL</td></tr>\n\ <tr><th>Network Write:</th><td>!UL</td>\ <td>(!UL)</td></tr>\n\ <tr><th>Network File:</th><td>!UL</td>\ <td>(!UL)</td></tr>\n\ <tr><th>Network MTU:</th><td>!UL</td></tr>\n\ <tr><th>Socket SNDBUF:</th><td>!UL</td>\ <td>!AZ</td></tr>\n\ <tr><th>Socket RCVBUF:</th><td>!UL</td>\ <td>!AZ</td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n"; static char ReportWelcomeFao [] = "<p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Welcome (Home) Pages</th></tr>\n\ <tr><td>\n\ <table class=\"lftlft\">\n"; static char ReportHostsFao [] = "</table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Hosts</th></tr>\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Accept:</th><td>!AZ</td></tr>\n\ <tr><th>Reject:</th><td>!AZ</td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Server Generated Reports</th></tr>\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Server Admin Email:</th>\ <td colspan=\"2\">!&@</td></tr>\n\ <tr><th>Server Signature:</th><td>!&;AZ</td></tr>\n\ <tr><th>Basic Info Only:</th><td>!AZ</td></tr>\n\ <tr><th><META> Info:</th><td>!AZ</td></tr>\n\ <tr><th>Error Report Path:</th><td colspan=\"2\">!AZ</td></tr>\n\ <tr><th>Error Recommend:</th><td>!AZ</td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Authorization</th></tr>\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Cache Entries:</th><td>!UL</td></tr>\n\ <tr><th>Cache Entry Size:</th><td>!UL</td>\ <td><i>bytes</i></td></tr>\n\ <tr><th>Cache Valid:</th><td>!UL</td>\ <td><i>minutes</i></td></tr>\n\ <tr><th>Revalidate User:</th><td>!UL</td>\ <td><i>minutes</i></td></tr>\n\ <tr><th>Failure Limit:</th><td>!UL</td>\ <td><i>attempts</i></td></tr>\n\ <tr><th>Failure Period:</th><td>!AZ</td>\ <td><i>hh:mm:ss</i></td></tr>\n\ <tr><th>Failure Timeout:</th><td>!AZ</td></tr>\n\ <tr><th>Token Entries:</th><td>!SL</td></tr>\n\ <tr><th>Basic</th><td colspan=\"2\">!AZ</td></tr>\n\ <tr><th>Digest:</th><td colspan=\"2\">!AZ</td></tr>\n\ <tr><th>Digest GET lifetime:</th><td>!UL</td>\ <td><i>minutes</i></td></tr>\n\ <tr><th>Digest PUT lifetime:</th><td>!UL</td>\ <td><i>minutes</i></td></tr>\n\ <tr><th>SYSUAF Logon Type:</th>\ <td colspan=\"2\">!AZ</td></tr>\n\ <tr><th>SYSUAF Accept Expired Pwd:</th>\ <td colspan=\"2\">!AZ</td></tr>\n\ <tr><th>SYSUAF Pwd Expired URL:</th>\ <td colspan=\"2\">!AZ</td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Proxy Serving</th></tr>\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Proxy Serving:</th>\ <td colspan=\"2\">!AZ</td></tr>\n\ <tr><th>Unknown Request Fields:</th>\ <td colspan=\"2\">!AZ</td></tr>\n\ <tr><th>Add "Forwarded: by":</th>\ <td colspan=\"2\">!AZ</td></tr>\n\ <tr><th>Add "X-Forwarded-For:":</th>\ <td colspan=\"2\">!AZ</td></tr>\n\ <tr><th>Report Events To Log:</th>\ <td colspan=\"2\">!AZ</td></tr>\n\ <tr><th>Verify Max:</th><td>!UL</td>\ <td><i>records</i></td></tr>\n\ <tr><th>Host Name Lookup Retry:</th><td>!UL</td>\ <td><i>attempts</i></td></tr>\n\ <tr><th>Connect Timeout:</th><td>!AZ</td>\ <td><i>hh:mm:ss</i></td></tr>\n\ <tr><th>Connect Persist Max:</th><td>!UL</td>\ <td><i>connections</i></td></tr>\n\ <tr><th>Connect Persist Timeout:</th><td>!AZ</td>\ <td><i>hh:mm:ss</i></td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Scripting (CGI, DCL & DECnet)</th></tr>\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Scripting:</th><td colspan=\"3\">!AZ</td></tr>\n\ <tr><th>Detach Process:</th><td colspan=\"3\">!AZ</td></tr>\n\ <tr><th>Process Priority:</th><td>!AZ</td>\ <td><i>server,user</i></td></tr>\n\ <tr><th>Strict CGI Output:</th><td colspan=\"3\">!AZ</td></tr>\n\ <tr><th>Spawn Authorized Privileges:</th><td colspan=\"3\">!AZ</td></tr>\n\ <tr><th>Gateway BG:</th><td colspan=\"3\">!AZ</td></tr>\n\ <tr><th>Soft Limit:</th><td>!UL</td>\ <td><i>script processes</i></td></tr>\n\ <tr><th>Hard Limit:</th><td>!UL</td>\ <td><i>script processes</i></td></tr>\n\ <tr><th>Bit-Bucket Timeout:</th><td>!AZ</td>\ <td><i>hh:mm:ss</i></td></tr>\n\ <tr><th>Zombie Life-Time:</th><td>!AZ</td></tr>\n\ <tr><th>CGIplus Life-Time:</th><td>!AZ</td></tr>\n\ <tr><th>DECnet Reuse Life-Time:</th><td>!AZ</td></tr>\n\ <tr><th>DECnet Connect List Max:</th><td>!UL</td>\ <td><i>connections</i></td></tr>\n\ <tr><th>Cleanup Scratch Max:</th><td>!UL</td>\ <td><i>minutes</i></td></tr>\n\ <tr><th>Cleanup Older-than:</th><td>!UL</td>\ <td><i>minutes</i></td></tr>\n\ <tr><th>Script Run-Time:</th>\ <td class=\"sbttl\">suffix</td>\ <td class=\"sbttl\" colspan=\"3\">verb</td></tr>\n"; static char ReportProctorFao [] = "<tr><th>Script Proctor:</th>\ <td class=\"sbttl\">min+idle</td><td class=\"sbttl\">pattern</td>\ <td class=\"sbttl\">activation</td><td class=\"sbttl\">notepad</td></tr>\n"; static char ReportSsiFao [] = "</table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Server-Side Includes</th></tr>\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>SSI:</th><td>!AZ</td></tr>\n\ <tr><th>Exec:</th><td>!AZ</td></tr>\n\ <tr><th>Accesses:</th><td>!AZ</td></tr>\n\ <tr><th>Max Size:</th><td>!UL</td>\ <td><i>kBytes</i></td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">WebDAV</th></tr>\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>WebDAV:</th><td>!AZ</td></tr>\n\ <tr><th>Locking:</th><td>!AZ</td></tr>\n\ <tr><th>Lock Timeout Default:</th><td>!AZ</td></tr>\n\ <tr><th>Lock Timeout Max:</th><td>!AZ</td></tr>\n\ <tr><th>Lock Collection Depth:</th><td>!UL</td></tr>\n\ <tr><th>Quota:</th><td>!AZ</td></tr>\n\ <tr><th>Meta File Directory:</th><td>!AZ</td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Directory</th></tr>\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Access:</th><td>!AZ</td></tr>\n\ <tr><th>Layout:</th><td>!AZ</td></tr>\n\ <tr><th>Listing <BODY>:</th>\ <td><tt>!&;AZ</tt></td></tr>\n\ <tr><th>HTML Description:</th><td>!UL <i>lines</i></td></tr>\n\ <tr><th><META> Info:</th><td>!AZ</td></tr>\n\ <tr><th>Owner:</th><td>!AZ</td></tr>\n\ <tr><th>Pre-Expired:</th><td>!AZ</td></tr>\n\ <tr><th>Wildcard:</th><td>!AZ</td></tr>\n\ <tr><th>No Implied Wildcard:</th><td>!AZ</td></tr>\n\ <tr><th>Prot Violations Ignored:</th><td>!AZ</td></tr>\n\ <tr><th>Readme:</th><td>!AZ !AZ</td></tr>\n\ <tr><th>Readme Files:</th>\n"; static char ReportIconsFao [] = "</table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Directory Icons</th></tr>\n\ <tr><td>\n\ <table class=\"lftlft\">\n\ <tr>\ <th class=\"sbttl\">Content-Type</th>\ <th class=\"sbttl\">Icon</th>\ <th class=\"sbttl\">Path</th>\ <th class=\"sbttl\">Alt.Text</th>\ </tr>\n"; static char ReportContentTypeFao [] = "</table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Content-Type</th></tr>\n\ <tr><td>\n\ <table class=\"lftlft\">\n\ <tr>\ <th class=\"sbttl\">Suffix</th>\ <th class=\"sbttl\">Content-Type</th>\ <th class=\"sbttl\">Icon</th>\ <th class=\"sbttl\">Auto-script</th>\ <th class=\"sbttl\">Description</th>\ </tr>\n"; static char EndPageFao [] = "<tr><td colspan=\"5\"><b><u>MIME.TYPES File</u>:</b> !AZ</td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ </div>\n\ </body>\n\ </html>\n"; int idx, status; unsigned long *vecptr; unsigned long FaoVector [128]; char HtmlIconAltText [256], IconAltText [256], IconPath [256]; char *cptr, *sptr, *zptr; CONFIG_STRUCT *cfptr; CONTENT_TYPE ContentType; CONTENT_TYPE *ctptr; ICON_TYPE *itptr; /*********/ /* begin */ /*********/ if (WATCHMOD (rqptr, WATCH_MOD_CONFIG)) WatchThis (WATCHITM(rqptr), WATCH_MOD_CONFIG, "ConfigReportNow()"); /* get a pointer to the meta-config data */ cfptr = mcptr->ConfigMetaPtr; AdminPageTitle (rqptr, "Server Configuration"); AdminMetaConReport (rqptr, mcptr, MetaGlobalConfigPtr); AdminMetaConSource (rqptr, mcptr, MetaGlobalConfigPtr); /************/ /* services */ /************/ if (VMSnok (ServiceReportConfigFromString (rqptr, cfptr))) return; /***********/ /* general */ /***********/ vecptr = FaoVector; /* GMT */ *vecptr++ = TimeGmtString; *vecptr++ = rqptr->rqTime.GmDateTime; /* general */ if (cfptr->cfServer.InstanceMax == INSTANCE_PER_CPU) *vecptr++ = "CPU"; else { *vecptr++ = "!UL"; *vecptr++ = cfptr->cfServer.InstanceMax; } REP_ENDIS (cfptr->cfServer.InstancePassive) if (cfptr->cfServer.ConnectMax && !NetInstancePassive) *vecptr++ = cfptr->cfServer.ConnectMax; else *vecptr++ = NetConcurrentMax; if (cfptr->cfServer.ProcessMax && !NetInstancePassive) *vecptr++ = cfptr->cfServer.ProcessMax; else *vecptr++ = NetConcurrentProcessMax; if (cfptr->cfServer.ListenBacklog) *vecptr++ = cfptr->cfServer.ListenBacklog; else *vecptr++ = DEFAULT_LISTEN_BACKLOG; *vecptr++ = cfptr->cfMisc.RequestHistory; *vecptr++ = cfptr->cfMisc.ActivityNumberOfDays; REP_NOTNONE (cfptr->cfContent.CharsetDefault) if (cfptr->cfContent.CharsetConvertPtr) *vecptr++ = ConfigStringList (rqptr, cfptr->cfContent.CharsetConvertPtr, '\r'); else *vecptr++ = ConfigNoteNone; REP_ENDIS (cfptr->cfMisc.MonitorEnabled) *vecptr++ = "!AZ"; switch (cfptr->cfMisc.RegexSyntax) { case 0 : *vecptr++ = "[disabled]"; break; case REGEX_C_FLAGS : *vecptr++ = "[enabled]"; break; case RE_SYNTAX_AWK : *vecptr++ = "AWK"; break; case RE_SYNTAX_EGREP : *vecptr++ = "EGREP"; break; case RE_SYNTAX_GREP : *vecptr++ = "GREP"; break; case RE_SYNTAX_POSIX_AWK : *vecptr++ = "POSIX_AWK"; break; case RE_SYNTAX_POSIX_BASIC : *vecptr++ = "POSIX_BASIC/ED/SED"; break; case RE_SYNTAX_POSIX_EGREP : *vecptr++ = "POSIX_EGREP"; break; case RE_SYNTAX_POSIX_EXTENDED : *vecptr++ = "POSIX_EXTENDED"; break; case RE_SYNTAX_POSIX_MINIMAL_BASIC : *vecptr++ = "POSIX_MINIMAL_BASIC"; break; case RE_SYNTAX_POSIX_MINIMAL_EXTENDED : *vecptr++ = "POSIX_MINIMAL_EXTENDED"; break; default : vecptr--; *vecptr++ = "!8XL"; *vecptr = cfptr->cfMisc.RegexSyntax; } REP_ENDIS (cfptr->cfMisc.EntityTag) REP_ENDIS (cfptr->cfMisc.PipelineRequests) REP_ENDIS (cfptr->cfMisc.HttpTraceEnabled) REP_ENDIS (cfptr->cfMisc.WwwImplied) *vecptr++ = cfptr->cfMisc.GzipAcceptWindowBits; if (cfptr->cfMisc.GzipFlushSeconds && cfptr->cfMisc.GzipFlushInitialSeconds) { *vecptr++ = "!UL,!UL"; *vecptr++ = cfptr->cfMisc.GzipFlushSeconds; *vecptr++ = cfptr->cfMisc.GzipFlushInitialSeconds; } else { *vecptr++ = "!UL"; *vecptr++ = cfptr->cfMisc.GzipFlushSeconds; } if (cfptr->cfMisc.GzipResponseMemLevel || cfptr->cfMisc.GzipResponseWindowBits) { *vecptr++ = "!UL,!UL,!UL"; *vecptr++ = cfptr->cfMisc.GzipResponseCompLevel; *vecptr++ = cfptr->cfMisc.GzipResponseMemLevel; *vecptr++ = cfptr->cfMisc.GzipResponseWindowBits; } else { *vecptr++ = "!UL"; *vecptr++ = cfptr->cfMisc.GzipResponseCompLevel; } *vecptr++ = cfptr->cfServer.DefaultPort; *vecptr++ = cfptr->cfMisc.StreamLfConversionMaxKbytes; *vecptr++ = cfptr->cfScript.DefaultSearch; if (cfptr->cfScript.DefaultSearchExcludePtr) *vecptr++ = ConfigStringList (rqptr, cfptr->cfScript.DefaultSearchExcludePtr, '\r'); else *vecptr++ = ConfigNoteNone; *vecptr++ = cfptr->cfMisc.PutMaxKbytes; if (cfptr->cfMisc.PutBinaryRFM == PUT_RFM_FIX512) *vecptr++ = "FIX512"; else if (cfptr->cfMisc.PutBinaryRFM == PUT_RFM_STM) *vecptr++ = "STM"; else if (cfptr->cfMisc.PutBinaryRFM == PUT_RFM_STMCR) *vecptr++ = "STMCR"; else if (cfptr->cfMisc.PutBinaryRFM == PUT_RFM_STMLF) *vecptr++ = "STMLF"; else if (cfptr->cfMisc.PutBinaryRFM == PUT_RFM_UDF) *vecptr++ = "UDF"; else *vecptr++ = "<i>(UDF)</i>"; *vecptr++ = cfptr->cfMisc.PutVersionLimit; if (cfptr == &Config) *vecptr++ = MapUrlUserNameCacheEntries; else *vecptr++ = cfptr->cfMisc.MapUserNameCacheEntries; if (cfptr == &Config) *vecptr++ = PersonaCacheEntries; else *vecptr++ = cfptr->cfMisc.PersonaCacheEntries; /* DNS host resolution */ REP_ENDIS (cfptr->cfMisc.DnsLookupClient) *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfMisc.DnsLookupLifeTimeSeconds); *vecptr++ = cfptr->cfMisc.DnsLookupRetryCount; /* logging */ REP_ENDIS (cfptr->cfLog.Enabled) REP_NOTNONE (cfptr->cfLog.Format) REP_NOTNONE (cfptr->cfLog.Naming) REP_NOTNONE (cfptr->cfLog.Period) REP_ENDIS (cfptr->cfLog.PerInstance) REP_ENDIS (cfptr->cfLog.PerService) REP_ENDIS (cfptr->cfLog.PerServiceHostOnly) REP_ENDIS (cfptr->cfLog.WriteFail503) REP_NOTNONE (cfptr->cfLog.FileName) *vecptr++ = cfptr->cfLog.ExtendBlocks; if (cfptr->cfLog.ExcludeHostsPtr) *vecptr++ = ConfigStringList (rqptr, cfptr->cfLog.ExcludeHostsPtr, '\n'); else *vecptr++ = ConfigNoteNone; /* OPCOM messages */ *vecptr++ = ConfigOpcomTarget[cfptr->cfOpcom.Index].Name; REP_ENDIS (cfptr->cfOpcom.Messages & OPCOM_ADMIN) REP_ENDIS (cfptr->cfOpcom.Messages & OPCOM_AUTHORIZATION) REP_ENDIS (cfptr->cfOpcom.Messages & OPCOM_CONTROL) REP_ENDIS (cfptr->cfOpcom.Messages & OPCOM_HTTPD) /* cache */ REP_ENDIS (cfptr->cfCache.Enabled) *vecptr++ = cfptr->cfCache.EntriesMax; *vecptr++ = cfptr->cfCache.TotalKBytesMax; *vecptr++ = cfptr->cfCache.FileKBytesMax; *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfCache.GuardSeconds); *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfCache.ValidateSeconds); *vecptr++ = cfptr->cfCache.FrequentHits; *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfCache.FrequentSeconds); /* timeouts */ *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfTimeout.Input); *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfTimeout.Output); *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfTimeout.NoProgress); *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfTimeout.Persistent); *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfTimeout.Http2Idle); /* buffer sizes */ if (cfptr == &Config) { /* in-use values */ *vecptr++ = "(in-use)"; *vecptr++ = DclSysCommandSize; *vecptr++ = DclSysOutputSize; *vecptr++ = cfptr->cfBuffer.SizeDclOutput; *vecptr++ = DclSysOutputQuota; *vecptr++ = cfptr->cfBuffer.QuotaDclOutput; *vecptr++ = DclCgiPlusInSize; *vecptr++ = DclCgiHeaderSize; *vecptr++ = NetReadBufferSize; *vecptr++ = OutputBufferSize; *vecptr++ = cfptr->cfBuffer.SizeNetWrite; *vecptr++ = OutputFileBufferSize; *vecptr++ = cfptr->cfBuffer.SizeNetFile; *vecptr++ = cfptr->cfBuffer.SizeNetMTU; *vecptr++ = TcpIpSocketSndBufSize; *vecptr++ = TcpIpSocketSndBufSize ? "" : ConfigNoteSystem; *vecptr++ = TcpIpSocketRcvBufSize; *vecptr++ = TcpIpSocketRcvBufSize ? "" : ConfigNoteSystem; } else { /* file values */ *vecptr++ = "(config)"; *vecptr++ = cfptr->cfBuffer.SizeDclCommand; *vecptr++ = cfptr->cfBuffer.SizeDclOutput; *vecptr++ = DclSysOutputSize; *vecptr++ = cfptr->cfBuffer.QuotaDclOutput; *vecptr++ = DclSysOutputQuota; *vecptr++ = cfptr->cfBuffer.SizeDclCgiPlusIn; *vecptr++ = cfptr->cfBuffer.SizeDclCgiHeader; *vecptr++ = cfptr->cfBuffer.SizeNetRead; *vecptr++ = cfptr->cfBuffer.SizeNetWrite; *vecptr++ = OutputBufferSize; *vecptr++ = cfptr->cfBuffer.SizeNetFile; *vecptr++ = OutputFileBufferSize; *vecptr++ = cfptr->cfBuffer.SizeNetMTU; *vecptr++ = cfptr->cfBuffer.SizeSocketSndBuf; *vecptr++ = cfptr->cfBuffer.SizeSocketSndBuf ? "" : ConfigNoteSystem; *vecptr++ = cfptr->cfBuffer.SizeSocketRcvBuf; *vecptr++ = cfptr->cfBuffer.SizeSocketRcvBuf ? "" : ConfigNoteSystem; } FaoCheck (sizeof(FaoVector), &FaoVector, vecptr, FI_LI); status = FaolToNet (rqptr, ReportGeneralFao, &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); /**********/ /* HTTP/2 */ /**********/ ConfigReportHttp2 (rqptr, mcptr); /******************/ /* Secure Sockets */ /******************/ ConfigReportSecureSocket (rqptr, mcptr); /*****************************/ /* welcome (home page) files */ /*****************************/ status = FaolToNet (rqptr, ReportWelcomeFao, NULL); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); for (idx = 0; idx < cfptr->cfContent.HomePageCount; idx++) { status = FaoToNet (rqptr, "<tr><td><tt>!&;AZ</tt></td></tr>\n", cfptr->cfContent.HomePageArray[idx]); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); } /*********************/ /* host access, etc. */ /*********************/ vecptr = FaoVector; if (cfptr->cfServer.AcceptHostsPtr) *vecptr++ = ConfigStringList (rqptr, cfptr->cfServer.AcceptHostsPtr, ','); else *vecptr++ = ConfigNoteNone; if (cfptr->cfServer.RejectHostsPtr) *vecptr++ = ConfigStringList (rqptr, cfptr->cfServer.RejectHostsPtr, ','); else *vecptr++ = ConfigNoteNone; /* reports */ if (cfptr->cfServer.AdminEmail[0]) { *vecptr++ = "!&;AZ"; *vecptr++ = cfptr->cfServer.AdminEmail; } else { *vecptr++ = "!AZ"; *vecptr++ = ConfigNoteNone; } if (cfptr->cfServer.Signature == CONFIG_SERVER_SIGNATURE_ON) *vecptr++ = "[enabled]"; else if (cfptr->cfServer.Signature == CONFIG_SERVER_SIGNATURE_EMAIL) *vecptr++ = "[enabled] [email]"; else *vecptr++ = "[disabled]"; REP_ENDIS (cfptr->cfReport.BasicOnly) REP_ENDIS (cfptr->cfReport.MetaInfoEnabled) REP_NOTNONE (cfptr->cfReport.ErrorReportPath) REP_ENDIS (cfptr->cfReport.ErrorRecommend) /* authentication */ *vecptr++ = cfptr->cfAuth.CacheEntriesMax; *vecptr++ = cfptr->cfAuth.CacheEntrySize; *vecptr++ = cfptr->cfAuth.CacheMinutes; *vecptr++ = cfptr->cfAuth.RevalidateUserMinutes; if (mcptr == MetaGlobalConfigPtr) { /* server, show the values in use */ *vecptr++ = AuthFailureLimit; *vecptr++ = MetaConShowSeconds (rqptr, AuthFailurePeriodSeconds); *vecptr++ = MetaConShowSeconds (rqptr, AuthFailureTimeoutSeconds); } else { /* from file, show the config values */ *vecptr++ = cfptr->cfAuth.FailureLimit; *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfAuth.FailurePeriodSeconds); *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfAuth.FailureTimeoutSeconds); } *vecptr++ = cfptr->cfAuth.TokenEntriesMax; REP_ENDIS (cfptr->cfAuth.BasicEnabled) REP_ENDIS (cfptr->cfAuth.DigestEnabled) *vecptr++ = cfptr->cfAuth.DigestNonceGetLifeTime; *vecptr++ = cfptr->cfAuth.DigestNonceGetLifeTime; switch (cfptr->cfAuth.SysUafLogonType) { case AUTH_LOGON_TYPE_NETWORK : *vecptr++ = "NETWORK"; break; case AUTH_LOGON_TYPE_BATCH : *vecptr++ = "BATCH"; break; case AUTH_LOGON_TYPE_LOCAL : *vecptr++ = "LOCAL"; break; case AUTH_LOGON_TYPE_DIALUP : *vecptr++ = "DIALUP"; break; case AUTH_LOGON_TYPE_REMOTE : *vecptr++ = "REMOTE"; break; default : *vecptr++ = ConfigNoteDefault; } REP_ENDIS (cfptr->cfAuth.SysUafAcceptExpPwd) REP_NOTNONE (cfptr->cfAuth.SysUafPwdExpUrl) /* proxy serving */ REP_ENDIS (cfptr->cfProxy.ServingEnabled) REP_ENDIS (cfptr->cfProxy.UnknownRequestFields) if (cfptr->cfProxy.ForwardedBy == PROXY_FORWARDED_BY) *vecptr++ = "BY"; else if (cfptr->cfProxy.ForwardedBy == PROXY_FORWARDED_FOR) *vecptr++ = "FOR"; else if (cfptr->cfProxy.ForwardedBy == PROXY_FORWARDED_ADDRESS) *vecptr++ = "ADDRESS"; else *vecptr++ = ConfigNoteNone; if (cfptr->cfProxy.XForwardedFor == PROXY_XFORWARDEDFOR_ENABLED) *vecptr++ = "ENABLED"; else if (cfptr->cfProxy.XForwardedFor == PROXY_XFORWARDEDFOR_UNKNOWN) *vecptr++ = "UNKNOWN"; else if (cfptr->cfProxy.XForwardedFor == PROXY_XFORWARDEDFOR_ADDRESS) *vecptr++ = "ADDRESS"; else *vecptr++ = ConfigNoteNone; REP_ENDIS (cfptr->cfProxy.ReportLog) *vecptr++ = cfptr->cfProxy.VerifyRecordMax; *vecptr++ = cfptr->cfProxy.HostLookupRetryCount; *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfProxy.ConnectTimeoutSeconds); *vecptr++ = cfptr->cfProxy.ConnectPersistMax; *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfProxy.ConnectPersistSeconds); /* scripting */ REP_ENDIS (cfptr->cfScript.Enabled) REP_ENDIS (cfptr->cfScript.DetachProcess) *vecptr++ = cfptr->cfScript.DetachProcessPriority; REP_ENDIS (cfptr->cfScript.CgiStrictOutput) REP_ENDIS (cfptr->cfScript.SpawnAuthPriv) REP_ENDIS (cfptr->cfScript.GatewayBg) *vecptr++ = cfptr->cfScript.ScriptProcessSoftLimit; *vecptr++ = cfptr->cfScript.ScriptProcessHardLimit; *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfScript.BitBucketTimeout); *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfScript.ZombieLifeTime); *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfScript.CgiPlusLifeTime); *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfScript.DECnetReuseLifeTime); *vecptr++ = cfptr->cfScript.DECnetConnectListMax; *vecptr++ = cfptr->cfScript.CleanupScratchMinutesMax; *vecptr++ = cfptr->cfScript.CleanupScratchMinutesOld; FaoCheck (sizeof(FaoVector), &FaoVector, vecptr, FI_LI); status = FaolToNet (rqptr, ReportHostsFao, &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); /****************/ /* script types */ /****************/ if (cfptr->cfScript.RunTimeCount) { for (idx = 0; idx < cfptr->cfScript.RunTimeCount; idx++) { vecptr = FaoVector; cptr = sptr = cfptr->cfScript.RunTime[idx].StringPtr; /* length of and location of the file type */ while (*cptr && *cptr != ';') cptr++; *vecptr++ = cptr - sptr; *vecptr++ = sptr; /* location of verb */ cptr += 2; *vecptr++ = cptr; status = FaolToNet (rqptr, "<tr><td></td><td>!#&;AZ</td><td colspan=\"3\"><tt>!&;AZ</tt></td></tr>\n", &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); } } else { static char NotNone [] = "<tr><td colspan=\"2\">" CONFIG_NOTE_NONE "</td></tr>\n"; status = FaolToNet (rqptr, NotNone, NULL); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); } status = FaolToNet (rqptr, ReportProctorFao, &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); /******************/ /* script proctor */ /******************/ if (cfptr->cfScript.ProctorCount) { for (idx = 0; idx < cfptr->cfScript.ProctorCount; idx++) { vecptr = FaoVector; *vecptr++ = cfptr->cfScript.Proctor[idx].NumberMin; *vecptr++ = cfptr->cfScript.Proctor[idx].NumberIdle; *vecptr++ = *cfptr->cfScript.Proctor[idx].RunTimePtr ? "(" : ""; *vecptr++ = cfptr->cfScript.Proctor[idx].RunTimePtr; *vecptr++ = *cfptr->cfScript.Proctor[idx].RunTimePtr ? ")" : ""; *vecptr++ = cfptr->cfScript.Proctor[idx].ScriptPtr; *vecptr++ = cfptr->cfScript.Proctor[idx].ActivatePtr; *vecptr++ = cfptr->cfScript.Proctor[idx].NotePadPtr; status = FaolToNet (rqptr, "<tr><td></td><td>!UL+!UL</td><td>!AZ!AZ!AZ!AZ</td>\ <td>!AZ</td><td>!AZ</td></tr>\n", &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); } } else { static char NotNone [] = "<tr><td></td><td colspan=\"3\">" CONFIG_NOTE_NONE "</td></tr>\n"; status = FaolToNet (rqptr, NotNone, NULL); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); } /**********************/ /* Reports, SSI, etc. */ /**********************/ vecptr = FaoVector; /* SSI (.shtml) */ REP_ENDIS (cfptr->cfSsi.Enabled) REP_ENDIS (cfptr->cfSsi.ExecEnabled) REP_ENDIS (cfptr->cfSsi.AccessesEnabled) *vecptr++ = cfptr->cfSsi.SizeMax; REP_ENDIS (cfptr->cfWebDav.DavEnabled) REP_ENDIS (cfptr->cfWebDav.LockingEnabled) *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfWebDav.LockTimeoutDefaultSeconds); *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfWebDav.LockTimeoutMaxSeconds); *vecptr++ = cfptr->cfWebDav.LockCollectionDepth; REP_ENDIS (cfptr->cfWebDav.QuotaEnabled) if (cfptr->cfWebDav.MetaFileDirectoryLength) *vecptr++ = cfptr->cfWebDav.MetaFileDirectory; else *vecptr++ = ConfigNoteNone; REP_ENDIS (cfptr->cfDir.Access) REP_NOTNONE (cfptr->cfDir.DefaultLayout) *vecptr++ = cfptr->cfDir.BodyTag; *vecptr++ = cfptr->cfDir.DescriptionLines; REP_ENDIS (cfptr->cfDir.MetaInfoEnabled) REP_ENDIS (cfptr->cfDir.OwnerEnabled) REP_ENDIS (cfptr->cfDir.PreExpired) REP_ENDIS (cfptr->cfDir.WildcardEnabled) REP_ENDIS (cfptr->cfDir.NoImpliedWildcard) REP_ENDIS (cfptr->cfDir.NoPrivIgnore) REP_ENDIS (cfptr->cfDir.ReadMeTop | cfptr->cfDir.ReadMeBottom) if (cfptr->cfDir.ReadMeTop) *vecptr++ = "[top]"; else if (cfptr->cfDir.ReadMeBottom) *vecptr++ = "[bottom]"; else *vecptr++ = ""; FaoCheck (sizeof(FaoVector), &FaoVector, vecptr, FI_LI); status = FaolToNet (rqptr, ReportSsiFao, &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); /*********************/ /* directory (contd) */ /*********************/ for (idx = 0; idx < cfptr->cfDir.ReadMeFileCount; idx++) { status = FaoToNet (rqptr, "!&@<td><tt>!AZ</tt></td></tr>\n", idx ? "<tr><td></td>" : "", cfptr->cfDir.ReadMeFileArray[idx]); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); } /*********/ /* icons */ /*********/ status = FaolToNet (rqptr, ReportIconsFao, NULL); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); itptr = cfptr->cfContent.IconListHeadPtr; while (itptr) { vecptr = FaoVector; *vecptr++ = itptr->ContentTypePtr; *vecptr++ = itptr->IconUrlPtr; *vecptr++ = itptr->IconUriPtr; *vecptr++ = itptr->AltTextPtr; if (itptr->Superceded) cptr = "<tr><td><i><strike>!AZ</strike></i></td>\ <td class=\"talft\">!AZ</td>\ <td><i><strike>!AZ</strike></i></td>\ <td><i><strike>[!&;AZ]</strike></i></td></tr>\n"; else cptr = "<tr><td>!AZ</td>\ <td class=\"talft\">!AZ</td>\ <td>!AZ</td>\ <td>!AZ</td></tr>\n"; status = FaolToNet (rqptr, cptr, &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); itptr = itptr->NextPtr; } /*****************/ /* content-types */ /*****************/ status = FaolToNet (rqptr, ReportContentTypeFao, NULL); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); for (ctptr = cfptr->cfContent.ContentInfoListHeadPtr; ctptr; ctptr = ctptr->NextPtr) { vecptr = &FaoVector; if (ctptr->FromMimeTypes) if (*ctptr->SuffixPtr == '.') *vecptr++ = ctptr->SuffixPtr+1; else *vecptr++ = ctptr->SuffixPtr; else *vecptr++ = ctptr->SuffixPtr; *vecptr++ = ctptr->ContentTypePtr; if (ctptr->PutRFM) { *vecptr++ = " RFM:!AZ"; if (ctptr->PutRFM == PUT_RFM_FIX512) *vecptr++ = "FIX512"; else if (ctptr->PutRFM == PUT_RFM_STM) *vecptr++ = "STM"; else if (ctptr->PutRFM == PUT_RFM_STMCR) *vecptr++ = "STMCR"; else if (ctptr->PutRFM == PUT_RFM_STMLF) *vecptr++ = "STMLF"; else if (ctptr->PutRFM == PUT_RFM_UDF) *vecptr++ = "UDF"; else *vecptr++ = "?"; } else *vecptr++ = ""; if (ctptr->FtpMode) { *vecptr++ = " FTP:!&C"; *vecptr++ = ctptr->FtpMode; } else *vecptr++ = ""; *vecptr++ = ctptr->IconPtr; *vecptr++ = ctptr->AutoScriptNamePtr; if (ctptr->TypeUnknown) *vecptr++ = cfptr->cfContent.ContentTypeDefaultPtr; else *vecptr++ = ctptr->DescriptionPtr; if (ctptr->Superceded) cptr = "<tr><td><i><strike>!AZ</strike></i></td>\ <td><i><strike>!AZ!&@!&@</strike></i></td>\ <td>!AZ</td>\ <td><i><strike>!AZ</strike></i></td>\ <td><i><strike>!AZ</strike></i></td></tr>\n"; else cptr = "<tr><td>!AZ</td>\ <td>!AZ!&@!&@</td>\ <td>!AZ</td>\ <td>!AZ</td>\ <td>!AZ</td></tr>\n"; FaoCheck (sizeof(FaoVector), &FaoVector, vecptr, FI_LI); status = FaolToNet (rqptr, cptr, &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); } vecptr = &FaoVector; if (cfptr->cfContent.MimeTypesFileName[0]) *vecptr++ = cfptr->cfContent.MimeTypesFileName; else *vecptr++ = ConfigNoteNone; status = FaolToNet (rqptr, EndPageFao, &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); rqptr->rqResponse.PreExpired = PRE_EXPIRE_ADMIN; ResponseHeader200 (rqptr, "text/html", &rqptr->NetWriteBufferDsc); #undef REP_ENDIS #undef REP_NOTNONE } /*****************************************************************************/ /* This function just wraps the revision function, loading a temporary database if necessary for reporting from the configuration file. */ ConfigRevise ( REQUEST_STRUCT *rqptr, BOOL UseServerDatabase ) { int status; META_CONFIG *mcptr; /*********/ /* begin */ /*********/ if (WATCHMOD (rqptr, WATCH_MOD_CONFIG)) WatchThis (WATCHITM(rqptr), WATCH_MOD_CONFIG, "ConfigRevise() !&F !UL", &ConfigRevise, UseServerDatabase); if (UseServerDatabase) ConfigReviseNow (rqptr, MetaGlobalConfigPtr); else { status = ConfigLoad (&mcptr); if (VMSnok (status)) { /* severe error reported */ rqptr->rqResponse.HttpStatus = 403; ErrorGeneral (rqptr, mcptr->LoadReport.TextPtr, FI_LI); } else ConfigReviseNow (rqptr, mcptr); MetaConUnload (&mcptr, NULL); } AdminEnd (rqptr); } /*****************************************************************************/ /* Return a form for the HTTPd server's configuration. POSTing the form to the server results in the URL-decoded form as a configuration file. This function blocks while executing. */ ConfigReviseNow ( REQUEST_STRUCT *rqptr, META_CONFIG *mcptr ) { #define SIZEOF_SPECIAL_ICON 256 #define REP_BOOL_RADIO(b)\ if (b)\ {\ *vecptr++ = RadioButtonChecked;\ *vecptr++ = RadioButtonUnchecked;\ }\ else\ {\ *vecptr++ = RadioButtonUnchecked;\ *vecptr++ = RadioButtonChecked;\ } static char ConfigGeneralFao [] = "<p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Service</th></tr>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^# -SERVICE-^\">\n\ <tr><td>\n\ !&@\ <br><b>Service Not Found URL:</b> \ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[ServiceNotFoundURL]  \">\n\ <input type=\"text\" size=\"40\" name=\"ServiceNotFoundURL\" value=\"!AZ\">\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">General</th></tr>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^^# -GENERAL-^\">\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Instance Max:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[InstanceMax]  \">\n\ <input type=\"text\" size=\"3\" name=\"InstanceMax\" value=\"!&@\">\n\ <i>per-node servers</i></td></tr>\n\ <tr><th>Instance Passive:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[InstancePassive]  \">\n\ <input type=\"radio\" name=\"InstancePassive\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"InstancePassive\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Connect Max:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[ConnectMax]  \">\n\ <input type=\"text\" size=\"3\" name=\"ConnectMax\" value=\"!UL\">\n\ <i>connections</i></td></tr>\n\ <tr><th>Process Max:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[ProcessMax]  \">\n\ <input type=\"text\" size=\"3\" name=\"ProcessMax\" value=\"!UL\">\n\ <i>requests being processed</i></td></tr>\n\ <tr><th>Listen Backlog:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[ServiceListenBacklog]  \">\n\ <input type=\"text\" size=\"3\" name=\"ServiceListenBacklog\" value=\"!UL\">\n\ <i>at socket</i></td></tr>\n\ <tr><th>Request History:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[RequestHistory]  \">\n\ <input type=\"text\" size=\"3\" name=\"RequestHistory\" value=\"!UL\">\n\ </td></tr>\n\ <tr><th>Activity History:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[ActivityDays]  \">\n\ <input type=\"text\" size=\"3\" name=\"ActivityDays\" value=\"!UL\">\n\ <i>days</i></td></tr>\n\ <tr><th>Charset Default:</th><td colspan=\"2\">\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[CharsetDefault]  \">\n\ <input type=\"text\" size=\"40\" name=\"CharsetDefault\" value=\"!AZ\">\n\ </td></tr>\n\ <tr><th>Charset Convert:</th></tr>\n\ <tr><td colspan=\"2\">\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[CharsetConvert]^\">\n\ <textarea name=\"CharsetConvert\" rows=\"4\" cols=\"60\" nowrap>\ !AZ\ </textarea>\n\ </td></tr>\n\ <tr><th>Monitor:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[Monitor]  \">\n\ <input type=\"radio\" name=\"Monitor\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"Monitor\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Regular Expressions:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[RegEx]  \">\n\ <input type=\"text\" size=\"10\" name=\"RegEx\" value=\"!&@\">\n\ </td></tr>\n\ <tr><th>Entity Tag:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[EntityTag]  \">\n\ <input type=\"radio\" name=\"EntityTag\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"EntityTag\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Pipeline Requests:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[PipelineRequests]  \">\n\ <input type=\"radio\" name=\"PipelineRequests\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"PipelineRequests\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>HTTP TRACE:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[HttpTrace]  \">\n\ <input type=\"radio\" name=\"HttpTrace\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"HttpTrace\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>WWW Implied:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[WwwImplied]  \">\n\ <input type=\"radio\" name=\"WwwImplied\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"WwwImplied\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>GZIP Accept:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[GzipAccept]  \">\n\ <input type=\"text\" size=\"5\" name=\"GzipAccept\" value=\"!UL\">\n\ <i>window</i></td></tr>\n\ <tr><th>GZIP Flush:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[GzipFlushSeconds]  \">\n\ <input type=\"text\" size=\"7\" name=\"GzipFlushSeconds\" value=\"!&@\">\n\ <i>interval[,initial] seconds</i></td></tr>\n\ <tr><th>GZIP Response:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[GzipResponse]  \">\n\ <input type=\"text\" size=\"7\" name=\"GzipResponse\" value=\"!&@\">\n\ <i>level[,memory,window]</i></td></tr>\n\ <tr><th>IP Port:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[Port]  \">\n\ <input type=\"text\" size=\"5\" name=\"Port\" value=\"!UL\">\n\ <i>(overridden by "service" directive)</i></td></tr>\n\ <tr><th>StreamLF:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[StreamLF]  \">\n\ <input type=\"text\" size=\"3\" name=\"StreamLF\" value=\"!UL\">\n\ <i>kBytes</i></td></tr>\n\ <tr><th>Search Script:</th><td colspan=\"2\">\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SearchScript]  \">\n\ <input type=\"text\" size=\"40\" name=\"SearchScript\" value=\"!AZ\">\n\ </td></tr>\n\ <tr><th>Search Script Exclude:</th></tr>\n\ <tr><td colspan=\"2\">\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SearchScriptExclude]^\">\n\ <textarea name=\"SearchScriptExclude\" rows=\"4\" cols=\"40\" nowrap>\ !AZ\ </textarea>\n\ </td></tr>\n\ <tr><th>PUT/POST Max:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[PutMaxKbytes]  \">\n\ <input type=\"text\" size=\"5\" name=\"PutMaxKbytes\" value=\"!UL\">\n\ <i>kBytes</i></td></tr>\n\ <tr><th>PUT/POST binary RFM:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[PutBinaryRFM]  \">\n\ <select name=\"PutBinaryRFM\">\n\ <option value=\"\"!AZ>(UDF)\n\ <option value=\"FIX512\"!AZ>FIX512\n\ <option value=\"STM\"!AZ>STM\n\ <option value=\"STMCR\"!AZ>STMCR\n\ <option value=\"STMLF\"!AZ>STMLF\n\ <option value=\"UDF\"!AZ>UDF\n\ </select>\n\ </td></tr>\n\ <tr><th>Put/Post Files:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[PutVersionLimit]  \">\n\ <input type=\"text\" size=\"5\" name=\"PutVersionLimit\" value=\"!UL\">\n\ <i>version limit</i></td></tr>\n\ </td></tr>\n\ <tr><th>/~username/ Cache Entries:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[MapUserNameCacheEntries]  \">\n\ <input type=\"text\" size=\"3\" name=\"MapUserNameCacheEntries\" value=\"!UL\">\n\ <i>user names</i>\ </td></tr>\n\ <tr><th>Persona Cache Entries:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[PersonaCacheEntries]  \">\n\ <input type=\"text\" size=\"3\" name=\"PersonaCacheEntries\" value=\"!UL\">\n\ <i>users</i>\ </td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Host Resolution</th></tr>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^^# -DNS-^\">\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Client Lookup:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DNSLookupClient]  \">\n\ <input type=\"radio\" name=\"DNSLookupClient\" value=\"enabled\"!AZ>yes\n\ <input type=\"radio\" name=\"DNSLookupClient\" value=\"disabled\"!AZ>no\n\ </td></tr>\n\ <tr><th>Life-Time:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DNSLookupLifeTime]  \">\n\ <input type=\"text\" size=\"7\" name=\"DNSLookupLifeTime\" value=\"!AZ\">\n\ <i>hh:mm:ss</i></td></tr>\n\ <tr><th>Retry Count:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DNSLookupRetry]  \">\n\ <input type=\"text\" size=\"3\" name=\"DNSLookupRetry\" value=\"!UL\"></td></tr>\n\ \ </table>\n\ </td></tr>\n\ </table>\n\ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Log</th></tr>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^^# -LOGGING-^\">\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Logging:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[Logging]  \">\n\ <input type=\"radio\" name=\"Logging\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"Logging\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Format:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[LogFormat]  \">\n\ <input type=\"text\" size=\"10\" name=\"LogFormat\" value=\"!AZ\"></td></tr>\n\ <tr><th>Naming:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[LogNaming]  \">\n\ <input type=\"text\" size=\"10\" name=\"LogNaming\" value=\"!AZ\"></td></tr>\n\ </td></tr>\n\ <tr><th>Period:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[LogPeriod]  \">\n\ <input type=\"text\" size=\"10\" name=\"LogPeriod\" value=\"!AZ\"></td></tr>\n\ </td></tr>\n\ <tr><th>Per-Instance:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[LogPerInstance]  \">\n\ <input type=\"radio\" name=\"LogPerInstance\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"LogPerInstance\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Per-Service:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[LogPerService]  \">\n\ <input type=\"radio\" name=\"LogPerService\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"LogPerService\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Per-Service Host Only:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[LogPerServiceHostOnly]  \">\n\ <input type=\"radio\" name=\"LogPerServiceHostOnly\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"LogPerServiceHostOnly\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Write Fail 503:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[LogWriteFail503]  \">\n\ <input type=\"radio\" name=\"LogWriteFail503\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"LogWriteFail503\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>File:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[LogFile]  \">\n\ <input type=\"text\" size=\"40\" name=\"LogFile\" value=\"!AZ\"></td></tr>\n\ <tr><th>Extend Blocks:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[LogFileExtend]  \">\n\ <input type=\"text\" size=\"5\" name=\"LogFileExtend\" value=\"!UL\">\n\ </td></tr>\n\ <tr><th>Exclude Hosts:</th></tr>\n\ <tr><td colspan=\"2\">\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[LogExcludeHosts]^\">\n\ <textarea name=\"LogExcludeHosts\" rows=\"4\" cols=40 nowrap>\ !AZ\ </textarea>\n\ </td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">OPCOM</th></tr>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^^# -OPCOM-^\">\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Target:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[OpcomTarget]  \">\n\ <select name=\"OpcomTarget\">\n"; static char ConfigOpcomTargetFao [] = "<option value=\"!AZ\"!&? SELECTED\r\r>!AZ\n"; static char ConfigOpcomFao [] = "</select>\n\ <tr><th>Admin:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[OpcomAdmin]  \">\n\ <input type=\"radio\" name=\"OpcomAdmin\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"OpcomAdmin\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Authorization:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[OpcomAuthorization]  \">\n\ <input type=\"radio\" name=\"OpcomAuthorization\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"OpcomAuthorization\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Control:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[OpcomControl]  \">\n\ <input type=\"radio\" name=\"OpcomControl\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"OpcomControl\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>HTTPd:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[OpcomHTTPd]  \">\n\ <input type=\"radio\" name=\"OpcomHTTPd\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"OpcomHTTPd\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Cache</th></tr>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^^# -CACHE-^\">\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Caching:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[Cache]  \">\n\ <input type=\"radio\" name=\"Cache\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"Cache\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Max Entries:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[CacheEntriesMax]  \">\n\ <input type=\"text\" size=\"4\" name=\"CacheEntriesMax\" value=\"!UL\">\n\ <i>files</i></td></tr>\n\ <tr><th>Max Cache Size:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[CacheTotalKBytesMax]  \">\n\ <input type=\"text\" size=\"4\" name=\"CacheTotalKBytesMax\" value=\"!UL\">\n\ <i>kBytes</i></td></tr>\n\ <tr><th>Max Entry Size:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[CacheFileKBytesMax]  \">\n\ <input type=\"text\" size=\"3\" name=\"CacheFileKBytesMax\" value=\"!UL\">\n\ <i>kBytes</i></td></tr>\n\ <tr><th>Guard:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[CacheGuardPeriod]  \">\n\ <input type=\"text\" size=\"7\" name=\"CacheGuardPeriod\" value=\"!AZ\">\n\ <i>hh:mm:ss</i></td></tr>\n\ <tr><th>Validate:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[CacheValidatePeriod]  \">\n\ <input type=\"text\" size=\"7\" name=\"CacheValidatePeriod\" value=\"!AZ\">\n</tr>\n\ <tr><th>Frequent After:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[CacheFrequentHits]  \">\n\ <input type=\"text\" size=\"3\" name=\"CacheFrequentHits\" value=\"!UL\"> \ <i>hits, last within</i>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[CacheFrequentPeriod]  \">\n\ <input type=\"text\" size=\"7\" name=\"CacheFrequentPeriod\" value=\"!AZ\">\n</tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Timeouts</th></tr>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^^# -TIMEOUTS-^\">\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Input:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[TimeoutInput]  \">\n\ <input type=\"text\" size=\"7\" name=\"TimeoutInput\" value=\"!AZ\">\n\ <i>hh:mm:ss</i></td></tr>\n\ <tr><th>Output:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[TimeoutOutput]  \">\n\ <input type=\"text\" size=\"7\" name=\"TimeoutOutput\" value=\"!AZ\">\n</tr>\n\ <tr><th>No-Progress:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[TimeoutNoProgress]  \">\n\ <input type=\"text\" size=\"7\" name=\"TimeoutNoProgress\" value=\"!AZ\">\n</tr>\n\ <tr><th>Persistent Connection:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[TimeoutPersistent]  \">\n\ <input type=\"text\" size=\"7\" name=\"TimeoutPersistent\" value=\"!AZ\">\n</tr>\n\ <tr><th>HTTP/2 Idle:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[TimeoutHttp2Idle]  \">\n\ <input type=\"text\" size=\"7\" name=\"TimeoutHttp2Idle\" value=\"!AZ\">\n</tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Buffer Sizes</th></tr>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^^# -BUFFER SIZES-^\">\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>DCL <font size=\"-1\">SYS$COMMAND</font>:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[BufferSizeDclCommand]  \">\n\ <input type=\"text\" size=\"6\" name=\"BufferSizeDclCommand\" value=\"!UL\">\n\ </td></tr>\n\ <tr><th>DCL <font size=\"-1\">SYS$OUTPUT</font>:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[BufferSizeDclOutput]  \">\n\ <input type=\"text\" size=\"6\" name=\"BufferSizeDclOutput\" value=\"!UL\">\n\ </td></tr>\n\ <tr><th>DCL <font size=\"-1\">(SYS$OUTPUT) BUFQUO</font>:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[BufferQuotaDclOutput]  \">\n\ <input type=\"text\" size=\"6\" name=\"BufferQuotaDclOutput\" value=\"!UL\">\n\ </td></tr>\n\ <tr><th>DCL <font size=\"-1\">CGIPLUSIN</font>:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[BufferSizeDclCgiPlusIn]  \">\n\ <input type=\"text\" size=\"6\" name=\"BufferSizeDclCgiPlusIn\" value=\"!UL\">\n\ </td></tr>\n\ <tr><th>CGI Header:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[BufferSizeDclCgiHeader]  \">\n\ <input type=\"text\" size=\"6\" name=\"BufferSizeDclCgiHeader\" value=\"!UL\">\n\ </td></tr>\n\ <tr><th>Network Read:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[BufferSizeNetRead]  \">\n\ <input type=\"text\" size=\"6\" name=\"BufferSizeNetRead\" value=\"!UL\">\n\ </td></tr>\n\ <tr><th>Network Write:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[BufferSizeNetWrite]  \">\n\ <input type=\"text\" size=\"6\" name=\"BufferSizeNetWrite\" value=\"!UL\">\n\ </td></tr>\n\ <tr><th>Network File:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[BufferSizeNetFile]  \">\n\ <input type=\"text\" size=\"6\" name=\"BufferSizeNetFile\" value=\"!UL\">\n\ </td></tr>\n\ <tr><th>Network MTU:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[BufferSizeNetMTU]  \">\n\ <input type=\"text\" size=\"6\" name=\"BufferSizeNetMTU\" value=\"!UL\">\n\ </td></tr>\n\ <tr><th>Socket SNDBUF:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SocketSizeSndBuf]  \">\n\ <input type=\"text\" size=\"6\" name=\"SocketSizeSndBuf\" value=\"!UL\">\n\ </td></tr>\n\ <tr><th>Socket RCVBUF:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SocketSizeRcvBuf]  \">\n\ <input type=\"text\" size=\"6\" name=\"SocketSizeRcvBuf\" value=\"!UL\">\n\ </td></tr>\n\ <tr><th>Note ...</a></th>\ <td>adjust with caution!!</td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n"; static char ConfigWelcomeFao [] = "<p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Welcome (index/home pages)</th></tr>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^^# -INDEX PAGES-^\">\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><td colspan=\"2\"><i>Format: \"file-name.file-type\" \ (e.g. HOME.HTML)</i></td></tr>\n\ <tr><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[Welcome]^\">\n\ <textarea name=\"Welcome\" rows=\"5\" cols=\"40\" nowrap>"; static char ConfigAcceptFao [] = "</textarea>\n\ </td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Host Access Control</th></tr>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^^# -HOST ACCESS-^\">\n\ <tr><td>\n\ <table class=\"lftlft\">\n\ <tr><th>Accept</th></tr>\n\ <tr><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[Accept]^\">\n\ <textarea name=\"Accept\" rows=\"4\" cols=\"40\" nowrap>\ !AZ\ </textarea>\n\ </td></tr>\n\ <tr><th>Reject</th></tr>\n\ <tr><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[Reject]^\">\n\ <textarea name=\"Reject\" rows=\"4\" cols=\"40\" nowrap>\ !AZ\ </textarea>\n\ </td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Server Generated Reports</th></tr>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^^# -REPORTS-^\">\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Server Admin:</th><td colspan=\"2\">\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[ServerAdmin]  \">\n\ <input type=\"text\" size=\"40\" name=\"ServerAdmin\" value=\"!&;AZ\">\n\ <i>email</i></td></tr>\n\ </td></tr>\n\ <tr><th>Server Signature:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[ServerSignature]  \">\n\ <input type=\"radio\" name=\"ServerSignature\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"ServerSignature\" value=\"email\"!AZ>enabled-email\n\ <input type=\"radio\" name=\"ServerSignature\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Basic Info Only:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[ReportBasicOnly]  \">\n\ <input type=\"radio\" name=\"ReportBasicOnly\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"ReportBasicOnly\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th><META> Info:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[ReportMetaInfo]  \">\n\ <input type=\"radio\" name=\"ReportMetaInfo\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"ReportMetaInfo\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Error Report Path:</th><td colspan=\"2\">\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[ErrorReportPath]  \">\n\ <input type=\"text\" size=\"40\" name=\"ErrorReportPath\" value=\"!AZ\">\n\ </td></tr>\n\ <tr><th>Error Recommend:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[ErrorRecommend]  \">\n\ <input type=\"radio\" name=\"ErrorRecommend\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"ErrorRecommend\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Authorization</th></tr>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^^# -AUTHORIZATION-^\">\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Cache Entries:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AuthCacheEntriesMax]  \">\n\ <input type=\"text\" size=\"3\" name=\"AuthCacheEntriesMax\" value=\"!UL\"></td></tr>\n\ <tr><th>Cache Entry Size:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AuthCacheEntrySize]  \">\n\ <input type=\"text\" size=\"4\" name=\"AuthCacheEntrySize\" value=\"!UL\">\n\ <i>bytes</i></td></tr>\n\ <tr><th>Cache Valid:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AuthCacheMinutes]  \">\n\ <input type=\"text\" size=\"3\" name=\"AuthCacheMinutes\" value=\"!UL\">\n\ <i>minutes</i></td></tr>\n\ <tr><th>Revalidate User:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AuthRevalidateUserMinutes]  \">\n\ <input type=\"text\" size=\"3\" name=\"AuthRevalidateUserMinutes\" value=\"!UL\">\n\ <i>minutes</i></td></tr>\n\ <tr><th>Failure Limit:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AuthFailureLimit]  \">\n\ <input type=\"text\" size=\"3\" name=\"AuthFailureLimit\" value=\"!UL\">\n\ <i>attempts</i></td></tr>\n\ <tr><th>Failure Period:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AuthFailurePeriod]  \">\n\ <input type=\"text\" size=\"7\" name=\"AuthFailurePeriod\" value=\"!AZ\">\n\ <i>hh:mm:ss</i></td></tr>\n\ <tr><th>Failure Timeout:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AuthFailureTimeout]  \">\n\ <input type=\"text\" size=\"7\" name=\"AuthFailureTimeout\" value=\"!AZ\">\n\ <i>hh:mm:ss</i></td></tr>\n\ <tr><th>Token Entries:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AuthTokenEntriesMax]  \">\n\ <input type=\"text\" size=\"4\" name=\"AuthTokenEntriesMax\" value=!SL></td></tr>\n\ <tr><th>Basic Authorization:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AuthBasic]  \">\n\ <input type=\"radio\" name=\"AuthBasic\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"AuthBasic\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Digest Authorization:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AuthDigest]  \">\n\ <input type=\"radio\" name=\"AuthDigest\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"AuthDigest\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>GET nonce lifetime:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AuthDigestGetLife]  \">\n\ <input type=\"text\" size=\"3\" name=\"AuthDigestGetLife\" value=\"!UL\">\n\ <i>minutes</i></td>\n\ </td></tr>\n\ <tr><th>PUT nonce lifetime:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AuthDigestPutLife]  \">\n\ <input type=\"text\" size=\"3\" name=\"AuthDigestPutLife\" value=\"!UL\">\n\ <i>minutes</i></td></tr>\n\ <tr><th>SYSUAF Logon Type:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AuthSYSUAFlogonType]  \">\n\ <select name=\"AuthSYSUAFlogonType\">\n\ <option value=\"\"!&? SELECTED\r\r>default\n\ <option value=\"NETWORK\"!&? SELECTED\r\r>NETWORK\n\ <option value=\"BATCH\"!&? SELECTED\r\r>BATCH\n\ <option value=\"LOCAL\"!&? SELECTED\r\r>LOCAL\n\ <option value=\"DIALUP\"!&? SELECTED\r\r>DIALUP\n\ <option value=\"REMOTE\"!&? SELECTED\r\r>REMOTE\n\ </select>\n\ </td></tr>\n\ <tr><th>SYSUAF Accept Expired Pwd:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AuthSYSUAFacceptExpPwd]  \">\n\ <input type=\"radio\" name=\"AuthSYSUAFacceptExpPwd\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"AuthSYSUAFacceptExpPwd\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>SYSUAF Pwd Expired URL:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AuthSYSUAFpwdExpURL]  \">\n\ <input type=\"text\" size=\"40\" name=\"AuthSYSUAFpwdExpURL\" value=\"!AZ\">\n\ </td></tr>\n\ </td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Proxy Serving</th></tr>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^^# -PROXY SERVING-^\">\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Serving:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[ProxyServing]  \">\n\ <input type=\"radio\" name=\"ProxyServing\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"ProxyServing\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Unknown Request Fields:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[ProxyUnknownRequestFields]  \">\n\ <input type=\"radio\" name=\"ProxyUnknownRequestFields\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"ProxyProxyUnknownRequestFields\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Add "Forwarded: by":</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[ProxyForwarded]  \">\n\ <input type=\"text\" size=\"10\" name=\"ProxyForwarded\" value=\"!AZ\">\n\ </td></tr>\n\ <tr><th>Add "X-Forwarded-For:":</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[ProxyXForwardedFor]  \">\n\ <input type=\"text\" size=\"10\" name=\"ProxyXForwardedFor\" value=\"!AZ\">\n\ </td></tr>\n\ <tr><th>Report Events To Log:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[ProxyReportLog]  \">\n\ <input type=\"radio\" name=\"ProxyReportLog\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"ProxyReportLog\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Verify Max:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[ProxyVerifyRecordMax]  \">\n\ <input type=\"text\" size=\"3\" name=ProxyVerifyRecordMax value=\"!UL\">\n\ <i>records</i></td></tr>\n\ <tr><th>Host Name Lookup Retry:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[ProxyHostLookupRetryCount]  \">\n\ <input type=\"text\" size=\"3\" name=\"ProxyHostLookupRetryCount\" value=\"!UL\">\n\ <i>attempts</i></td></tr>\n\ <tr><th>Connect Timeout:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[ProxyConnectTimeoutSeconds]  \">\n\ <input type=\"text\" size=\"7\" name=\"ProxyConnectTimeoutSeconds\" value=\"!AZ\">\n\ <i>hh:mm:ss</i></td></tr>\n\ <tr><th>Connect Persist Max:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[ProxyConnectPersistMax]  \">\n\ <input type=\"text\" size=\"3\" name=\"ProxyConnectPersistMax\" value=\"!UL\">\n\ <i>network connections</i></td></tr>\n\ <tr><th>Connect Persist Seconds:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[ProxyConnectPersistSeconds]  \">\n\ <input type=\"text\" size=\"7\" name=\"ProxyConnectPersistSeconds\" value=\"!AZ\">\n\ <i>hh:mm:ss</i></td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Scripting (CGI, DCL & DECnet)</th></tr>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^^# -SCRIPTING-^\">\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Scripting:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[Scripting]  \">\n\ <input type=\"radio\" name=\"Scripting\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"Scripting\" value=\"disabled\"!AZ>disabled\n\ </td><td></td></tr>\n\ <tr><th>Detach Process:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DclDetachProcess]  \">\n\ <input type=\"radio\" name=\"DclDetachProcess\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"DclDetachProcess\" value=\"disabled\"!AZ>disabled\n\ </td><td></td></tr>\n\ <tr><th>Process Priority:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DclDetachProcessPriority]  \">\n\ <input type=\"text\" size=\"6\" name=\"DclDetachProcessPriority\" value=\"!AZ\">\n\ <i>server,user</i></td></tr>\n\ <tr><th>Strict CGI Output:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[CgiStrictOutput]  \">\n\ <input type=\"radio\" name=\"CgiStrictOutput\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"CgiStrictOutput\" value=\"disabled\"!AZ>disabled\n\ </td><td></td></tr>\n\ <tr><th>Spawn Authorized Privileges:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DclSpawnAuthPriv]  \">\n\ <input type=\"radio\" name=\"DclSpawnAuthPriv\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"DclSpawnAuthPriv\" value=\"disabled\"!AZ>disabled\n\ </td><td></td></tr>\n\ <tr><th>Gateway BG:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DclGatewayBg]  \">\n\ <input type=\"radio\" name=\"DclGatewayBg\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"DclGatewayBg\" value=\"disabled\"!AZ>disabled\n\ </td><td></td></tr>\n\ <tr><th>Soft Limit:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DclSoftLimit]  \">\n\ <input type=\"text\" size=\"3\" name=\"DclSoftLimit\" value=\"!UL\">\n\ <i>script processes</i></td></tr>\n\ <tr><th>Hard Limit:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DclHardLimit]  \">\n\ <input type=\"text\" size=\"3\" name=\"DclHardLimit\" value=\"!UL\">\n\ <i>script processes</i></td></tr>\n\ <tr><th>Bit-Bucket Timeout:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DclBitBucketTimeout]  \">\n\ <input type=\"text\" size=\"7\" name=\"DclBitBucketTimeout\" value=\"!AZ\">\n\ <i>hh:mm:ss</i></tr>\n\ <tr><th>Zombie Life-Time:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DclZombieLifeTime]  \">\n\ <input type=\"text\" size=\"7\" name=\"DclZombieLifeTime\" value=\"!AZ\">\n</tr>\n\ <tr><th>CGIplus Life-Time:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DclCgiPlusLifeTime]  \">\n\ <input type=\"text\" size=\"7\" name=\"DclCgiPlusLifeTime\" value=\"!AZ\">\n</tr>\n\ <tr><th>DECnet Reuse Life-Time:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DECnetReuseLifeTime]  \">\n\ <input type=\"text\" size=\"7\" name=\"DECnetReuseLifeTime\" value=\"!AZ\">\n</tr>\n\ <tr><th>DECnet Connect List Limit:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DECnetConnectListMax]  \">\n\ <input type=\"text\" size=\"4\" name=\"DECnetConnectListMax\" value=\"!UL\">\n\ <i>network connections</i></td></tr>\n\ <tr><th>Cleanup Scratch Max:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DclCleanupScratchMinutesMax]  \">\n\ <input type=\"text\" size=\"4\" name=\"DclCleanupScratchMinutesMax\" value=\"!UL\">\n\ <i>minutes</i></td></tr>\n\ <tr><th>Cleanup Older-than:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DclCleanupScratchMinutesOld]  \">\n\ <input type=\"text\" size=\"4\" name=\"DclCleanupScratchMinutesOld\" value=\"!UL\">\n\ <i>minutes</i></td></tr>\n\ <tr><th>Script Run-Time:</th></tr>\n\ <tr><td colspan=\"2\"><i>\ Format: "file-type [SPACE] verb"<br>\ (e.g. ".PL [SPACE] PERL" or ".PL [SPACE] $PERL_EXE:PERL")\ </i>\ </td></tr>\n\ <tr><td colspan=\"2\">\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DclScriptRunTime]^\">\n\ <textarea name=\"DclScriptRunTime\" rows=\"5\" cols=\"60\" nowrap>"; static char ConfigProctorFao [] = "</textarea>\n\ <tr><th>Script Proctor:</th></tr>\n\ <tr><td colspan=\"2\"><i>\ Format: "minimum[+idle] pattern activation [notepad]"<br>\ (e.g. "2+0 (*pyrte*) /py-bin/proctor")\ </i>\ </td></tr>\n\ <tr><td colspan=\"2\">\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DclScriptProctor]^\">\n\ <textarea name=\"DclScriptProctor\" rows=\"5\" cols=\"60\" nowrap>"; static char ConfigSsiFao [] = "</textarea>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Server-Side Includes</th></tr>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^^# -SSI-^\">\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>SSI:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SSI]  \">\n\ <input type=\"radio\" name=\"SSI\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"SSI\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Exec:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SSIexec]  \">\n\ <input type=\"radio\" name=\"SSIexec\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"SSIexec\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Access Counting:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SSIaccesses]  \">\n\ <input type=\"radio\" name=\"SSIaccesses\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"SSIaccesses\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Max Size:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SSISizeMax]  \">\n\ <input type=\"text\" size=\"4\" name=\"SSISizeMax\" value=\"!UL\">\n\ <i>kBytes</i></td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">WebDAV</th></tr>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^^# -WebDAV-^\">\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>WebDAV:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[WebDAV]  \">\n\ <input type=\"radio\" name=\"WebDAV\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"WebDAV\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Locking:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[WebDAVlocking]  \">\n\ <input type=\"radio\" name=\"WebDAVlocking\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"WebDAVlocking\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Lock Timeout Default:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[WebDAVlockTimeoutDefault]  \">\n\ <input type=\"text\" size=\"7\" name=\"WebDAVlockTimeoutDefault\" value=\"!AZ\">\n\ <i>hh:mm:ss</i></td></tr>\n\ <tr><th>Lock Timeout Max:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[WebDAVlockTimeoutMax]  \">\n\ <input type=\"text\" size=\"7\" name=\"WebDAVlockTimeoutMax\" value=\"!AZ\">\n\ <i>hh:mm:ss</i></td></tr>\n\ <tr><th>Lock Collection Depth:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[WebDAVlockCollectionDepth]  \">\n\ <input type=\"text\" size=\"3\" name=\"WebDAVlockCollectionDepth\" value=\"!UL\">\n\ </td></tr>\n\ <tr><th>Quota:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[WebDAVquota]  \">\n\ <input type=\"radio\" name=\"WebDAVquota\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"WebDAVquota\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Meta File Directory:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[WebDAVmetaDir]  \">\n\ <input type=\"text\" size=\"40\" name=\"WebDAVmetaDir\" value=\"!AZ\">\n\ </td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Directory (Index of...)</th></tr>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^^# -DIRECTORY-^\">\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Access:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DirAccess]  \">\n\ <input type=\"radio\" name=\"DirAccess\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"DirAccess\" value=\"selective\"!AZ>selective\n\ <input type=\"radio\" name=\"DirAccess\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Layout:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DirLayout]  \">\n\ <input type=\"text\" size=\"30\" name=\"DirLayout\" value=\"!AZ\">\n\ </td></tr>\n\ <tr><th>Listing <BODY>:</th><td colspan=\"2\">\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DirBodyTag]  \">\n\ <input type=\"text\" size=\"40\" name=\"DirBodyTag\" value=\"!&;AZ\">\n\ <i>HTML tag</i></td></tr>\n\ </td></tr>\n\ <tr><th>HTML Description:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DirDescriptionLines]  \">\n\ <input type=\"text\" size=\"6\" name=\"DirDescriptionLines\" value=\"!UL\">\n\ <i>lines</i></td></tr>\n\ </td></tr>\n\ <tr><th><META> Info:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DirMetaInfo]  \">\n\ <input type=\"radio\" name=\"DirMetaInfo\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"DirMetaInfo\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Owner:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DirOwner]  \">\n\ <input type=\"radio\" name=\"DirOwner\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"DirOwner\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Pre-Expired:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DirPreExpired]  \">\n\ <input type=\"radio\" name=\"DirPreExpired\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"DirPreExpired\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Wildcard:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DirWildcard]  \">\n\ <input type=\"radio\" name=\"DirWildcard\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"DirWildcard\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>No Implied Wildcard:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DirNoImpliedWildcard]  \">\n\ <input type=\"radio\" name=\"DirNoImpliedWildcard\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"DirNoImpliedWildcard\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Prot Violations Ignored:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DirNoPrivIgnore]  \">\n\ <input type=\"radio\" name=\"DirNoPrivIgnore\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"DirNoPrivIgnore\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ <tr><th>Readme:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DirReadme]  \">\n\ <input type=\"radio\" name=\"DirReadme\" value=\"top\"!AZ>top\n\ <input type=\"radio\" name=\"DirReadme\" value=\"bottom\"!AZ>bottom\n\ <input type=\"radio\" name=\"DirReadme\" value=\"disabled\"!AZ>none\n\ </td></tr>\n\ <tr><th>Readme Files:</th></tr>\n\ <tr><td colspan=\"2\"><i>Format: "file-name.file-type" \ (e.g. README.HTML)</i></td></tr>\n\ <tr><td colspan=\"2\">\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[DirReadmeFile]^\">\n\ <textarea name=\"DirReadmeFile\" rows=\"5\" cols=\"40\" nowrap>"; static char ConfigIconsFao [] = "</textarea>\n\ </td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n\ \ <p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">Icons</th></tr>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^^# -ICONS-^\">\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><td colspan=\"2\"><i>Format: "icon-path [SPACE] \ alternative-text [SPACE] content-type"</i></td></tr>\n\ <tr><td colspan=\"2\">\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AddIcon]^\">\n\ <textarea name=\"AddIcon\" rows=\"7\" cols=\"60\" nowrap>"; static char ConfigSpecialIconsFao [] = "</textarea>\n\ </td></tr>\n\ <tr><th class=\"talft\" colspan=\"2\">Special Icons:</th></tr>\n\ <tr><td colspan=\"2\"><i>Format: "icon-path [SPACE] \ alternative-text"</i></td></tr>\n\ <tr><th>Blank:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AddBlankIcon]  \">\n\ <input type=\"text\" size=\"40\" name=\"AddBlankIcon\" value=\"!&;AZ\">\n\ </td></tr>\n\ <tr><th>Default:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AddDefaultIcon]  \">\n\ <input type=\"text\" size=\"40\" name=\"AddDefaultIcon\" value=\"!&;AZ\">\n\ </td></tr>\n\ <tr><th>Directory:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AddDirIcon]  \">\n\ <input type=\"text\" size=\"40\" name=\"AddDirIcon\" value=\"!&;AZ\">\n\ </td></tr>\n\ <tr><th>Parent Directory:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AddParentIcon]  \">\n\ <input type=\"text\" size=\"40\" name=\"AddParentIcon\" value=\"!&;AZ\">\n\ </td></tr>\n\ <tr><th>Unknown:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AddUnknownIcon]  \">\n\ <input type=\"text\" size=\"40\" name=\"AddUnknownIcon\" value=\"!&;AZ\">\n\ </td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n"; static char ConfigContentTypesFao [] = "<p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\" colspan=\"2\">Content Types</th></tr>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^^# -CONTENT TYPES-^\">\n\ <tr><td>\n\ <table class=\"lftlft\">\n\ <tr><td colspan=\"2\"><i>Format: "file-suffix \ content-type[;charset=] [ftp:] [rfm:] \ [/auto-script-path] description (to-end-of-line)"</i></td></tr>\n\ <tr><td colspan=\"2\">\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AddType]^\">\n\ <textarea name=\"AddType\" rows=\"7\" cols=\"60\" nowrap>"; static char AddMimeTypesFao [] = "</textarea>\n\ </td></tr>\n\ <tr><th colspan=\"2\">MIME.TYPES File:\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[AddMimeTypesFile]  \">\n\ <input type=\"text\" size=\"40\" name=\"AddMimeTypesFile\" value=\"!&;AZ\">\n\ </th></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n"; static char RadioButtonChecked [] = " CHECKED", RadioButtonUnchecked [] = ""; int idx, status; unsigned short Length; unsigned long *vecptr; unsigned long FaoVector [128]; char *cptr, *sptr, *zptr, *IconAltPtr, *IconAltEndPositionPtr, *IconAltStartPositionPtr, *IconUrlPtr, *IconTypePtr, *IconTypePositionPtr, *SpecialIconPtr; char AltTextBuffer [32], HtmlIconUrl [256], Scratch [256], SpecialIconBlank [SIZEOF_SPECIAL_ICON], SpecialIconDir [SIZEOF_SPECIAL_ICON], SpecialIconDefault [SIZEOF_SPECIAL_ICON], SpecialIconParent [SIZEOF_SPECIAL_ICON], SpecialIconUnknown [SIZEOF_SPECIAL_ICON], TimeCurrent [32]; CONFIG_STRUCT *cfptr; CONTENT_TYPE ContentType; CONTENT_TYPE *ctptr; ICON_TYPE *itptr; /*********/ /* begin */ /*********/ if (WATCHMOD (rqptr, WATCH_MOD_CONFIG)) WatchThis (WATCHITM(rqptr), WATCH_MOD_CONFIG, "ConfigReviseNow()"); /* get a pointer to the meta-config data */ cfptr = mcptr->ConfigMetaPtr; AdminPageTitle (rqptr, "Server Configuration"); AdminMetaConReport (rqptr, mcptr, MetaGlobalConfigPtr); AdminMetaConSource (rqptr, mcptr, MetaGlobalConfigPtr); AdminMetaConBeginUpdateForm (rqptr); vecptr = FaoVector; /* services */ if (ServiceLoadFromConfigFile) { *vecptr++ = "<center><b>(See "Services" Configuration)</b></center>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[Service]^!AZ\">\n"; } else { *vecptr++ = "<input type=\"hidden\" name=\"hidden$lf\" value=\"^[Service]^\">\n\ <textarea name=\"Service\" rows=\"5\" cols=\"60\" nowrap>\ !AZ\ </textarea>\n"; } \ *vecptr++ = ConfigStringList (rqptr, cfptr->cfServer.ServicePtr, '\n'); *vecptr++ = cfptr->cfServer.ServiceNotFoundUrl; /* general */ if (cfptr->cfServer.InstanceMax == INSTANCE_PER_CPU) *vecptr++ = "CPU"; else { *vecptr++ = "!UL"; *vecptr++ = cfptr->cfServer.InstanceMax; } REP_BOOL_RADIO (cfptr->cfServer.InstancePassive) if (cfptr->cfServer.ConnectMax) *vecptr++ = cfptr->cfServer.ConnectMax; else *vecptr++ = NetConcurrentMax; if (cfptr->cfServer.ProcessMax) *vecptr++ = cfptr->cfServer.ProcessMax; else *vecptr++ = NetConcurrentProcessMax; if (cfptr->cfServer.ListenBacklog) *vecptr++ = cfptr->cfServer.ListenBacklog; else *vecptr++ = DEFAULT_LISTEN_BACKLOG; *vecptr++ = cfptr->cfMisc.RequestHistory; *vecptr++ = cfptr->cfMisc.ActivityNumberOfDays; *vecptr++ = cfptr->cfContent.CharsetDefault; *vecptr++ = ConfigStringList (rqptr, cfptr->cfContent.CharsetConvertPtr, '\n'); REP_BOOL_RADIO (cfptr->cfMisc.MonitorEnabled) *vecptr++ = "!AZ"; switch (cfptr->cfMisc.RegexSyntax) { case 0 : *vecptr++ = "disabled"; break; case REGEX_C_FLAGS : *vecptr++ = "enabled"; break; case RE_SYNTAX_AWK : *vecptr++ = "AWK"; break; case RE_SYNTAX_EGREP : *vecptr++ = "EGREP"; break; case RE_SYNTAX_GREP : *vecptr++ = "GREP"; break; case RE_SYNTAX_POSIX_AWK : *vecptr++ = "POSIX_AWK"; break; case RE_SYNTAX_POSIX_BASIC : *vecptr++ = "POSIX_BASIC/ED/SED"; break; case RE_SYNTAX_POSIX_EGREP : *vecptr++ = "POSIX_EGREP"; break; case RE_SYNTAX_POSIX_EXTENDED : *vecptr++ = "POSIX_EXTENDED"; break; case RE_SYNTAX_POSIX_MINIMAL_BASIC : *vecptr++ = "POSIX_MINIMAL_BASIC"; break; case RE_SYNTAX_POSIX_MINIMAL_EXTENDED : *vecptr++ = "POSIX_MINIMAL_EXTENDED"; break; default : vecptr--; *vecptr++ = "!8XL"; *vecptr = cfptr->cfMisc.RegexSyntax; } REP_BOOL_RADIO (cfptr->cfMisc.EntityTag) REP_BOOL_RADIO (cfptr->cfMisc.PipelineRequests) REP_BOOL_RADIO (cfptr->cfMisc.HttpTraceEnabled) REP_BOOL_RADIO (cfptr->cfMisc.WwwImplied) *vecptr++ = cfptr->cfMisc.GzipAcceptWindowBits; if (cfptr->cfMisc.GzipFlushSeconds && cfptr->cfMisc.GzipFlushInitialSeconds) { *vecptr++ = "!UL,!UL"; *vecptr++ =cfptr->cfMisc.GzipFlushSeconds; *vecptr++ =cfptr->cfMisc.GzipFlushInitialSeconds; } else { *vecptr++ = "!UL"; *vecptr++ = cfptr->cfMisc.GzipFlushSeconds; } if (cfptr->cfMisc.GzipResponseMemLevel || cfptr->cfMisc.GzipResponseWindowBits) { *vecptr++ = "!UL,!UL,!UL"; *vecptr++ = cfptr->cfMisc.GzipResponseCompLevel; *vecptr++ = cfptr->cfMisc.GzipResponseMemLevel; *vecptr++ = cfptr->cfMisc.GzipResponseWindowBits; } else { *vecptr++ = "!UL"; *vecptr++ = cfptr->cfMisc.GzipResponseCompLevel; } *vecptr++ = cfptr->cfServer.DefaultPort; *vecptr++ = cfptr->cfMisc.StreamLfConversionMaxKbytes; *vecptr++ = cfptr->cfScript.DefaultSearch; *vecptr++ = ConfigStringList (rqptr, cfptr->cfScript.DefaultSearchExcludePtr, '\n'); *vecptr++ = cfptr->cfMisc.PutMaxKbytes; if (cfptr->cfMisc.PutBinaryRFM == PUT_RFM_FIX512) { *vecptr++ = ""; *vecptr++ = ""; *vecptr++ = ""; *vecptr++ = ""; *vecptr++ = " SELECT"; *vecptr++ = ""; } else if (cfptr->cfMisc.PutBinaryRFM == PUT_RFM_STM) { *vecptr++ = ""; *vecptr++ = " SELECT"; *vecptr++ = ""; *vecptr++ = ""; *vecptr++ = ""; *vecptr++ = ""; } else if (cfptr->cfMisc.PutBinaryRFM == PUT_RFM_STMCR) { *vecptr++ = ""; *vecptr++ = ""; *vecptr++ = " SELECT"; *vecptr++ = ""; *vecptr++ = ""; *vecptr++ = ""; } else if (cfptr->cfMisc.PutBinaryRFM == PUT_RFM_STMLF) { *vecptr++ = ""; *vecptr++ = ""; *vecptr++ = ""; *vecptr++ = " SELECT"; *vecptr++ = ""; *vecptr++ = ""; } else if (cfptr->cfMisc.PutBinaryRFM == PUT_RFM_UDF) { *vecptr++ = ""; *vecptr++ = ""; *vecptr++ = ""; *vecptr++ = ""; *vecptr++ = ""; *vecptr++ = " SELECT"; } else { *vecptr++ = " SELECT"; *vecptr++ = ""; *vecptr++ = ""; *vecptr++ = ""; *vecptr++ = ""; *vecptr++ = ""; } *vecptr++ = cfptr->cfMisc.PutVersionLimit; if (cfptr == &Config) *vecptr++ = MapUrlUserNameCacheEntries; else *vecptr++ = cfptr->cfMisc.MapUserNameCacheEntries; if (cfptr == &Config) *vecptr++ = PersonaCacheEntries; else *vecptr++ = cfptr->cfMisc.PersonaCacheEntries; /* DNS host resolution */ REP_BOOL_RADIO (cfptr->cfMisc.DnsLookupClient) *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfMisc.DnsLookupLifeTimeSeconds); *vecptr++ = cfptr->cfMisc.DnsLookupRetryCount; /* logging */ REP_BOOL_RADIO (cfptr->cfLog.Enabled) *vecptr++ = cfptr->cfLog.Format; *vecptr++ = cfptr->cfLog.Naming; *vecptr++ = cfptr->cfLog.Period; REP_BOOL_RADIO (cfptr->cfLog.PerInstance) REP_BOOL_RADIO (cfptr->cfLog.PerService) REP_BOOL_RADIO (cfptr->cfLog.PerServiceHostOnly) REP_BOOL_RADIO (cfptr->cfLog.WriteFail503) *vecptr++ = cfptr->cfLog.FileName; *vecptr++ = cfptr->cfLog.ExtendBlocks; *vecptr++ = ConfigStringList (rqptr, cfptr->cfLog.ExcludeHostsPtr, '\n'); FaoCheck (sizeof(FaoVector), &FaoVector, vecptr, FI_LI); status = FaolToNet (rqptr, ConfigGeneralFao, &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); /* OPCOM messages */ for (idx = 0; ConfigOpcomTarget[idx].Number >= 0; idx++) { vecptr = FaoVector; *vecptr++ = ConfigOpcomTarget[idx].Name; *vecptr++ = (OpcomTarget == ConfigOpcomTarget[idx].Number); *vecptr++ = ConfigOpcomTarget[idx].Name; status = FaolToNet (rqptr, ConfigOpcomTargetFao, &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); } vecptr = FaoVector; REP_BOOL_RADIO (cfptr->cfOpcom.Messages & OPCOM_ADMIN) REP_BOOL_RADIO (cfptr->cfOpcom.Messages & OPCOM_AUTHORIZATION) REP_BOOL_RADIO (cfptr->cfOpcom.Messages & OPCOM_CONTROL) REP_BOOL_RADIO (cfptr->cfOpcom.Messages & OPCOM_HTTPD) /* cache */ REP_BOOL_RADIO (cfptr->cfCache.Enabled) *vecptr++ = cfptr->cfCache.EntriesMax; *vecptr++ = cfptr->cfCache.TotalKBytesMax; *vecptr++ = cfptr->cfCache.FileKBytesMax; *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfCache.GuardSeconds); *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfCache.ValidateSeconds); *vecptr++ = cfptr->cfCache.FrequentHits; *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfCache.FrequentSeconds); /* timeouts */ *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfTimeout.Input); *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfTimeout.Output); *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfTimeout.NoProgress); *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfTimeout.Persistent); *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfTimeout.Http2Idle); /* buffer sizes */ if (cfptr == &Config) { /* in-use values */ *vecptr++ = DclSysCommandSize; *vecptr++ = DclSysOutputSize; *vecptr++ = DclSysOutputQuota; *vecptr++ = DclCgiPlusInSize; *vecptr++ = DclCgiHeaderSize; *vecptr++ = NetReadBufferSize; *vecptr++ = OutputBufferSize; *vecptr++ = OutputFileBufferSize; *vecptr++ = cfptr->cfBuffer.SizeNetMTU; *vecptr++ = TcpIpSocketSndBufSize; *vecptr++ = TcpIpSocketRcvBufSize; } else { /* file values */ *vecptr++ = cfptr->cfBuffer.SizeDclCommand; *vecptr++ = cfptr->cfBuffer.SizeDclOutput; *vecptr++ = cfptr->cfBuffer.QuotaDclOutput; *vecptr++ = cfptr->cfBuffer.SizeDclCgiPlusIn; *vecptr++ = cfptr->cfBuffer.SizeDclCgiHeader; *vecptr++ = cfptr->cfBuffer.SizeNetRead; *vecptr++ = cfptr->cfBuffer.SizeNetWrite; *vecptr++ = cfptr->cfBuffer.SizeNetFile; *vecptr++ = cfptr->cfBuffer.SizeNetMTU; *vecptr++ = cfptr->cfBuffer.SizeSocketSndBuf; *vecptr++ = cfptr->cfBuffer.SizeSocketRcvBuf; } FaoCheck (sizeof(FaoVector), &FaoVector, vecptr, FI_LI); status = FaolToNet (rqptr, ConfigOpcomFao, &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); /**********/ /* HTTP/2 */ /**********/ ConfigReviseHttp2 (rqptr, mcptr); /*****************/ /* secure socket */ /*****************/ ConfigReviseSecureSocket (rqptr, mcptr); /*****************************/ /* welcome (home page) files */ /*****************************/ status = FaolToNet (rqptr, ConfigWelcomeFao, NULL); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); for (idx = 0; idx < cfptr->cfContent.HomePageCount; idx++) { status = FaoToNet (rqptr, "!&;AZ\n", cfptr->cfContent.HomePageArray[idx]); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); } /********/ /* more */ /********/ vecptr = FaoVector; /* accept and reject hosts */ *vecptr++ = ConfigStringList (rqptr, cfptr->cfServer.AcceptHostsPtr, '\n'); *vecptr++ = ConfigStringList (rqptr, cfptr->cfServer.RejectHostsPtr, '\n'); *vecptr++ = cfptr->cfServer.AdminEmail; if (cfptr->cfServer.Signature == CONFIG_SERVER_SIGNATURE_ON) *vecptr++ = " CHECKED"; else *vecptr++ = ""; if (cfptr->cfServer.Signature == CONFIG_SERVER_SIGNATURE_EMAIL) *vecptr++ = " CHECKED"; else *vecptr++ = ""; if (cfptr->cfServer.Signature == CONFIG_SERVER_SIGNATURE_OFF) *vecptr++ = " CHECKED"; else *vecptr++ = ""; REP_BOOL_RADIO (cfptr->cfReport.BasicOnly) REP_BOOL_RADIO (cfptr->cfReport.MetaInfoEnabled) *vecptr++ = cfptr->cfReport.ErrorReportPath; REP_BOOL_RADIO (cfptr->cfReport.ErrorRecommend) /* authorization */ *vecptr++ = cfptr->cfAuth.CacheEntriesMax; *vecptr++ = cfptr->cfAuth.CacheEntrySize; *vecptr++ = cfptr->cfAuth.CacheMinutes; *vecptr++ = cfptr->cfAuth.RevalidateUserMinutes; *vecptr++ = cfptr->cfAuth.FailureLimit; *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfAuth.FailurePeriodSeconds); *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfAuth.FailureTimeoutSeconds); *vecptr++ = cfptr->cfAuth.TokenEntriesMax; REP_BOOL_RADIO (cfptr->cfAuth.BasicEnabled) REP_BOOL_RADIO (cfptr->cfAuth.DigestEnabled) *vecptr++ = cfptr->cfAuth.DigestNonceGetLifeTime; *vecptr++ = cfptr->cfAuth.DigestNonceGetLifeTime; if (!cfptr->cfAuth.SysUafLogonType) *vecptr++ = TRUE; else *vecptr++ = FALSE; if (cfptr->cfAuth.SysUafLogonType == AUTH_LOGON_TYPE_NETWORK) *vecptr++ = TRUE; else *vecptr++ = FALSE; if (cfptr->cfAuth.SysUafLogonType == AUTH_LOGON_TYPE_BATCH) *vecptr++ = TRUE; else *vecptr++ = FALSE; if (cfptr->cfAuth.SysUafLogonType == AUTH_LOGON_TYPE_LOCAL) *vecptr++ = TRUE; else *vecptr++ = FALSE; if (cfptr->cfAuth.SysUafLogonType == AUTH_LOGON_TYPE_DIALUP) *vecptr++ = TRUE; else *vecptr++ = FALSE; if (cfptr->cfAuth.SysUafLogonType == AUTH_LOGON_TYPE_REMOTE) *vecptr++ = TRUE; else *vecptr++ = FALSE; REP_BOOL_RADIO (cfptr->cfAuth.SysUafAcceptExpPwd) *vecptr++ = cfptr->cfAuth.SysUafPwdExpUrl; /* proxy serving */ REP_BOOL_RADIO (cfptr->cfProxy.ServingEnabled) REP_BOOL_RADIO (cfptr->cfProxy.UnknownRequestFields) if (cfptr->cfProxy.ForwardedBy == PROXY_FORWARDED_BY) *vecptr++ = "BY"; else if (cfptr->cfProxy.ForwardedBy == PROXY_FORWARDED_FOR) *vecptr++ = "FOR"; else if (cfptr->cfProxy.ForwardedBy == PROXY_FORWARDED_ADDRESS) *vecptr++ = "ADDRESS"; else *vecptr++ = "disabled"; if (cfptr->cfProxy.XForwardedFor == PROXY_XFORWARDEDFOR_ENABLED) *vecptr++ = "ENABLED"; else if (cfptr->cfProxy.XForwardedFor == PROXY_XFORWARDEDFOR_UNKNOWN) *vecptr++ = "UNKNOWN"; else if (cfptr->cfProxy.XForwardedFor == PROXY_XFORWARDEDFOR_ADDRESS) *vecptr++ = "ADDRESS"; else *vecptr++ = "disabled"; REP_BOOL_RADIO (cfptr->cfProxy.ReportLog) *vecptr++ = cfptr->cfProxy.VerifyRecordMax; *vecptr++ = cfptr->cfProxy.HostLookupRetryCount; *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfProxy.ConnectTimeoutSeconds); *vecptr++ = cfptr->cfProxy.ConnectPersistMax; *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfProxy.ConnectPersistSeconds); /* scripting */ REP_BOOL_RADIO (cfptr->cfScript.Enabled) REP_BOOL_RADIO (cfptr->cfScript.DetachProcess) *vecptr++ = cfptr->cfScript.DetachProcessPriority; REP_BOOL_RADIO (cfptr->cfScript.CgiStrictOutput) REP_BOOL_RADIO (cfptr->cfScript.SpawnAuthPriv) REP_BOOL_RADIO (cfptr->cfScript.GatewayBg) *vecptr++ = cfptr->cfScript.ScriptProcessSoftLimit; *vecptr++ = cfptr->cfScript.ScriptProcessHardLimit; *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfScript.BitBucketTimeout); *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfScript.ZombieLifeTime); *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfScript.CgiPlusLifeTime); *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfScript.DECnetReuseLifeTime); *vecptr++ = cfptr->cfScript.DECnetConnectListMax; *vecptr++ = cfptr->cfScript.CleanupScratchMinutesMax; *vecptr++ = cfptr->cfScript.CleanupScratchMinutesOld; FaoCheck (sizeof(FaoVector), &FaoVector, vecptr, FI_LI); status = FaolToNet (rqptr, ConfigAcceptFao, &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); /****************/ /* script types */ /****************/ for (idx = 0; idx < cfptr->cfScript.RunTimeCount; idx++) { vecptr = FaoVector; cptr = sptr = cfptr->cfScript.RunTime[idx].StringPtr; /* length of and location of the file type */ while (*cptr && *cptr != ';') cptr++; *vecptr++ = cptr - sptr; *vecptr++ = sptr; /* location of verb */ cptr += 2; *vecptr++ = cptr; status = FaolToNet (rqptr, "!#&;AZ !&;AZ\n", &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); } status = FaolToNet (rqptr, ConfigProctorFao, &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); /******************/ /* script proctor */ /******************/ if (cfptr->cfScript.ProctorCount) { for (idx = 0; idx < cfptr->cfScript.ProctorCount; idx++) { vecptr = FaoVector; *vecptr++ = cfptr->cfScript.Proctor[idx].NumberMin; *vecptr++ = cfptr->cfScript.Proctor[idx].NumberIdle; *vecptr++ = *cfptr->cfScript.Proctor[idx].RunTimePtr ? "(" : ""; *vecptr++ = cfptr->cfScript.Proctor[idx].RunTimePtr; *vecptr++ = *cfptr->cfScript.Proctor[idx].RunTimePtr ? ")" : ""; *vecptr++ = cfptr->cfScript.Proctor[idx].ScriptPtr; *vecptr++ = cfptr->cfScript.Proctor[idx].ActivatePtr; *vecptr++ = *cfptr->cfScript.Proctor[idx].NotePadPtr ? " " : ""; *vecptr++ = cfptr->cfScript.Proctor[idx].NotePadPtr; status = FaolToNet (rqptr, "!UL+!UL !AZ!AZ!AZ!AZ !AZ!AZ!AZ\n", &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); } } /********/ /* more */ /********/ vecptr = FaoVector; /* SSI (.shtml) */ REP_BOOL_RADIO (cfptr->cfSsi.Enabled) REP_BOOL_RADIO (cfptr->cfSsi.ExecEnabled) REP_BOOL_RADIO (cfptr->cfSsi.AccessesEnabled) *vecptr++ = cfptr->cfSsi.SizeMax; /* WebDAV */ REP_BOOL_RADIO (cfptr->cfWebDav.DavEnabled) REP_BOOL_RADIO (cfptr->cfWebDav.LockingEnabled) *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfWebDav.LockTimeoutDefaultSeconds); *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfWebDav.LockTimeoutMaxSeconds); *vecptr++ = cfptr->cfWebDav.LockCollectionDepth; REP_BOOL_RADIO (cfptr->cfWebDav.QuotaEnabled) *vecptr++ = cfptr->cfWebDav.MetaFileDirectory; /* directory */ if (cfptr->cfDir.Access) { *vecptr++ = " CHECKED"; *vecptr++ = ""; *vecptr++ = ""; } else if (cfptr->cfDir.AccessSelective) { *vecptr++ = ""; *vecptr++ = " CHECKED"; *vecptr++ = ""; } else { *vecptr++ = ""; *vecptr++ = ""; *vecptr++ = " CHECKED"; } *vecptr++ = cfptr->cfDir.DefaultLayout; *vecptr++ = cfptr->cfDir.BodyTag; *vecptr++ = cfptr->cfDir.DescriptionLines; REP_BOOL_RADIO (cfptr->cfDir.MetaInfoEnabled) REP_BOOL_RADIO (cfptr->cfDir.OwnerEnabled) REP_BOOL_RADIO (cfptr->cfDir.PreExpired) REP_BOOL_RADIO (cfptr->cfDir.WildcardEnabled) REP_BOOL_RADIO (cfptr->cfDir.NoImpliedWildcard) REP_BOOL_RADIO (cfptr->cfDir.NoPrivIgnore) if (cfptr->cfDir.ReadMeTop) { *vecptr++ = " CHECKED"; *vecptr++ = ""; *vecptr++ = ""; } else if (cfptr->cfDir.ReadMeBottom) { *vecptr++ = ""; *vecptr++ = " CHECKED"; *vecptr++ = ""; } else { *vecptr++ = ""; *vecptr++ = ""; *vecptr++ = " CHECKED"; } REP_BOOL_RADIO (cfptr->cfDir.WildcardEnabled) FaoCheck (sizeof(FaoVector), &FaoVector, vecptr, FI_LI); status = FaolToNet (rqptr, ConfigSsiFao, &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); /****************/ /* readme files */ /****************/ for (idx = 0; idx < cfptr->cfDir.ReadMeFileCount; idx++) { status = FaoToNet (rqptr, "!&@!&;AZ", idx ? "\n" : "", cfptr->cfDir.ReadMeFileArray[idx]); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); } /*********/ /* icons */ /*********/ status = FaolToNet (rqptr, ConfigIconsFao, NULL); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); SpecialIconBlank[0] = SpecialIconDefault[0] = SpecialIconDir[0] = SpecialIconParent[0] = SpecialIconUnknown[0] = '\n'; SpecialIconBlank[1] = SpecialIconDefault[0] = SpecialIconDir[1] = SpecialIconParent[1] = SpecialIconUnknown[1] = '\0'; for (itptr = cfptr->cfContent.IconListHeadPtr; itptr; itptr = itptr->NextPtr) { if (itptr->FromMimeTypes) continue; SpecialIconPtr = NULL; if (strsame (itptr->ContentTypePtr, ConfigContentTypeBlank, -1)) SpecialIconPtr = SpecialIconBlank; else if (strsame (itptr->ContentTypePtr, ConfigContentTypeDir, -1)) SpecialIconPtr = SpecialIconDir; else if (strsame (itptr->ContentTypePtr, ConfigContentTypeDefaultIcon, -1)) SpecialIconPtr = SpecialIconDefault; else if (strsame (itptr->ContentTypePtr, ConfigContentTypeParent, -1)) SpecialIconPtr = SpecialIconParent; else if (strsame (itptr->ContentTypePtr, ConfigContentTypeUnknown, -1)) SpecialIconPtr = SpecialIconUnknown; zptr = (sptr = AltTextBuffer) + sizeof(AltTextBuffer)-1; for (cptr = itptr->AltTextPtr; *cptr && sptr < zptr; cptr++) if (*cptr == ' ') *sptr++ = '_'; else *sptr++ = *cptr; vecptr = FaoVector; *vecptr++ = itptr->IconUriPtr; *vecptr++ = AltTextBuffer; *vecptr++ = itptr->ContentTypePtr; status = FaolToNet (rqptr, "!AZ !AZ !&;AZ\n", &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); } vecptr = FaoVector; *vecptr++ = SpecialIconBlank; *vecptr++ = SpecialIconDefault; *vecptr++ = SpecialIconDir; *vecptr++ = SpecialIconParent; *vecptr++ = SpecialIconUnknown; status = FaolToNet (rqptr, ConfigSpecialIconsFao, &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); /*****************/ /* content types */ /*****************/ status = FaolToNet (rqptr, ConfigContentTypesFao, NULL); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); for (ctptr = cfptr->cfContent.ContentInfoListHeadPtr; ctptr; ctptr = ctptr->NextPtr) { if (ctptr->FromMimeTypes) continue; vecptr = &FaoVector; *vecptr++ = ctptr->SuffixPtr; if (!strchr (ctptr->ContentTypePtr, ';')) *vecptr++ = " !AZ"; else *vecptr++ = " \"!AZ\""; *vecptr++ = ctptr->ContentTypePtr; if (ctptr->PutRFM) { *vecptr++ = " RFM:!AZ"; if (ctptr->PutRFM == PUT_RFM_FIX512) *vecptr++ = "FIX512"; else if (ctptr->PutRFM == PUT_RFM_STM) *vecptr++ = "STM"; else if (ctptr->PutRFM == PUT_RFM_STMCR) *vecptr++ = "STMCR"; else if (ctptr->PutRFM == PUT_RFM_STMLF) *vecptr++ = "STMLF"; else if (ctptr->PutRFM == PUT_RFM_UDF) *vecptr++ = "UDF"; else *vecptr++ = "?"; } else *vecptr++ = ""; if (ctptr->FtpMode) { *vecptr++ = " FTP:!&C"; *vecptr++ = ctptr->FtpMode; } else *vecptr++ = ""; if (ctptr->AutoScriptNamePtr[0]) { *vecptr++ = " !AZ"; *vecptr++ = ctptr->AutoScriptNamePtr; } else *vecptr++ = ""; *vecptr++ = " !&;AZ"; if (ctptr->TypeUnknown) *vecptr++ = cfptr->cfContent.ContentTypeDefaultPtr; else *vecptr++ = ctptr->DescriptionPtr; status = FaolToNet (rqptr, "!AZ!&@!&@!&@!&@!&@\n", &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); } vecptr = FaoVector; *vecptr++ = cfptr->cfContent.MimeTypesFileName; status = FaolToNet (rqptr, AddMimeTypesFao, &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); AdminMetaConEndUpdateForm (rqptr); status = FaolToNet (rqptr, "</body>\n</html>\n", NULL); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); rqptr->rqResponse.PreExpired = PRE_EXPIRE_ADMIN; ResponseHeader200 (rqptr, "text/html", &rqptr->NetWriteBufferDsc); #undef REP_BOOL_RADIO } /*****************************************************************************/ /* Server Admin SSL configuration report. */ extern int Http2MaxConcurrentStreams, Http2MaxFrameSize, Http2MaxHeaderListSize, Http2MaxHeaderTableSize, Http2InitialWindowSize, Http2PingTimerSeconds; ConfigReportHttp2 ( REQUEST_STRUCT *rqptr, META_CONFIG *mcptr ) { /* macro to push booleans onto the parameter list */ #define REP_ENDIS(b) \ if (b) *vecptr++ = "[enabled]"; else *vecptr++ = "[disabled]"; static char ReportHttp2Fao [] = "<p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">HTTP/2 !AZ</th></tr>\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>HTTP/2:</th><td>!AZ</td></tr>\n\ <tr><th>Max Concurrent Streams:</th><td>!UL</td>\ <td><i></i></td></tr>\n\ <tr><th>Max Frame Size:</th><td>!UL</td>\ <td><i></i></td></tr>\n\ <tr><th>Max Header List Size:</th><td>!UL</td>\ <td><i></i></td></tr>\n\ <tr><th>Max Header Table Size:</th><td>!UL</td>\ <td><i></i></td></tr>\n\ <tr><th>Initial Window Size:</th><td>!UL</td>\ <td><i></i></td></tr>\n\ <tr><th>Ping Timer:</th><td>!AZ</td></tr>\n\ </table>\n\ </td></tr>\n\ </table>\n"; int status; unsigned long *vecptr; unsigned long FaoVector [32]; CONFIG_STRUCT *cfptr; /*********/ /* begin */ /*********/ if (WATCHMOD (rqptr, WATCH_MOD_CONFIG)) WatchThis (WATCHITM(rqptr), WATCH_MOD_CONFIG, "ConfigReportHttp2()"); /* get a pointer to the meta-config data */ cfptr = mcptr->ConfigMetaPtr; vecptr = FaoVector; /* buffer sizes */ if (cfptr == &Config) { /* in-use values */ *vecptr++ = "(in-use)"; REP_ENDIS (cfptr->cfHttp2.Enabled); *vecptr++ = Http2MaxConcurrentStreams; *vecptr++ = Http2MaxFrameSize; *vecptr++ = Http2MaxHeaderListSize; *vecptr++ = Http2MaxHeaderTableSize; *vecptr++ = Http2InitialWindowSize; *vecptr++ = MetaConShowSeconds (rqptr, Http2PingTimerSeconds); } else { /* file values */ *vecptr++ = "(config)"; REP_ENDIS (cfptr->cfHttp2.Enabled); *vecptr++ = cfptr->cfHttp2.MaxConcurrentStreams; *vecptr++ = cfptr->cfHttp2.MaxFrameSize; *vecptr++ = cfptr->cfHttp2.MaxHeaderListSize; *vecptr++ = cfptr->cfHttp2.MaxHeaderTableSize; *vecptr++ = cfptr->cfHttp2.InitialWindowSize; *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfHttp2.PingTimerSeconds); } status = FaolToNet (rqptr, ReportHttp2Fao, &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); #undef REP_ENDIS } /*****************************************************************************/ /* Server Admin HTTP/2 configuration menu. */ ConfigReviseHttp2 ( REQUEST_STRUCT *rqptr, META_CONFIG *mcptr ) { #define REP_BOOL_RADIO(b)\ if (b)\ {\ *vecptr++ = RadioButtonChecked;\ *vecptr++ = RadioButtonUnchecked;\ }\ else\ {\ *vecptr++ = RadioButtonUnchecked;\ *vecptr++ = RadioButtonChecked;\ } static char ReviseHttp2Fao [] = "<p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">HTTP/2</th></tr>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^^# -HTTP/2-^\">\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ \ <tr><th>HTTP/2:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[Http2Protocol] \">\n\ <input type=\"radio\" name=\"Http2Protocol\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"Http2Protocol\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ \ <tr><th>Concurrent Streams Max:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[Http2StreamsMax]  \">\n\ <input type=\"text\" size=\"5\" name=\"Http2StreamsMax\" value=\"!UL\">\n\ <i></i></td></tr>\n\ \ <tr><th>Frame Size Max:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[Http2FrameSizeMax]  \">\n\ <input type=\"text\" size=\"5\" name=\"Http2FrameSizeMax\" value=\"!UL\">\n\ <i></i></td></tr>\n\ \ <tr><th>Header List Max:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[Http2HeaderListMax]  \">\n\ <input type=\"text\" size=\"5\" name=\"Http2HeaderListMax\" value=\"!UL\">\n\ <i></i></td></tr>\n\ \ <tr><th>Header Table Max:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[Http2HeaderTableMax]  \">\n\ <input type=\"text\" size=\"5\" name=\"Http2HeaderTableMax\" value=\"!UL\">\n\ <i></i></td></tr>\n\ \ <tr><th>Initial Window Size:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[Http2InitWindowSize]  \">\n\ <input type=\"text\" size=\"5\" name=\"Http2InitWindowSize\" value=\"!UL\">\n\ <i></i></td></tr>\n\ \ <tr><th>Ping Timer:</th><td>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[Http2PingSeconds]  \">\n\ <input type=\"text\" size=\"7\" name=\"Http2PingSeconds\" value=\"!AZ\">\n\ <i>hh:mm:ss</i></td></tr>\n\ \ </table>\n\ </td></tr>\n\ </table>\n"; static char RadioButtonChecked [] = " CHECKED", RadioButtonUnchecked [] = ""; int status; unsigned long *vecptr; unsigned long FaoVector [32]; CONFIG_STRUCT *cfptr; /*********/ /* begin */ /*********/ if (WATCHMOD (rqptr, WATCH_MOD_CONFIG)) WatchThis (WATCHITM(rqptr), WATCH_MOD_CONFIG, "ConfigReviseHttp2()"); /* get a pointer to the meta-config data */ cfptr = mcptr->ConfigMetaPtr; vecptr = FaoVector; REP_BOOL_RADIO (cfptr->cfHttp2.Enabled); *vecptr++ = cfptr->cfHttp2.MaxConcurrentStreams; *vecptr++ = cfptr->cfHttp2.MaxFrameSize; *vecptr++ = cfptr->cfHttp2.MaxHeaderListSize; *vecptr++ = cfptr->cfHttp2.MaxHeaderTableSize; *vecptr++ = cfptr->cfHttp2.InitialWindowSize; *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfHttp2.PingTimerSeconds); status = FaolToNet (rqptr, ReviseHttp2Fao, &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); #undef REP_BOOL_RADIO } /*****************************************************************************/ /* Server Admin SSL configuration report. */ ConfigReportSecureSocket ( REQUEST_STRUCT *rqptr, META_CONFIG *mcptr ) { /* macro to push booleans onto the parameter list */ #define REP_ENDIS(b) \ if (b) *vecptr++ = "[enabled]"; else *vecptr++ = "[disabled]"; /* report a string, or if empty as "(none)" */ #define REP_DEFAULT(s) \ if (s[0]) *vecptr++ = s; else *vecptr++ = ConfigNoteDefault; static char ReportSslFao [] = "<p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">!AZSecure Socket (SSL/TLS)!AZ</th></tr>\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ <tr><th>Secure Socket:</th><td>!AZ</td></tr>\n\ <tr><th>Protocol:</th><td>!AZ</td></tr>\n\ <tr><th>Options:</th>\ <td style=\"white-space:normal;\">!AZ</td></tr>\n\ <tr><th>Cipher List:</th>\ <td style=\"white-space:normal;\">!AZ</td>\ <tr><th>Server Certificate:</th><td>!AZ</td>\ <tr><th>Private Key:</th><td>!AZ</td>\ <tr><th>Verify Peer:</th><td>!AZ</td>\ <tr><th>Verify Peer Data Max:</th><td>!SL <i>kBytes</i> !AZ</td>\ <tr><th>Verify Peer Depth:</th><td>!UL</td>\ <tr><th>Verify Peer CA File:</th><td>!AZ</td>\ <tr><th>Strict Transport Security:</th><td>!AZ</td>\ <tr><th>Session Lifetime:</th><td>!AZ!AZ</td>\ <tr><th>Session Cache Max:</th><td>!SL!AZ</td>\ <tr><th>Instance Cache Max:</th><td>!SL!AZ</td>\ <tr><th>Instance Cache Size:</th><td>!SL!AZ</td>\ </table>\n\ </td></tr>\n\ </table>\n"; int status; unsigned long *vecptr; unsigned long FaoVector [32]; CONFIG_STRUCT *cfptr; /*********/ /* begin */ /*********/ if (WATCHMOD (rqptr, WATCH_MOD_CONFIG)) WatchThis (WATCHITM(rqptr), WATCH_MOD_CONFIG, "ConfigReportSecureSocket()"); /* get a pointer to the meta-config data */ cfptr = mcptr->ConfigMetaPtr; vecptr = FaoVector; *vecptr++ = ProtocolHttpsAvailable ? "" : "<strike>"; *vecptr++ = ProtocolHttpsAvailable ? "" : "</strike>"; /* somewhat back-to-front from the usual enab/disab */ REP_ENDIS (!cfptr->cfSesola.Disabled); REP_DEFAULT (cfptr->cfSesola.ProtocolVersion); REP_DEFAULT (cfptr->cfSesola.ProtocolOptions); REP_DEFAULT (cfptr->cfSesola.CipherList); REP_DEFAULT (cfptr->cfSesola.ServerCert); REP_DEFAULT (cfptr->cfSesola.PrivateKey); REP_ENDIS (cfptr->cfSesola.VerifyPeer); *vecptr++ = cfptr->cfSesola.VerifyPeerDataMax; *vecptr++ = cfptr->cfSesola.VerifyPeerDataMax ? "" : ConfigNoteDefault; *vecptr++ = cfptr->cfSesola.VerifyPeerDepth; REP_DEFAULT (cfptr->cfSesola.VerifyPeerCAFile); *vecptr++ = cfptr->cfSesola.StrictTransSec; *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfSesola.SessionLifetime); *vecptr++ = cfptr->cfSesola.SessionLifetime ? "" : ConfigNoteDefault; *vecptr++ = cfptr->cfSesola.SessionCacheMax; *vecptr++ = cfptr->cfSesola.SessionCacheMax ? "" : ConfigNoteDefault; *vecptr++ = cfptr->cfSesola.InstanceSessionCacheMax; *vecptr++ = cfptr->cfSesola.InstanceSessionCacheMax ? "" : ConfigNoteDefault; *vecptr++ = cfptr->cfSesola.InstanceSessionCacheSize; *vecptr++ = cfptr->cfSesola.InstanceSessionCacheSize ? "" : ConfigNoteDefault; status = FaolToNet (rqptr, ReportSslFao, &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); #undef REP_ENDIS #undef REP_DEFAULT } /*****************************************************************************/ /* Server Admin SSL configuration menu. */ ConfigReviseSecureSocket ( REQUEST_STRUCT *rqptr, META_CONFIG *mcptr ) { #define REP_BOOL_RADIO(b)\ if (b)\ {\ *vecptr++ = RadioButtonChecked;\ *vecptr++ = RadioButtonUnchecked;\ }\ else\ {\ *vecptr++ = RadioButtonUnchecked;\ *vecptr++ = RadioButtonChecked;\ } static char ReviseSslFao [] = "<p><table class=\"ctgry\">\n\ <tr><th class=\"ctttl\">!AZSecure Socket (SSL/TLS)!AZ</th></tr>\n\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^^# -SECURE SOCKET-^\">\n\ <tr><td>\n\ <table class=\"rghtlft\">\n\ \ <tr><th>Secure Socket:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SecureSocket]  \">\n\ <input type=\"radio\" name=\"SecureSocket\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"SecureSocket\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ \ <tr><th>Protocol Version(s):</th>\ <td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SSLversion]  \">\n\ <input type=\"text\" size=\"40\" name=\"SSLversion\" value=\"!AZ\">\n\ </td></tr>\n\ <tr><th>Options:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SSLoptions]  \">\n\ <input type=\"text\" size=\"!UL\" name=\">SSLoptions\" value=\"!AZ\">\n\ </td></tr>\n\ \ <tr><th>Cipher List:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SSLcipherList] \">\n\ <input type=\"text\" size=\"!UL\" name=\"SSLcipherList\" value=\"!AZ\">\n\ </td></tr>\n\ <tr><th>Server Certificate:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SSLcert]  \">\n\ <input type=\"text\" size=\"40\" name=\"SSLcert\" value=\"!AZ\">\n\ </td></tr>\n\ \ <tr><th>Certificate Key:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SSLkey]  \">\n\ <input type=\"text\" size=\"40\" name=\"SSLkey\" value=\"!AZ\">\n\ </td></tr>\n\ \ <tr><th>Verify Peer:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SSLverifyPeer]  \">\n\ <input type=\"radio\" name=\"SSLverifyPeer\" value=\"enabled\"!AZ>enabled\n\ <input type=\"radio\" name=\"SSLverifyPeer\" value=\"disabled\"!AZ>disabled\n\ </td></tr>\n\ \ <tr><th>Verify Peer Data Max:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SSLVerifyPeerDataMax]  \">\n\ <input type=\"text\" size=\"5\" name=\"SSLVerifyPeerDataMax\" value=\"!SL\">\n\ <i>maximum kBytes request data during client certificate renegotiation</i></td></tr>\n\ \ <tr><th>Verify Peer Depth:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SSLverifyPeerDepth]  \">\n\ <input type=\"text\" size=\"5\" name=\"SSLverifyPeerDepth\" value=\"!UL\">\n\ </td></tr>\n\ \ <tr><th>Verify Peer CA File:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SSLverifyPeerCAFile]  \">\n\ <input type=\"text\" size=\"40\" name=\"SSLverifyPeerCAFile\" value=\"!AZ\">\n\ </td></tr>\n\ \ <tr><th>Strict Transport Security:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SSLstrictTransSec]  \">\n\ <input type=\"text\" size=\"60\" name=\"SSLstrictTransSec\" value=\"!AZ\">\n\ </td></tr>\n\ \ <tr><th>Session Lifetime:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SSLsessionLifetime]  \">\n\ <input type=\"text\" size=\"7\" name=\"SSLsessionLifetime\" value=\"!AZ\">\n\ <i>hh:mm:ss</i></td></tr>\n\ \ <tr><th>Session Cache Max:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SSLsessionCacheMax]  \">\n\ <input type=\"text\" size=\"5\" name=\"SSLsessionCacheMax\" value=\"!SL\">\n\ <i>number of records</i></td></tr>\n\ \ <tr><th>Instance Cache Max:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SSLinstanceCacheMax]  \">\n\ <input type=\"text\" size=\"5\" name=\"SSLinstanceCacheMax\" value=\"!SL\">\n\ <i>number of shared records</i></td></tr>\n\ \ <tr><th>Instance Cache Size:</th><td>\ <input type=\"hidden\" name=\"hidden$lf\" value=\"^[SSLinstanceCacheSize]  \">\n\ <input type=\"text\" size=\"5\" name=\"SSLinstanceCacheSize\" value=\"!SL\">\n\ <i>shared record size in bytes</i></td></tr>\n\ \ </table>\n\ </td></tr>\n\ </table>\n"; static char RadioButtonChecked [] = " CHECKED", RadioButtonUnchecked [] = ""; int status; unsigned long *vecptr; unsigned long FaoVector [32]; CONFIG_STRUCT *cfptr; /*********/ /* begin */ /*********/ if (WATCHMOD (rqptr, WATCH_MOD_CONFIG)) WatchThis (WATCHITM(rqptr), WATCH_MOD_CONFIG, "ConfigReviseSecureSocket()"); /* get a pointer to the meta-config data */ cfptr = mcptr->ConfigMetaPtr; vecptr = FaoVector; *vecptr++ = ProtocolHttpsAvailable ? "" : "<strike>"; *vecptr++ = ProtocolHttpsAvailable ? "" : "</strike>"; /* somewhat back-to-front from the usual enab/disab */ REP_BOOL_RADIO (!cfptr->cfSesola.Disabled); *vecptr++ = cfptr->cfSesola.ProtocolVersion; *vecptr++ = strlen(cfptr->cfSesola.ProtocolOptions) > 30 ? 80 : 40; *vecptr++ = cfptr->cfSesola.ProtocolOptions; *vecptr++ = strlen(cfptr->cfSesola.CipherList) > 80 ? strlen(cfptr->cfSesola.CipherList)/2 : 40; *vecptr++ = cfptr->cfSesola.CipherList; *vecptr++ = cfptr->cfSesola.ServerCert; *vecptr++ = cfptr->cfSesola.PrivateKey; REP_BOOL_RADIO (cfptr->cfSesola.VerifyPeer); *vecptr++ = cfptr->cfSesola.VerifyPeerDataMax; *vecptr++ = cfptr->cfSesola.VerifyPeerDepth; *vecptr++ = cfptr->cfSesola.VerifyPeerCAFile; *vecptr++ = cfptr->cfSesola.StrictTransSec; *vecptr++ = MetaConShowSeconds (rqptr, cfptr->cfSesola.SessionLifetime); *vecptr++ = cfptr->cfSesola.SessionCacheMax; *vecptr++ = cfptr->cfSesola.InstanceSessionCacheMax; *vecptr++ = cfptr->cfSesola.InstanceSessionCacheSize; status = FaolToNet (rqptr, ReviseSslFao, &FaoVector); if (VMSnok (status)) ErrorNoticed (rqptr, status, NULL, FI_LI); #undef REP_BOOL_RADIO } /*****************************************************************************/ /* Takes a comma-separated list of elements and returns a pointer to a dynamically allocated string with that list reformated for inclusion in HTML. The separator is intended to be either a newline or comma character. If a comma an extra space is added after each (so that when displayed in HTML it will be wrapped). If a carriage-return ('\r'), it is converted into an HTML <br> (new line) tag so that each appears on a new line in areas where '\n' doesn't behave that way. */ char* ConfigStringList ( REQUEST_STRUCT *rqptr, char *ListPtr, char Separator ) { int Length; char *cptr, *sptr, *zptr; char ListBuffer [8192], HtmlListBuffer [8192]; /*********/ /* begin */ /*********/ if (WATCHMOD (rqptr, WATCH_MOD_CONFIG)) WatchThis (WATCHITM(rqptr), WATCH_MOD_CONFIG, "ConfigStringList() !&Z !UL", ListPtr, Separator); if (!ListPtr) return (""); zptr = (sptr = ListBuffer) + sizeof(ListBuffer); for (cptr = ListPtr; *cptr && sptr < zptr; cptr++) { if (*cptr == STRING_LIST_CHAR) *sptr++ = Separator; else *sptr++ = *cptr; if (Separator == ',' && *cptr == STRING_LIST_CHAR && sptr < zptr) *sptr++ = ' '; } if (sptr >= zptr) return (ConfigStringOverflow); *sptr = '\0'; /* now HTML-escape */ zptr = (sptr = HtmlListBuffer) + sizeof(HtmlListBuffer); for (cptr = ListBuffer; *cptr && sptr < zptr; cptr++) { if (*cptr == '\r') { *sptr++ = '<'; if (sptr < zptr) *sptr++ = 'B'; if (sptr < zptr) *sptr++ = 'R'; if (sptr < zptr) *sptr++ = '>'; } else { switch (*cptr) { case '<' : if (sptr+4 >= zptr) return (ConfigStringOverflow); memcpy (sptr, "<", 4); sptr += 4; break; case '>' : if (sptr+4 >= zptr) return (ConfigStringOverflow); memcpy (sptr, ">", 4); sptr += 4; break; case '&' : if (sptr+5 >= zptr) return (ConfigStringOverflow); memcpy (sptr, "&", 5); sptr += 5; break; case '\"' : if (sptr+6 >= zptr) return (ConfigStringOverflow); memcpy (sptr, """, 6); sptr += 6; break; default : *sptr++ = *cptr; } } if (Separator == ',' && *cptr == STRING_LIST_CHAR && sptr < zptr) *sptr++ = ' '; } if (sptr >= zptr) return (ConfigStringOverflow); *sptr = '\0'; Length = sptr - HtmlListBuffer; sptr = VmGetHeap (rqptr, Length+1); memcpy (sptr, HtmlListBuffer, Length+1); return (sptr); } /*****************************************************************************/