1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 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
|
<pre>Network Working Group T. Berners-Lee
Request for Comments: 1945 MIT/LCS
Category: Informational R. Fielding
UC Irvine
H. Frystyk
MIT/LCS
May 1996
<span class="h1">Hypertext Transfer Protocol -- HTTP/1.0</span>
Status of This Memo
This memo provides information for the Internet community. This memo
does not specify an Internet standard of any kind. Distribution of
this memo is unlimited.
IESG Note:
The IESG has concerns about this protocol, and expects this document
to be replaced relatively soon by a standards track document.
Abstract
The Hypertext Transfer Protocol (HTTP) is an application-level
protocol with the lightness and speed necessary for distributed,
collaborative, hypermedia information systems. It is a generic,
stateless, object-oriented protocol which can be used for many tasks,
such as name servers and distributed object management systems,
through extension of its request methods (commands). A feature of
HTTP is the typing of data representation, allowing systems to be
built independently of the data being transferred.
HTTP has been in use by the World-Wide Web global information
initiative since 1990. This specification reflects common usage of
the protocol referred to as "HTTP/1.0".
Table of Contents
<a href="#section-1">1</a>. Introduction .............................................. <a href="#page-4">4</a>
<a href="#section-1.1">1.1</a> Purpose .............................................. <a href="#page-4">4</a>
<a href="#section-1.2">1.2</a> Terminology .......................................... <a href="#page-4">4</a>
<a href="#section-1.3">1.3</a> Overall Operation .................................... <a href="#page-6">6</a>
<a href="#section-1.4">1.4</a> HTTP and MIME ........................................ <a href="#page-8">8</a>
<a href="#section-2">2</a>. Notational Conventions and Generic Grammar ................ <a href="#page-8">8</a>
<a href="#section-2.1">2.1</a> Augmented BNF ........................................ <a href="#page-8">8</a>
<a href="#section-2.2">2.2</a> Basic Rules .......................................... <a href="#page-10">10</a>
<a href="#section-3">3</a>. Protocol Parameters ....................................... <a href="#page-12">12</a>
<span class="grey">Berners-Lee, et al Informational [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
<a href="#section-3.1">3.1</a> HTTP Version ......................................... <a href="#page-12">12</a>
<a href="#section-3.2">3.2</a> Uniform Resource Identifiers ......................... <a href="#page-14">14</a>
<a href="#section-3.2.1">3.2.1</a> General Syntax ................................ <a href="#page-14">14</a>
<a href="#section-3.2.2">3.2.2</a> http URL ...................................... <a href="#page-15">15</a>
<a href="#section-3.3">3.3</a> Date/Time Formats .................................... <a href="#page-15">15</a>
<a href="#section-3.4">3.4</a> Character Sets ....................................... <a href="#page-17">17</a>
<a href="#section-3.5">3.5</a> Content Codings ...................................... <a href="#page-18">18</a>
<a href="#section-3.6">3.6</a> Media Types .......................................... <a href="#page-19">19</a>
<a href="#section-3.6.1">3.6.1</a> Canonicalization and Text Defaults ............ <a href="#page-19">19</a>
<a href="#section-3.6.2">3.6.2</a> Multipart Types ............................... <a href="#page-20">20</a>
<a href="#section-3.7">3.7</a> Product Tokens ....................................... <a href="#page-20">20</a>
<a href="#section-4">4</a>. HTTP Message .............................................. <a href="#page-21">21</a>
<a href="#section-4.1">4.1</a> Message Types ........................................ <a href="#page-21">21</a>
<a href="#section-4.2">4.2</a> Message Headers ...................................... <a href="#page-22">22</a>
<a href="#section-4.3">4.3</a> General Header Fields ................................ <a href="#page-23">23</a>
<a href="#section-5">5</a>. Request ................................................... <a href="#page-23">23</a>
<a href="#section-5.1">5.1</a> Request-Line ......................................... <a href="#page-23">23</a>
<a href="#section-5.1.1">5.1.1</a> Method ........................................ <a href="#page-24">24</a>
<a href="#section-5.1.2">5.1.2</a> Request-URI ................................... <a href="#page-24">24</a>
<a href="#section-5.2">5.2</a> Request Header Fields ................................ <a href="#page-25">25</a>
<a href="#section-6">6</a>. Response .................................................. <a href="#page-25">25</a>
<a href="#section-6.1">6.1</a> Status-Line .......................................... <a href="#page-26">26</a>
<a href="#section-6.1.1">6.1.1</a> Status Code and Reason Phrase ................. <a href="#page-26">26</a>
<a href="#section-6.2">6.2</a> Response Header Fields ............................... <a href="#page-28">28</a>
<a href="#section-7">7</a>. Entity .................................................... <a href="#page-28">28</a>
<a href="#section-7.1">7.1</a> Entity Header Fields ................................. <a href="#page-29">29</a>
<a href="#section-7.2">7.2</a> Entity Body .......................................... <a href="#page-29">29</a>
<a href="#section-7.2.1">7.2.1</a> Type .......................................... <a href="#page-29">29</a>
<a href="#section-7.2.2">7.2.2</a> Length ........................................ <a href="#page-30">30</a>
<a href="#section-8">8</a>. Method Definitions ........................................ <a href="#page-30">30</a>
<a href="#section-8.1">8.1</a> GET .................................................. <a href="#page-31">31</a>
<a href="#section-8.2">8.2</a> HEAD ................................................. <a href="#page-31">31</a>
<a href="#section-8.3">8.3</a> POST ................................................. <a href="#page-31">31</a>
<a href="#section-9">9</a>. Status Code Definitions ................................... <a href="#page-32">32</a>
<a href="#section-9.1">9.1</a> Informational 1xx .................................... <a href="#page-32">32</a>
<a href="#section-9.2">9.2</a> Successful 2xx ....................................... <a href="#page-32">32</a>
<a href="#section-9.3">9.3</a> Redirection 3xx ...................................... <a href="#page-34">34</a>
<a href="#section-9.4">9.4</a> Client Error 4xx ..................................... <a href="#page-35">35</a>
<a href="#section-9.5">9.5</a> Server Error 5xx ..................................... <a href="#page-37">37</a>
<a href="#section-10">10</a>. Header Field Definitions .................................. <a href="#page-37">37</a>
<a href="#section-10.1">10.1</a> Allow ............................................... <a href="#page-38">38</a>
<a href="#section-10.2">10.2</a> Authorization ....................................... <a href="#page-38">38</a>
<a href="#section-10.3">10.3</a> Content-Encoding .................................... <a href="#page-39">39</a>
<a href="#section-10.4">10.4</a> Content-Length ...................................... <a href="#page-39">39</a>
<a href="#section-10.5">10.5</a> Content-Type ........................................ <a href="#page-40">40</a>
<a href="#section-10.6">10.6</a> Date ................................................ <a href="#page-40">40</a>
<a href="#section-10.7">10.7</a> Expires ............................................. <a href="#page-41">41</a>
<a href="#section-10.8">10.8</a> From ................................................ <a href="#page-42">42</a>
<span class="grey">Berners-Lee, et al Informational [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
<a href="#section-10.9">10.9</a> If-Modified-Since ................................... <a href="#page-42">42</a>
<a href="#section-10.10">10.10</a> Last-Modified ....................................... <a href="#page-43">43</a>
<a href="#section-10.11">10.11</a> Location ............................................ <a href="#page-44">44</a>
<a href="#section-10.12">10.12</a> Pragma .............................................. <a href="#page-44">44</a>
<a href="#section-10.13">10.13</a> Referer ............................................. <a href="#page-44">44</a>
<a href="#section-10.14">10.14</a> Server .............................................. <a href="#page-45">45</a>
<a href="#section-10.15">10.15</a> User-Agent .......................................... <a href="#page-46">46</a>
<a href="#section-10.16">10.16</a> WWW-Authenticate .................................... <a href="#page-46">46</a>
<a href="#section-11">11</a>. Access Authentication ..................................... <a href="#page-47">47</a>
<a href="#section-11.1">11.1</a> Basic Authentication Scheme ......................... <a href="#page-48">48</a>
<a href="#section-12">12</a>. Security Considerations ................................... <a href="#page-49">49</a>
<a href="#section-12.1">12.1</a> Authentication of Clients ........................... <a href="#page-49">49</a>
<a href="#section-12.2">12.2</a> Safe Methods ........................................ <a href="#page-49">49</a>
<a href="#section-12.3">12.3</a> Abuse of Server Log Information ..................... <a href="#page-50">50</a>
<a href="#section-12.4">12.4</a> Transfer of Sensitive Information ................... <a href="#page-50">50</a>
<a href="#section-12.5">12.5</a> Attacks Based On File and Path Names ................ <a href="#page-51">51</a>
<a href="#section-13">13</a>. Acknowledgments ........................................... <a href="#page-51">51</a>
<a href="#section-14">14</a>. References ................................................ <a href="#page-52">52</a>
<a href="#section-15">15</a>. Authors' Addresses ........................................ <a href="#page-54">54</a>
<a href="#appendix-A">Appendix A</a>. Internet Media Type message/http ................ <a href="#page-55">55</a>
<a href="#appendix-B">Appendix B</a>. Tolerant Applications ........................... <a href="#page-55">55</a>
<a href="#appendix-C">Appendix C</a>. Relationship to MIME ............................ <a href="#page-56">56</a>
<a href="#appendix-C.1">C.1</a> Conversion to Canonical Form ......................... <a href="#page-56">56</a>
<a href="#appendix-C.2">C.2</a> Conversion of Date Formats ........................... <a href="#page-57">57</a>
<a href="#appendix-C.3">C.3</a> Introduction of Content-Encoding ..................... <a href="#page-57">57</a>
<a href="#appendix-C.4">C.4</a> No Content-Transfer-Encoding ......................... <a href="#page-57">57</a>
<a href="#appendix-C.5">C.5</a> HTTP Header Fields in Multipart Body-Parts ........... <a href="#page-57">57</a>
<a href="#appendix-D">Appendix D</a>. Additional Features ............................. <a href="#page-57">57</a>
<a href="#appendix-D.1">D.1</a> Additional Request Methods ........................... <a href="#page-58">58</a>
<a href="#appendix-D.1.1">D.1.1</a> PUT ........................................... <a href="#page-58">58</a>
<a href="#appendix-D.1.2">D.1.2</a> DELETE ........................................ <a href="#page-58">58</a>
<a href="#appendix-D.1.3">D.1.3</a> LINK .......................................... <a href="#page-58">58</a>
<a href="#appendix-D.1.4">D.1.4</a> UNLINK ........................................ <a href="#page-58">58</a>
<a href="#appendix-D.2">D.2</a> Additional Header Field Definitions .................. <a href="#page-58">58</a>
<a href="#appendix-D.2.1">D.2.1</a> Accept ........................................ <a href="#page-58">58</a>
<a href="#appendix-D.2.2">D.2.2</a> Accept-Charset ................................ <a href="#page-59">59</a>
<a href="#appendix-D.2.3">D.2.3</a> Accept-Encoding ............................... <a href="#page-59">59</a>
<a href="#appendix-D.2.4">D.2.4</a> Accept-Language ............................... <a href="#page-59">59</a>
<a href="#appendix-D.2.5">D.2.5</a> Content-Language .............................. <a href="#page-59">59</a>
<a href="#appendix-D.2.6">D.2.6</a> Link .......................................... <a href="#page-59">59</a>
<a href="#appendix-D.2.7">D.2.7</a> MIME-Version .................................. <a href="#page-59">59</a>
<a href="#appendix-D.2.8">D.2.8</a> Retry-After ................................... <a href="#page-60">60</a>
<a href="#appendix-D.2.9">D.2.9</a> Title ......................................... <a href="#page-60">60</a>
<a href="#appendix-D.2.10">D.2.10</a> URI ........................................... <a href="#page-60">60</a>
<span class="grey">Berners-Lee, et al Informational [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
<span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a> Purpose</span>
The Hypertext Transfer Protocol (HTTP) is an application-level
protocol with the lightness and speed necessary for distributed,
collaborative, hypermedia information systems. HTTP has been in use
by the World-Wide Web global information initiative since 1990. This
specification reflects common usage of the protocol referred too as
"HTTP/1.0". This specification describes the features that seem to be
consistently implemented in most HTTP/1.0 clients and servers. The
specification is split into two sections. Those features of HTTP for
which implementations are usually consistent are described in the
main body of this document. Those features which have few or
inconsistent implementations are listed in <a href="#appendix-D">Appendix D</a>.
Practical information systems require more functionality than simple
retrieval, including search, front-end update, and annotation. HTTP
allows an open-ended set of methods to be used to indicate the
purpose of a request. It builds on the discipline of reference
provided by the Uniform Resource Identifier (URI) [<a href="#ref-2" title=""Universal Resource Identifiers in WWW: A Unifying Syntax for the Expression of Names and Addresses of Objects on the Network as used in the World-Wide Web"">2</a>], as a location
(URL) [<a href="#ref-4" title=""Uniform Resource Locators (URL)"">4</a>] or name (URN) [<a href="#ref-16" title=""Functional Requirements for Uniform Resource Names"">16</a>], for indicating the resource on which a
method is to be applied. Messages are passed in a format similar to
that used by Internet Mail [<a href="#ref-7" title=""Standard for the Format of ARPA Internet Text Messages"">7</a>] and the Multipurpose Internet Mail
Extensions (MIME) [<a href="#ref-5" title=""MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms for Specifying and Describing the Format of Internet Message Bodies"">5</a>].
HTTP is also used as a generic protocol for communication between
user agents and proxies/gateways to other Internet protocols, such as
SMTP [<a href="#ref-12" title=""Simple Mail Transfer Protocol."">12</a>], NNTP [<a href="#ref-11" title=""Network News Transfer Protocol: A Proposed Standard for the Stream-Based Transmission of News"">11</a>], FTP [<a href="#ref-14" title=""File Transfer Protocol (FTP)"">14</a>], Gopher [<a href="#ref-1" title=""The Internet Gopher Protocol: A Distributed Document Search and Retrieval Protocol"">1</a>], and WAIS [<a href="#ref-8" title=""WAIS Interface Protocol Prototype Functional Specification."">8</a>], allowing
basic hypermedia access to resources available from diverse
applications and simplifying the implementation of user agents.
<span class="h3"><a class="selflink" id="section-1.2" href="#section-1.2">1.2</a> Terminology</span>
This specification uses a number of terms to refer to the roles
played by participants in, and objects of, the HTTP communication.
connection
A transport layer virtual circuit established between two
application programs for the purpose of communication.
message
The basic unit of HTTP communication, consisting of a structured
sequence of octets matching the syntax defined in <a href="#section-4">Section 4</a> and
transmitted via the connection.
<span class="grey">Berners-Lee, et al Informational [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
request
An HTTP request message (as defined in <a href="#section-5">Section 5</a>).
response
An HTTP response message (as defined in <a href="#section-6">Section 6</a>).
resource
A network data object or service which can be identified by a
URI (<a href="#section-3.2">Section 3.2</a>).
entity
A particular representation or rendition of a data resource, or
reply from a service resource, that may be enclosed within a
request or response message. An entity consists of
metainformation in the form of entity headers and content in the
form of an entity body.
client
An application program that establishes connections for the
purpose of sending requests.
user agent
The client which initiates a request. These are often browsers,
editors, spiders (web-traversing robots), or other end user
tools.
server
An application program that accepts connections in order to
service requests by sending back responses.
origin server
The server on which a given resource resides or is to be created.
proxy
An intermediary program which acts as both a server and a client
for the purpose of making requests on behalf of other clients.
Requests are serviced internally or by passing them, with
possible translation, on to other servers. A proxy must
interpret and, if necessary, rewrite a request message before
<span class="grey">Berners-Lee, et al Informational [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
forwarding it. Proxies are often used as client-side portals
through network firewalls and as helper applications for
handling requests via protocols not implemented by the user
agent.
gateway
A server which acts as an intermediary for some other server.
Unlike a proxy, a gateway receives requests as if it were the
origin server for the requested resource; the requesting client
may not be aware that it is communicating with a gateway.
Gateways are often used as server-side portals through network
firewalls and as protocol translators for access to resources
stored on non-HTTP systems.
tunnel
A tunnel is an intermediary program which is acting as a blind
relay between two connections. Once active, a tunnel is not
considered a party to the HTTP communication, though the tunnel
may have been initiated by an HTTP request. The tunnel ceases to
exist when both ends of the relayed connections are closed.
Tunnels are used when a portal is necessary and the intermediary
cannot, or should not, interpret the relayed communication.
cache
A program's local store of response messages and the subsystem
that controls its message storage, retrieval, and deletion. A
cache stores cachable responses in order to reduce the response
time and network bandwidth consumption on future, equivalent
requests. Any client or server may include a cache, though a
cache cannot be used by a server while it is acting as a tunnel.
Any given program may be capable of being both a client and a server;
our use of these terms refers only to the role being performed by the
program for a particular connection, rather than to the program's
capabilities in general. Likewise, any server may act as an origin
server, proxy, gateway, or tunnel, switching behavior based on the
nature of each request.
<span class="h3"><a class="selflink" id="section-1.3" href="#section-1.3">1.3</a> Overall Operation</span>
The HTTP protocol is based on a request/response paradigm. A client
establishes a connection with a server and sends a request to the
server in the form of a request method, URI, and protocol version,
followed by a MIME-like message containing request modifiers, client
information, and possible body content. The server responds with a
<span class="grey">Berners-Lee, et al Informational [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
status line, including the message's protocol version and a success
or error code, followed by a MIME-like message containing server
information, entity metainformation, and possible body content.
Most HTTP communication is initiated by a user agent and consists of
a request to be applied to a resource on some origin server. In the
simplest case, this may be accomplished via a single connection (v)
between the user agent (UA) and the origin server (O).
request chain ------------------------>
UA -------------------v------------------- O
<----------------------- response chain
A more complicated situation occurs when one or more intermediaries
are present in the request/response chain. There are three common
forms of intermediary: proxy, gateway, and tunnel. A proxy is a
forwarding agent, receiving requests for a URI in its absolute form,
rewriting all or parts of the message, and forwarding the reformatted
request toward the server identified by the URI. A gateway is a
receiving agent, acting as a layer above some other server(s) and, if
necessary, translating the requests to the underlying server's
protocol. A tunnel acts as a relay point between two connections
without changing the messages; tunnels are used when the
communication needs to pass through an intermediary (such as a
firewall) even when the intermediary cannot understand the contents
of the messages.
request chain -------------------------------------->
UA -----v----- A -----v----- B -----v----- C -----v----- O
<------------------------------------- response chain
The figure above shows three intermediaries (A, B, and C) between the
user agent and origin server. A request or response message that
travels the whole chain must pass through four separate connections.
This distinction is important because some HTTP communication options
may apply only to the connection with the nearest, non-tunnel
neighbor, only to the end-points of the chain, or to all connections
along the chain. Although the diagram is linear, each participant may
be engaged in multiple, simultaneous communications. For example, B
may be receiving requests from many clients other than A, and/or
forwarding requests to servers other than C, at the same time that it
is handling A's request.
Any party to the communication which is not acting as a tunnel may
employ an internal cache for handling requests. The effect of a cache
is that the request/response chain is shortened if one of the
participants along the chain has a cached response applicable to that
request. The following illustrates the resulting chain if B has a
<span class="grey">Berners-Lee, et al Informational [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
cached copy of an earlier response from O (via C) for a request which
has not been cached by UA or A.
request chain ---------->
UA -----v----- A -----v----- B - - - - - - C - - - - - - O
<--------- response chain
Not all responses are cachable, and some requests may contain
modifiers which place special requirements on cache behavior. Some
HTTP/1.0 applications use heuristics to describe what is or is not a
"cachable" response, but these rules are not standardized.
On the Internet, HTTP communication generally takes place over TCP/IP
connections. The default port is TCP 80 [<a href="#ref-15" title=""Assigned Numbers"">15</a>], but other ports can be
used. This does not preclude HTTP from being implemented on top of
any other protocol on the Internet, or on other networks. HTTP only
presumes a reliable transport; any protocol that provides such
guarantees can be used, and the mapping of the HTTP/1.0 request and
response structures onto the transport data units of the protocol in
question is outside the scope of this specification.
Except for experimental applications, current practice requires that
the connection be established by the client prior to each request and
closed by the server after sending the response. Both clients and
servers should be aware that either party may close the connection
prematurely, due to user action, automated time-out, or program
failure, and should handle such closing in a predictable fashion. In
any case, the closing of the connection by either or both parties
always terminates the current request, regardless of its status.
<span class="h3"><a class="selflink" id="section-1.4" href="#section-1.4">1.4</a> HTTP and MIME</span>
HTTP/1.0 uses many of the constructs defined for MIME, as defined in
<a href="./rfc1521">RFC 1521</a> [<a href="#ref-5" title=""MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms for Specifying and Describing the Format of Internet Message Bodies"">5</a>]. <a href="#appendix-C">Appendix C</a> describes the ways in which the context of
HTTP allows for different use of Internet Media Types than is
typically found in Internet mail, and gives the rationale for those
differences.
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Notational Conventions and Generic Grammar</span>
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a> Augmented BNF</span>
All of the mechanisms specified in this document are described in
both prose and an augmented Backus-Naur Form (BNF) similar to that
used by <a href="./rfc822">RFC 822</a> [<a href="#ref-7" title=""Standard for the Format of ARPA Internet Text Messages"">7</a>]. Implementors will need to be familiar with the
notation in order to understand this specification. The augmented BNF
includes the following constructs:
<span class="grey">Berners-Lee, et al Informational [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
name = definition
The name of a rule is simply the name itself (without any
enclosing "<" and ">") and is separated from its definition by
the equal character "=". Whitespace is only significant in that
indentation of continuation lines is used to indicate a rule
definition that spans more than one line. Certain basic rules
are in uppercase, such as SP, LWS, HT, CRLF, DIGIT, ALPHA, etc.
Angle brackets are used within definitions whenever their
presence will facilitate discerning the use of rule names.
"literal"
Quotation marks surround literal text. Unless stated otherwise,
the text is case-insensitive.
rule1 | rule2
Elements separated by a bar ("I") are alternatives,
e.g., "yes | no" will accept yes or no.
(rule1 rule2)
Elements enclosed in parentheses are treated as a single
element. Thus, "(elem (foo | bar) elem)" allows the token
sequences "elem foo elem" and "elem bar elem".
*rule
The character "*" preceding an element indicates repetition. The
full form is "<n>*<m>element" indicating at least <n> and at
most <m> occurrences of element. Default values are 0 and
infinity so that "*(element)" allows any number, including zero;
"1*element" requires at least one; and "1*2element" allows one
or two.
[<a id="ref-rule">rule</a>]
Square brackets enclose optional elements; "[foo bar]" is
equivalent to "*1(foo bar)".
N rule
Specific repetition: "<n>(element)" is equivalent to
"<n>*<n>(element)"; that is, exactly <n> occurrences of
(element). Thus 2DIGIT is a 2-digit number, and 3ALPHA is a
string of three alphabetic characters.
<span class="grey">Berners-Lee, et al Informational [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
#rule
A construct "#" is defined, similar to "*", for defining lists
of elements. The full form is "<n>#<m>element" indicating at
least <n> and at most <m> elements, each separated by one or
more commas (",") and optional linear whitespace (LWS). This
makes the usual form of lists very easy; a rule such as
"( *LWS element *( *LWS "," *LWS element ))" can be shown as
"1#element". Wherever this construct is used, null elements are
allowed, but do not contribute to the count of elements present.
That is, "(element), , (element)" is permitted, but counts as
only two elements. Therefore, where at least one element is
required, at least one non-null element must be present. Default
values are 0 and infinity so that "#(element)" allows any
number, including zero; "1#element" requires at least one; and
"1#2element" allows one or two.
; comment
A semi-colon, set off some distance to the right of rule text,
starts a comment that continues to the end of line. This is a
simple way of including useful notes in parallel with the
specifications.
implied *LWS
The grammar described by this specification is word-based.
Except where noted otherwise, linear whitespace (LWS) can be
included between any two adjacent words (token or
quoted-string), and between adjacent tokens and delimiters
(tspecials), without changing the interpretation of a field. At
least one delimiter (tspecials) must exist between any two
tokens, since they would otherwise be interpreted as a single
token. However, applications should attempt to follow "common
form" when generating HTTP constructs, since there exist some
implementations that fail to accept anything beyond the common
forms.
<span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a> Basic Rules</span>
The following rules are used throughout this specification to
describe basic parsing constructs. The US-ASCII coded character set
is defined by [<a href="#ref-17" title="ANSI">17</a>].
OCTET = <any 8-bit sequence of data>
CHAR = <any US-ASCII character (octets 0 - 127)>
UPALPHA = <any US-ASCII uppercase letter "A".."Z">
LOALPHA = <any US-ASCII lowercase letter "a".."z">
<span class="grey">Berners-Lee, et al Informational [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
ALPHA = UPALPHA | LOALPHA
DIGIT = <any US-ASCII digit "0".."9">
CTL = <any US-ASCII control character
(octets 0 - 31) and DEL (127)>
CR = <US-ASCII CR, carriage return (13)>
LF = <US-ASCII LF, linefeed (10)>
SP = <US-ASCII SP, space (32)>
HT = <US-ASCII HT, horizontal-tab (9)>
<"> = <US-ASCII double-quote mark (34)>
HTTP/1.0 defines the octet sequence CR LF as the end-of-line marker
for all protocol elements except the Entity-Body (see <a href="#appendix-B">Appendix B</a> for
tolerant applications). The end-of-line marker within an Entity-Body
is defined by its associated media type, as described in <a href="#section-3.6">Section 3.6</a>.
CRLF = CR LF
HTTP/1.0 headers may be folded onto multiple lines if each
continuation line begins with a space or horizontal tab. All linear
whitespace, including folding, has the same semantics as SP.
LWS = [CRLF] 1*( SP | HT )
However, folding of header lines is not expected by some
applications, and should not be generated by HTTP/1.0 applications.
The TEXT rule is only used for descriptive field contents and values
that are not intended to be interpreted by the message parser. Words
of *TEXT may contain octets from character sets other than US-ASCII.
TEXT = <any OCTET except CTLs,
but including LWS>
Recipients of header field TEXT containing octets outside the US-
ASCII character set may assume that they represent ISO-8859-1
characters.
Hexadecimal numeric characters are used in several protocol elements.
HEX = "A" | "B" | "C" | "D" | "E" | "F"
| "a" | "b" | "c" | "d" | "e" | "f" | DIGIT
Many HTTP/1.0 header field values consist of words separated by LWS
or special characters. These special characters must be in a quoted
string to be used within a parameter value.
word = token | quoted-string
<span class="grey">Berners-Lee, et al Informational [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
token = 1*<any CHAR except CTLs or tspecials>
tspecials = "(" | ")" | "<" | ">" | "@"
| "," | ";" | ":" | "\" | <">
| "/" | "[" | "]" | "?" | "="
| "{" | "}" | SP | HT
Comments may be included in some HTTP header fields by surrounding
the comment text with parentheses. Comments are only allowed in
fields containing "comment" as part of their field value definition.
In all other fields, parentheses are considered part of the field
value.
comment = "(" *( ctext | comment ) ")"
ctext = <any TEXT excluding "(" and ")">
A string of text is parsed as a single word if it is quoted using
double-quote marks.
quoted-string = ( <"> *(qdtext) <"> )
qdtext = <any CHAR except <"> and CTLs,
but including LWS>
Single-character quoting using the backslash ("\") character is not
permitted in HTTP/1.0.
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Protocol Parameters</span>
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a> HTTP Version</span>
HTTP uses a "<major>.<minor>" numbering scheme to indicate versions
of the protocol. The protocol versioning policy is intended to allow
the sender to indicate the format of a message and its capacity for
understanding further HTTP communication, rather than the features
obtained via that communication. No change is made to the version
number for the addition of message components which do not affect
communication behavior or which only add to extensible field values.
The <minor> number is incremented when the changes made to the
protocol add features which do not change the general message parsing
algorithm, but which may add to the message semantics and imply
additional capabilities of the sender. The <major> number is
incremented when the format of a message within the protocol is
changed.
The version of an HTTP message is indicated by an HTTP-Version field
in the first line of the message. If the protocol version is not
specified, the recipient must assume that the message is in the
<span class="grey">Berners-Lee, et al Informational [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
simple HTTP/0.9 format.
HTTP-Version = "HTTP" "/" 1*DIGIT "." 1*DIGIT
Note that the major and minor numbers should be treated as separate
integers and that each may be incremented higher than a single digit.
Thus, HTTP/2.4 is a lower version than HTTP/2.13, which in turn is
lower than HTTP/12.3. Leading zeros should be ignored by recipients
and never generated by senders.
This document defines both the 0.9 and 1.0 versions of the HTTP
protocol. Applications sending Full-Request or Full-Response
messages, as defined by this specification, must include an HTTP-
Version of "HTTP/1.0".
HTTP/1.0 servers must:
o recognize the format of the Request-Line for HTTP/0.9 and
HTTP/1.0 requests;
o understand any valid request in the format of HTTP/0.9 or
HTTP/1.0;
o respond appropriately with a message in the same protocol
version used by the client.
HTTP/1.0 clients must:
o recognize the format of the Status-Line for HTTP/1.0 responses;
o understand any valid response in the format of HTTP/0.9 or
HTTP/1.0.
Proxy and gateway applications must be careful in forwarding requests
that are received in a format different than that of the
application's native HTTP version. Since the protocol version
indicates the protocol capability of the sender, a proxy/gateway must
never send a message with a version indicator which is greater than
its native version; if a higher version request is received, the
proxy/gateway must either downgrade the request version or respond
with an error. Requests with a version lower than that of the
application's native format may be upgraded before being forwarded;
the proxy/gateway's response to that request must follow the server
requirements listed above.
<span class="grey">Berners-Lee, et al Informational [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a> Uniform Resource Identifiers</span>
URIs have been known by many names: WWW addresses, Universal Document
Identifiers, Universal Resource Identifiers [<a href="#ref-2" title=""Universal Resource Identifiers in WWW: A Unifying Syntax for the Expression of Names and Addresses of Objects on the Network as used in the World-Wide Web"">2</a>], and finally the
combination of Uniform Resource Locators (URL) [<a href="#ref-4" title=""Uniform Resource Locators (URL)"">4</a>] and Names (URN)
[<a href="#ref-16" title=""Functional Requirements for Uniform Resource Names"">16</a>]. As far as HTTP is concerned, Uniform Resource Identifiers are
simply formatted strings which identify--via name, location, or any
other characteristic--a network resource.
<span class="h4"><a class="selflink" id="section-3.2.1" href="#section-3.2.1">3.2.1</a> General Syntax</span>
URIs in HTTP can be represented in absolute form or relative to some
known base URI [<a href="#ref-9" title=""Relative Uniform Resource Locators"">9</a>], depending upon the context of their use. The two
forms are differentiated by the fact that absolute URIs always begin
with a scheme name followed by a colon.
URI = ( absoluteURI | relativeURI ) [ "#" fragment ]
absoluteURI = scheme ":" *( uchar | reserved )
relativeURI = net_path | abs_path | rel_path
net_path = "//" net_loc [ abs_path ]
abs_path = "/" rel_path
rel_path = [ path ] [ ";" params ] [ "?" query ]
path = fsegment *( "/" segment )
fsegment = 1*pchar
segment = *pchar
params = param *( ";" param )
param = *( pchar | "/" )
scheme = 1*( ALPHA | DIGIT | "+" | "-" | "." )
net_loc = *( pchar | ";" | "?" )
query = *( uchar | reserved )
fragment = *( uchar | reserved )
pchar = uchar | ":" | "@" | "&" | "=" | "+"
uchar = unreserved | escape
unreserved = ALPHA | DIGIT | safe | extra | national
escape = "%" HEX HEX
reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+"
extra = "!" | "*" | "'" | "(" | ")" | ","
safe = "$" | "-" | "_" | "."
unsafe = CTL | SP | <"> | "#" | "%" | "<" | ">"
national = <any OCTET excluding ALPHA, DIGIT,
<span class="grey">Berners-Lee, et al Informational [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
reserved, extra, safe, and unsafe>
For definitive information on URL syntax and semantics, see <a href="./rfc1738">RFC 1738</a>
[<a href="#ref-4" title=""Uniform Resource Locators (URL)"">4</a>] and <a href="./rfc1808">RFC 1808</a> [<a href="#ref-9" title=""Relative Uniform Resource Locators"">9</a>]. The BNF above includes national characters not
allowed in valid URLs as specified by <a href="./rfc1738">RFC 1738</a>, since HTTP servers
are not restricted in the set of unreserved characters allowed to
represent the rel_path part of addresses, and HTTP proxies may
receive requests for URIs not defined by <a href="./rfc1738">RFC 1738</a>.
<span class="h4"><a class="selflink" id="section-3.2.2" href="#section-3.2.2">3.2.2</a> http URL</span>
The "http" scheme is used to locate network resources via the HTTP
protocol. This section defines the scheme-specific syntax and
semantics for http URLs.
http_URL = "http:" "//" host [ ":" port ] [ abs_path ]
host = <A legal Internet host domain name
or IP address (in dotted-decimal form),
as defined by <a href="./rfc1123#section-2.1">Section 2.1 of RFC 1123</a>>
port = *DIGIT
If the port is empty or not given, port 80 is assumed. The semantics
are that the identified resource is located at the server listening
for TCP connections on that port of that host, and the Request-URI
for the resource is abs_path. If the abs_path is not present in the
URL, it must be given as "/" when used as a Request-URI (<a href="#section-5.1.2">Section</a>
<a href="#section-5.1.2">5.1.2</a>).
Note: Although the HTTP protocol is independent of the transport
layer protocol, the http URL only identifies resources by their
TCP location, and thus non-TCP resources must be identified by
some other URI scheme.
The canonical form for "http" URLs is obtained by converting any
UPALPHA characters in host to their LOALPHA equivalent (hostnames are
case-insensitive), eliding the [ ":" port ] if the port is 80, and
replacing an empty abs_path with "/".
<span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a> Date/Time Formats</span>
HTTP/1.0 applications have historically allowed three different
formats for the representation of date/time stamps:
Sun, 06 Nov 1994 08:49:37 GMT ; <a href="./rfc822">RFC 822</a>, updated by <a href="./rfc1123">RFC 1123</a>
Sunday, 06-Nov-94 08:49:37 GMT ; <a href="./rfc850">RFC 850</a>, obsoleted by <a href="./rfc1036">RFC 1036</a>
Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
<span class="grey">Berners-Lee, et al Informational [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
The first format is preferred as an Internet standard and represents
a fixed-length subset of that defined by <a href="./rfc1123">RFC 1123</a> [<a href="#ref-6" title=""Requirements for Internet hosts - Application and Support"">6</a>] (an update to
<a href="./rfc822">RFC 822</a> [<a href="#ref-7" title=""Standard for the Format of ARPA Internet Text Messages"">7</a>]). The second format is in common use, but is based on the
obsolete <a href="./rfc850">RFC 850</a> [<a href="#ref-10" title=""Standard for interchange of USENET Messages"">10</a>] date format and lacks a four-digit year.
HTTP/1.0 clients and servers that parse the date value should accept
all three formats, though they must never generate the third
(asctime) format.
Note: Recipients of date values are encouraged to be robust in
accepting date values that may have been generated by non-HTTP
applications, as is sometimes the case when retrieving or posting
messages via proxies/gateways to SMTP or NNTP.
All HTTP/1.0 date/time stamps must be represented in Universal Time
(UT), also known as Greenwich Mean Time (GMT), without exception.
This is indicated in the first two formats by the inclusion of "GMT"
as the three-letter abbreviation for time zone, and should be assumed
when reading the asctime format.
HTTP-date = <a href="./rfc1123">rfc1123</a>-date | <a href="./rfc850">rfc850</a>-date | asctime-date
<a href="./rfc1123">rfc1123</a>-date = wkday "," SP date1 SP time SP "GMT"
<a href="./rfc850">rfc850</a>-date = weekday "," SP date2 SP time SP "GMT"
asctime-date = wkday SP date3 SP time SP 4DIGIT
date1 = 2DIGIT SP month SP 4DIGIT
; day month year (e.g., 02 Jun 1982)
date2 = 2DIGIT "-" month "-" 2DIGIT
; day-month-year (e.g., 02-Jun-82)
date3 = month SP ( 2DIGIT | ( SP 1DIGIT ))
; month day (e.g., Jun 2)
time = 2DIGIT ":" 2DIGIT ":" 2DIGIT
; 00:00:00 - 23:59:59
wkday = "Mon" | "Tue" | "Wed"
| "Thu" | "Fri" | "Sat" | "Sun"
weekday = "Monday" | "Tuesday" | "Wednesday"
| "Thursday" | "Friday" | "Saturday" | "Sunday"
month = "Jan" | "Feb" | "Mar" | "Apr"
| "May" | "Jun" | "Jul" | "Aug"
| "Sep" | "Oct" | "Nov" | "Dec"
Note: HTTP requirements for the date/time stamp format apply
only to their usage within the protocol stream. Clients and
servers are not required to use these formats for user
<span class="grey">Berners-Lee, et al Informational [Page 16]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
presentation, request logging, etc.
<span class="h3"><a class="selflink" id="section-3.4" href="#section-3.4">3.4</a> Character Sets</span>
HTTP uses the same definition of the term "character set" as that
described for MIME:
The term "character set" is used in this document to refer to a
method used with one or more tables to convert a sequence of
octets into a sequence of characters. Note that unconditional
conversion in the other direction is not required, in that not all
characters may be available in a given character set and a
character set may provide more than one sequence of octets to
represent a particular character. This definition is intended to
allow various kinds of character encodings, from simple single-
table mappings such as US-ASCII to complex table switching methods
such as those that use ISO 2022's techniques. However, the
definition associated with a MIME character set name must fully
specify the mapping to be performed from octets to characters. In
particular, use of external profiling information to determine the
exact mapping is not permitted.
Note: This use of the term "character set" is more commonly
referred to as a "character encoding." However, since HTTP and
MIME share the same registry, it is important that the terminology
also be shared.
HTTP character sets are identified by case-insensitive tokens. The
complete set of tokens are defined by the IANA Character Set registry
[<a href="#ref-15" title=""Assigned Numbers"">15</a>]. However, because that registry does not define a single,
consistent token for each character set, we define here the preferred
names for those character sets most likely to be used with HTTP
entities. These character sets include those registered by <a href="./rfc1521">RFC 1521</a>
[<a href="#ref-5" title=""MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms for Specifying and Describing the Format of Internet Message Bodies"">5</a>] -- the US-ASCII [<a href="#ref-17" title="ANSI">17</a>] and ISO-8859 [<a href="#ref-18" title="ISO 8859-2">18</a>] character sets -- and
other names specifically recommended for use within MIME charset
parameters.
charset = "US-ASCII"
| "ISO-8859-1" | "ISO-8859-2" | "ISO-8859-3"
| "ISO-8859-4" | "ISO-8859-5" | "ISO-8859-6"
| "ISO-8859-7" | "ISO-8859-8" | "ISO-8859-9"
| "ISO-2022-JP" | "ISO-2022-JP-2" | "ISO-2022-KR"
| "UNICODE-1-1" | "UNICODE-1-1-UTF-7" | "UNICODE-1-1-UTF-8"
| token
Although HTTP allows an arbitrary token to be used as a charset
value, any token that has a predefined value within the IANA
Character Set registry [<a href="#ref-15" title=""Assigned Numbers"">15</a>] must represent the character set defined
<span class="grey">Berners-Lee, et al Informational [Page 17]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
by that registry. Applications should limit their use of character
sets to those defined by the IANA registry.
The character set of an entity body should be labelled as the lowest
common denominator of the character codes used within that body, with
the exception that no label is preferred over the labels US-ASCII or
ISO-8859-1.
<span class="h3"><a class="selflink" id="section-3.5" href="#section-3.5">3.5</a> Content Codings</span>
Content coding values are used to indicate an encoding transformation
that has been applied to a resource. Content codings are primarily
used to allow a document to be compressed or encrypted without losing
the identity of its underlying media type. Typically, the resource is
stored in this encoding and only decoded before rendering or
analogous usage.
content-coding = "x-gzip" | "x-compress" | token
Note: For future compatibility, HTTP/1.0 applications should
consider "gzip" and "compress" to be equivalent to "x-gzip"
and "x-compress", respectively.
All content-coding values are case-insensitive. HTTP/1.0 uses
content-coding values in the Content-Encoding (<a href="#section-10.3">Section 10.3</a>) header
field. Although the value describes the content-coding, what is more
important is that it indicates what decoding mechanism will be
required to remove the encoding. Note that a single program may be
capable of decoding multiple content-coding formats. Two values are
defined by this specification:
x-gzip
An encoding format produced by the file compression program
"gzip" (GNU zip) developed by Jean-loup Gailly. This format is
typically a Lempel-Ziv coding (LZ77) with a 32 bit CRC.
x-compress
The encoding format produced by the file compression program
"compress". This format is an adaptive Lempel-Ziv-Welch coding
(LZW).
Note: Use of program names for the identification of
encoding formats is not desirable and should be discouraged
for future encodings. Their use here is representative of
historical practice, not good design.
<span class="grey">Berners-Lee, et al Informational [Page 18]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
<span class="h3"><a class="selflink" id="section-3.6" href="#section-3.6">3.6</a> Media Types</span>
HTTP uses Internet Media Types [<a href="#ref-13" title=""Media Type Registration Procedure."">13</a>] in the Content-Type header field
(<a href="#section-10.5">Section 10.5</a>) in order to provide open and extensible data typing.
media-type = type "/" subtype *( ";" parameter )
type = token
subtype = token
Parameters may follow the type/subtype in the form of attribute/value
pairs.
parameter = attribute "=" value
attribute = token
value = token | quoted-string
The type, subtype, and parameter attribute names are case-
insensitive. Parameter values may or may not be case-sensitive,
depending on the semantics of the parameter name. LWS must not be
generated between the type and subtype, nor between an attribute and
its value. Upon receipt of a media type with an unrecognized
parameter, a user agent should treat the media type as if the
unrecognized parameter and its value were not present.
Some older HTTP applications do not recognize media type parameters.
HTTP/1.0 applications should only use media type parameters when they
are necessary to define the content of a message.
Media-type values are registered with the Internet Assigned Number
Authority (IANA [<a href="#ref-15" title=""Assigned Numbers"">15</a>]). The media type registration process is
outlined in <a href="./rfc1590">RFC 1590</a> [<a href="#ref-13" title=""Media Type Registration Procedure."">13</a>]. Use of non-registered media types is
discouraged.
<span class="h4"><a class="selflink" id="section-3.6.1" href="#section-3.6.1">3.6.1</a> Canonicalization and Text Defaults</span>
Internet media types are registered with a canonical form. In
general, an Entity-Body transferred via HTTP must be represented in
the appropriate canonical form prior to its transmission. If the body
has been encoded with a Content-Encoding, the underlying data should
be in canonical form prior to being encoded.
Media subtypes of the "text" type use CRLF as the text line break
when in canonical form. However, HTTP allows the transport of text
media with plain CR or LF alone representing a line break when used
consistently within the Entity-Body. HTTP applications must accept
CRLF, bare CR, and bare LF as being representative of a line break in
text media received via HTTP.
<span class="grey">Berners-Lee, et al Informational [Page 19]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
In addition, if the text media is represented in a character set that
does not use octets 13 and 10 for CR and LF respectively, as is the
case for some multi-byte character sets, HTTP allows the use of
whatever octet sequences are defined by that character set to
represent the equivalent of CR and LF for line breaks. This
flexibility regarding line breaks applies only to text media in the
Entity-Body; a bare CR or LF should not be substituted for CRLF
within any of the HTTP control structures (such as header fields and
multipart boundaries).
The "charset" parameter is used with some media types to define the
character set (<a href="#section-3.4">Section 3.4</a>) of the data. When no explicit charset
parameter is provided by the sender, media subtypes of the "text"
type are defined to have a default charset value of "ISO-8859-1" when
received via HTTP. Data in character sets other than "ISO-8859-1" or
its subsets must be labelled with an appropriate charset value in
order to be consistently interpreted by the recipient.
Note: Many current HTTP servers provide data using charsets other
than "ISO-8859-1" without proper labelling. This situation reduces
interoperability and is not recommended. To compensate for this,
some HTTP user agents provide a configuration option to allow the
user to change the default interpretation of the media type
character set when no charset parameter is given.
<span class="h4"><a class="selflink" id="section-3.6.2" href="#section-3.6.2">3.6.2</a> Multipart Types</span>
MIME provides for a number of "multipart" types -- encapsulations of
several entities within a single message's Entity-Body. The multipart
types registered by IANA [<a href="#ref-15" title=""Assigned Numbers"">15</a>] do not have any special meaning for
HTTP/1.0, though user agents may need to understand each type in
order to correctly interpret the purpose of each body-part. An HTTP
user agent should follow the same or similar behavior as a MIME user
agent does upon receipt of a multipart type. HTTP servers should not
assume that all HTTP clients are prepared to handle multipart types.
All multipart types share a common syntax and must include a boundary
parameter as part of the media type value. The message body is itself
a protocol element and must therefore use only CRLF to represent line
breaks between body-parts. Multipart body-parts may contain HTTP
header fields which are significant to the meaning of that part.
<span class="h3"><a class="selflink" id="section-3.7" href="#section-3.7">3.7</a> Product Tokens</span>
Product tokens are used to allow communicating applications to
identify themselves via a simple product token, with an optional
slash and version designator. Most fields using product tokens also
allow subproducts which form a significant part of the application to
<span class="grey">Berners-Lee, et al Informational [Page 20]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
be listed, separated by whitespace. By convention, the products are
listed in order of their significance for identifying the
application.
product = token ["/" product-version]
product-version = token
Examples:
User-Agent: CERN-LineMode/2.15 libwww/2.17b3
Server: Apache/0.8.4
Product tokens should be short and to the point -- use of them for
advertizing or other non-essential information is explicitly
forbidden. Although any token character may appear in a product-
version, this token should only be used for a version identifier
(i.e., successive versions of the same product should only differ in
the product-version portion of the product value).
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. HTTP Message</span>
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a> Message Types</span>
HTTP messages consist of requests from client to server and responses
from server to client.
HTTP-message = Simple-Request ; HTTP/0.9 messages
| Simple-Response
| Full-Request ; HTTP/1.0 messages
| Full-Response
Full-Request and Full-Response use the generic message format of <a href="./rfc822">RFC</a>
<a href="./rfc822">822</a> [<a href="#ref-7" title=""Standard for the Format of ARPA Internet Text Messages"">7</a>] for transferring entities. Both messages may include optional
header fields (also known as "headers") and an entity body. The
entity body is separated from the headers by a null line (i.e., a
line with nothing preceding the CRLF).
Full-Request = Request-Line ; <a href="#section-5.1">Section 5.1</a>
*( General-Header ; <a href="#section-4.3">Section 4.3</a>
| Request-Header ; <a href="#section-5.2">Section 5.2</a>
| Entity-Header ) ; <a href="#section-7.1">Section 7.1</a>
CRLF
[ Entity-Body ] ; <a href="#section-7.2">Section 7.2</a>
Full-Response = Status-Line ; <a href="#section-6.1">Section 6.1</a>
*( General-Header ; <a href="#section-4.3">Section 4.3</a>
| Response-Header ; <a href="#section-6.2">Section 6.2</a>
<span class="grey">Berners-Lee, et al Informational [Page 21]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
| Entity-Header ) ; <a href="#section-7.1">Section 7.1</a>
CRLF
[ Entity-Body ] ; <a href="#section-7.2">Section 7.2</a>
Simple-Request and Simple-Response do not allow the use of any header
information and are limited to a single request method (GET).
Simple-Request = "GET" SP Request-URI CRLF
Simple-Response = [ Entity-Body ]
Use of the Simple-Request format is discouraged because it prevents
the server from identifying the media type of the returned entity.
<span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a> Message Headers</span>
HTTP header fields, which include General-Header (<a href="#section-4.3">Section 4.3</a>),
Request-Header (<a href="#section-5.2">Section 5.2</a>), Response-Header (<a href="#section-6.2">Section 6.2</a>), and
Entity-Header (<a href="#section-7.1">Section 7.1</a>) fields, follow the same generic format as
that given in <a href="./rfc822#section-3.1">Section 3.1 of RFC 822</a> [<a href="#ref-7" title=""Standard for the Format of ARPA Internet Text Messages"">7</a>]. Each header field consists
of a name followed immediately by a colon (":"), a single space (SP)
character, and the field value. Field names are case-insensitive.
Header fields can be extended over multiple lines by preceding each
extra line with at least one SP or HT, though this is not
recommended.
HTTP-header = field-name ":" [ field-value ] CRLF
field-name = token
field-value = *( field-content | LWS )
field-content = <the OCTETs making up the field-value
and consisting of either *TEXT or combinations
of token, tspecials, and quoted-string>
The order in which header fields are received is not significant.
However, it is "good practice" to send General-Header fields first,
followed by Request-Header or Response-Header fields prior to the
Entity-Header fields.
Multiple HTTP-header fields with the same field-name may be present
in a message if and only if the entire field-value for that header
field is defined as a comma-separated list [i.e., #(values)]. It must
be possible to combine the multiple header fields into one "field-
name: field-value" pair, without changing the semantics of the
message, by appending each subsequent field-value to the first, each
separated by a comma.
<span class="grey">Berners-Lee, et al Informational [Page 22]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
<span class="h3"><a class="selflink" id="section-4.3" href="#section-4.3">4.3</a> General Header Fields</span>
There are a few header fields which have general applicability for
both request and response messages, but which do not apply to the
entity being transferred. These headers apply only to the message
being transmitted.
General-Header = Date ; <a href="#section-10.6">Section 10.6</a>
| Pragma ; <a href="#section-10.12">Section 10.12</a>
General header field names can be extended reliably only in
combination with a change in the protocol version. However, new or
experimental header fields may be given the semantics of general
header fields if all parties in the communication recognize them to
be general header fields. Unrecognized header fields are treated as
Entity-Header fields.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Request</span>
A request message from a client to a server includes, within the
first line of that message, the method to be applied to the resource,
the identifier of the resource, and the protocol version in use. For
backwards compatibility with the more limited HTTP/0.9 protocol,
there are two valid formats for an HTTP request:
Request = Simple-Request | Full-Request
Simple-Request = "GET" SP Request-URI CRLF
Full-Request = Request-Line ; <a href="#section-5.1">Section 5.1</a>
*( General-Header ; <a href="#section-4.3">Section 4.3</a>
| Request-Header ; <a href="#section-5.2">Section 5.2</a>
| Entity-Header ) ; <a href="#section-7.1">Section 7.1</a>
CRLF
[ Entity-Body ] ; <a href="#section-7.2">Section 7.2</a>
If an HTTP/1.0 server receives a Simple-Request, it must respond with
an HTTP/0.9 Simple-Response. An HTTP/1.0 client capable of receiving
a Full-Response should never generate a Simple-Request.
<span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a> Request-Line</span>
The Request-Line begins with a method token, followed by the
Request-URI and the protocol version, and ending with CRLF. The
elements are separated by SP characters. No CR or LF are allowed
except in the final CRLF sequence.
Request-Line = Method SP Request-URI SP HTTP-Version CRLF
<span class="grey">Berners-Lee, et al Informational [Page 23]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
Note that the difference between a Simple-Request and the Request-
Line of a Full-Request is the presence of the HTTP-Version field and
the availability of methods other than GET.
<span class="h4"><a class="selflink" id="section-5.1.1" href="#section-5.1.1">5.1.1</a> Method</span>
The Method token indicates the method to be performed on the resource
identified by the Request-URI. The method is case-sensitive.
Method = "GET" ; <a href="#section-8.1">Section 8.1</a>
| "HEAD" ; <a href="#section-8.2">Section 8.2</a>
| "POST" ; <a href="#section-8.3">Section 8.3</a>
| extension-method
extension-method = token
The list of methods acceptable by a specific resource can change
dynamically; the client is notified through the return code of the
response if a method is not allowed on a resource. Servers should
return the status code 501 (not implemented) if the method is
unrecognized or not implemented.
The methods commonly used by HTTP/1.0 applications are fully defined
in <a href="#section-8">Section 8</a>.
<span class="h4"><a class="selflink" id="section-5.1.2" href="#section-5.1.2">5.1.2</a> Request-URI</span>
The Request-URI is a Uniform Resource Identifier (<a href="#section-3.2">Section 3.2</a>) and
identifies the resource upon which to apply the request.
Request-URI = absoluteURI | abs_path
The two options for Request-URI are dependent on the nature of the
request.
The absoluteURI form is only allowed when the request is being made
to a proxy. The proxy is requested to forward the request and return
the response. If the request is GET or HEAD and a prior response is
cached, the proxy may use the cached message if it passes any
restrictions in the Expires header field. Note that the proxy may
forward the request on to another proxy or directly to the server
specified by the absoluteURI. In order to avoid request loops, a
proxy must be able to recognize all of its server names, including
any aliases, local variations, and the numeric IP address. An example
Request-Line would be:
GET <a href="http://www.w3.org/pub/WWW/TheProject.html">http://www.w3.org/pub/WWW/TheProject.html</a> HTTP/1.0
<span class="grey">Berners-Lee, et al Informational [Page 24]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
The most common form of Request-URI is that used to identify a
resource on an origin server or gateway. In this case, only the
absolute path of the URI is transmitted (see <a href="#section-3.2.1">Section 3.2.1</a>,
abs_path). For example, a client wishing to retrieve the resource
above directly from the origin server would create a TCP connection
to port 80 of the host "www.w3.org" and send the line:
GET /pub/WWW/TheProject.html HTTP/1.0
followed by the remainder of the Full-Request. Note that the absolute
path cannot be empty; if none is present in the original URI, it must
be given as "/" (the server root).
The Request-URI is transmitted as an encoded string, where some
characters may be escaped using the "% HEX HEX" encoding defined by
<a href="./rfc1738">RFC 1738</a> [<a href="#ref-4" title=""Uniform Resource Locators (URL)"">4</a>]. The origin server must decode the Request-URI in order
to properly interpret the request.
<span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a> Request Header Fields</span>
The request header fields allow the client to pass additional
information about the request, and about the client itself, to the
server. These fields act as request modifiers, with semantics
equivalent to the parameters on a programming language method
(procedure) invocation.
Request-Header = Authorization ; <a href="#section-10.2">Section 10.2</a>
| From ; <a href="#section-10.8">Section 10.8</a>
| If-Modified-Since ; <a href="#section-10.9">Section 10.9</a>
| Referer ; <a href="#section-10.13">Section 10.13</a>
| User-Agent ; <a href="#section-10.15">Section 10.15</a>
Request-Header field names can be extended reliably only in
combination with a change in the protocol version. However, new or
experimental header fields may be given the semantics of request
header fields if all parties in the communication recognize them to
be request header fields. Unrecognized header fields are treated as
Entity-Header fields.
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Response</span>
After receiving and interpreting a request message, a server responds
in the form of an HTTP response message.
Response = Simple-Response | Full-Response
Simple-Response = [ Entity-Body ]
<span class="grey">Berners-Lee, et al Informational [Page 25]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
Full-Response = Status-Line ; <a href="#section-6.1">Section 6.1</a>
*( General-Header ; <a href="#section-4.3">Section 4.3</a>
| Response-Header ; <a href="#section-6.2">Section 6.2</a>
| Entity-Header ) ; <a href="#section-7.1">Section 7.1</a>
CRLF
[ Entity-Body ] ; <a href="#section-7.2">Section 7.2</a>
A Simple-Response should only be sent in response to an HTTP/0.9
Simple-Request or if the server only supports the more limited
HTTP/0.9 protocol. If a client sends an HTTP/1.0 Full-Request and
receives a response that does not begin with a Status-Line, it should
assume that the response is a Simple-Response and parse it
accordingly. Note that the Simple-Response consists only of the
entity body and is terminated by the server closing the connection.
<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a> Status-Line</span>
The first line of a Full-Response message is the Status-Line,
consisting of the protocol version followed by a numeric status code
and its associated textual phrase, with each element separated by SP
characters. No CR or LF is allowed except in the final CRLF sequence.
Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
Since a status line always begins with the protocol version and
status code
"HTTP/" 1*DIGIT "." 1*DIGIT SP 3DIGIT SP
(e.g., "HTTP/1.0 200 "), the presence of that expression is
sufficient to differentiate a Full-Response from a Simple-Response.
Although the Simple-Response format may allow such an expression to
occur at the beginning of an entity body, and thus cause a
misinterpretation of the message if it was given in response to a
Full-Request, most HTTP/0.9 servers are limited to responses of type
"text/html" and therefore would never generate such a response.
<span class="h4"><a class="selflink" id="section-6.1.1" href="#section-6.1.1">6.1.1</a> Status Code and Reason Phrase</span>
The Status-Code element is a 3-digit integer result code of the
attempt to understand and satisfy the request. The Reason-Phrase is
intended to give a short textual description of the Status-Code. The
Status-Code is intended for use by automata and the Reason-Phrase is
intended for the human user. The client is not required to examine or
display the Reason-Phrase.
<span class="grey">Berners-Lee, et al Informational [Page 26]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-27" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
The first digit of the Status-Code defines the class of response. The
last two digits do not have any categorization role. There are 5
values for the first digit:
o 1xx: Informational - Not used, but reserved for future use
o 2xx: Success - The action was successfully received,
understood, and accepted.
o 3xx: Redirection - Further action must be taken in order to
complete the request
o 4xx: Client Error - The request contains bad syntax or cannot
be fulfilled
o 5xx: Server Error - The server failed to fulfill an apparently
valid request
The individual values of the numeric status codes defined for
HTTP/1.0, and an example set of corresponding Reason-Phrase's, are
presented below. The reason phrases listed here are only recommended
-- they may be replaced by local equivalents without affecting the
protocol. These codes are fully defined in <a href="#section-9">Section 9</a>.
Status-Code = "200" ; OK
| "201" ; Created
| "202" ; Accepted
| "204" ; No Content
| "301" ; Moved Permanently
| "302" ; Moved Temporarily
| "304" ; Not Modified
| "400" ; Bad Request
| "401" ; Unauthorized
| "403" ; Forbidden
| "404" ; Not Found
| "500" ; Internal Server Error
| "501" ; Not Implemented
| "502" ; Bad Gateway
| "503" ; Service Unavailable
| extension-code
extension-code = 3DIGIT
Reason-Phrase = *<TEXT, excluding CR, LF>
HTTP status codes are extensible, but the above codes are the only
ones generally recognized in current practice. HTTP applications are
not required to understand the meaning of all registered status
<span class="grey">Berners-Lee, et al Informational [Page 27]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-28" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
codes, though such understanding is obviously desirable. However,
applications must understand the class of any status code, as
indicated by the first digit, and treat any unrecognized response as
being equivalent to the x00 status code of that class, with the
exception that an unrecognized response must not be cached. For
example, if an unrecognized status code of 431 is received by the
client, it can safely assume that there was something wrong with its
request and treat the response as if it had received a 400 status
code. In such cases, user agents should present to the user the
entity returned with the response, since that entity is likely to
include human-readable information which will explain the unusual
status.
<span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a> Response Header Fields</span>
The response header fields allow the server to pass additional
information about the response which cannot be placed in the Status-
Line. These header fields give information about the server and about
further access to the resource identified by the Request-URI.
Response-Header = Location ; <a href="#section-10.11">Section 10.11</a>
| Server ; <a href="#section-10.14">Section 10.14</a>
| WWW-Authenticate ; <a href="#section-10.16">Section 10.16</a>
Response-Header field names can be extended reliably only in
combination with a change in the protocol version. However, new or
experimental header fields may be given the semantics of response
header fields if all parties in the communication recognize them to
be response header fields. Unrecognized header fields are treated as
Entity-Header fields.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Entity</span>
Full-Request and Full-Response messages may transfer an entity within
some requests and responses. An entity consists of Entity-Header
fields and (usually) an Entity-Body. In this section, both sender and
recipient refer to either the client or the server, depending on who
sends and who receives the entity.
<span class="grey">Berners-Lee, et al Informational [Page 28]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-29" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
<span class="h3"><a class="selflink" id="section-7.1" href="#section-7.1">7.1</a> Entity Header Fields</span>
Entity-Header fields define optional metainformation about the
Entity-Body or, if no body is present, about the resource identified
by the request.
Entity-Header = Allow ; <a href="#section-10.1">Section 10.1</a>
| Content-Encoding ; <a href="#section-10.3">Section 10.3</a>
| Content-Length ; <a href="#section-10.4">Section 10.4</a>
| Content-Type ; <a href="#section-10.5">Section 10.5</a>
| Expires ; <a href="#section-10.7">Section 10.7</a>
| Last-Modified ; <a href="#section-10.10">Section 10.10</a>
| extension-header
extension-header = HTTP-header
The extension-header mechanism allows additional Entity-Header fields
to be defined without changing the protocol, but these fields cannot
be assumed to be recognizable by the recipient. Unrecognized header
fields should be ignored by the recipient and forwarded by proxies.
<span class="h3"><a class="selflink" id="section-7.2" href="#section-7.2">7.2</a> Entity Body</span>
The entity body (if any) sent with an HTTP request or response is in
a format and encoding defined by the Entity-Header fields.
Entity-Body = *OCTET
An entity body is included with a request message only when the
request method calls for one. The presence of an entity body in a
request is signaled by the inclusion of a Content-Length header field
in the request message headers. HTTP/1.0 requests containing an
entity body must include a valid Content-Length header field.
For response messages, whether or not an entity body is included with
a message is dependent on both the request method and the response
code. All responses to the HEAD request method must not include a
body, even though the presence of entity header fields may lead one
to believe they do. All 1xx (informational), 204 (no content), and
304 (not modified) responses must not include a body. All other
responses must include an entity body or a Content-Length header
field defined with a value of zero (0).
<span class="h4"><a class="selflink" id="section-7.2.1" href="#section-7.2.1">7.2.1</a> Type</span>
When an Entity-Body is included with a message, the data type of that
body is determined via the header fields Content-Type and Content-
Encoding. These define a two-layer, ordered encoding model:
<span class="grey">Berners-Lee, et al Informational [Page 29]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-30" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
entity-body := Content-Encoding( Content-Type( data ) )
A Content-Type specifies the media type of the underlying data. A
Content-Encoding may be used to indicate any additional content
coding applied to the type, usually for the purpose of data
compression, that is a property of the resource requested. The
default for the content encoding is none (i.e., the identity
function).
Any HTTP/1.0 message containing an entity body should include a
Content-Type header field defining the media type of that body. If
and only if the media type is not given by a Content-Type header, as
is the case for Simple-Response messages, the recipient may attempt
to guess the media type via inspection of its content and/or the name
extension(s) of the URL used to identify the resource. If the media
type remains unknown, the recipient should treat it as type
"application/octet-stream".
<span class="h4"><a class="selflink" id="section-7.2.2" href="#section-7.2.2">7.2.2</a> Length</span>
When an Entity-Body is included with a message, the length of that
body may be determined in one of two ways. If a Content-Length header
field is present, its value in bytes represents the length of the
Entity-Body. Otherwise, the body length is determined by the closing
of the connection by the server.
Closing the connection cannot be used to indicate the end of a
request body, since it leaves no possibility for the server to send
back a response. Therefore, HTTP/1.0 requests containing an entity
body must include a valid Content-Length header field. If a request
contains an entity body and Content-Length is not specified, and the
server does not recognize or cannot calculate the length from other
fields, then the server should send a 400 (bad request) response.
Note: Some older servers supply an invalid Content-Length when
sending a document that contains server-side includes dynamically
inserted into the data stream. It must be emphasized that this
will not be tolerated by future versions of HTTP. Unless the
client knows that it is receiving a response from a compliant
server, it should not depend on the Content-Length value being
correct.
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Method Definitions</span>
The set of common methods for HTTP/1.0 is defined below. Although
this set can be expanded, additional methods cannot be assumed to
share the same semantics for separately extended clients and servers.
<span class="grey">Berners-Lee, et al Informational [Page 30]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-31" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
<span class="h3"><a class="selflink" id="section-8.1" href="#section-8.1">8.1</a> GET</span>
The GET method means retrieve whatever information (in the form of an
entity) is identified by the Request-URI. If the Request-URI refers
to a data-producing process, it is the produced data which shall be
returned as the entity in the response and not the source text of the
process, unless that text happens to be the output of the process.
The semantics of the GET method changes to a "conditional GET" if the
request message includes an If-Modified-Since header field. A
conditional GET method requests that the identified resource be
transferred only if it has been modified since the date given by the
If-Modified-Since header, as described in <a href="#section-10.9">Section 10.9</a>. The
conditional GET method is intended to reduce network usage by
allowing cached entities to be refreshed without requiring multiple
requests or transferring unnecessary data.
<span class="h3"><a class="selflink" id="section-8.2" href="#section-8.2">8.2</a> HEAD</span>
The HEAD method is identical to GET except that the server must not
return any Entity-Body in the response. The metainformation contained
in the HTTP headers in response to a HEAD request should be identical
to the information sent in response to a GET request. This method can
be used for obtaining metainformation about the resource identified
by the Request-URI without transferring the Entity-Body itself. This
method is often used for testing hypertext links for validity,
accessibility, and recent modification.
There is no "conditional HEAD" request analogous to the conditional
GET. If an If-Modified-Since header field is included with a HEAD
request, it should be ignored.
<span class="h3"><a class="selflink" id="section-8.3" href="#section-8.3">8.3</a> POST</span>
The POST method is used to request that the destination server accept
the entity enclosed in the request as a new subordinate of the
resource identified by the Request-URI in the Request-Line. POST is
designed to allow a uniform method to cover the following functions:
o Annotation of existing resources;
o Posting a message to a bulletin board, newsgroup, mailing list,
or similar group of articles;
o Providing a block of data, such as the result of submitting a
form [<a href="#ref-3" title=""Hypertext Markup Language - 2.0"">3</a>], to a data-handling process;
o Extending a database through an append operation.
<span class="grey">Berners-Lee, et al Informational [Page 31]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-32" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
The actual function performed by the POST method is determined by the
server and is usually dependent on the Request-URI. The posted entity
is subordinate to that URI in the same way that a file is subordinate
to a directory containing it, a news article is subordinate to a
newsgroup to which it is posted, or a record is subordinate to a
database.
A successful POST does not require that the entity be created as a
resource on the origin server or made accessible for future
reference. That is, the action performed by the POST method might not
result in a resource that can be identified by a URI. In this case,
either 200 (ok) or 204 (no content) is the appropriate response
status, depending on whether or not the response includes an entity
that describes the result.
If a resource has been created on the origin server, the response
should be 201 (created) and contain an entity (preferably of type
"text/html") which describes the status of the request and refers to
the new resource.
A valid Content-Length is required on all HTTP/1.0 POST requests. An
HTTP/1.0 server should respond with a 400 (bad request) message if it
cannot determine the length of the request message's content.
Applications must not cache responses to a POST request because the
application has no way of knowing that the server would return an
equivalent response on some future request.
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. Status Code Definitions</span>
Each Status-Code is described below, including a description of which
method(s) it can follow and any metainformation required in the
response.
<span class="h3"><a class="selflink" id="section-9.1" href="#section-9.1">9.1</a> Informational 1xx</span>
This class of status code indicates a provisional response,
consisting only of the Status-Line and optional headers, and is
terminated by an empty line. HTTP/1.0 does not define any 1xx status
codes and they are not a valid response to a HTTP/1.0 request.
However, they may be useful for experimental applications which are
outside the scope of this specification.
<span class="h3"><a class="selflink" id="section-9.2" href="#section-9.2">9.2</a> Successful 2xx</span>
This class of status code indicates that the client's request was
successfully received, understood, and accepted.
<span class="grey">Berners-Lee, et al Informational [Page 32]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-33" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
200 OK
The request has succeeded. The information returned with the
response is dependent on the method used in the request, as follows:
GET an entity corresponding to the requested resource is sent
in the response;
HEAD the response must only contain the header information and
no Entity-Body;
POST an entity describing or containing the result of the action.
201 Created
The request has been fulfilled and resulted in a new resource being
created. The newly created resource can be referenced by the URI(s)
returned in the entity of the response. The origin server should
create the resource before using this Status-Code. If the action
cannot be carried out immediately, the server must include in the
response body a description of when the resource will be available;
otherwise, the server should respond with 202 (accepted).
Of the methods defined by this specification, only POST can create a
resource.
202 Accepted
The request has been accepted for processing, but the processing
has not been completed. The request may or may not eventually be
acted upon, as it may be disallowed when processing actually takes
place. There is no facility for re-sending a status code from an
asynchronous operation such as this.
The 202 response is intentionally non-committal. Its purpose is to
allow a server to accept a request for some other process (perhaps
a batch-oriented process that is only run once per day) without
requiring that the user agent's connection to the server persist
until the process is completed. The entity returned with this
response should include an indication of the request's current
status and either a pointer to a status monitor or some estimate of
when the user can expect the request to be fulfilled.
204 No Content
The server has fulfilled the request but there is no new
information to send back. If the client is a user agent, it should
not change its document view from that which caused the request to
<span class="grey">Berners-Lee, et al Informational [Page 33]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-34" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
be generated. This response is primarily intended to allow input
for scripts or other actions to take place without causing a change
to the user agent's active document view. The response may include
new metainformation in the form of entity headers, which should
apply to the document currently in the user agent's active view.
<span class="h3"><a class="selflink" id="section-9.3" href="#section-9.3">9.3</a> Redirection 3xx</span>
This class of status code indicates that further action needs to be
taken by the user agent in order to fulfill the request. The action
required may be carried out by the user agent without interaction
with the user if and only if the method used in the subsequent
request is GET or HEAD. A user agent should never automatically
redirect a request more than 5 times, since such redirections usually
indicate an infinite loop.
300 Multiple Choices
This response code is not directly used by HTTP/1.0 applications,
but serves as the default for interpreting the 3xx class of
responses.
The requested resource is available at one or more locations.
Unless it was a HEAD request, the response should include an entity
containing a list of resource characteristics and locations from
which the user or user agent can choose the one most appropriate.
If the server has a preferred choice, it should include the URL in
a Location field; user agents may use this field value for
automatic redirection.
301 Moved Permanently
The requested resource has been assigned a new permanent URL and
any future references to this resource should be done using that
URL. Clients with link editing capabilities should automatically
relink references to the Request-URI to the new reference returned
by the server, where possible.
The new URL must be given by the Location field in the response.
Unless it was a HEAD request, the Entity-Body of the response
should contain a short note with a hyperlink to the new URL.
If the 301 status code is received in response to a request using
the POST method, the user agent must not automatically redirect the
request unless it can be confirmed by the user, since this might
change the conditions under which the request was issued.
<span class="grey">Berners-Lee, et al Informational [Page 34]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-35" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
Note: When automatically redirecting a POST request after
receiving a 301 status code, some existing user agents will
erroneously change it into a GET request.
302 Moved Temporarily
The requested resource resides temporarily under a different URL.
Since the redirection may be altered on occasion, the client should
continue to use the Request-URI for future requests.
The URL must be given by the Location field in the response. Unless
it was a HEAD request, the Entity-Body of the response should
contain a short note with a hyperlink to the new URI(s).
If the 302 status code is received in response to a request using
the POST method, the user agent must not automatically redirect the
request unless it can be confirmed by the user, since this might
change the conditions under which the request was issued.
Note: When automatically redirecting a POST request after
receiving a 302 status code, some existing user agents will
erroneously change it into a GET request.
304 Not Modified
If the client has performed a conditional GET request and access is
allowed, but the document has not been modified since the date and
time specified in the If-Modified-Since field, the server must
respond with this status code and not send an Entity-Body to the
client. Header fields contained in the response should only include
information which is relevant to cache managers or which may have
changed independently of the entity's Last-Modified date. Examples
of relevant header fields include: Date, Server, and Expires. A
cache should update its cached entity to reflect any new field
values given in the 304 response.
<span class="h3"><a class="selflink" id="section-9.4" href="#section-9.4">9.4</a> Client Error 4xx</span>
The 4xx class of status code is intended for cases in which the
client seems to have erred. If the client has not completed the
request when a 4xx code is received, it should immediately cease
sending data to the server. Except when responding to a HEAD request,
the server should include an entity containing an explanation of the
error situation, and whether it is a temporary or permanent
condition. These status codes are applicable to any request method.
<span class="grey">Berners-Lee, et al Informational [Page 35]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-36" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
Note: If the client is sending data, server implementations on TCP
should be careful to ensure that the client acknowledges receipt
of the packet(s) containing the response prior to closing the
input connection. If the client continues sending data to the
server after the close, the server's controller will send a reset
packet to the client, which may erase the client's unacknowledged
input buffers before they can be read and interpreted by the HTTP
application.
400 Bad Request
The request could not be understood by the server due to malformed
syntax. The client should not repeat the request without
modifications.
401 Unauthorized
The request requires user authentication. The response must include
a WWW-Authenticate header field (<a href="#section-10.16">Section 10.16</a>) containing a
challenge applicable to the requested resource. The client may
repeat the request with a suitable Authorization header field
(<a href="#section-10.2">Section 10.2</a>). If the request already included Authorization
credentials, then the 401 response indicates that authorization has
been refused for those credentials. If the 401 response contains
the same challenge as the prior response, and the user agent has
already attempted authentication at least once, then the user
should be presented the entity that was given in the response,
since that entity may include relevant diagnostic information. HTTP
access authentication is explained in <a href="#section-11">Section 11</a>.
403 Forbidden
The server understood the request, but is refusing to fulfill it.
Authorization will not help and the request should not be repeated.
If the request method was not HEAD and the server wishes to make
public why the request has not been fulfilled, it should describe
the reason for the refusal in the entity body. This status code is
commonly used when the server does not wish to reveal exactly why
the request has been refused, or when no other response is
applicable.
404 Not Found
The server has not found anything matching the Request-URI. No
indication is given of whether the condition is temporary or
permanent. If the server does not wish to make this information
available to the client, the status code 403 (forbidden) can be
used instead.
<span class="grey">Berners-Lee, et al Informational [Page 36]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-37" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
<span class="h3"><a class="selflink" id="section-9.5" href="#section-9.5">9.5</a> Server Error 5xx</span>
Response status codes beginning with the digit "5" indicate cases in
which the server is aware that it has erred or is incapable of
performing the request. If the client has not completed the request
when a 5xx code is received, it should immediately cease sending data
to the server. Except when responding to a HEAD request, the server
should include an entity containing an explanation of the error
situation, and whether it is a temporary or permanent condition.
These response codes are applicable to any request method and there
are no required header fields.
500 Internal Server Error
The server encountered an unexpected condition which prevented it
from fulfilling the request.
501 Not Implemented
The server does not support the functionality required to fulfill
the request. This is the appropriate response when the server does
not recognize the request method and is not capable of supporting
it for any resource.
502 Bad Gateway
The server, while acting as a gateway or proxy, received an invalid
response from the upstream server it accessed in attempting to
fulfill the request.
503 Service Unavailable
The server is currently unable to handle the request due to a
temporary overloading or maintenance of the server. The implication
is that this is a temporary condition which will be alleviated
after some delay.
Note: The existence of the 503 status code does not imply
that a server must use it when becoming overloaded. Some
servers may wish to simply refuse the connection.
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. Header Field Definitions</span>
This section defines the syntax and semantics of all commonly used
HTTP/1.0 header fields. For general and entity header fields, both
sender and recipient refer to either the client or the server,
depending on who sends and who receives the message.
<span class="grey">Berners-Lee, et al Informational [Page 37]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-38" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
<span class="h3"><a class="selflink" id="section-10.1" href="#section-10.1">10.1</a> Allow</span>
The Allow entity-header field lists the set of methods supported by
the resource identified by the Request-URI. The purpose of this field
is strictly to inform the recipient of valid methods associated with
the resource. The Allow header field is not permitted in a request
using the POST method, and thus should be ignored if it is received
as part of a POST entity.
Allow = "Allow" ":" 1#method
Example of use:
Allow: GET, HEAD
This field cannot prevent a client from trying other methods.
However, the indications given by the Allow header field value should
be followed. The actual set of allowed methods is defined by the
origin server at the time of each request.
A proxy must not modify the Allow header field even if it does not
understand all the methods specified, since the user agent may have
other means of communicating with the origin server.
The Allow header field does not indicate what methods are implemented
by the server.
<span class="h3"><a class="selflink" id="section-10.2" href="#section-10.2">10.2</a> Authorization</span>
A user agent that wishes to authenticate itself with a server--
usually, but not necessarily, after receiving a 401 response--may do
so by including an Authorization request-header field with the
request. The Authorization field value consists of credentials
containing the authentication information of the user agent for the
realm of the resource being requested.
Authorization = "Authorization" ":" credentials
HTTP access authentication is described in <a href="#section-11">Section 11</a>. If a request
is authenticated and a realm specified, the same credentials should
be valid for all other requests within this realm.
Responses to requests containing an Authorization field are not
cachable.
<span class="grey">Berners-Lee, et al Informational [Page 38]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-39" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
<span class="h3"><a class="selflink" id="section-10.3" href="#section-10.3">10.3</a> Content-Encoding</span>
The Content-Encoding entity-header field is used as a modifier to the
media-type. When present, its value indicates what additional content
coding has been applied to the resource, and thus what decoding
mechanism must be applied in order to obtain the media-type
referenced by the Content-Type header field. The Content-Encoding is
primarily used to allow a document to be compressed without losing
the identity of its underlying media type.
Content-Encoding = "Content-Encoding" ":" content-coding
Content codings are defined in <a href="#section-3.5">Section 3.5</a>. An example of its use is
Content-Encoding: x-gzip
The Content-Encoding is a characteristic of the resource identified
by the Request-URI. Typically, the resource is stored with this
encoding and is only decoded before rendering or analogous usage.
<span class="h3"><a class="selflink" id="section-10.4" href="#section-10.4">10.4</a> Content-Length</span>
The Content-Length entity-header field indicates the size of the
Entity-Body, in decimal number of octets, sent to the recipient or,
in the case of the HEAD method, the size of the Entity-Body that
would have been sent had the request been a GET.
Content-Length = "Content-Length" ":" 1*DIGIT
An example is
Content-Length: 3495
Applications should use this field to indicate the size of the
Entity-Body to be transferred, regardless of the media type of the
entity. A valid Content-Length field value is required on all
HTTP/1.0 request messages containing an entity body.
Any Content-Length greater than or equal to zero is a valid value.
<a href="#section-7.2.2">Section 7.2.2</a> describes how to determine the length of a response
entity body if a Content-Length is not given.
Note: The meaning of this field is significantly different from
the corresponding definition in MIME, where it is an optional
field used within the "message/external-body" content-type. In
HTTP, it should be used whenever the entity's length can be
determined prior to being transferred.
<span class="grey">Berners-Lee, et al Informational [Page 39]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-40" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
<span class="h3"><a class="selflink" id="section-10.5" href="#section-10.5">10.5</a> Content-Type</span>
The Content-Type entity-header field indicates the media type of the
Entity-Body sent to the recipient or, in the case of the HEAD method,
the media type that would have been sent had the request been a GET.
Content-Type = "Content-Type" ":" media-type
Media types are defined in <a href="#section-3.6">Section 3.6</a>. An example of the field is
Content-Type: text/html
Further discussion of methods for identifying the media type of an
entity is provided in <a href="#section-7.2.1">Section 7.2.1</a>.
<span class="h3"><a class="selflink" id="section-10.6" href="#section-10.6">10.6</a> Date</span>
The Date general-header field represents the date and time at which
the message was originated, having the same semantics as orig-date in
<a href="./rfc822">RFC 822</a>. The field value is an HTTP-date, as described in <a href="#section-3.3">Section</a>
<a href="#section-3.3">3.3</a>.
Date = "Date" ":" HTTP-date
An example is
Date: Tue, 15 Nov 1994 08:12:31 GMT
If a message is received via direct connection with the user agent
(in the case of requests) or the origin server (in the case of
responses), then the date can be assumed to be the current date at
the receiving end. However, since the date--as it is believed by the
origin--is important for evaluating cached responses, origin servers
should always include a Date header. Clients should only send a Date
header field in messages that include an entity body, as in the case
of the POST request, and even then it is optional. A received message
which does not have a Date header field should be assigned one by the
recipient if the message will be cached by that recipient or
gatewayed via a protocol which requires a Date.
In theory, the date should represent the moment just before the
entity is generated. In practice, the date can be generated at any
time during the message origination without affecting its semantic
value.
Note: An earlier version of this document incorrectly specified
that this field should contain the creation date of the enclosed
Entity-Body. This has been changed to reflect actual (and proper)
<span class="grey">Berners-Lee, et al Informational [Page 40]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-41" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
usage.
<span class="h3"><a class="selflink" id="section-10.7" href="#section-10.7">10.7</a> Expires</span>
The Expires entity-header field gives the date/time after which the
entity should be considered stale. This allows information providers
to suggest the volatility of the resource, or a date after which the
information may no longer be valid. Applications must not cache this
entity beyond the date given. The presence of an Expires field does
not imply that the original resource will change or cease to exist
at, before, or after that time. However, information providers that
know or even suspect that a resource will change by a certain date
should include an Expires header with that date. The format is an
absolute date and time as defined by HTTP-date in <a href="#section-3.3">Section 3.3</a>.
Expires = "Expires" ":" HTTP-date
An example of its use is
Expires: Thu, 01 Dec 1994 16:00:00 GMT
If the date given is equal to or earlier than the value of the Date
header, the recipient must not cache the enclosed entity. If a
resource is dynamic by nature, as is the case with many data-
producing processes, entities from that resource should be given an
appropriate Expires value which reflects that dynamism.
The Expires field cannot be used to force a user agent to refresh its
display or reload a resource; its semantics apply only to caching
mechanisms, and such mechanisms need only check a resource's
expiration status when a new request for that resource is initiated.
User agents often have history mechanisms, such as "Back" buttons and
history lists, which can be used to redisplay an entity retrieved
earlier in a session. By default, the Expires field does not apply to
history mechanisms. If the entity is still in storage, a history
mechanism should display it even if the entity has expired, unless
the user has specifically configured the agent to refresh expired
history documents.
Note: Applications are encouraged to be tolerant of bad or
misinformed implementations of the Expires header. A value of zero
(0) or an invalid date format should be considered equivalent to
an "expires immediately." Although these values are not legitimate
for HTTP/1.0, a robust implementation is always desirable.
<span class="grey">Berners-Lee, et al Informational [Page 41]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-42" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
<span class="h3"><a class="selflink" id="section-10.8" href="#section-10.8">10.8</a> From</span>
The From request-header field, if given, should contain an Internet
e-mail address for the human user who controls the requesting user
agent. The address should be machine-usable, as defined by mailbox in
<a href="./rfc822">RFC 822</a> [<a href="#ref-7" title=""Standard for the Format of ARPA Internet Text Messages"">7</a>] (as updated by <a href="./rfc1123">RFC 1123</a> [<a href="#ref-6" title=""Requirements for Internet hosts - Application and Support"">6</a>]):
From = "From" ":" mailbox
An example is:
From: webmaster@w3.org
This header field may be used for logging purposes and as a means for
identifying the source of invalid or unwanted requests. It should not
be used as an insecure form of access protection. The interpretation
of this field is that the request is being performed on behalf of the
person given, who accepts responsibility for the method performed. In
particular, robot agents should include this header so that the
person responsible for running the robot can be contacted if problems
occur on the receiving end.
The Internet e-mail address in this field may be separate from the
Internet host which issued the request. For example, when a request
is passed through a proxy, the original issuer's address should be
used.
Note: The client should not send the From header field without the
user's approval, as it may conflict with the user's privacy
interests or their site's security policy. It is strongly
recommended that the user be able to disable, enable, and modify
the value of this field at any time prior to a request.
<span class="h3"><a class="selflink" id="section-10.9" href="#section-10.9">10.9</a> If-Modified-Since</span>
The If-Modified-Since request-header field is used with the GET
method to make it conditional: if the requested resource has not been
modified since the time specified in this field, a copy of the
resource will not be returned from the server; instead, a 304 (not
modified) response will be returned without any Entity-Body.
If-Modified-Since = "If-Modified-Since" ":" HTTP-date
An example of the field is:
If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
<span class="grey">Berners-Lee, et al Informational [Page 42]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-43" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
A conditional GET method requests that the identified resource be
transferred only if it has been modified since the date given by the
If-Modified-Since header. The algorithm for determining this includes
the following cases:
a) If the request would normally result in anything other than
a 200 (ok) status, or if the passed If-Modified-Since date
is invalid, the response is exactly the same as for a
normal GET. A date which is later than the server's current
time is invalid.
b) If the resource has been modified since the
If-Modified-Since date, the response is exactly the same as
for a normal GET.
c) If the resource has not been modified since a valid
If-Modified-Since date, the server shall return a 304 (not
modified) response.
The purpose of this feature is to allow efficient updates of cached
information with a minimum amount of transaction overhead.
<span class="h3"><a class="selflink" id="section-10.10" href="#section-10.10">10.10</a> Last-Modified</span>
The Last-Modified entity-header field indicates the date and time at
which the sender believes the resource was last modified. The exact
semantics of this field are defined in terms of how the recipient
should interpret it: if the recipient has a copy of this resource
which is older than the date given by the Last-Modified field, that
copy should be considered stale.
Last-Modified = "Last-Modified" ":" HTTP-date
An example of its use is
Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT
The exact meaning of this header field depends on the implementation
of the sender and the nature of the original resource. For files, it
may be just the file system last-modified time. For entities with
dynamically included parts, it may be the most recent of the set of
last-modify times for its component parts. For database gateways, it
may be the last-update timestamp of the record. For virtual objects,
it may be the last time the internal state changed.
An origin server must not send a Last-Modified date which is later
than the server's time of message origination. In such cases, where
the resource's last modification would indicate some time in the
<span class="grey">Berners-Lee, et al Informational [Page 43]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-44" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
future, the server must replace that date with the message
origination date.
<span class="h3"><a class="selflink" id="section-10.11" href="#section-10.11">10.11</a> Location</span>
The Location response-header field defines the exact location of the
resource that was identified by the Request-URI. For 3xx responses,
the location must indicate the server's preferred URL for automatic
redirection to the resource. Only one absolute URL is allowed.
Location = "Location" ":" absoluteURI
An example is
Location: <a href="http://www.w3.org/hypertext/WWW/NewLocation.html">http://www.w3.org/hypertext/WWW/NewLocation.html</a>
<span class="h3"><a class="selflink" id="section-10.12" href="#section-10.12">10.12</a> Pragma</span>
The Pragma general-header field is used to include implementation-
specific directives that may apply to any recipient along the
request/response chain. All pragma directives specify optional
behavior from the viewpoint of the protocol; however, some systems
may require that behavior be consistent with the directives.
Pragma = "Pragma" ":" 1#pragma-directive
pragma-directive = "no-cache" | extension-pragma
extension-pragma = token [ "=" word ]
When the "no-cache" directive is present in a request message, an
application should forward the request toward the origin server even
if it has a cached copy of what is being requested. This allows a
client to insist upon receiving an authoritative response to its
request. It also allows a client to refresh a cached copy which is
known to be corrupted or stale.
Pragma directives must be passed through by a proxy or gateway
application, regardless of their significance to that application,
since the directives may be applicable to all recipients along the
request/response chain. It is not possible to specify a pragma for a
specific recipient; however, any pragma directive not relevant to a
recipient should be ignored by that recipient.
<span class="h3"><a class="selflink" id="section-10.13" href="#section-10.13">10.13</a> Referer</span>
The Referer request-header field allows the client to specify, for
the server's benefit, the address (URI) of the resource from which
the Request-URI was obtained. This allows a server to generate lists
<span class="grey">Berners-Lee, et al Informational [Page 44]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-45" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
of back-links to resources for interest, logging, optimized caching,
etc. It also allows obsolete or mistyped links to be traced for
maintenance. The Referer field must not be sent if the Request-URI
was obtained from a source that does not have its own URI, such as
input from the user keyboard.
Referer = "Referer" ":" ( absoluteURI | relativeURI )
Example:
Referer: <a href="http://www.w3.org/hypertext/DataSources/Overview.html">http://www.w3.org/hypertext/DataSources/Overview.html</a>
If a partial URI is given, it should be interpreted relative to the
Request-URI. The URI must not include a fragment.
Note: Because the source of a link may be private information or
may reveal an otherwise private information source, it is strongly
recommended that the user be able to select whether or not the
Referer field is sent. For example, a browser client could have a
toggle switch for browsing openly/anonymously, which would
respectively enable/disable the sending of Referer and From
information.
<span class="h3"><a class="selflink" id="section-10.14" href="#section-10.14">10.14</a> Server</span>
The Server response-header field contains information about the
software used by the origin server to handle the request. The field
can contain multiple product tokens (<a href="#section-3.7">Section 3.7</a>) and comments
identifying the server and any significant subproducts. By
convention, the product tokens are listed in order of their
significance for identifying the application.
Server = "Server" ":" 1*( product | comment )
Example:
Server: CERN/3.0 libwww/2.17
If the response is being forwarded through a proxy, the proxy
application must not add its data to the product list.
Note: Revealing the specific software version of the server may
allow the server machine to become more vulnerable to attacks
against software that is known to contain security holes. Server
implementors are encouraged to make this field a configurable
option.
<span class="grey">Berners-Lee, et al Informational [Page 45]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-46" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
Note: Some existing servers fail to restrict themselves to the
product token syntax within the Server field.
<span class="h3"><a class="selflink" id="section-10.15" href="#section-10.15">10.15</a> User-Agent</span>
The User-Agent request-header field contains information about the
user agent originating the request. This is for statistical purposes,
the tracing of protocol violations, and automated recognition of user
agents for the sake of tailoring responses to avoid particular user
agent limitations. Although it is not required, user agents should
include this field with requests. The field can contain multiple
product tokens (<a href="#section-3.7">Section 3.7</a>) and comments identifying the agent and
any subproducts which form a significant part of the user agent. By
convention, the product tokens are listed in order of their
significance for identifying the application.
User-Agent = "User-Agent" ":" 1*( product | comment )
Example:
User-Agent: CERN-LineMode/2.15 libwww/2.17b3
Note: Some current proxy applications append their product
information to the list in the User-Agent field. This is not
recommended, since it makes machine interpretation of these
fields ambiguous.
Note: Some existing clients fail to restrict themselves to
the product token syntax within the User-Agent field.
<span class="h3"><a class="selflink" id="section-10.16" href="#section-10.16">10.16</a> WWW-Authenticate</span>
The WWW-Authenticate response-header field must be included in 401
(unauthorized) response messages. The field value consists of at
least one challenge that indicates the authentication scheme(s) and
parameters applicable to the Request-URI.
WWW-Authenticate = "WWW-Authenticate" ":" 1#challenge
The HTTP access authentication process is described in <a href="#section-11">Section 11</a>.
User agents must take special care in parsing the WWW-Authenticate
field value if it contains more than one challenge, or if more than
one WWW-Authenticate header field is provided, since the contents of
a challenge may itself contain a comma-separated list of
authentication parameters.
<span class="grey">Berners-Lee, et al Informational [Page 46]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-47" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
<span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. Access Authentication</span>
HTTP provides a simple challenge-response authentication mechanism
which may be used by a server to challenge a client request and by a
client to provide authentication information. It uses an extensible,
case-insensitive token to identify the authentication scheme,
followed by a comma-separated list of attribute-value pairs which
carry the parameters necessary for achieving authentication via that
scheme.
auth-scheme = token
auth-param = token "=" quoted-string
The 401 (unauthorized) response message is used by an origin server
to challenge the authorization of a user agent. This response must
include a WWW-Authenticate header field containing at least one
challenge applicable to the requested resource.
challenge = auth-scheme 1*SP realm *( "," auth-param )
realm = "realm" "=" realm-value
realm-value = quoted-string
The realm attribute (case-insensitive) is required for all
authentication schemes which issue a challenge. The realm value
(case-sensitive), in combination with the canonical root URL of the
server being accessed, defines the protection space. These realms
allow the protected resources on a server to be partitioned into a
set of protection spaces, each with its own authentication scheme
and/or authorization database. The realm value is a string, generally
assigned by the origin server, which may have additional semantics
specific to the authentication scheme.
A user agent that wishes to authenticate itself with a server--
usually, but not necessarily, after receiving a 401 response--may do
so by including an Authorization header field with the request. The
Authorization field value consists of credentials containing the
authentication information of the user agent for the realm of the
resource being requested.
credentials = basic-credentials
| ( auth-scheme #auth-param )
The domain over which credentials can be automatically applied by a
user agent is determined by the protection space. If a prior request
has been authorized, the same credentials may be reused for all other
requests within that protection space for a period of time determined
<span class="grey">Berners-Lee, et al Informational [Page 47]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-48" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
by the authentication scheme, parameters, and/or user preference.
Unless otherwise defined by the authentication scheme, a single
protection space cannot extend outside the scope of its server.
If the server does not wish to accept the credentials sent with a
request, it should return a 403 (forbidden) response.
The HTTP protocol does not restrict applications to this simple
challenge-response mechanism for access authentication. Additional
mechanisms may be used, such as encryption at the transport level or
via message encapsulation, and with additional header fields
specifying authentication information. However, these additional
mechanisms are not defined by this specification.
Proxies must be completely transparent regarding user agent
authentication. That is, they must forward the WWW-Authenticate and
Authorization headers untouched, and must not cache the response to a
request containing Authorization. HTTP/1.0 does not provide a means
for a client to be authenticated with a proxy.
<span class="h3"><a class="selflink" id="section-11.1" href="#section-11.1">11.1</a> Basic Authentication Scheme</span>
The "basic" authentication scheme is based on the model that the user
agent must authenticate itself with a user-ID and a password for each
realm. The realm value should be considered an opaque string which
can only be compared for equality with other realms on that server.
The server will authorize the request only if it can validate the
user-ID and password for the protection space of the Request-URI.
There are no optional authentication parameters.
Upon receipt of an unauthorized request for a URI within the
protection space, the server should respond with a challenge like the
following:
WWW-Authenticate: Basic realm="WallyWorld"
where "WallyWorld" is the string assigned by the server to identify
the protection space of the Request-URI.
To receive authorization, the client sends the user-ID and password,
separated by a single colon (":") character, within a base64 [<a href="#ref-5" title=""MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms for Specifying and Describing the Format of Internet Message Bodies"">5</a>]
encoded string in the credentials.
basic-credentials = "Basic" SP basic-cookie
basic-cookie = <base64 [<a href="#ref-5" title=""MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms for Specifying and Describing the Format of Internet Message Bodies"">5</a>] encoding of userid-password,
except not limited to 76 char/line>
<span class="grey">Berners-Lee, et al Informational [Page 48]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-49" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
userid-password = [ token ] ":" *TEXT
If the user agent wishes to send the user-ID "Aladdin" and password
"open sesame", it would use the following header field:
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
The basic authentication scheme is a non-secure method of filtering
unauthorized access to resources on an HTTP server. It is based on
the assumption that the connection between the client and the server
can be regarded as a trusted carrier. As this is not generally true
on an open network, the basic authentication scheme should be used
accordingly. In spite of this, clients should implement the scheme in
order to communicate with servers that use it.
<span class="h2"><a class="selflink" id="section-12" href="#section-12">12</a>. Security Considerations</span>
This section is meant to inform application developers, information
providers, and users of the security limitations in HTTP/1.0 as
described by this document. The discussion does not include
definitive solutions to the problems revealed, though it does make
some suggestions for reducing security risks.
<span class="h3"><a class="selflink" id="section-12.1" href="#section-12.1">12.1</a> Authentication of Clients</span>
As mentioned in <a href="#section-11.1">Section 11.1</a>, the Basic authentication scheme is not
a secure method of user authentication, nor does it prevent the
Entity-Body from being transmitted in clear text across the physical
network used as the carrier. HTTP/1.0 does not prevent additional
authentication schemes and encryption mechanisms from being employed
to increase security.
<span class="h3"><a class="selflink" id="section-12.2" href="#section-12.2">12.2</a> Safe Methods</span>
The writers of client software should be aware that the software
represents the user in their interactions over the Internet, and
should be careful to allow the user to be aware of any actions they
may take which may have an unexpected significance to themselves or
others.
In particular, the convention has been established that the GET and
HEAD methods should never have the significance of taking an action
other than retrieval. These methods should be considered "safe." This
allows user agents to represent other methods, such as POST, in a
special way, so that the user is made aware of the fact that a
possibly unsafe action is being requested.
<span class="grey">Berners-Lee, et al Informational [Page 49]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-50" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
Naturally, it is not possible to ensure that the server does not
generate side-effects as a result of performing a GET request; in
fact, some dynamic resources consider that a feature. The important
distinction here is that the user did not request the side-effects,
so therefore cannot be held accountable for them.
<span class="h3"><a class="selflink" id="section-12.3" href="#section-12.3">12.3</a> Abuse of Server Log Information</span>
A server is in the position to save personal data about a user's
requests which may identify their reading patterns or subjects of
interest. This information is clearly confidential in nature and its
handling may be constrained by law in certain countries. People using
the HTTP protocol to provide data are responsible for ensuring that
such material is not distributed without the permission of any
individuals that are identifiable by the published results.
<span class="h3"><a class="selflink" id="section-12.4" href="#section-12.4">12.4</a> Transfer of Sensitive Information</span>
Like any generic data transfer protocol, HTTP cannot regulate the
content of the data that is transferred, nor is there any a priori
method of determining the sensitivity of any particular piece of
information within the context of any given request. Therefore,
applications should supply as much control over this information as
possible to the provider of that information. Three header fields are
worth special mention in this context: Server, Referer and From.
Revealing the specific software version of the server may allow the
server machine to become more vulnerable to attacks against software
that is known to contain security holes. Implementors should make the
Server header field a configurable option.
The Referer field allows reading patterns to be studied and reverse
links drawn. Although it can be very useful, its power can be abused
if user details are not separated from the information contained in
the Referer. Even when the personal information has been removed, the
Referer field may indicate a private document's URI whose publication
would be inappropriate.
The information sent in the From field might conflict with the user's
privacy interests or their site's security policy, and hence it
should not be transmitted without the user being able to disable,
enable, and modify the contents of the field. The user must be able
to set the contents of this field within a user preference or
application defaults configuration.
We suggest, though do not require, that a convenient toggle interface
be provided for the user to enable or disable the sending of From and
Referer information.
<span class="grey">Berners-Lee, et al Informational [Page 50]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-51" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
<span class="h3"><a class="selflink" id="section-12.5" href="#section-12.5">12.5</a> Attacks Based On File and Path Names</span>
Implementations of HTTP origin servers should be careful to restrict
the documents returned by HTTP requests to be only those that were
intended by the server administrators. If an HTTP server translates
HTTP URIs directly into file system calls, the server must take
special care not to serve files that were not intended to be
delivered to HTTP clients. For example, Unix, Microsoft Windows, and
other operating systems use ".." as a path component to indicate a
directory level above the current one. On such a system, an HTTP
server must disallow any such construct in the Request-URI if it
would otherwise allow access to a resource outside those intended to
be accessible via the HTTP server. Similarly, files intended for
reference only internally to the server (such as access control
files, configuration files, and script code) must be protected from
inappropriate retrieval, since they might contain sensitive
information. Experience has shown that minor bugs in such HTTP server
implementations have turned into security risks.
<span class="h2"><a class="selflink" id="section-13" href="#section-13">13</a>. Acknowledgments</span>
This specification makes heavy use of the augmented BNF and generic
constructs defined by David H. Crocker for <a href="./rfc822">RFC 822</a> [<a href="#ref-7" title=""Standard for the Format of ARPA Internet Text Messages"">7</a>]. Similarly, it
reuses many of the definitions provided by Nathaniel Borenstein and
Ned Freed for MIME [<a href="#ref-5" title=""MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms for Specifying and Describing the Format of Internet Message Bodies"">5</a>]. We hope that their inclusion in this
specification will help reduce past confusion over the relationship
between HTTP/1.0 and Internet mail message formats.
The HTTP protocol has evolved considerably over the past four years.
It has benefited from a large and active developer community--the
many people who have participated on the www-talk mailing list--and
it is that community which has been most responsible for the success
of HTTP and of the World-Wide Web in general. Marc Andreessen, Robert
Cailliau, Daniel W. Connolly, Bob Denny, Jean-Francois Groff, Phillip
M. Hallam-Baker, Hakon W. Lie, Ari Luotonen, Rob McCool, Lou
Montulli, Dave Raggett, Tony Sanders, and Marc VanHeyningen deserve
special recognition for their efforts in defining aspects of the
protocol for early versions of this specification.
Paul Hoffman contributed sections regarding the informational status
of this document and Appendices C and D.
<span class="grey">Berners-Lee, et al Informational [Page 51]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-52" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
This document has benefited greatly from the comments of all those
participating in the HTTP-WG. In addition to those already mentioned,
the following individuals have contributed to this specification:
Gary Adams Harald Tveit Alvestrand
Keith Ball Brian Behlendorf
Paul Burchard Maurizio Codogno
Mike Cowlishaw Roman Czyborra
Michael A. Dolan John Franks
Jim Gettys Marc Hedlund
Koen Holtman Alex Hopmann
Bob Jernigan Shel Kaphan
Martijn Koster Dave Kristol
Daniel LaLiberte Paul Leach
Albert Lunde John C. Mallery
Larry Masinter Mitra
Jeffrey Mogul Gavin Nicol
Bill Perry Jeffrey Perry
Owen Rees Luigi Rizzo
David Robinson Marc Salomon
Rich Salz Jim Seidman
Chuck Shotton Eric W. Sink
Simon E. Spero Robert S. Thau
Francois Yergeau Mary Ellen Zurko
Jean-Philippe Martin-Flatin
<span class="h2"><a class="selflink" id="section-14" href="#section-14">14</a>. References</span>
[<a id="ref-1">1</a>] Anklesaria, F., McCahill, M., Lindner, P., Johnson, D.,
Torrey, D., and B. Alberti, "The Internet Gopher Protocol: A
Distributed Document Search and Retrieval Protocol", <a href="./rfc1436">RFC 1436</a>,
University of Minnesota, March 1993.
[<a id="ref-2">2</a>] Berners-Lee, T., "Universal Resource Identifiers in WWW: A
Unifying Syntax for the Expression of Names and Addresses of
Objects on the Network as used in the World-Wide Web",
<a href="./rfc1630">RFC 1630</a>, CERN, June 1994.
[<a id="ref-3">3</a>] Berners-Lee, T., and D. Connolly, "Hypertext Markup Language -
2.0", <a href="./rfc1866">RFC 1866</a>, MIT/W3C, November 1995.
[<a id="ref-4">4</a>] Berners-Lee, T., Masinter, L., and M. McCahill, "Uniform
Resource Locators (URL)", <a href="./rfc1738">RFC 1738</a>, CERN, Xerox PARC,
University of Minnesota, December 1994.
<span class="grey">Berners-Lee, et al Informational [Page 52]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-53" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
[<a id="ref-5">5</a>] Borenstein, N., and N. Freed, "MIME (Multipurpose Internet Mail
Extensions) Part One: Mechanisms for Specifying and Describing
the Format of Internet Message Bodies", <a href="./rfc1521">RFC 1521</a>, Bellcore,
Innosoft, September 1993.
[<a id="ref-6">6</a>] Braden, R., "Requirements for Internet hosts - Application and
Support", STD 3, <a href="./rfc1123">RFC 1123</a>, IETF, October 1989.
[<a id="ref-7">7</a>] Crocker, D., "Standard for the Format of ARPA Internet Text
Messages", STD 11, <a href="./rfc822">RFC 822</a>, UDEL, August 1982.
[<a id="ref-8">8</a>] F. Davis, B. Kahle, H. Morris, J. Salem, T. Shen, R. Wang,
J. Sui, and M. Grinbaum. "WAIS Interface Protocol Prototype
Functional Specification." (v1.5), Thinking Machines
Corporation, April 1990.
[<a id="ref-9">9</a>] Fielding, R., "Relative Uniform Resource Locators", <a href="./rfc1808">RFC 1808</a>,
UC Irvine, June 1995.
[<a id="ref-10">10</a>] Horton, M., and R. Adams, "Standard for interchange of USENET
Messages", <a href="./rfc1036">RFC 1036</a> (Obsoletes <a href="./rfc850">RFC 850</a>), AT&T Bell
Laboratories, Center for Seismic Studies, December 1987.
[<a id="ref-11">11</a>] Kantor, B., and P. Lapsley, "Network News Transfer Protocol:
A Proposed Standard for the Stream-Based Transmission of News",
<a href="./rfc977">RFC 977</a>, UC San Diego, UC Berkeley, February 1986.
[<a id="ref-12">12</a>] Postel, J., "Simple Mail Transfer Protocol." STD 10, <a href="./rfc821">RFC 821</a>,
USC/ISI, August 1982.
[<a id="ref-13">13</a>] Postel, J., "Media Type Registration Procedure." <a href="./rfc1590">RFC 1590</a>,
USC/ISI, March 1994.
[<a id="ref-14">14</a>] Postel, J., and J. Reynolds, "File Transfer Protocol (FTP)",
STD 9, <a href="./rfc959">RFC 959</a>, USC/ISI, October 1985.
[<a id="ref-15">15</a>] Reynolds, J., and J. Postel, "Assigned Numbers", STD 2, <a href="./rfc1700">RFC</a>
<a href="./rfc1700">1700</a>, USC/ISI, October 1994.
[<a id="ref-16">16</a>] Sollins, K., and L. Masinter, "Functional Requirements for
Uniform Resource Names", <a href="./rfc1737">RFC 1737</a>, MIT/LCS, Xerox Corporation,
December 1994.
[<a id="ref-17">17</a>] US-ASCII. Coded Character Set - 7-Bit American Standard Code
for Information Interchange. Standard ANSI X3.4-1986, ANSI,
1986.
<span class="grey">Berners-Lee, et al Informational [Page 53]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-54" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
[<a id="ref-18">18</a>] ISO-8859. International Standard -- Information Processing --
8-bit Single-Byte Coded Graphic Character Sets --
Part 1: Latin alphabet No. 1, ISO 8859-1:1987.
Part 2: Latin alphabet No. 2, ISO 8859-2, 1987.
Part 3: Latin alphabet No. 3, ISO 8859-3, 1988.
Part 4: Latin alphabet No. 4, ISO 8859-4, 1988.
Part 5: Latin/Cyrillic alphabet, ISO 8859-5, 1988.
Part 6: Latin/Arabic alphabet, ISO 8859-6, 1987.
Part 7: Latin/Greek alphabet, ISO 8859-7, 1987.
Part 8: Latin/Hebrew alphabet, ISO 8859-8, 1988.
Part 9: Latin alphabet No. 5, ISO 8859-9, 1990.
<span class="h2"><a class="selflink" id="section-15" href="#section-15">15</a>. Authors' Addresses</span>
Tim Berners-Lee
Director, W3 Consortium
MIT Laboratory for Computer Science
545 Technology Square
Cambridge, MA 02139, U.S.A.
Fax: +1 (617) 258 8682
EMail: timbl@w3.org
Roy T. Fielding
Department of Information and Computer Science
University of California
Irvine, CA 92717-3425, U.S.A.
Fax: +1 (714) 824-4056
EMail: fielding@ics.uci.edu
Henrik Frystyk Nielsen
W3 Consortium
MIT Laboratory for Computer Science
545 Technology Square
Cambridge, MA 02139, U.S.A.
Fax: +1 (617) 258 8682
EMail: frystyk@w3.org
<span class="grey">Berners-Lee, et al Informational [Page 54]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-55" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
Appendices
These appendices are provided for informational reasons only -- they
do not form a part of the HTTP/1.0 specification.
<span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">A</a>. Internet Media Type message/http</span>
In addition to defining the HTTP/1.0 protocol, this document serves
as the specification for the Internet media type "message/http". The
following is to be registered with IANA [<a href="#ref-13" title=""Media Type Registration Procedure."">13</a>].
Media Type name: message
Media subtype name: http
Required parameters: none
Optional parameters: version, msgtype
version: The HTTP-Version number of the enclosed message
(e.g., "1.0"). If not present, the version can be
determined from the first line of the body.
msgtype: The message type -- "request" or "response". If
not present, the type can be determined from the
first line of the body.
Encoding considerations: only "7bit", "8bit", or "binary" are
permitted
Security considerations: none
<span class="h2"><a class="selflink" id="appendix-B" href="#appendix-B">B</a>. Tolerant Applications</span>
Although this document specifies the requirements for the generation
of HTTP/1.0 messages, not all applications will be correct in their
implementation. We therefore recommend that operational applications
be tolerant of deviations whenever those deviations can be
interpreted unambiguously.
Clients should be tolerant in parsing the Status-Line and servers
tolerant when parsing the Request-Line. In particular, they should
accept any amount of SP or HT characters between fields, even though
only a single SP is required.
The line terminator for HTTP-header fields is the sequence CRLF.
However, we recommend that applications, when parsing such headers,
recognize a single LF as a line terminator and ignore the leading CR.
<span class="grey">Berners-Lee, et al Informational [Page 55]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-56" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
<span class="h2"><a class="selflink" id="appendix-C" href="#appendix-C">C</a>. Relationship to MIME</span>
HTTP/1.0 uses many of the constructs defined for Internet Mail (<a href="./rfc822">RFC</a>
<a href="./rfc822">822</a> [<a href="#ref-7" title=""Standard for the Format of ARPA Internet Text Messages"">7</a>]) and the Multipurpose Internet Mail Extensions (MIME [<a href="#ref-5" title=""MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms for Specifying and Describing the Format of Internet Message Bodies"">5</a>]) to
allow entities to be transmitted in an open variety of
representations and with extensible mechanisms. However, <a href="./rfc1521">RFC 1521</a>
discusses mail, and HTTP has a few features that are different than
those described in <a href="./rfc1521">RFC 1521</a>. These differences were carefully chosen
to optimize performance over binary connections, to allow greater
freedom in the use of new media types, to make date comparisons
easier, and to acknowledge the practice of some early HTTP servers
and clients.
At the time of this writing, it is expected that <a href="./rfc1521">RFC 1521</a> will be
revised. The revisions may include some of the practices found in
HTTP/1.0 but not in <a href="./rfc1521">RFC 1521</a>.
This appendix describes specific areas where HTTP differs from <a href="./rfc1521">RFC</a>
<a href="./rfc1521">1521</a>. Proxies and gateways to strict MIME environments should be
aware of these differences and provide the appropriate conversions
where necessary. Proxies and gateways from MIME environments to HTTP
also need to be aware of the differences because some conversions may
be required.
<span class="h3"><a class="selflink" id="appendix-C.1" href="#appendix-C.1">C.1</a> Conversion to Canonical Form</span>
<a href="./rfc1521">RFC 1521</a> requires that an Internet mail entity be converted to
canonical form prior to being transferred, as described in <a href="./rfc1521#appendix-G">Appendix G
of RFC 1521</a> [<a href="#ref-5" title=""MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms for Specifying and Describing the Format of Internet Message Bodies"">5</a>]. <a href="#section-3.6.1">Section 3.6.1</a> of this document describes the forms
allowed for subtypes of the "text" media type when transmitted over
HTTP.
<a href="./rfc1521">RFC 1521</a> requires that content with a Content-Type of "text"
represent line breaks as CRLF and forbids the use of CR or LF outside
of line break sequences. HTTP allows CRLF, bare CR, and bare LF to
indicate a line break within text content when a message is
transmitted over HTTP.
Where it is possible, a proxy or gateway from HTTP to a strict <a href="./rfc1521">RFC</a>
<a href="./rfc1521">1521</a> environment should translate all line breaks within the text
media types described in <a href="#section-3.6.1">Section 3.6.1</a> of this document to the <a href="./rfc1521">RFC</a>
<a href="./rfc1521">1521</a> canonical form of CRLF. Note, however, that this may be
complicated by the presence of a Content-Encoding and by the fact
that HTTP allows the use of some character sets which do not use
octets 13 and 10 to represent CR and LF, as is the case for some
multi-byte character sets.
<span class="grey">Berners-Lee, et al Informational [Page 56]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-57" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
<span class="h3"><a class="selflink" id="appendix-C.2" href="#appendix-C.2">C.2</a> Conversion of Date Formats</span>
HTTP/1.0 uses a restricted set of date formats (<a href="#section-3.3">Section 3.3</a>) to
simplify the process of date comparison. Proxies and gateways from
other protocols should ensure that any Date header field present in a
message conforms to one of the HTTP/1.0 formats and rewrite the date
if necessary.
<span class="h3"><a class="selflink" id="appendix-C.3" href="#appendix-C.3">C.3</a> Introduction of Content-Encoding</span>
<a href="./rfc1521">RFC 1521</a> does not include any concept equivalent to HTTP/1.0's
Content-Encoding header field. Since this acts as a modifier on the
media type, proxies and gateways from HTTP to MIME-compliant
protocols must either change the value of the Content-Type header
field or decode the Entity-Body before forwarding the message. (Some
experimental applications of Content-Type for Internet mail have used
a media-type parameter of ";conversions=<content-coding>" to perform
an equivalent function as Content-Encoding. However, this parameter
is not part of <a href="./rfc1521">RFC 1521</a>.)
<span class="h3"><a class="selflink" id="appendix-C.4" href="#appendix-C.4">C.4</a> No Content-Transfer-Encoding</span>
HTTP does not use the Content-Transfer-Encoding (CTE) field of <a href="./rfc1521">RFC</a>
<a href="./rfc1521">1521</a>. Proxies and gateways from MIME-compliant protocols to HTTP must
remove any non-identity CTE ("quoted-printable" or "base64") encoding
prior to delivering the response message to an HTTP client.
Proxies and gateways from HTTP to MIME-compliant protocols are
responsible for ensuring that the message is in the correct format
and encoding for safe transport on that protocol, where "safe
transport" is defined by the limitations of the protocol being used.
Such a proxy or gateway should label the data with an appropriate
Content-Transfer-Encoding if doing so will improve the likelihood of
safe transport over the destination protocol.
<span class="h3"><a class="selflink" id="appendix-C.5" href="#appendix-C.5">C.5</a> HTTP Header Fields in Multipart Body-Parts</span>
In <a href="./rfc1521">RFC 1521</a>, most header fields in multipart body-parts are generally
ignored unless the field name begins with "Content-". In HTTP/1.0,
multipart body-parts may contain any HTTP header fields which are
significant to the meaning of that part.
<span class="h2"><a class="selflink" id="appendix-D" href="#appendix-D">D</a>. Additional Features</span>
This appendix documents protocol elements used by some existing HTTP
implementations, but not consistently and correctly across most
HTTP/1.0 applications. Implementors should be aware of these
features, but cannot rely upon their presence in, or interoperability
<span class="grey">Berners-Lee, et al Informational [Page 57]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-58" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
with, other HTTP/1.0 applications.
<span class="h3"><a class="selflink" id="appendix-D.1" href="#appendix-D.1">D.1</a> Additional Request Methods</span>
<span class="h4"><a class="selflink" id="appendix-D.1.1" href="#appendix-D.1.1">D.1.1</a> PUT</span>
The PUT method requests that the enclosed entity be stored under the
supplied Request-URI. If the Request-URI refers to an already
existing resource, the enclosed entity should be considered as a
modified version of the one residing on the origin server. If the
Request-URI does not point to an existing resource, and that URI is
capable of being defined as a new resource by the requesting user
agent, the origin server can create the resource with that URI.
The fundamental difference between the POST and PUT requests is
reflected in the different meaning of the Request-URI. The URI in a
POST request identifies the resource that will handle the enclosed
entity as data to be processed. That resource may be a data-accepting
process, a gateway to some other protocol, or a separate entity that
accepts annotations. In contrast, the URI in a PUT request identifies
the entity enclosed with the request -- the user agent knows what URI
is intended and the server should not apply the request to some other
resource.
<span class="h4"><a class="selflink" id="appendix-D.1.2" href="#appendix-D.1.2">D.1.2</a> DELETE</span>
The DELETE method requests that the origin server delete the resource
identified by the Request-URI.
<span class="h4"><a class="selflink" id="appendix-D.1.3" href="#appendix-D.1.3">D.1.3</a> LINK</span>
The LINK method establishes one or more Link relationships between
the existing resource identified by the Request-URI and other
existing resources.
<span class="h4"><a class="selflink" id="appendix-D.1.4" href="#appendix-D.1.4">D.1.4</a> UNLINK</span>
The UNLINK method removes one or more Link relationships from the
existing resource identified by the Request-URI.
<span class="h3"><a class="selflink" id="appendix-D.2" href="#appendix-D.2">D.2</a> Additional Header Field Definitions</span>
<span class="h4"><a class="selflink" id="appendix-D.2.1" href="#appendix-D.2.1">D.2.1</a> Accept</span>
The Accept request-header field can be used to indicate a list of
media ranges which are acceptable as a response to the request. The
asterisk "*" character is used to group media types into ranges, with
"*/*" indicating all media types and "type/*" indicating all subtypes
<span class="grey">Berners-Lee, et al Informational [Page 58]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-59" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
of that type. The set of ranges given by the client should represent
what types are acceptable given the context of the request.
<span class="h4"><a class="selflink" id="appendix-D.2.2" href="#appendix-D.2.2">D.2.2</a> Accept-Charset</span>
The Accept-Charset request-header field can be used to indicate a
list of preferred character sets other than the default US-ASCII and
ISO-8859-1. This field allows clients capable of understanding more
comprehensive or special-purpose character sets to signal that
capability to a server which is capable of representing documents in
those character sets.
<span class="h4"><a class="selflink" id="appendix-D.2.3" href="#appendix-D.2.3">D.2.3</a> Accept-Encoding</span>
The Accept-Encoding request-header field is similar to Accept, but
restricts the content-coding values which are acceptable in the
response.
<span class="h4"><a class="selflink" id="appendix-D.2.4" href="#appendix-D.2.4">D.2.4</a> Accept-Language</span>
The Accept-Language request-header field is similar to Accept, but
restricts the set of natural languages that are preferred as a
response to the request.
<span class="h4"><a class="selflink" id="appendix-D.2.5" href="#appendix-D.2.5">D.2.5</a> Content-Language</span>
The Content-Language entity-header field describes the natural
language(s) of the intended audience for the enclosed entity. Note
that this may not be equivalent to all the languages used within the
entity.
<span class="h4"><a class="selflink" id="appendix-D.2.6" href="#appendix-D.2.6">D.2.6</a> Link</span>
The Link entity-header field provides a means for describing a
relationship between the entity and some other resource. An entity
may include multiple Link values. Links at the metainformation level
typically indicate relationships like hierarchical structure and
navigation paths.
<span class="h4"><a class="selflink" id="appendix-D.2.7" href="#appendix-D.2.7">D.2.7</a> MIME-Version</span>
HTTP messages may include a single MIME-Version general-header field
to indicate what version of the MIME protocol was used to construct
the message. Use of the MIME-Version header field, as defined by <a href="./rfc1521">RFC</a>
<a href="./rfc1521">1521</a> [<a href="#ref-5" title=""MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms for Specifying and Describing the Format of Internet Message Bodies"">5</a>], should indicate that the message is MIME-conformant.
Unfortunately, some older HTTP/1.0 servers send it indiscriminately,
and thus this field should be ignored.
<span class="grey">Berners-Lee, et al Informational [Page 59]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-60" ></span>
<span class="grey"><a href="./rfc1945">RFC 1945</a> HTTP/1.0 May 1996</span>
<span class="h4"><a class="selflink" id="appendix-D.2.8" href="#appendix-D.2.8">D.2.8</a> Retry-After</span>
The Retry-After response-header field can be used with a 503 (service
unavailable) response to indicate how long the service is expected to
be unavailable to the requesting client. The value of this field can
be either an HTTP-date or an integer number of seconds (in decimal)
after the time of the response.
<span class="h4"><a class="selflink" id="appendix-D.2.9" href="#appendix-D.2.9">D.2.9</a> Title</span>
The Title entity-header field indicates the title of the entity.
<span class="h4"><a class="selflink" id="appendix-D.2.10" href="#appendix-D.2.10">D.2.10</a> URI</span>
The URI entity-header field may contain some or all of the Uniform
Resource Identifiers (<a href="#section-3.2">Section 3.2</a>) by which the Request-URI resource
can be identified. There is no guarantee that the resource can be
accessed using the URI(s) specified.
Berners-Lee, et al Informational [Page 60]
</pre>
|