2
0

rfc1945-1996-http1.0.txt 134 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363
  1. Network Working Group T. Berners-Lee
  2. Request for Comments: 1945 MIT/LCS
  3. Category: Informational R. Fielding
  4. UC Irvine
  5. H. Frystyk
  6. MIT/LCS
  7. May 1996
  8. Hypertext Transfer Protocol -- HTTP/1.0
  9. Status of This Memo
  10. This memo provides information for the Internet community. This memo
  11. does not specify an Internet standard of any kind. Distribution of
  12. this memo is unlimited.
  13. IESG Note:
  14. The IESG has concerns about this protocol, and expects this document
  15. to be replaced relatively soon by a standards track document.
  16. Abstract
  17. The Hypertext Transfer Protocol (HTTP) is an application-level
  18. protocol with the lightness and speed necessary for distributed,
  19. collaborative, hypermedia information systems. It is a generic,
  20. stateless, object-oriented protocol which can be used for many tasks,
  21. such as name servers and distributed object management systems,
  22. through extension of its request methods (commands). A feature of
  23. HTTP is the typing of data representation, allowing systems to be
  24. built independently of the data being transferred.
  25. HTTP has been in use by the World-Wide Web global information
  26. initiative since 1990. This specification reflects common usage of
  27. the protocol referred to as "HTTP/1.0".
  28. Table of Contents
  29. 1. Introduction .............................................. 4
  30. 1.1 Purpose .............................................. 4
  31. 1.2 Terminology .......................................... 4
  32. 1.3 Overall Operation .................................... 6
  33. 1.4 HTTP and MIME ........................................ 8
  34. 2. Notational Conventions and Generic Grammar ................ 8
  35. 2.1 Augmented BNF ........................................ 8
  36. 2.2 Basic Rules .......................................... 10
  37. 3. Protocol Parameters ....................................... 12
  38. Berners-Lee, et al Informational [Page 1]
  39. RFC 1945 HTTP/1.0 May 1996
  40. 3.1 HTTP Version ......................................... 12
  41. 3.2 Uniform Resource Identifiers ......................... 14
  42. 3.2.1 General Syntax ................................ 14
  43. 3.2.2 http URL ...................................... 15
  44. 3.3 Date/Time Formats .................................... 15
  45. 3.4 Character Sets ....................................... 17
  46. 3.5 Content Codings ...................................... 18
  47. 3.6 Media Types .......................................... 19
  48. 3.6.1 Canonicalization and Text Defaults ............ 19
  49. 3.6.2 Multipart Types ............................... 20
  50. 3.7 Product Tokens ....................................... 20
  51. 4. HTTP Message .............................................. 21
  52. 4.1 Message Types ........................................ 21
  53. 4.2 Message Headers ...................................... 22
  54. 4.3 General Header Fields ................................ 23
  55. 5. Request ................................................... 23
  56. 5.1 Request-Line ......................................... 23
  57. 5.1.1 Method ........................................ 24
  58. 5.1.2 Request-URI ................................... 24
  59. 5.2 Request Header Fields ................................ 25
  60. 6. Response .................................................. 25
  61. 6.1 Status-Line .......................................... 26
  62. 6.1.1 Status Code and Reason Phrase ................. 26
  63. 6.2 Response Header Fields ............................... 28
  64. 7. Entity .................................................... 28
  65. 7.1 Entity Header Fields ................................. 29
  66. 7.2 Entity Body .......................................... 29
  67. 7.2.1 Type .......................................... 29
  68. 7.2.2 Length ........................................ 30
  69. 8. Method Definitions ........................................ 30
  70. 8.1 GET .................................................. 31
  71. 8.2 HEAD ................................................. 31
  72. 8.3 POST ................................................. 31
  73. 9. Status Code Definitions ................................... 32
  74. 9.1 Informational 1xx .................................... 32
  75. 9.2 Successful 2xx ....................................... 32
  76. 9.3 Redirection 3xx ...................................... 34
  77. 9.4 Client Error 4xx ..................................... 35
  78. 9.5 Server Error 5xx ..................................... 37
  79. 10. Header Field Definitions .................................. 37
  80. 10.1 Allow ............................................... 38
  81. 10.2 Authorization ....................................... 38
  82. 10.3 Content-Encoding .................................... 39
  83. 10.4 Content-Length ...................................... 39
  84. 10.5 Content-Type ........................................ 40
  85. 10.6 Date ................................................ 40
  86. 10.7 Expires ............................................. 41
  87. 10.8 From ................................................ 42
  88. Berners-Lee, et al Informational [Page 2]
  89. RFC 1945 HTTP/1.0 May 1996
  90. 10.9 If-Modified-Since ................................... 42
  91. 10.10 Last-Modified ....................................... 43
  92. 10.11 Location ............................................ 44
  93. 10.12 Pragma .............................................. 44
  94. 10.13 Referer ............................................. 44
  95. 10.14 Server .............................................. 45
  96. 10.15 User-Agent .......................................... 46
  97. 10.16 WWW-Authenticate .................................... 46
  98. 11. Access Authentication ..................................... 47
  99. 11.1 Basic Authentication Scheme ......................... 48
  100. 12. Security Considerations ................................... 49
  101. 12.1 Authentication of Clients ........................... 49
  102. 12.2 Safe Methods ........................................ 49
  103. 12.3 Abuse of Server Log Information ..................... 50
  104. 12.4 Transfer of Sensitive Information ................... 50
  105. 12.5 Attacks Based On File and Path Names ................ 51
  106. 13. Acknowledgments ........................................... 51
  107. 14. References ................................................ 52
  108. 15. Authors' Addresses ........................................ 54
  109. Appendix A. Internet Media Type message/http ................ 55
  110. Appendix B. Tolerant Applications ........................... 55
  111. Appendix C. Relationship to MIME ............................ 56
  112. C.1 Conversion to Canonical Form ......................... 56
  113. C.2 Conversion of Date Formats ........................... 57
  114. C.3 Introduction of Content-Encoding ..................... 57
  115. C.4 No Content-Transfer-Encoding ......................... 57
  116. C.5 HTTP Header Fields in Multipart Body-Parts ........... 57
  117. Appendix D. Additional Features ............................. 57
  118. D.1 Additional Request Methods ........................... 58
  119. D.1.1 PUT ........................................... 58
  120. D.1.2 DELETE ........................................ 58
  121. D.1.3 LINK .......................................... 58
  122. D.1.4 UNLINK ........................................ 58
  123. D.2 Additional Header Field Definitions .................. 58
  124. D.2.1 Accept ........................................ 58
  125. D.2.2 Accept-Charset ................................ 59
  126. D.2.3 Accept-Encoding ............................... 59
  127. D.2.4 Accept-Language ............................... 59
  128. D.2.5 Content-Language .............................. 59
  129. D.2.6 Link .......................................... 59
  130. D.2.7 MIME-Version .................................. 59
  131. D.2.8 Retry-After ................................... 60
  132. D.2.9 Title ......................................... 60
  133. D.2.10 URI ........................................... 60
  134. Berners-Lee, et al Informational [Page 3]
  135. RFC 1945 HTTP/1.0 May 1996
  136. 1. Introduction
  137. 1.1 Purpose
  138. The Hypertext Transfer Protocol (HTTP) is an application-level
  139. protocol with the lightness and speed necessary for distributed,
  140. collaborative, hypermedia information systems. HTTP has been in use
  141. by the World-Wide Web global information initiative since 1990. This
  142. specification reflects common usage of the protocol referred too as
  143. "HTTP/1.0". This specification describes the features that seem to be
  144. consistently implemented in most HTTP/1.0 clients and servers. The
  145. specification is split into two sections. Those features of HTTP for
  146. which implementations are usually consistent are described in the
  147. main body of this document. Those features which have few or
  148. inconsistent implementations are listed in Appendix D.
  149. Practical information systems require more functionality than simple
  150. retrieval, including search, front-end update, and annotation. HTTP
  151. allows an open-ended set of methods to be used to indicate the
  152. purpose of a request. It builds on the discipline of reference
  153. provided by the Uniform Resource Identifier (URI) [2], as a location
  154. (URL) [4] or name (URN) [16], for indicating the resource on which a
  155. method is to be applied. Messages are passed in a format similar to
  156. that used by Internet Mail [7] and the Multipurpose Internet Mail
  157. Extensions (MIME) [5].
  158. HTTP is also used as a generic protocol for communication between
  159. user agents and proxies/gateways to other Internet protocols, such as
  160. SMTP [12], NNTP [11], FTP [14], Gopher [1], and WAIS [8], allowing
  161. basic hypermedia access to resources available from diverse
  162. applications and simplifying the implementation of user agents.
  163. 1.2 Terminology
  164. This specification uses a number of terms to refer to the roles
  165. played by participants in, and objects of, the HTTP communication.
  166. connection
  167. A transport layer virtual circuit established between two
  168. application programs for the purpose of communication.
  169. message
  170. The basic unit of HTTP communication, consisting of a structured
  171. sequence of octets matching the syntax defined in Section 4 and
  172. transmitted via the connection.
  173. Berners-Lee, et al Informational [Page 4]
  174. RFC 1945 HTTP/1.0 May 1996
  175. request
  176. An HTTP request message (as defined in Section 5).
  177. response
  178. An HTTP response message (as defined in Section 6).
  179. resource
  180. A network data object or service which can be identified by a
  181. URI (Section 3.2).
  182. entity
  183. A particular representation or rendition of a data resource, or
  184. reply from a service resource, that may be enclosed within a
  185. request or response message. An entity consists of
  186. metainformation in the form of entity headers and content in the
  187. form of an entity body.
  188. client
  189. An application program that establishes connections for the
  190. purpose of sending requests.
  191. user agent
  192. The client which initiates a request. These are often browsers,
  193. editors, spiders (web-traversing robots), or other end user
  194. tools.
  195. server
  196. An application program that accepts connections in order to
  197. service requests by sending back responses.
  198. origin server
  199. The server on which a given resource resides or is to be created.
  200. proxy
  201. An intermediary program which acts as both a server and a client
  202. for the purpose of making requests on behalf of other clients.
  203. Requests are serviced internally or by passing them, with
  204. possible translation, on to other servers. A proxy must
  205. interpret and, if necessary, rewrite a request message before
  206. Berners-Lee, et al Informational [Page 5]
  207. RFC 1945 HTTP/1.0 May 1996
  208. forwarding it. Proxies are often used as client-side portals
  209. through network firewalls and as helper applications for
  210. handling requests via protocols not implemented by the user
  211. agent.
  212. gateway
  213. A server which acts as an intermediary for some other server.
  214. Unlike a proxy, a gateway receives requests as if it were the
  215. origin server for the requested resource; the requesting client
  216. may not be aware that it is communicating with a gateway.
  217. Gateways are often used as server-side portals through network
  218. firewalls and as protocol translators for access to resources
  219. stored on non-HTTP systems.
  220. tunnel
  221. A tunnel is an intermediary program which is acting as a blind
  222. relay between two connections. Once active, a tunnel is not
  223. considered a party to the HTTP communication, though the tunnel
  224. may have been initiated by an HTTP request. The tunnel ceases to
  225. exist when both ends of the relayed connections are closed.
  226. Tunnels are used when a portal is necessary and the intermediary
  227. cannot, or should not, interpret the relayed communication.
  228. cache
  229. A program's local store of response messages and the subsystem
  230. that controls its message storage, retrieval, and deletion. A
  231. cache stores cachable responses in order to reduce the response
  232. time and network bandwidth consumption on future, equivalent
  233. requests. Any client or server may include a cache, though a
  234. cache cannot be used by a server while it is acting as a tunnel.
  235. Any given program may be capable of being both a client and a server;
  236. our use of these terms refers only to the role being performed by the
  237. program for a particular connection, rather than to the program's
  238. capabilities in general. Likewise, any server may act as an origin
  239. server, proxy, gateway, or tunnel, switching behavior based on the
  240. nature of each request.
  241. 1.3 Overall Operation
  242. The HTTP protocol is based on a request/response paradigm. A client
  243. establishes a connection with a server and sends a request to the
  244. server in the form of a request method, URI, and protocol version,
  245. followed by a MIME-like message containing request modifiers, client
  246. information, and possible body content. The server responds with a
  247. Berners-Lee, et al Informational [Page 6]
  248. RFC 1945 HTTP/1.0 May 1996
  249. status line, including the message's protocol version and a success
  250. or error code, followed by a MIME-like message containing server
  251. information, entity metainformation, and possible body content.
  252. Most HTTP communication is initiated by a user agent and consists of
  253. a request to be applied to a resource on some origin server. In the
  254. simplest case, this may be accomplished via a single connection (v)
  255. between the user agent (UA) and the origin server (O).
  256. request chain ------------------------>
  257. UA -------------------v------------------- O
  258. <----------------------- response chain
  259. A more complicated situation occurs when one or more intermediaries
  260. are present in the request/response chain. There are three common
  261. forms of intermediary: proxy, gateway, and tunnel. A proxy is a
  262. forwarding agent, receiving requests for a URI in its absolute form,
  263. rewriting all or parts of the message, and forwarding the reformatted
  264. request toward the server identified by the URI. A gateway is a
  265. receiving agent, acting as a layer above some other server(s) and, if
  266. necessary, translating the requests to the underlying server's
  267. protocol. A tunnel acts as a relay point between two connections
  268. without changing the messages; tunnels are used when the
  269. communication needs to pass through an intermediary (such as a
  270. firewall) even when the intermediary cannot understand the contents
  271. of the messages.
  272. request chain -------------------------------------->
  273. UA -----v----- A -----v----- B -----v----- C -----v----- O
  274. <------------------------------------- response chain
  275. The figure above shows three intermediaries (A, B, and C) between the
  276. user agent and origin server. A request or response message that
  277. travels the whole chain must pass through four separate connections.
  278. This distinction is important because some HTTP communication options
  279. may apply only to the connection with the nearest, non-tunnel
  280. neighbor, only to the end-points of the chain, or to all connections
  281. along the chain. Although the diagram is linear, each participant may
  282. be engaged in multiple, simultaneous communications. For example, B
  283. may be receiving requests from many clients other than A, and/or
  284. forwarding requests to servers other than C, at the same time that it
  285. is handling A's request.
  286. Any party to the communication which is not acting as a tunnel may
  287. employ an internal cache for handling requests. The effect of a cache
  288. is that the request/response chain is shortened if one of the
  289. participants along the chain has a cached response applicable to that
  290. request. The following illustrates the resulting chain if B has a
  291. Berners-Lee, et al Informational [Page 7]
  292. RFC 1945 HTTP/1.0 May 1996
  293. cached copy of an earlier response from O (via C) for a request which
  294. has not been cached by UA or A.
  295. request chain ---------->
  296. UA -----v----- A -----v----- B - - - - - - C - - - - - - O
  297. <--------- response chain
  298. Not all responses are cachable, and some requests may contain
  299. modifiers which place special requirements on cache behavior. Some
  300. HTTP/1.0 applications use heuristics to describe what is or is not a
  301. "cachable" response, but these rules are not standardized.
  302. On the Internet, HTTP communication generally takes place over TCP/IP
  303. connections. The default port is TCP 80 [15], but other ports can be
  304. used. This does not preclude HTTP from being implemented on top of
  305. any other protocol on the Internet, or on other networks. HTTP only
  306. presumes a reliable transport; any protocol that provides such
  307. guarantees can be used, and the mapping of the HTTP/1.0 request and
  308. response structures onto the transport data units of the protocol in
  309. question is outside the scope of this specification.
  310. Except for experimental applications, current practice requires that
  311. the connection be established by the client prior to each request and
  312. closed by the server after sending the response. Both clients and
  313. servers should be aware that either party may close the connection
  314. prematurely, due to user action, automated time-out, or program
  315. failure, and should handle such closing in a predictable fashion. In
  316. any case, the closing of the connection by either or both parties
  317. always terminates the current request, regardless of its status.
  318. 1.4 HTTP and MIME
  319. HTTP/1.0 uses many of the constructs defined for MIME, as defined in
  320. RFC 1521 [5]. Appendix C describes the ways in which the context of
  321. HTTP allows for different use of Internet Media Types than is
  322. typically found in Internet mail, and gives the rationale for those
  323. differences.
  324. 2. Notational Conventions and Generic Grammar
  325. 2.1 Augmented BNF
  326. All of the mechanisms specified in this document are described in
  327. both prose and an augmented Backus-Naur Form (BNF) similar to that
  328. used by RFC 822 [7]. Implementors will need to be familiar with the
  329. notation in order to understand this specification. The augmented BNF
  330. includes the following constructs:
  331. Berners-Lee, et al Informational [Page 8]
  332. RFC 1945 HTTP/1.0 May 1996
  333. name = definition
  334. The name of a rule is simply the name itself (without any
  335. enclosing "<" and ">") and is separated from its definition by
  336. the equal character "=". Whitespace is only significant in that
  337. indentation of continuation lines is used to indicate a rule
  338. definition that spans more than one line. Certain basic rules
  339. are in uppercase, such as SP, LWS, HT, CRLF, DIGIT, ALPHA, etc.
  340. Angle brackets are used within definitions whenever their
  341. presence will facilitate discerning the use of rule names.
  342. "literal"
  343. Quotation marks surround literal text. Unless stated otherwise,
  344. the text is case-insensitive.
  345. rule1 | rule2
  346. Elements separated by a bar ("I") are alternatives,
  347. e.g., "yes | no" will accept yes or no.
  348. (rule1 rule2)
  349. Elements enclosed in parentheses are treated as a single
  350. element. Thus, "(elem (foo | bar) elem)" allows the token
  351. sequences "elem foo elem" and "elem bar elem".
  352. *rule
  353. The character "*" preceding an element indicates repetition. The
  354. full form is "<n>*<m>element" indicating at least <n> and at
  355. most <m> occurrences of element. Default values are 0 and
  356. infinity so that "*(element)" allows any number, including zero;
  357. "1*element" requires at least one; and "1*2element" allows one
  358. or two.
  359. [rule]
  360. Square brackets enclose optional elements; "[foo bar]" is
  361. equivalent to "*1(foo bar)".
  362. N rule
  363. Specific repetition: "<n>(element)" is equivalent to
  364. "<n>*<n>(element)"; that is, exactly <n> occurrences of
  365. (element). Thus 2DIGIT is a 2-digit number, and 3ALPHA is a
  366. string of three alphabetic characters.
  367. Berners-Lee, et al Informational [Page 9]
  368. RFC 1945 HTTP/1.0 May 1996
  369. #rule
  370. A construct "#" is defined, similar to "*", for defining lists
  371. of elements. The full form is "<n>#<m>element" indicating at
  372. least <n> and at most <m> elements, each separated by one or
  373. more commas (",") and optional linear whitespace (LWS). This
  374. makes the usual form of lists very easy; a rule such as
  375. "( *LWS element *( *LWS "," *LWS element ))" can be shown as
  376. "1#element". Wherever this construct is used, null elements are
  377. allowed, but do not contribute to the count of elements present.
  378. That is, "(element), , (element)" is permitted, but counts as
  379. only two elements. Therefore, where at least one element is
  380. required, at least one non-null element must be present. Default
  381. values are 0 and infinity so that "#(element)" allows any
  382. number, including zero; "1#element" requires at least one; and
  383. "1#2element" allows one or two.
  384. ; comment
  385. A semi-colon, set off some distance to the right of rule text,
  386. starts a comment that continues to the end of line. This is a
  387. simple way of including useful notes in parallel with the
  388. specifications.
  389. implied *LWS
  390. The grammar described by this specification is word-based.
  391. Except where noted otherwise, linear whitespace (LWS) can be
  392. included between any two adjacent words (token or
  393. quoted-string), and between adjacent tokens and delimiters
  394. (tspecials), without changing the interpretation of a field. At
  395. least one delimiter (tspecials) must exist between any two
  396. tokens, since they would otherwise be interpreted as a single
  397. token. However, applications should attempt to follow "common
  398. form" when generating HTTP constructs, since there exist some
  399. implementations that fail to accept anything beyond the common
  400. forms.
  401. 2.2 Basic Rules
  402. The following rules are used throughout this specification to
  403. describe basic parsing constructs. The US-ASCII coded character set
  404. is defined by [17].
  405. OCTET = <any 8-bit sequence of data>
  406. CHAR = <any US-ASCII character (octets 0 - 127)>
  407. UPALPHA = <any US-ASCII uppercase letter "A".."Z">
  408. LOALPHA = <any US-ASCII lowercase letter "a".."z">
  409. Berners-Lee, et al Informational [Page 10]
  410. RFC 1945 HTTP/1.0 May 1996
  411. ALPHA = UPALPHA | LOALPHA
  412. DIGIT = <any US-ASCII digit "0".."9">
  413. CTL = <any US-ASCII control character
  414. (octets 0 - 31) and DEL (127)>
  415. CR = <US-ASCII CR, carriage return (13)>
  416. LF = <US-ASCII LF, linefeed (10)>
  417. SP = <US-ASCII SP, space (32)>
  418. HT = <US-ASCII HT, horizontal-tab (9)>
  419. <"> = <US-ASCII double-quote mark (34)>
  420. HTTP/1.0 defines the octet sequence CR LF as the end-of-line marker
  421. for all protocol elements except the Entity-Body (see Appendix B for
  422. tolerant applications). The end-of-line marker within an Entity-Body
  423. is defined by its associated media type, as described in Section 3.6.
  424. CRLF = CR LF
  425. HTTP/1.0 headers may be folded onto multiple lines if each
  426. continuation line begins with a space or horizontal tab. All linear
  427. whitespace, including folding, has the same semantics as SP.
  428. LWS = [CRLF] 1*( SP | HT )
  429. However, folding of header lines is not expected by some
  430. applications, and should not be generated by HTTP/1.0 applications.
  431. The TEXT rule is only used for descriptive field contents and values
  432. that are not intended to be interpreted by the message parser. Words
  433. of *TEXT may contain octets from character sets other than US-ASCII.
  434. TEXT = <any OCTET except CTLs,
  435. but including LWS>
  436. Recipients of header field TEXT containing octets outside the US-
  437. ASCII character set may assume that they represent ISO-8859-1
  438. characters.
  439. Hexadecimal numeric characters are used in several protocol elements.
  440. HEX = "A" | "B" | "C" | "D" | "E" | "F"
  441. | "a" | "b" | "c" | "d" | "e" | "f" | DIGIT
  442. Many HTTP/1.0 header field values consist of words separated by LWS
  443. or special characters. These special characters must be in a quoted
  444. string to be used within a parameter value.
  445. word = token | quoted-string
  446. Berners-Lee, et al Informational [Page 11]
  447. RFC 1945 HTTP/1.0 May 1996
  448. token = 1*<any CHAR except CTLs or tspecials>
  449. tspecials = "(" | ")" | "<" | ">" | "@"
  450. | "," | ";" | ":" | "\" | <">
  451. | "/" | "[" | "]" | "?" | "="
  452. | "{" | "}" | SP | HT
  453. Comments may be included in some HTTP header fields by surrounding
  454. the comment text with parentheses. Comments are only allowed in
  455. fields containing "comment" as part of their field value definition.
  456. In all other fields, parentheses are considered part of the field
  457. value.
  458. comment = "(" *( ctext | comment ) ")"
  459. ctext = <any TEXT excluding "(" and ")">
  460. A string of text is parsed as a single word if it is quoted using
  461. double-quote marks.
  462. quoted-string = ( <"> *(qdtext) <"> )
  463. qdtext = <any CHAR except <"> and CTLs,
  464. but including LWS>
  465. Single-character quoting using the backslash ("\") character is not
  466. permitted in HTTP/1.0.
  467. 3. Protocol Parameters
  468. 3.1 HTTP Version
  469. HTTP uses a "<major>.<minor>" numbering scheme to indicate versions
  470. of the protocol. The protocol versioning policy is intended to allow
  471. the sender to indicate the format of a message and its capacity for
  472. understanding further HTTP communication, rather than the features
  473. obtained via that communication. No change is made to the version
  474. number for the addition of message components which do not affect
  475. communication behavior or which only add to extensible field values.
  476. The <minor> number is incremented when the changes made to the
  477. protocol add features which do not change the general message parsing
  478. algorithm, but which may add to the message semantics and imply
  479. additional capabilities of the sender. The <major> number is
  480. incremented when the format of a message within the protocol is
  481. changed.
  482. The version of an HTTP message is indicated by an HTTP-Version field
  483. in the first line of the message. If the protocol version is not
  484. specified, the recipient must assume that the message is in the
  485. Berners-Lee, et al Informational [Page 12]
  486. RFC 1945 HTTP/1.0 May 1996
  487. simple HTTP/0.9 format.
  488. HTTP-Version = "HTTP" "/" 1*DIGIT "." 1*DIGIT
  489. Note that the major and minor numbers should be treated as separate
  490. integers and that each may be incremented higher than a single digit.
  491. Thus, HTTP/2.4 is a lower version than HTTP/2.13, which in turn is
  492. lower than HTTP/12.3. Leading zeros should be ignored by recipients
  493. and never generated by senders.
  494. This document defines both the 0.9 and 1.0 versions of the HTTP
  495. protocol. Applications sending Full-Request or Full-Response
  496. messages, as defined by this specification, must include an HTTP-
  497. Version of "HTTP/1.0".
  498. HTTP/1.0 servers must:
  499. o recognize the format of the Request-Line for HTTP/0.9 and
  500. HTTP/1.0 requests;
  501. o understand any valid request in the format of HTTP/0.9 or
  502. HTTP/1.0;
  503. o respond appropriately with a message in the same protocol
  504. version used by the client.
  505. HTTP/1.0 clients must:
  506. o recognize the format of the Status-Line for HTTP/1.0 responses;
  507. o understand any valid response in the format of HTTP/0.9 or
  508. HTTP/1.0.
  509. Proxy and gateway applications must be careful in forwarding requests
  510. that are received in a format different than that of the
  511. application's native HTTP version. Since the protocol version
  512. indicates the protocol capability of the sender, a proxy/gateway must
  513. never send a message with a version indicator which is greater than
  514. its native version; if a higher version request is received, the
  515. proxy/gateway must either downgrade the request version or respond
  516. with an error. Requests with a version lower than that of the
  517. application's native format may be upgraded before being forwarded;
  518. the proxy/gateway's response to that request must follow the server
  519. requirements listed above.
  520. Berners-Lee, et al Informational [Page 13]
  521. RFC 1945 HTTP/1.0 May 1996
  522. 3.2 Uniform Resource Identifiers
  523. URIs have been known by many names: WWW addresses, Universal Document
  524. Identifiers, Universal Resource Identifiers [2], and finally the
  525. combination of Uniform Resource Locators (URL) [4] and Names (URN)
  526. [16]. As far as HTTP is concerned, Uniform Resource Identifiers are
  527. simply formatted strings which identify--via name, location, or any
  528. other characteristic--a network resource.
  529. 3.2.1 General Syntax
  530. URIs in HTTP can be represented in absolute form or relative to some
  531. known base URI [9], depending upon the context of their use. The two
  532. forms are differentiated by the fact that absolute URIs always begin
  533. with a scheme name followed by a colon.
  534. URI = ( absoluteURI | relativeURI ) [ "#" fragment ]
  535. absoluteURI = scheme ":" *( uchar | reserved )
  536. relativeURI = net_path | abs_path | rel_path
  537. net_path = "//" net_loc [ abs_path ]
  538. abs_path = "/" rel_path
  539. rel_path = [ path ] [ ";" params ] [ "?" query ]
  540. path = fsegment *( "/" segment )
  541. fsegment = 1*pchar
  542. segment = *pchar
  543. params = param *( ";" param )
  544. param = *( pchar | "/" )
  545. scheme = 1*( ALPHA | DIGIT | "+" | "-" | "." )
  546. net_loc = *( pchar | ";" | "?" )
  547. query = *( uchar | reserved )
  548. fragment = *( uchar | reserved )
  549. pchar = uchar | ":" | "@" | "&" | "=" | "+"
  550. uchar = unreserved | escape
  551. unreserved = ALPHA | DIGIT | safe | extra | national
  552. escape = "%" HEX HEX
  553. reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+"
  554. extra = "!" | "*" | "'" | "(" | ")" | ","
  555. safe = "$" | "-" | "_" | "."
  556. unsafe = CTL | SP | <"> | "#" | "%" | "<" | ">"
  557. national = <any OCTET excluding ALPHA, DIGIT,
  558. Berners-Lee, et al Informational [Page 14]
  559. RFC 1945 HTTP/1.0 May 1996
  560. reserved, extra, safe, and unsafe>
  561. For definitive information on URL syntax and semantics, see RFC 1738
  562. [4] and RFC 1808 [9]. The BNF above includes national characters not
  563. allowed in valid URLs as specified by RFC 1738, since HTTP servers
  564. are not restricted in the set of unreserved characters allowed to
  565. represent the rel_path part of addresses, and HTTP proxies may
  566. receive requests for URIs not defined by RFC 1738.
  567. 3.2.2 http URL
  568. The "http" scheme is used to locate network resources via the HTTP
  569. protocol. This section defines the scheme-specific syntax and
  570. semantics for http URLs.
  571. http_URL = "http:" "//" host [ ":" port ] [ abs_path ]
  572. host = <A legal Internet host domain name
  573. or IP address (in dotted-decimal form),
  574. as defined by Section 2.1 of RFC 1123>
  575. port = *DIGIT
  576. If the port is empty or not given, port 80 is assumed. The semantics
  577. are that the identified resource is located at the server listening
  578. for TCP connections on that port of that host, and the Request-URI
  579. for the resource is abs_path. If the abs_path is not present in the
  580. URL, it must be given as "/" when used as a Request-URI (Section
  581. 5.1.2).
  582. Note: Although the HTTP protocol is independent of the transport
  583. layer protocol, the http URL only identifies resources by their
  584. TCP location, and thus non-TCP resources must be identified by
  585. some other URI scheme.
  586. The canonical form for "http" URLs is obtained by converting any
  587. UPALPHA characters in host to their LOALPHA equivalent (hostnames are
  588. case-insensitive), eliding the [ ":" port ] if the port is 80, and
  589. replacing an empty abs_path with "/".
  590. 3.3 Date/Time Formats
  591. HTTP/1.0 applications have historically allowed three different
  592. formats for the representation of date/time stamps:
  593. Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
  594. Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
  595. Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
  596. Berners-Lee, et al Informational [Page 15]
  597. RFC 1945 HTTP/1.0 May 1996
  598. The first format is preferred as an Internet standard and represents
  599. a fixed-length subset of that defined by RFC 1123 [6] (an update to
  600. RFC 822 [7]). The second format is in common use, but is based on the
  601. obsolete RFC 850 [10] date format and lacks a four-digit year.
  602. HTTP/1.0 clients and servers that parse the date value should accept
  603. all three formats, though they must never generate the third
  604. (asctime) format.
  605. Note: Recipients of date values are encouraged to be robust in
  606. accepting date values that may have been generated by non-HTTP
  607. applications, as is sometimes the case when retrieving or posting
  608. messages via proxies/gateways to SMTP or NNTP.
  609. All HTTP/1.0 date/time stamps must be represented in Universal Time
  610. (UT), also known as Greenwich Mean Time (GMT), without exception.
  611. This is indicated in the first two formats by the inclusion of "GMT"
  612. as the three-letter abbreviation for time zone, and should be assumed
  613. when reading the asctime format.
  614. HTTP-date = rfc1123-date | rfc850-date | asctime-date
  615. rfc1123-date = wkday "," SP date1 SP time SP "GMT"
  616. rfc850-date = weekday "," SP date2 SP time SP "GMT"
  617. asctime-date = wkday SP date3 SP time SP 4DIGIT
  618. date1 = 2DIGIT SP month SP 4DIGIT
  619. ; day month year (e.g., 02 Jun 1982)
  620. date2 = 2DIGIT "-" month "-" 2DIGIT
  621. ; day-month-year (e.g., 02-Jun-82)
  622. date3 = month SP ( 2DIGIT | ( SP 1DIGIT ))
  623. ; month day (e.g., Jun 2)
  624. time = 2DIGIT ":" 2DIGIT ":" 2DIGIT
  625. ; 00:00:00 - 23:59:59
  626. wkday = "Mon" | "Tue" | "Wed"
  627. | "Thu" | "Fri" | "Sat" | "Sun"
  628. weekday = "Monday" | "Tuesday" | "Wednesday"
  629. | "Thursday" | "Friday" | "Saturday" | "Sunday"
  630. month = "Jan" | "Feb" | "Mar" | "Apr"
  631. | "May" | "Jun" | "Jul" | "Aug"
  632. | "Sep" | "Oct" | "Nov" | "Dec"
  633. Note: HTTP requirements for the date/time stamp format apply
  634. only to their usage within the protocol stream. Clients and
  635. servers are not required to use these formats for user
  636. Berners-Lee, et al Informational [Page 16]
  637. RFC 1945 HTTP/1.0 May 1996
  638. presentation, request logging, etc.
  639. 3.4 Character Sets
  640. HTTP uses the same definition of the term "character set" as that
  641. described for MIME:
  642. The term "character set" is used in this document to refer to a
  643. method used with one or more tables to convert a sequence of
  644. octets into a sequence of characters. Note that unconditional
  645. conversion in the other direction is not required, in that not all
  646. characters may be available in a given character set and a
  647. character set may provide more than one sequence of octets to
  648. represent a particular character. This definition is intended to
  649. allow various kinds of character encodings, from simple single-
  650. table mappings such as US-ASCII to complex table switching methods
  651. such as those that use ISO 2022's techniques. However, the
  652. definition associated with a MIME character set name must fully
  653. specify the mapping to be performed from octets to characters. In
  654. particular, use of external profiling information to determine the
  655. exact mapping is not permitted.
  656. Note: This use of the term "character set" is more commonly
  657. referred to as a "character encoding." However, since HTTP and
  658. MIME share the same registry, it is important that the terminology
  659. also be shared.
  660. HTTP character sets are identified by case-insensitive tokens. The
  661. complete set of tokens are defined by the IANA Character Set registry
  662. [15]. However, because that registry does not define a single,
  663. consistent token for each character set, we define here the preferred
  664. names for those character sets most likely to be used with HTTP
  665. entities. These character sets include those registered by RFC 1521
  666. [5] -- the US-ASCII [17] and ISO-8859 [18] character sets -- and
  667. other names specifically recommended for use within MIME charset
  668. parameters.
  669. charset = "US-ASCII"
  670. | "ISO-8859-1" | "ISO-8859-2" | "ISO-8859-3"
  671. | "ISO-8859-4" | "ISO-8859-5" | "ISO-8859-6"
  672. | "ISO-8859-7" | "ISO-8859-8" | "ISO-8859-9"
  673. | "ISO-2022-JP" | "ISO-2022-JP-2" | "ISO-2022-KR"
  674. | "UNICODE-1-1" | "UNICODE-1-1-UTF-7" | "UNICODE-1-1-UTF-8"
  675. | token
  676. Although HTTP allows an arbitrary token to be used as a charset
  677. value, any token that has a predefined value within the IANA
  678. Character Set registry [15] must represent the character set defined
  679. Berners-Lee, et al Informational [Page 17]
  680. RFC 1945 HTTP/1.0 May 1996
  681. by that registry. Applications should limit their use of character
  682. sets to those defined by the IANA registry.
  683. The character set of an entity body should be labelled as the lowest
  684. common denominator of the character codes used within that body, with
  685. the exception that no label is preferred over the labels US-ASCII or
  686. ISO-8859-1.
  687. 3.5 Content Codings
  688. Content coding values are used to indicate an encoding transformation
  689. that has been applied to a resource. Content codings are primarily
  690. used to allow a document to be compressed or encrypted without losing
  691. the identity of its underlying media type. Typically, the resource is
  692. stored in this encoding and only decoded before rendering or
  693. analogous usage.
  694. content-coding = "x-gzip" | "x-compress" | token
  695. Note: For future compatibility, HTTP/1.0 applications should
  696. consider "gzip" and "compress" to be equivalent to "x-gzip"
  697. and "x-compress", respectively.
  698. All content-coding values are case-insensitive. HTTP/1.0 uses
  699. content-coding values in the Content-Encoding (Section 10.3) header
  700. field. Although the value describes the content-coding, what is more
  701. important is that it indicates what decoding mechanism will be
  702. required to remove the encoding. Note that a single program may be
  703. capable of decoding multiple content-coding formats. Two values are
  704. defined by this specification:
  705. x-gzip
  706. An encoding format produced by the file compression program
  707. "gzip" (GNU zip) developed by Jean-loup Gailly. This format is
  708. typically a Lempel-Ziv coding (LZ77) with a 32 bit CRC.
  709. x-compress
  710. The encoding format produced by the file compression program
  711. "compress". This format is an adaptive Lempel-Ziv-Welch coding
  712. (LZW).
  713. Note: Use of program names for the identification of
  714. encoding formats is not desirable and should be discouraged
  715. for future encodings. Their use here is representative of
  716. historical practice, not good design.
  717. Berners-Lee, et al Informational [Page 18]
  718. RFC 1945 HTTP/1.0 May 1996
  719. 3.6 Media Types
  720. HTTP uses Internet Media Types [13] in the Content-Type header field
  721. (Section 10.5) in order to provide open and extensible data typing.
  722. media-type = type "/" subtype *( ";" parameter )
  723. type = token
  724. subtype = token
  725. Parameters may follow the type/subtype in the form of attribute/value
  726. pairs.
  727. parameter = attribute "=" value
  728. attribute = token
  729. value = token | quoted-string
  730. The type, subtype, and parameter attribute names are case-
  731. insensitive. Parameter values may or may not be case-sensitive,
  732. depending on the semantics of the parameter name. LWS must not be
  733. generated between the type and subtype, nor between an attribute and
  734. its value. Upon receipt of a media type with an unrecognized
  735. parameter, a user agent should treat the media type as if the
  736. unrecognized parameter and its value were not present.
  737. Some older HTTP applications do not recognize media type parameters.
  738. HTTP/1.0 applications should only use media type parameters when they
  739. are necessary to define the content of a message.
  740. Media-type values are registered with the Internet Assigned Number
  741. Authority (IANA [15]). The media type registration process is
  742. outlined in RFC 1590 [13]. Use of non-registered media types is
  743. discouraged.
  744. 3.6.1 Canonicalization and Text Defaults
  745. Internet media types are registered with a canonical form. In
  746. general, an Entity-Body transferred via HTTP must be represented in
  747. the appropriate canonical form prior to its transmission. If the body
  748. has been encoded with a Content-Encoding, the underlying data should
  749. be in canonical form prior to being encoded.
  750. Media subtypes of the "text" type use CRLF as the text line break
  751. when in canonical form. However, HTTP allows the transport of text
  752. media with plain CR or LF alone representing a line break when used
  753. consistently within the Entity-Body. HTTP applications must accept
  754. CRLF, bare CR, and bare LF as being representative of a line break in
  755. text media received via HTTP.
  756. Berners-Lee, et al Informational [Page 19]
  757. RFC 1945 HTTP/1.0 May 1996
  758. In addition, if the text media is represented in a character set that
  759. does not use octets 13 and 10 for CR and LF respectively, as is the
  760. case for some multi-byte character sets, HTTP allows the use of
  761. whatever octet sequences are defined by that character set to
  762. represent the equivalent of CR and LF for line breaks. This
  763. flexibility regarding line breaks applies only to text media in the
  764. Entity-Body; a bare CR or LF should not be substituted for CRLF
  765. within any of the HTTP control structures (such as header fields and
  766. multipart boundaries).
  767. The "charset" parameter is used with some media types to define the
  768. character set (Section 3.4) of the data. When no explicit charset
  769. parameter is provided by the sender, media subtypes of the "text"
  770. type are defined to have a default charset value of "ISO-8859-1" when
  771. received via HTTP. Data in character sets other than "ISO-8859-1" or
  772. its subsets must be labelled with an appropriate charset value in
  773. order to be consistently interpreted by the recipient.
  774. Note: Many current HTTP servers provide data using charsets other
  775. than "ISO-8859-1" without proper labelling. This situation reduces
  776. interoperability and is not recommended. To compensate for this,
  777. some HTTP user agents provide a configuration option to allow the
  778. user to change the default interpretation of the media type
  779. character set when no charset parameter is given.
  780. 3.6.2 Multipart Types
  781. MIME provides for a number of "multipart" types -- encapsulations of
  782. several entities within a single message's Entity-Body. The multipart
  783. types registered by IANA [15] do not have any special meaning for
  784. HTTP/1.0, though user agents may need to understand each type in
  785. order to correctly interpret the purpose of each body-part. An HTTP
  786. user agent should follow the same or similar behavior as a MIME user
  787. agent does upon receipt of a multipart type. HTTP servers should not
  788. assume that all HTTP clients are prepared to handle multipart types.
  789. All multipart types share a common syntax and must include a boundary
  790. parameter as part of the media type value. The message body is itself
  791. a protocol element and must therefore use only CRLF to represent line
  792. breaks between body-parts. Multipart body-parts may contain HTTP
  793. header fields which are significant to the meaning of that part.
  794. 3.7 Product Tokens
  795. Product tokens are used to allow communicating applications to
  796. identify themselves via a simple product token, with an optional
  797. slash and version designator. Most fields using product tokens also
  798. allow subproducts which form a significant part of the application to
  799. Berners-Lee, et al Informational [Page 20]
  800. RFC 1945 HTTP/1.0 May 1996
  801. be listed, separated by whitespace. By convention, the products are
  802. listed in order of their significance for identifying the
  803. application.
  804. product = token ["/" product-version]
  805. product-version = token
  806. Examples:
  807. User-Agent: CERN-LineMode/2.15 libwww/2.17b3
  808. Server: Apache/0.8.4
  809. Product tokens should be short and to the point -- use of them for
  810. advertizing or other non-essential information is explicitly
  811. forbidden. Although any token character may appear in a product-
  812. version, this token should only be used for a version identifier
  813. (i.e., successive versions of the same product should only differ in
  814. the product-version portion of the product value).
  815. 4. HTTP Message
  816. 4.1 Message Types
  817. HTTP messages consist of requests from client to server and responses
  818. from server to client.
  819. HTTP-message = Simple-Request ; HTTP/0.9 messages
  820. | Simple-Response
  821. | Full-Request ; HTTP/1.0 messages
  822. | Full-Response
  823. Full-Request and Full-Response use the generic message format of RFC
  824. 822 [7] for transferring entities. Both messages may include optional
  825. header fields (also known as "headers") and an entity body. The
  826. entity body is separated from the headers by a null line (i.e., a
  827. line with nothing preceding the CRLF).
  828. Full-Request = Request-Line ; Section 5.1
  829. *( General-Header ; Section 4.3
  830. | Request-Header ; Section 5.2
  831. | Entity-Header ) ; Section 7.1
  832. CRLF
  833. [ Entity-Body ] ; Section 7.2
  834. Full-Response = Status-Line ; Section 6.1
  835. *( General-Header ; Section 4.3
  836. | Response-Header ; Section 6.2
  837. Berners-Lee, et al Informational [Page 21]
  838. RFC 1945 HTTP/1.0 May 1996
  839. | Entity-Header ) ; Section 7.1
  840. CRLF
  841. [ Entity-Body ] ; Section 7.2
  842. Simple-Request and Simple-Response do not allow the use of any header
  843. information and are limited to a single request method (GET).
  844. Simple-Request = "GET" SP Request-URI CRLF
  845. Simple-Response = [ Entity-Body ]
  846. Use of the Simple-Request format is discouraged because it prevents
  847. the server from identifying the media type of the returned entity.
  848. 4.2 Message Headers
  849. HTTP header fields, which include General-Header (Section 4.3),
  850. Request-Header (Section 5.2), Response-Header (Section 6.2), and
  851. Entity-Header (Section 7.1) fields, follow the same generic format as
  852. that given in Section 3.1 of RFC 822 [7]. Each header field consists
  853. of a name followed immediately by a colon (":"), a single space (SP)
  854. character, and the field value. Field names are case-insensitive.
  855. Header fields can be extended over multiple lines by preceding each
  856. extra line with at least one SP or HT, though this is not
  857. recommended.
  858. HTTP-header = field-name ":" [ field-value ] CRLF
  859. field-name = token
  860. field-value = *( field-content | LWS )
  861. field-content = <the OCTETs making up the field-value
  862. and consisting of either *TEXT or combinations
  863. of token, tspecials, and quoted-string>
  864. The order in which header fields are received is not significant.
  865. However, it is "good practice" to send General-Header fields first,
  866. followed by Request-Header or Response-Header fields prior to the
  867. Entity-Header fields.
  868. Multiple HTTP-header fields with the same field-name may be present
  869. in a message if and only if the entire field-value for that header
  870. field is defined as a comma-separated list [i.e., #(values)]. It must
  871. be possible to combine the multiple header fields into one "field-
  872. name: field-value" pair, without changing the semantics of the
  873. message, by appending each subsequent field-value to the first, each
  874. separated by a comma.
  875. Berners-Lee, et al Informational [Page 22]
  876. RFC 1945 HTTP/1.0 May 1996
  877. 4.3 General Header Fields
  878. There are a few header fields which have general applicability for
  879. both request and response messages, but which do not apply to the
  880. entity being transferred. These headers apply only to the message
  881. being transmitted.
  882. General-Header = Date ; Section 10.6
  883. | Pragma ; Section 10.12
  884. General header field names can be extended reliably only in
  885. combination with a change in the protocol version. However, new or
  886. experimental header fields may be given the semantics of general
  887. header fields if all parties in the communication recognize them to
  888. be general header fields. Unrecognized header fields are treated as
  889. Entity-Header fields.
  890. 5. Request
  891. A request message from a client to a server includes, within the
  892. first line of that message, the method to be applied to the resource,
  893. the identifier of the resource, and the protocol version in use. For
  894. backwards compatibility with the more limited HTTP/0.9 protocol,
  895. there are two valid formats for an HTTP request:
  896. Request = Simple-Request | Full-Request
  897. Simple-Request = "GET" SP Request-URI CRLF
  898. Full-Request = Request-Line ; Section 5.1
  899. *( General-Header ; Section 4.3
  900. | Request-Header ; Section 5.2
  901. | Entity-Header ) ; Section 7.1
  902. CRLF
  903. [ Entity-Body ] ; Section 7.2
  904. If an HTTP/1.0 server receives a Simple-Request, it must respond with
  905. an HTTP/0.9 Simple-Response. An HTTP/1.0 client capable of receiving
  906. a Full-Response should never generate a Simple-Request.
  907. 5.1 Request-Line
  908. The Request-Line begins with a method token, followed by the
  909. Request-URI and the protocol version, and ending with CRLF. The
  910. elements are separated by SP characters. No CR or LF are allowed
  911. except in the final CRLF sequence.
  912. Request-Line = Method SP Request-URI SP HTTP-Version CRLF
  913. Berners-Lee, et al Informational [Page 23]
  914. RFC 1945 HTTP/1.0 May 1996
  915. Note that the difference between a Simple-Request and the Request-
  916. Line of a Full-Request is the presence of the HTTP-Version field and
  917. the availability of methods other than GET.
  918. 5.1.1 Method
  919. The Method token indicates the method to be performed on the resource
  920. identified by the Request-URI. The method is case-sensitive.
  921. Method = "GET" ; Section 8.1
  922. | "HEAD" ; Section 8.2
  923. | "POST" ; Section 8.3
  924. | extension-method
  925. extension-method = token
  926. The list of methods acceptable by a specific resource can change
  927. dynamically; the client is notified through the return code of the
  928. response if a method is not allowed on a resource. Servers should
  929. return the status code 501 (not implemented) if the method is
  930. unrecognized or not implemented.
  931. The methods commonly used by HTTP/1.0 applications are fully defined
  932. in Section 8.
  933. 5.1.2 Request-URI
  934. The Request-URI is a Uniform Resource Identifier (Section 3.2) and
  935. identifies the resource upon which to apply the request.
  936. Request-URI = absoluteURI | abs_path
  937. The two options for Request-URI are dependent on the nature of the
  938. request.
  939. The absoluteURI form is only allowed when the request is being made
  940. to a proxy. The proxy is requested to forward the request and return
  941. the response. If the request is GET or HEAD and a prior response is
  942. cached, the proxy may use the cached message if it passes any
  943. restrictions in the Expires header field. Note that the proxy may
  944. forward the request on to another proxy or directly to the server
  945. specified by the absoluteURI. In order to avoid request loops, a
  946. proxy must be able to recognize all of its server names, including
  947. any aliases, local variations, and the numeric IP address. An example
  948. Request-Line would be:
  949. GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.0
  950. Berners-Lee, et al Informational [Page 24]
  951. RFC 1945 HTTP/1.0 May 1996
  952. The most common form of Request-URI is that used to identify a
  953. resource on an origin server or gateway. In this case, only the
  954. absolute path of the URI is transmitted (see Section 3.2.1,
  955. abs_path). For example, a client wishing to retrieve the resource
  956. above directly from the origin server would create a TCP connection
  957. to port 80 of the host "www.w3.org" and send the line:
  958. GET /pub/WWW/TheProject.html HTTP/1.0
  959. followed by the remainder of the Full-Request. Note that the absolute
  960. path cannot be empty; if none is present in the original URI, it must
  961. be given as "/" (the server root).
  962. The Request-URI is transmitted as an encoded string, where some
  963. characters may be escaped using the "% HEX HEX" encoding defined by
  964. RFC 1738 [4]. The origin server must decode the Request-URI in order
  965. to properly interpret the request.
  966. 5.2 Request Header Fields
  967. The request header fields allow the client to pass additional
  968. information about the request, and about the client itself, to the
  969. server. These fields act as request modifiers, with semantics
  970. equivalent to the parameters on a programming language method
  971. (procedure) invocation.
  972. Request-Header = Authorization ; Section 10.2
  973. | From ; Section 10.8
  974. | If-Modified-Since ; Section 10.9
  975. | Referer ; Section 10.13
  976. | User-Agent ; Section 10.15
  977. Request-Header field names can be extended reliably only in
  978. combination with a change in the protocol version. However, new or
  979. experimental header fields may be given the semantics of request
  980. header fields if all parties in the communication recognize them to
  981. be request header fields. Unrecognized header fields are treated as
  982. Entity-Header fields.
  983. 6. Response
  984. After receiving and interpreting a request message, a server responds
  985. in the form of an HTTP response message.
  986. Response = Simple-Response | Full-Response
  987. Simple-Response = [ Entity-Body ]
  988. Berners-Lee, et al Informational [Page 25]
  989. RFC 1945 HTTP/1.0 May 1996
  990. Full-Response = Status-Line ; Section 6.1
  991. *( General-Header ; Section 4.3
  992. | Response-Header ; Section 6.2
  993. | Entity-Header ) ; Section 7.1
  994. CRLF
  995. [ Entity-Body ] ; Section 7.2
  996. A Simple-Response should only be sent in response to an HTTP/0.9
  997. Simple-Request or if the server only supports the more limited
  998. HTTP/0.9 protocol. If a client sends an HTTP/1.0 Full-Request and
  999. receives a response that does not begin with a Status-Line, it should
  1000. assume that the response is a Simple-Response and parse it
  1001. accordingly. Note that the Simple-Response consists only of the
  1002. entity body and is terminated by the server closing the connection.
  1003. 6.1 Status-Line
  1004. The first line of a Full-Response message is the Status-Line,
  1005. consisting of the protocol version followed by a numeric status code
  1006. and its associated textual phrase, with each element separated by SP
  1007. characters. No CR or LF is allowed except in the final CRLF sequence.
  1008. Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
  1009. Since a status line always begins with the protocol version and
  1010. status code
  1011. "HTTP/" 1*DIGIT "." 1*DIGIT SP 3DIGIT SP
  1012. (e.g., "HTTP/1.0 200 "), the presence of that expression is
  1013. sufficient to differentiate a Full-Response from a Simple-Response.
  1014. Although the Simple-Response format may allow such an expression to
  1015. occur at the beginning of an entity body, and thus cause a
  1016. misinterpretation of the message if it was given in response to a
  1017. Full-Request, most HTTP/0.9 servers are limited to responses of type
  1018. "text/html" and therefore would never generate such a response.
  1019. 6.1.1 Status Code and Reason Phrase
  1020. The Status-Code element is a 3-digit integer result code of the
  1021. attempt to understand and satisfy the request. The Reason-Phrase is
  1022. intended to give a short textual description of the Status-Code. The
  1023. Status-Code is intended for use by automata and the Reason-Phrase is
  1024. intended for the human user. The client is not required to examine or
  1025. display the Reason-Phrase.
  1026. Berners-Lee, et al Informational [Page 26]
  1027. RFC 1945 HTTP/1.0 May 1996
  1028. The first digit of the Status-Code defines the class of response. The
  1029. last two digits do not have any categorization role. There are 5
  1030. values for the first digit:
  1031. o 1xx: Informational - Not used, but reserved for future use
  1032. o 2xx: Success - The action was successfully received,
  1033. understood, and accepted.
  1034. o 3xx: Redirection - Further action must be taken in order to
  1035. complete the request
  1036. o 4xx: Client Error - The request contains bad syntax or cannot
  1037. be fulfilled
  1038. o 5xx: Server Error - The server failed to fulfill an apparently
  1039. valid request
  1040. The individual values of the numeric status codes defined for
  1041. HTTP/1.0, and an example set of corresponding Reason-Phrase's, are
  1042. presented below. The reason phrases listed here are only recommended
  1043. -- they may be replaced by local equivalents without affecting the
  1044. protocol. These codes are fully defined in Section 9.
  1045. Status-Code = "200" ; OK
  1046. | "201" ; Created
  1047. | "202" ; Accepted
  1048. | "204" ; No Content
  1049. | "301" ; Moved Permanently
  1050. | "302" ; Moved Temporarily
  1051. | "304" ; Not Modified
  1052. | "400" ; Bad Request
  1053. | "401" ; Unauthorized
  1054. | "403" ; Forbidden
  1055. | "404" ; Not Found
  1056. | "500" ; Internal Server Error
  1057. | "501" ; Not Implemented
  1058. | "502" ; Bad Gateway
  1059. | "503" ; Service Unavailable
  1060. | extension-code
  1061. extension-code = 3DIGIT
  1062. Reason-Phrase = *<TEXT, excluding CR, LF>
  1063. HTTP status codes are extensible, but the above codes are the only
  1064. ones generally recognized in current practice. HTTP applications are
  1065. not required to understand the meaning of all registered status
  1066. Berners-Lee, et al Informational [Page 27]
  1067. RFC 1945 HTTP/1.0 May 1996
  1068. codes, though such understanding is obviously desirable. However,
  1069. applications must understand the class of any status code, as
  1070. indicated by the first digit, and treat any unrecognized response as
  1071. being equivalent to the x00 status code of that class, with the
  1072. exception that an unrecognized response must not be cached. For
  1073. example, if an unrecognized status code of 431 is received by the
  1074. client, it can safely assume that there was something wrong with its
  1075. request and treat the response as if it had received a 400 status
  1076. code. In such cases, user agents should present to the user the
  1077. entity returned with the response, since that entity is likely to
  1078. include human-readable information which will explain the unusual
  1079. status.
  1080. 6.2 Response Header Fields
  1081. The response header fields allow the server to pass additional
  1082. information about the response which cannot be placed in the Status-
  1083. Line. These header fields give information about the server and about
  1084. further access to the resource identified by the Request-URI.
  1085. Response-Header = Location ; Section 10.11
  1086. | Server ; Section 10.14
  1087. | WWW-Authenticate ; Section 10.16
  1088. Response-Header field names can be extended reliably only in
  1089. combination with a change in the protocol version. However, new or
  1090. experimental header fields may be given the semantics of response
  1091. header fields if all parties in the communication recognize them to
  1092. be response header fields. Unrecognized header fields are treated as
  1093. Entity-Header fields.
  1094. 7. Entity
  1095. Full-Request and Full-Response messages may transfer an entity within
  1096. some requests and responses. An entity consists of Entity-Header
  1097. fields and (usually) an Entity-Body. In this section, both sender and
  1098. recipient refer to either the client or the server, depending on who
  1099. sends and who receives the entity.
  1100. Berners-Lee, et al Informational [Page 28]
  1101. RFC 1945 HTTP/1.0 May 1996
  1102. 7.1 Entity Header Fields
  1103. Entity-Header fields define optional metainformation about the
  1104. Entity-Body or, if no body is present, about the resource identified
  1105. by the request.
  1106. Entity-Header = Allow ; Section 10.1
  1107. | Content-Encoding ; Section 10.3
  1108. | Content-Length ; Section 10.4
  1109. | Content-Type ; Section 10.5
  1110. | Expires ; Section 10.7
  1111. | Last-Modified ; Section 10.10
  1112. | extension-header
  1113. extension-header = HTTP-header
  1114. The extension-header mechanism allows additional Entity-Header fields
  1115. to be defined without changing the protocol, but these fields cannot
  1116. be assumed to be recognizable by the recipient. Unrecognized header
  1117. fields should be ignored by the recipient and forwarded by proxies.
  1118. 7.2 Entity Body
  1119. The entity body (if any) sent with an HTTP request or response is in
  1120. a format and encoding defined by the Entity-Header fields.
  1121. Entity-Body = *OCTET
  1122. An entity body is included with a request message only when the
  1123. request method calls for one. The presence of an entity body in a
  1124. request is signaled by the inclusion of a Content-Length header field
  1125. in the request message headers. HTTP/1.0 requests containing an
  1126. entity body must include a valid Content-Length header field.
  1127. For response messages, whether or not an entity body is included with
  1128. a message is dependent on both the request method and the response
  1129. code. All responses to the HEAD request method must not include a
  1130. body, even though the presence of entity header fields may lead one
  1131. to believe they do. All 1xx (informational), 204 (no content), and
  1132. 304 (not modified) responses must not include a body. All other
  1133. responses must include an entity body or a Content-Length header
  1134. field defined with a value of zero (0).
  1135. 7.2.1 Type
  1136. When an Entity-Body is included with a message, the data type of that
  1137. body is determined via the header fields Content-Type and Content-
  1138. Encoding. These define a two-layer, ordered encoding model:
  1139. Berners-Lee, et al Informational [Page 29]
  1140. RFC 1945 HTTP/1.0 May 1996
  1141. entity-body := Content-Encoding( Content-Type( data ) )
  1142. A Content-Type specifies the media type of the underlying data. A
  1143. Content-Encoding may be used to indicate any additional content
  1144. coding applied to the type, usually for the purpose of data
  1145. compression, that is a property of the resource requested. The
  1146. default for the content encoding is none (i.e., the identity
  1147. function).
  1148. Any HTTP/1.0 message containing an entity body should include a
  1149. Content-Type header field defining the media type of that body. If
  1150. and only if the media type is not given by a Content-Type header, as
  1151. is the case for Simple-Response messages, the recipient may attempt
  1152. to guess the media type via inspection of its content and/or the name
  1153. extension(s) of the URL used to identify the resource. If the media
  1154. type remains unknown, the recipient should treat it as type
  1155. "application/octet-stream".
  1156. 7.2.2 Length
  1157. When an Entity-Body is included with a message, the length of that
  1158. body may be determined in one of two ways. If a Content-Length header
  1159. field is present, its value in bytes represents the length of the
  1160. Entity-Body. Otherwise, the body length is determined by the closing
  1161. of the connection by the server.
  1162. Closing the connection cannot be used to indicate the end of a
  1163. request body, since it leaves no possibility for the server to send
  1164. back a response. Therefore, HTTP/1.0 requests containing an entity
  1165. body must include a valid Content-Length header field. If a request
  1166. contains an entity body and Content-Length is not specified, and the
  1167. server does not recognize or cannot calculate the length from other
  1168. fields, then the server should send a 400 (bad request) response.
  1169. Note: Some older servers supply an invalid Content-Length when
  1170. sending a document that contains server-side includes dynamically
  1171. inserted into the data stream. It must be emphasized that this
  1172. will not be tolerated by future versions of HTTP. Unless the
  1173. client knows that it is receiving a response from a compliant
  1174. server, it should not depend on the Content-Length value being
  1175. correct.
  1176. 8. Method Definitions
  1177. The set of common methods for HTTP/1.0 is defined below. Although
  1178. this set can be expanded, additional methods cannot be assumed to
  1179. share the same semantics for separately extended clients and servers.
  1180. Berners-Lee, et al Informational [Page 30]
  1181. RFC 1945 HTTP/1.0 May 1996
  1182. 8.1 GET
  1183. The GET method means retrieve whatever information (in the form of an
  1184. entity) is identified by the Request-URI. If the Request-URI refers
  1185. to a data-producing process, it is the produced data which shall be
  1186. returned as the entity in the response and not the source text of the
  1187. process, unless that text happens to be the output of the process.
  1188. The semantics of the GET method changes to a "conditional GET" if the
  1189. request message includes an If-Modified-Since header field. A
  1190. conditional GET method requests that the identified resource be
  1191. transferred only if it has been modified since the date given by the
  1192. If-Modified-Since header, as described in Section 10.9. The
  1193. conditional GET method is intended to reduce network usage by
  1194. allowing cached entities to be refreshed without requiring multiple
  1195. requests or transferring unnecessary data.
  1196. 8.2 HEAD
  1197. The HEAD method is identical to GET except that the server must not
  1198. return any Entity-Body in the response. The metainformation contained
  1199. in the HTTP headers in response to a HEAD request should be identical
  1200. to the information sent in response to a GET request. This method can
  1201. be used for obtaining metainformation about the resource identified
  1202. by the Request-URI without transferring the Entity-Body itself. This
  1203. method is often used for testing hypertext links for validity,
  1204. accessibility, and recent modification.
  1205. There is no "conditional HEAD" request analogous to the conditional
  1206. GET. If an If-Modified-Since header field is included with a HEAD
  1207. request, it should be ignored.
  1208. 8.3 POST
  1209. The POST method is used to request that the destination server accept
  1210. the entity enclosed in the request as a new subordinate of the
  1211. resource identified by the Request-URI in the Request-Line. POST is
  1212. designed to allow a uniform method to cover the following functions:
  1213. o Annotation of existing resources;
  1214. o Posting a message to a bulletin board, newsgroup, mailing list,
  1215. or similar group of articles;
  1216. o Providing a block of data, such as the result of submitting a
  1217. form [3], to a data-handling process;
  1218. o Extending a database through an append operation.
  1219. Berners-Lee, et al Informational [Page 31]
  1220. RFC 1945 HTTP/1.0 May 1996
  1221. The actual function performed by the POST method is determined by the
  1222. server and is usually dependent on the Request-URI. The posted entity
  1223. is subordinate to that URI in the same way that a file is subordinate
  1224. to a directory containing it, a news article is subordinate to a
  1225. newsgroup to which it is posted, or a record is subordinate to a
  1226. database.
  1227. A successful POST does not require that the entity be created as a
  1228. resource on the origin server or made accessible for future
  1229. reference. That is, the action performed by the POST method might not
  1230. result in a resource that can be identified by a URI. In this case,
  1231. either 200 (ok) or 204 (no content) is the appropriate response
  1232. status, depending on whether or not the response includes an entity
  1233. that describes the result.
  1234. If a resource has been created on the origin server, the response
  1235. should be 201 (created) and contain an entity (preferably of type
  1236. "text/html") which describes the status of the request and refers to
  1237. the new resource.
  1238. A valid Content-Length is required on all HTTP/1.0 POST requests. An
  1239. HTTP/1.0 server should respond with a 400 (bad request) message if it
  1240. cannot determine the length of the request message's content.
  1241. Applications must not cache responses to a POST request because the
  1242. application has no way of knowing that the server would return an
  1243. equivalent response on some future request.
  1244. 9. Status Code Definitions
  1245. Each Status-Code is described below, including a description of which
  1246. method(s) it can follow and any metainformation required in the
  1247. response.
  1248. 9.1 Informational 1xx
  1249. This class of status code indicates a provisional response,
  1250. consisting only of the Status-Line and optional headers, and is
  1251. terminated by an empty line. HTTP/1.0 does not define any 1xx status
  1252. codes and they are not a valid response to a HTTP/1.0 request.
  1253. However, they may be useful for experimental applications which are
  1254. outside the scope of this specification.
  1255. 9.2 Successful 2xx
  1256. This class of status code indicates that the client's request was
  1257. successfully received, understood, and accepted.
  1258. Berners-Lee, et al Informational [Page 32]
  1259. RFC 1945 HTTP/1.0 May 1996
  1260. 200 OK
  1261. The request has succeeded. The information returned with the
  1262. response is dependent on the method used in the request, as follows:
  1263. GET an entity corresponding to the requested resource is sent
  1264. in the response;
  1265. HEAD the response must only contain the header information and
  1266. no Entity-Body;
  1267. POST an entity describing or containing the result of the action.
  1268. 201 Created
  1269. The request has been fulfilled and resulted in a new resource being
  1270. created. The newly created resource can be referenced by the URI(s)
  1271. returned in the entity of the response. The origin server should
  1272. create the resource before using this Status-Code. If the action
  1273. cannot be carried out immediately, the server must include in the
  1274. response body a description of when the resource will be available;
  1275. otherwise, the server should respond with 202 (accepted).
  1276. Of the methods defined by this specification, only POST can create a
  1277. resource.
  1278. 202 Accepted
  1279. The request has been accepted for processing, but the processing
  1280. has not been completed. The request may or may not eventually be
  1281. acted upon, as it may be disallowed when processing actually takes
  1282. place. There is no facility for re-sending a status code from an
  1283. asynchronous operation such as this.
  1284. The 202 response is intentionally non-committal. Its purpose is to
  1285. allow a server to accept a request for some other process (perhaps
  1286. a batch-oriented process that is only run once per day) without
  1287. requiring that the user agent's connection to the server persist
  1288. until the process is completed. The entity returned with this
  1289. response should include an indication of the request's current
  1290. status and either a pointer to a status monitor or some estimate of
  1291. when the user can expect the request to be fulfilled.
  1292. 204 No Content
  1293. The server has fulfilled the request but there is no new
  1294. information to send back. If the client is a user agent, it should
  1295. not change its document view from that which caused the request to
  1296. Berners-Lee, et al Informational [Page 33]
  1297. RFC 1945 HTTP/1.0 May 1996
  1298. be generated. This response is primarily intended to allow input
  1299. for scripts or other actions to take place without causing a change
  1300. to the user agent's active document view. The response may include
  1301. new metainformation in the form of entity headers, which should
  1302. apply to the document currently in the user agent's active view.
  1303. 9.3 Redirection 3xx
  1304. This class of status code indicates that further action needs to be
  1305. taken by the user agent in order to fulfill the request. The action
  1306. required may be carried out by the user agent without interaction
  1307. with the user if and only if the method used in the subsequent
  1308. request is GET or HEAD. A user agent should never automatically
  1309. redirect a request more than 5 times, since such redirections usually
  1310. indicate an infinite loop.
  1311. 300 Multiple Choices
  1312. This response code is not directly used by HTTP/1.0 applications,
  1313. but serves as the default for interpreting the 3xx class of
  1314. responses.
  1315. The requested resource is available at one or more locations.
  1316. Unless it was a HEAD request, the response should include an entity
  1317. containing a list of resource characteristics and locations from
  1318. which the user or user agent can choose the one most appropriate.
  1319. If the server has a preferred choice, it should include the URL in
  1320. a Location field; user agents may use this field value for
  1321. automatic redirection.
  1322. 301 Moved Permanently
  1323. The requested resource has been assigned a new permanent URL and
  1324. any future references to this resource should be done using that
  1325. URL. Clients with link editing capabilities should automatically
  1326. relink references to the Request-URI to the new reference returned
  1327. by the server, where possible.
  1328. The new URL must be given by the Location field in the response.
  1329. Unless it was a HEAD request, the Entity-Body of the response
  1330. should contain a short note with a hyperlink to the new URL.
  1331. If the 301 status code is received in response to a request using
  1332. the POST method, the user agent must not automatically redirect the
  1333. request unless it can be confirmed by the user, since this might
  1334. change the conditions under which the request was issued.
  1335. Berners-Lee, et al Informational [Page 34]
  1336. RFC 1945 HTTP/1.0 May 1996
  1337. Note: When automatically redirecting a POST request after
  1338. receiving a 301 status code, some existing user agents will
  1339. erroneously change it into a GET request.
  1340. 302 Moved Temporarily
  1341. The requested resource resides temporarily under a different URL.
  1342. Since the redirection may be altered on occasion, the client should
  1343. continue to use the Request-URI for future requests.
  1344. The URL must be given by the Location field in the response. Unless
  1345. it was a HEAD request, the Entity-Body of the response should
  1346. contain a short note with a hyperlink to the new URI(s).
  1347. If the 302 status code is received in response to a request using
  1348. the POST method, the user agent must not automatically redirect the
  1349. request unless it can be confirmed by the user, since this might
  1350. change the conditions under which the request was issued.
  1351. Note: When automatically redirecting a POST request after
  1352. receiving a 302 status code, some existing user agents will
  1353. erroneously change it into a GET request.
  1354. 304 Not Modified
  1355. If the client has performed a conditional GET request and access is
  1356. allowed, but the document has not been modified since the date and
  1357. time specified in the If-Modified-Since field, the server must
  1358. respond with this status code and not send an Entity-Body to the
  1359. client. Header fields contained in the response should only include
  1360. information which is relevant to cache managers or which may have
  1361. changed independently of the entity's Last-Modified date. Examples
  1362. of relevant header fields include: Date, Server, and Expires. A
  1363. cache should update its cached entity to reflect any new field
  1364. values given in the 304 response.
  1365. 9.4 Client Error 4xx
  1366. The 4xx class of status code is intended for cases in which the
  1367. client seems to have erred. If the client has not completed the
  1368. request when a 4xx code is received, it should immediately cease
  1369. sending data to the server. Except when responding to a HEAD request,
  1370. the server should include an entity containing an explanation of the
  1371. error situation, and whether it is a temporary or permanent
  1372. condition. These status codes are applicable to any request method.
  1373. Berners-Lee, et al Informational [Page 35]
  1374. RFC 1945 HTTP/1.0 May 1996
  1375. Note: If the client is sending data, server implementations on TCP
  1376. should be careful to ensure that the client acknowledges receipt
  1377. of the packet(s) containing the response prior to closing the
  1378. input connection. If the client continues sending data to the
  1379. server after the close, the server's controller will send a reset
  1380. packet to the client, which may erase the client's unacknowledged
  1381. input buffers before they can be read and interpreted by the HTTP
  1382. application.
  1383. 400 Bad Request
  1384. The request could not be understood by the server due to malformed
  1385. syntax. The client should not repeat the request without
  1386. modifications.
  1387. 401 Unauthorized
  1388. The request requires user authentication. The response must include
  1389. a WWW-Authenticate header field (Section 10.16) containing a
  1390. challenge applicable to the requested resource. The client may
  1391. repeat the request with a suitable Authorization header field
  1392. (Section 10.2). If the request already included Authorization
  1393. credentials, then the 401 response indicates that authorization has
  1394. been refused for those credentials. If the 401 response contains
  1395. the same challenge as the prior response, and the user agent has
  1396. already attempted authentication at least once, then the user
  1397. should be presented the entity that was given in the response,
  1398. since that entity may include relevant diagnostic information. HTTP
  1399. access authentication is explained in Section 11.
  1400. 403 Forbidden
  1401. The server understood the request, but is refusing to fulfill it.
  1402. Authorization will not help and the request should not be repeated.
  1403. If the request method was not HEAD and the server wishes to make
  1404. public why the request has not been fulfilled, it should describe
  1405. the reason for the refusal in the entity body. This status code is
  1406. commonly used when the server does not wish to reveal exactly why
  1407. the request has been refused, or when no other response is
  1408. applicable.
  1409. 404 Not Found
  1410. The server has not found anything matching the Request-URI. No
  1411. indication is given of whether the condition is temporary or
  1412. permanent. If the server does not wish to make this information
  1413. available to the client, the status code 403 (forbidden) can be
  1414. used instead.
  1415. Berners-Lee, et al Informational [Page 36]
  1416. RFC 1945 HTTP/1.0 May 1996
  1417. 9.5 Server Error 5xx
  1418. Response status codes beginning with the digit "5" indicate cases in
  1419. which the server is aware that it has erred or is incapable of
  1420. performing the request. If the client has not completed the request
  1421. when a 5xx code is received, it should immediately cease sending data
  1422. to the server. Except when responding to a HEAD request, the server
  1423. should include an entity containing an explanation of the error
  1424. situation, and whether it is a temporary or permanent condition.
  1425. These response codes are applicable to any request method and there
  1426. are no required header fields.
  1427. 500 Internal Server Error
  1428. The server encountered an unexpected condition which prevented it
  1429. from fulfilling the request.
  1430. 501 Not Implemented
  1431. The server does not support the functionality required to fulfill
  1432. the request. This is the appropriate response when the server does
  1433. not recognize the request method and is not capable of supporting
  1434. it for any resource.
  1435. 502 Bad Gateway
  1436. The server, while acting as a gateway or proxy, received an invalid
  1437. response from the upstream server it accessed in attempting to
  1438. fulfill the request.
  1439. 503 Service Unavailable
  1440. The server is currently unable to handle the request due to a
  1441. temporary overloading or maintenance of the server. The implication
  1442. is that this is a temporary condition which will be alleviated
  1443. after some delay.
  1444. Note: The existence of the 503 status code does not imply
  1445. that a server must use it when becoming overloaded. Some
  1446. servers may wish to simply refuse the connection.
  1447. 10. Header Field Definitions
  1448. This section defines the syntax and semantics of all commonly used
  1449. HTTP/1.0 header fields. For general and entity header fields, both
  1450. sender and recipient refer to either the client or the server,
  1451. depending on who sends and who receives the message.
  1452. Berners-Lee, et al Informational [Page 37]
  1453. RFC 1945 HTTP/1.0 May 1996
  1454. 10.1 Allow
  1455. The Allow entity-header field lists the set of methods supported by
  1456. the resource identified by the Request-URI. The purpose of this field
  1457. is strictly to inform the recipient of valid methods associated with
  1458. the resource. The Allow header field is not permitted in a request
  1459. using the POST method, and thus should be ignored if it is received
  1460. as part of a POST entity.
  1461. Allow = "Allow" ":" 1#method
  1462. Example of use:
  1463. Allow: GET, HEAD
  1464. This field cannot prevent a client from trying other methods.
  1465. However, the indications given by the Allow header field value should
  1466. be followed. The actual set of allowed methods is defined by the
  1467. origin server at the time of each request.
  1468. A proxy must not modify the Allow header field even if it does not
  1469. understand all the methods specified, since the user agent may have
  1470. other means of communicating with the origin server.
  1471. The Allow header field does not indicate what methods are implemented
  1472. by the server.
  1473. 10.2 Authorization
  1474. A user agent that wishes to authenticate itself with a server--
  1475. usually, but not necessarily, after receiving a 401 response--may do
  1476. so by including an Authorization request-header field with the
  1477. request. The Authorization field value consists of credentials
  1478. containing the authentication information of the user agent for the
  1479. realm of the resource being requested.
  1480. Authorization = "Authorization" ":" credentials
  1481. HTTP access authentication is described in Section 11. If a request
  1482. is authenticated and a realm specified, the same credentials should
  1483. be valid for all other requests within this realm.
  1484. Responses to requests containing an Authorization field are not
  1485. cachable.
  1486. Berners-Lee, et al Informational [Page 38]
  1487. RFC 1945 HTTP/1.0 May 1996
  1488. 10.3 Content-Encoding
  1489. The Content-Encoding entity-header field is used as a modifier to the
  1490. media-type. When present, its value indicates what additional content
  1491. coding has been applied to the resource, and thus what decoding
  1492. mechanism must be applied in order to obtain the media-type
  1493. referenced by the Content-Type header field. The Content-Encoding is
  1494. primarily used to allow a document to be compressed without losing
  1495. the identity of its underlying media type.
  1496. Content-Encoding = "Content-Encoding" ":" content-coding
  1497. Content codings are defined in Section 3.5. An example of its use is
  1498. Content-Encoding: x-gzip
  1499. The Content-Encoding is a characteristic of the resource identified
  1500. by the Request-URI. Typically, the resource is stored with this
  1501. encoding and is only decoded before rendering or analogous usage.
  1502. 10.4 Content-Length
  1503. The Content-Length entity-header field indicates the size of the
  1504. Entity-Body, in decimal number of octets, sent to the recipient or,
  1505. in the case of the HEAD method, the size of the Entity-Body that
  1506. would have been sent had the request been a GET.
  1507. Content-Length = "Content-Length" ":" 1*DIGIT
  1508. An example is
  1509. Content-Length: 3495
  1510. Applications should use this field to indicate the size of the
  1511. Entity-Body to be transferred, regardless of the media type of the
  1512. entity. A valid Content-Length field value is required on all
  1513. HTTP/1.0 request messages containing an entity body.
  1514. Any Content-Length greater than or equal to zero is a valid value.
  1515. Section 7.2.2 describes how to determine the length of a response
  1516. entity body if a Content-Length is not given.
  1517. Note: The meaning of this field is significantly different from
  1518. the corresponding definition in MIME, where it is an optional
  1519. field used within the "message/external-body" content-type. In
  1520. HTTP, it should be used whenever the entity's length can be
  1521. determined prior to being transferred.
  1522. Berners-Lee, et al Informational [Page 39]
  1523. RFC 1945 HTTP/1.0 May 1996
  1524. 10.5 Content-Type
  1525. The Content-Type entity-header field indicates the media type of the
  1526. Entity-Body sent to the recipient or, in the case of the HEAD method,
  1527. the media type that would have been sent had the request been a GET.
  1528. Content-Type = "Content-Type" ":" media-type
  1529. Media types are defined in Section 3.6. An example of the field is
  1530. Content-Type: text/html
  1531. Further discussion of methods for identifying the media type of an
  1532. entity is provided in Section 7.2.1.
  1533. 10.6 Date
  1534. The Date general-header field represents the date and time at which
  1535. the message was originated, having the same semantics as orig-date in
  1536. RFC 822. The field value is an HTTP-date, as described in Section
  1537. 3.3.
  1538. Date = "Date" ":" HTTP-date
  1539. An example is
  1540. Date: Tue, 15 Nov 1994 08:12:31 GMT
  1541. If a message is received via direct connection with the user agent
  1542. (in the case of requests) or the origin server (in the case of
  1543. responses), then the date can be assumed to be the current date at
  1544. the receiving end. However, since the date--as it is believed by the
  1545. origin--is important for evaluating cached responses, origin servers
  1546. should always include a Date header. Clients should only send a Date
  1547. header field in messages that include an entity body, as in the case
  1548. of the POST request, and even then it is optional. A received message
  1549. which does not have a Date header field should be assigned one by the
  1550. recipient if the message will be cached by that recipient or
  1551. gatewayed via a protocol which requires a Date.
  1552. In theory, the date should represent the moment just before the
  1553. entity is generated. In practice, the date can be generated at any
  1554. time during the message origination without affecting its semantic
  1555. value.
  1556. Note: An earlier version of this document incorrectly specified
  1557. that this field should contain the creation date of the enclosed
  1558. Entity-Body. This has been changed to reflect actual (and proper)
  1559. Berners-Lee, et al Informational [Page 40]
  1560. RFC 1945 HTTP/1.0 May 1996
  1561. usage.
  1562. 10.7 Expires
  1563. The Expires entity-header field gives the date/time after which the
  1564. entity should be considered stale. This allows information providers
  1565. to suggest the volatility of the resource, or a date after which the
  1566. information may no longer be valid. Applications must not cache this
  1567. entity beyond the date given. The presence of an Expires field does
  1568. not imply that the original resource will change or cease to exist
  1569. at, before, or after that time. However, information providers that
  1570. know or even suspect that a resource will change by a certain date
  1571. should include an Expires header with that date. The format is an
  1572. absolute date and time as defined by HTTP-date in Section 3.3.
  1573. Expires = "Expires" ":" HTTP-date
  1574. An example of its use is
  1575. Expires: Thu, 01 Dec 1994 16:00:00 GMT
  1576. If the date given is equal to or earlier than the value of the Date
  1577. header, the recipient must not cache the enclosed entity. If a
  1578. resource is dynamic by nature, as is the case with many data-
  1579. producing processes, entities from that resource should be given an
  1580. appropriate Expires value which reflects that dynamism.
  1581. The Expires field cannot be used to force a user agent to refresh its
  1582. display or reload a resource; its semantics apply only to caching
  1583. mechanisms, and such mechanisms need only check a resource's
  1584. expiration status when a new request for that resource is initiated.
  1585. User agents often have history mechanisms, such as "Back" buttons and
  1586. history lists, which can be used to redisplay an entity retrieved
  1587. earlier in a session. By default, the Expires field does not apply to
  1588. history mechanisms. If the entity is still in storage, a history
  1589. mechanism should display it even if the entity has expired, unless
  1590. the user has specifically configured the agent to refresh expired
  1591. history documents.
  1592. Note: Applications are encouraged to be tolerant of bad or
  1593. misinformed implementations of the Expires header. A value of zero
  1594. (0) or an invalid date format should be considered equivalent to
  1595. an "expires immediately." Although these values are not legitimate
  1596. for HTTP/1.0, a robust implementation is always desirable.
  1597. Berners-Lee, et al Informational [Page 41]
  1598. RFC 1945 HTTP/1.0 May 1996
  1599. 10.8 From
  1600. The From request-header field, if given, should contain an Internet
  1601. e-mail address for the human user who controls the requesting user
  1602. agent. The address should be machine-usable, as defined by mailbox in
  1603. RFC 822 [7] (as updated by RFC 1123 [6]):
  1604. From = "From" ":" mailbox
  1605. An example is:
  1606. From: webmaster@w3.org
  1607. This header field may be used for logging purposes and as a means for
  1608. identifying the source of invalid or unwanted requests. It should not
  1609. be used as an insecure form of access protection. The interpretation
  1610. of this field is that the request is being performed on behalf of the
  1611. person given, who accepts responsibility for the method performed. In
  1612. particular, robot agents should include this header so that the
  1613. person responsible for running the robot can be contacted if problems
  1614. occur on the receiving end.
  1615. The Internet e-mail address in this field may be separate from the
  1616. Internet host which issued the request. For example, when a request
  1617. is passed through a proxy, the original issuer's address should be
  1618. used.
  1619. Note: The client should not send the From header field without the
  1620. user's approval, as it may conflict with the user's privacy
  1621. interests or their site's security policy. It is strongly
  1622. recommended that the user be able to disable, enable, and modify
  1623. the value of this field at any time prior to a request.
  1624. 10.9 If-Modified-Since
  1625. The If-Modified-Since request-header field is used with the GET
  1626. method to make it conditional: if the requested resource has not been
  1627. modified since the time specified in this field, a copy of the
  1628. resource will not be returned from the server; instead, a 304 (not
  1629. modified) response will be returned without any Entity-Body.
  1630. If-Modified-Since = "If-Modified-Since" ":" HTTP-date
  1631. An example of the field is:
  1632. If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
  1633. Berners-Lee, et al Informational [Page 42]
  1634. RFC 1945 HTTP/1.0 May 1996
  1635. A conditional GET method requests that the identified resource be
  1636. transferred only if it has been modified since the date given by the
  1637. If-Modified-Since header. The algorithm for determining this includes
  1638. the following cases:
  1639. a) If the request would normally result in anything other than
  1640. a 200 (ok) status, or if the passed If-Modified-Since date
  1641. is invalid, the response is exactly the same as for a
  1642. normal GET. A date which is later than the server's current
  1643. time is invalid.
  1644. b) If the resource has been modified since the
  1645. If-Modified-Since date, the response is exactly the same as
  1646. for a normal GET.
  1647. c) If the resource has not been modified since a valid
  1648. If-Modified-Since date, the server shall return a 304 (not
  1649. modified) response.
  1650. The purpose of this feature is to allow efficient updates of cached
  1651. information with a minimum amount of transaction overhead.
  1652. 10.10 Last-Modified
  1653. The Last-Modified entity-header field indicates the date and time at
  1654. which the sender believes the resource was last modified. The exact
  1655. semantics of this field are defined in terms of how the recipient
  1656. should interpret it: if the recipient has a copy of this resource
  1657. which is older than the date given by the Last-Modified field, that
  1658. copy should be considered stale.
  1659. Last-Modified = "Last-Modified" ":" HTTP-date
  1660. An example of its use is
  1661. Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT
  1662. The exact meaning of this header field depends on the implementation
  1663. of the sender and the nature of the original resource. For files, it
  1664. may be just the file system last-modified time. For entities with
  1665. dynamically included parts, it may be the most recent of the set of
  1666. last-modify times for its component parts. For database gateways, it
  1667. may be the last-update timestamp of the record. For virtual objects,
  1668. it may be the last time the internal state changed.
  1669. An origin server must not send a Last-Modified date which is later
  1670. than the server's time of message origination. In such cases, where
  1671. the resource's last modification would indicate some time in the
  1672. Berners-Lee, et al Informational [Page 43]
  1673. RFC 1945 HTTP/1.0 May 1996
  1674. future, the server must replace that date with the message
  1675. origination date.
  1676. 10.11 Location
  1677. The Location response-header field defines the exact location of the
  1678. resource that was identified by the Request-URI. For 3xx responses,
  1679. the location must indicate the server's preferred URL for automatic
  1680. redirection to the resource. Only one absolute URL is allowed.
  1681. Location = "Location" ":" absoluteURI
  1682. An example is
  1683. Location: http://www.w3.org/hypertext/WWW/NewLocation.html
  1684. 10.12 Pragma
  1685. The Pragma general-header field is used to include implementation-
  1686. specific directives that may apply to any recipient along the
  1687. request/response chain. All pragma directives specify optional
  1688. behavior from the viewpoint of the protocol; however, some systems
  1689. may require that behavior be consistent with the directives.
  1690. Pragma = "Pragma" ":" 1#pragma-directive
  1691. pragma-directive = "no-cache" | extension-pragma
  1692. extension-pragma = token [ "=" word ]
  1693. When the "no-cache" directive is present in a request message, an
  1694. application should forward the request toward the origin server even
  1695. if it has a cached copy of what is being requested. This allows a
  1696. client to insist upon receiving an authoritative response to its
  1697. request. It also allows a client to refresh a cached copy which is
  1698. known to be corrupted or stale.
  1699. Pragma directives must be passed through by a proxy or gateway
  1700. application, regardless of their significance to that application,
  1701. since the directives may be applicable to all recipients along the
  1702. request/response chain. It is not possible to specify a pragma for a
  1703. specific recipient; however, any pragma directive not relevant to a
  1704. recipient should be ignored by that recipient.
  1705. 10.13 Referer
  1706. The Referer request-header field allows the client to specify, for
  1707. the server's benefit, the address (URI) of the resource from which
  1708. the Request-URI was obtained. This allows a server to generate lists
  1709. Berners-Lee, et al Informational [Page 44]
  1710. RFC 1945 HTTP/1.0 May 1996
  1711. of back-links to resources for interest, logging, optimized caching,
  1712. etc. It also allows obsolete or mistyped links to be traced for
  1713. maintenance. The Referer field must not be sent if the Request-URI
  1714. was obtained from a source that does not have its own URI, such as
  1715. input from the user keyboard.
  1716. Referer = "Referer" ":" ( absoluteURI | relativeURI )
  1717. Example:
  1718. Referer: http://www.w3.org/hypertext/DataSources/Overview.html
  1719. If a partial URI is given, it should be interpreted relative to the
  1720. Request-URI. The URI must not include a fragment.
  1721. Note: Because the source of a link may be private information or
  1722. may reveal an otherwise private information source, it is strongly
  1723. recommended that the user be able to select whether or not the
  1724. Referer field is sent. For example, a browser client could have a
  1725. toggle switch for browsing openly/anonymously, which would
  1726. respectively enable/disable the sending of Referer and From
  1727. information.
  1728. 10.14 Server
  1729. The Server response-header field contains information about the
  1730. software used by the origin server to handle the request. The field
  1731. can contain multiple product tokens (Section 3.7) and comments
  1732. identifying the server and any significant subproducts. By
  1733. convention, the product tokens are listed in order of their
  1734. significance for identifying the application.
  1735. Server = "Server" ":" 1*( product | comment )
  1736. Example:
  1737. Server: CERN/3.0 libwww/2.17
  1738. If the response is being forwarded through a proxy, the proxy
  1739. application must not add its data to the product list.
  1740. Note: Revealing the specific software version of the server may
  1741. allow the server machine to become more vulnerable to attacks
  1742. against software that is known to contain security holes. Server
  1743. implementors are encouraged to make this field a configurable
  1744. option.
  1745. Berners-Lee, et al Informational [Page 45]
  1746. RFC 1945 HTTP/1.0 May 1996
  1747. Note: Some existing servers fail to restrict themselves to the
  1748. product token syntax within the Server field.
  1749. 10.15 User-Agent
  1750. The User-Agent request-header field contains information about the
  1751. user agent originating the request. This is for statistical purposes,
  1752. the tracing of protocol violations, and automated recognition of user
  1753. agents for the sake of tailoring responses to avoid particular user
  1754. agent limitations. Although it is not required, user agents should
  1755. include this field with requests. The field can contain multiple
  1756. product tokens (Section 3.7) and comments identifying the agent and
  1757. any subproducts which form a significant part of the user agent. By
  1758. convention, the product tokens are listed in order of their
  1759. significance for identifying the application.
  1760. User-Agent = "User-Agent" ":" 1*( product | comment )
  1761. Example:
  1762. User-Agent: CERN-LineMode/2.15 libwww/2.17b3
  1763. Note: Some current proxy applications append their product
  1764. information to the list in the User-Agent field. This is not
  1765. recommended, since it makes machine interpretation of these
  1766. fields ambiguous.
  1767. Note: Some existing clients fail to restrict themselves to
  1768. the product token syntax within the User-Agent field.
  1769. 10.16 WWW-Authenticate
  1770. The WWW-Authenticate response-header field must be included in 401
  1771. (unauthorized) response messages. The field value consists of at
  1772. least one challenge that indicates the authentication scheme(s) and
  1773. parameters applicable to the Request-URI.
  1774. WWW-Authenticate = "WWW-Authenticate" ":" 1#challenge
  1775. The HTTP access authentication process is described in Section 11.
  1776. User agents must take special care in parsing the WWW-Authenticate
  1777. field value if it contains more than one challenge, or if more than
  1778. one WWW-Authenticate header field is provided, since the contents of
  1779. a challenge may itself contain a comma-separated list of
  1780. authentication parameters.
  1781. Berners-Lee, et al Informational [Page 46]
  1782. RFC 1945 HTTP/1.0 May 1996
  1783. 11. Access Authentication
  1784. HTTP provides a simple challenge-response authentication mechanism
  1785. which may be used by a server to challenge a client request and by a
  1786. client to provide authentication information. It uses an extensible,
  1787. case-insensitive token to identify the authentication scheme,
  1788. followed by a comma-separated list of attribute-value pairs which
  1789. carry the parameters necessary for achieving authentication via that
  1790. scheme.
  1791. auth-scheme = token
  1792. auth-param = token "=" quoted-string
  1793. The 401 (unauthorized) response message is used by an origin server
  1794. to challenge the authorization of a user agent. This response must
  1795. include a WWW-Authenticate header field containing at least one
  1796. challenge applicable to the requested resource.
  1797. challenge = auth-scheme 1*SP realm *( "," auth-param )
  1798. realm = "realm" "=" realm-value
  1799. realm-value = quoted-string
  1800. The realm attribute (case-insensitive) is required for all
  1801. authentication schemes which issue a challenge. The realm value
  1802. (case-sensitive), in combination with the canonical root URL of the
  1803. server being accessed, defines the protection space. These realms
  1804. allow the protected resources on a server to be partitioned into a
  1805. set of protection spaces, each with its own authentication scheme
  1806. and/or authorization database. The realm value is a string, generally
  1807. assigned by the origin server, which may have additional semantics
  1808. specific to the authentication scheme.
  1809. A user agent that wishes to authenticate itself with a server--
  1810. usually, but not necessarily, after receiving a 401 response--may do
  1811. so by including an Authorization header field with the request. The
  1812. Authorization field value consists of credentials containing the
  1813. authentication information of the user agent for the realm of the
  1814. resource being requested.
  1815. credentials = basic-credentials
  1816. | ( auth-scheme #auth-param )
  1817. The domain over which credentials can be automatically applied by a
  1818. user agent is determined by the protection space. If a prior request
  1819. has been authorized, the same credentials may be reused for all other
  1820. requests within that protection space for a period of time determined
  1821. Berners-Lee, et al Informational [Page 47]
  1822. RFC 1945 HTTP/1.0 May 1996
  1823. by the authentication scheme, parameters, and/or user preference.
  1824. Unless otherwise defined by the authentication scheme, a single
  1825. protection space cannot extend outside the scope of its server.
  1826. If the server does not wish to accept the credentials sent with a
  1827. request, it should return a 403 (forbidden) response.
  1828. The HTTP protocol does not restrict applications to this simple
  1829. challenge-response mechanism for access authentication. Additional
  1830. mechanisms may be used, such as encryption at the transport level or
  1831. via message encapsulation, and with additional header fields
  1832. specifying authentication information. However, these additional
  1833. mechanisms are not defined by this specification.
  1834. Proxies must be completely transparent regarding user agent
  1835. authentication. That is, they must forward the WWW-Authenticate and
  1836. Authorization headers untouched, and must not cache the response to a
  1837. request containing Authorization. HTTP/1.0 does not provide a means
  1838. for a client to be authenticated with a proxy.
  1839. 11.1 Basic Authentication Scheme
  1840. The "basic" authentication scheme is based on the model that the user
  1841. agent must authenticate itself with a user-ID and a password for each
  1842. realm. The realm value should be considered an opaque string which
  1843. can only be compared for equality with other realms on that server.
  1844. The server will authorize the request only if it can validate the
  1845. user-ID and password for the protection space of the Request-URI.
  1846. There are no optional authentication parameters.
  1847. Upon receipt of an unauthorized request for a URI within the
  1848. protection space, the server should respond with a challenge like the
  1849. following:
  1850. WWW-Authenticate: Basic realm="WallyWorld"
  1851. where "WallyWorld" is the string assigned by the server to identify
  1852. the protection space of the Request-URI.
  1853. To receive authorization, the client sends the user-ID and password,
  1854. separated by a single colon (":") character, within a base64 [5]
  1855. encoded string in the credentials.
  1856. basic-credentials = "Basic" SP basic-cookie
  1857. basic-cookie = <base64 [5] encoding of userid-password,
  1858. except not limited to 76 char/line>
  1859. Berners-Lee, et al Informational [Page 48]
  1860. RFC 1945 HTTP/1.0 May 1996
  1861. userid-password = [ token ] ":" *TEXT
  1862. If the user agent wishes to send the user-ID "Aladdin" and password
  1863. "open sesame", it would use the following header field:
  1864. Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
  1865. The basic authentication scheme is a non-secure method of filtering
  1866. unauthorized access to resources on an HTTP server. It is based on
  1867. the assumption that the connection between the client and the server
  1868. can be regarded as a trusted carrier. As this is not generally true
  1869. on an open network, the basic authentication scheme should be used
  1870. accordingly. In spite of this, clients should implement the scheme in
  1871. order to communicate with servers that use it.
  1872. 12. Security Considerations
  1873. This section is meant to inform application developers, information
  1874. providers, and users of the security limitations in HTTP/1.0 as
  1875. described by this document. The discussion does not include
  1876. definitive solutions to the problems revealed, though it does make
  1877. some suggestions for reducing security risks.
  1878. 12.1 Authentication of Clients
  1879. As mentioned in Section 11.1, the Basic authentication scheme is not
  1880. a secure method of user authentication, nor does it prevent the
  1881. Entity-Body from being transmitted in clear text across the physical
  1882. network used as the carrier. HTTP/1.0 does not prevent additional
  1883. authentication schemes and encryption mechanisms from being employed
  1884. to increase security.
  1885. 12.2 Safe Methods
  1886. The writers of client software should be aware that the software
  1887. represents the user in their interactions over the Internet, and
  1888. should be careful to allow the user to be aware of any actions they
  1889. may take which may have an unexpected significance to themselves or
  1890. others.
  1891. In particular, the convention has been established that the GET and
  1892. HEAD methods should never have the significance of taking an action
  1893. other than retrieval. These methods should be considered "safe." This
  1894. allows user agents to represent other methods, such as POST, in a
  1895. special way, so that the user is made aware of the fact that a
  1896. possibly unsafe action is being requested.
  1897. Berners-Lee, et al Informational [Page 49]
  1898. RFC 1945 HTTP/1.0 May 1996
  1899. Naturally, it is not possible to ensure that the server does not
  1900. generate side-effects as a result of performing a GET request; in
  1901. fact, some dynamic resources consider that a feature. The important
  1902. distinction here is that the user did not request the side-effects,
  1903. so therefore cannot be held accountable for them.
  1904. 12.3 Abuse of Server Log Information
  1905. A server is in the position to save personal data about a user's
  1906. requests which may identify their reading patterns or subjects of
  1907. interest. This information is clearly confidential in nature and its
  1908. handling may be constrained by law in certain countries. People using
  1909. the HTTP protocol to provide data are responsible for ensuring that
  1910. such material is not distributed without the permission of any
  1911. individuals that are identifiable by the published results.
  1912. 12.4 Transfer of Sensitive Information
  1913. Like any generic data transfer protocol, HTTP cannot regulate the
  1914. content of the data that is transferred, nor is there any a priori
  1915. method of determining the sensitivity of any particular piece of
  1916. information within the context of any given request. Therefore,
  1917. applications should supply as much control over this information as
  1918. possible to the provider of that information. Three header fields are
  1919. worth special mention in this context: Server, Referer and From.
  1920. Revealing the specific software version of the server may allow the
  1921. server machine to become more vulnerable to attacks against software
  1922. that is known to contain security holes. Implementors should make the
  1923. Server header field a configurable option.
  1924. The Referer field allows reading patterns to be studied and reverse
  1925. links drawn. Although it can be very useful, its power can be abused
  1926. if user details are not separated from the information contained in
  1927. the Referer. Even when the personal information has been removed, the
  1928. Referer field may indicate a private document's URI whose publication
  1929. would be inappropriate.
  1930. The information sent in the From field might conflict with the user's
  1931. privacy interests or their site's security policy, and hence it
  1932. should not be transmitted without the user being able to disable,
  1933. enable, and modify the contents of the field. The user must be able
  1934. to set the contents of this field within a user preference or
  1935. application defaults configuration.
  1936. We suggest, though do not require, that a convenient toggle interface
  1937. be provided for the user to enable or disable the sending of From and
  1938. Referer information.
  1939. Berners-Lee, et al Informational [Page 50]
  1940. RFC 1945 HTTP/1.0 May 1996
  1941. 12.5 Attacks Based On File and Path Names
  1942. Implementations of HTTP origin servers should be careful to restrict
  1943. the documents returned by HTTP requests to be only those that were
  1944. intended by the server administrators. If an HTTP server translates
  1945. HTTP URIs directly into file system calls, the server must take
  1946. special care not to serve files that were not intended to be
  1947. delivered to HTTP clients. For example, Unix, Microsoft Windows, and
  1948. other operating systems use ".." as a path component to indicate a
  1949. directory level above the current one. On such a system, an HTTP
  1950. server must disallow any such construct in the Request-URI if it
  1951. would otherwise allow access to a resource outside those intended to
  1952. be accessible via the HTTP server. Similarly, files intended for
  1953. reference only internally to the server (such as access control
  1954. files, configuration files, and script code) must be protected from
  1955. inappropriate retrieval, since they might contain sensitive
  1956. information. Experience has shown that minor bugs in such HTTP server
  1957. implementations have turned into security risks.
  1958. 13. Acknowledgments
  1959. This specification makes heavy use of the augmented BNF and generic
  1960. constructs defined by David H. Crocker for RFC 822 [7]. Similarly, it
  1961. reuses many of the definitions provided by Nathaniel Borenstein and
  1962. Ned Freed for MIME [5]. We hope that their inclusion in this
  1963. specification will help reduce past confusion over the relationship
  1964. between HTTP/1.0 and Internet mail message formats.
  1965. The HTTP protocol has evolved considerably over the past four years.
  1966. It has benefited from a large and active developer community--the
  1967. many people who have participated on the www-talk mailing list--and
  1968. it is that community which has been most responsible for the success
  1969. of HTTP and of the World-Wide Web in general. Marc Andreessen, Robert
  1970. Cailliau, Daniel W. Connolly, Bob Denny, Jean-Francois Groff, Phillip
  1971. M. Hallam-Baker, Hakon W. Lie, Ari Luotonen, Rob McCool, Lou
  1972. Montulli, Dave Raggett, Tony Sanders, and Marc VanHeyningen deserve
  1973. special recognition for their efforts in defining aspects of the
  1974. protocol for early versions of this specification.
  1975. Paul Hoffman contributed sections regarding the informational status
  1976. of this document and Appendices C and D.
  1977. Berners-Lee, et al Informational [Page 51]
  1978. RFC 1945 HTTP/1.0 May 1996
  1979. This document has benefited greatly from the comments of all those
  1980. participating in the HTTP-WG. In addition to those already mentioned,
  1981. the following individuals have contributed to this specification:
  1982. Gary Adams Harald Tveit Alvestrand
  1983. Keith Ball Brian Behlendorf
  1984. Paul Burchard Maurizio Codogno
  1985. Mike Cowlishaw Roman Czyborra
  1986. Michael A. Dolan John Franks
  1987. Jim Gettys Marc Hedlund
  1988. Koen Holtman Alex Hopmann
  1989. Bob Jernigan Shel Kaphan
  1990. Martijn Koster Dave Kristol
  1991. Daniel LaLiberte Paul Leach
  1992. Albert Lunde John C. Mallery
  1993. Larry Masinter Mitra
  1994. Jeffrey Mogul Gavin Nicol
  1995. Bill Perry Jeffrey Perry
  1996. Owen Rees Luigi Rizzo
  1997. David Robinson Marc Salomon
  1998. Rich Salz Jim Seidman
  1999. Chuck Shotton Eric W. Sink
  2000. Simon E. Spero Robert S. Thau
  2001. Francois Yergeau Mary Ellen Zurko
  2002. Jean-Philippe Martin-Flatin
  2003. 14. References
  2004. [1] Anklesaria, F., McCahill, M., Lindner, P., Johnson, D.,
  2005. Torrey, D., and B. Alberti, "The Internet Gopher Protocol: A
  2006. Distributed Document Search and Retrieval Protocol", RFC 1436,
  2007. University of Minnesota, March 1993.
  2008. [2] Berners-Lee, T., "Universal Resource Identifiers in WWW: A
  2009. Unifying Syntax for the Expression of Names and Addresses of
  2010. Objects on the Network as used in the World-Wide Web",
  2011. RFC 1630, CERN, June 1994.
  2012. [3] Berners-Lee, T., and D. Connolly, "Hypertext Markup Language -
  2013. 2.0", RFC 1866, MIT/W3C, November 1995.
  2014. [4] Berners-Lee, T., Masinter, L., and M. McCahill, "Uniform
  2015. Resource Locators (URL)", RFC 1738, CERN, Xerox PARC,
  2016. University of Minnesota, December 1994.
  2017. Berners-Lee, et al Informational [Page 52]
  2018. RFC 1945 HTTP/1.0 May 1996
  2019. [5] Borenstein, N., and N. Freed, "MIME (Multipurpose Internet Mail
  2020. Extensions) Part One: Mechanisms for Specifying and Describing
  2021. the Format of Internet Message Bodies", RFC 1521, Bellcore,
  2022. Innosoft, September 1993.
  2023. [6] Braden, R., "Requirements for Internet hosts - Application and
  2024. Support", STD 3, RFC 1123, IETF, October 1989.
  2025. [7] Crocker, D., "Standard for the Format of ARPA Internet Text
  2026. Messages", STD 11, RFC 822, UDEL, August 1982.
  2027. [8] F. Davis, B. Kahle, H. Morris, J. Salem, T. Shen, R. Wang,
  2028. J. Sui, and M. Grinbaum. "WAIS Interface Protocol Prototype
  2029. Functional Specification." (v1.5), Thinking Machines
  2030. Corporation, April 1990.
  2031. [9] Fielding, R., "Relative Uniform Resource Locators", RFC 1808,
  2032. UC Irvine, June 1995.
  2033. [10] Horton, M., and R. Adams, "Standard for interchange of USENET
  2034. Messages", RFC 1036 (Obsoletes RFC 850), AT&T Bell
  2035. Laboratories, Center for Seismic Studies, December 1987.
  2036. [11] Kantor, B., and P. Lapsley, "Network News Transfer Protocol:
  2037. A Proposed Standard for the Stream-Based Transmission of News",
  2038. RFC 977, UC San Diego, UC Berkeley, February 1986.
  2039. [12] Postel, J., "Simple Mail Transfer Protocol." STD 10, RFC 821,
  2040. USC/ISI, August 1982.
  2041. [13] Postel, J., "Media Type Registration Procedure." RFC 1590,
  2042. USC/ISI, March 1994.
  2043. [14] Postel, J., and J. Reynolds, "File Transfer Protocol (FTP)",
  2044. STD 9, RFC 959, USC/ISI, October 1985.
  2045. [15] Reynolds, J., and J. Postel, "Assigned Numbers", STD 2, RFC
  2046. 1700, USC/ISI, October 1994.
  2047. [16] Sollins, K., and L. Masinter, "Functional Requirements for
  2048. Uniform Resource Names", RFC 1737, MIT/LCS, Xerox Corporation,
  2049. December 1994.
  2050. [17] US-ASCII. Coded Character Set - 7-Bit American Standard Code
  2051. for Information Interchange. Standard ANSI X3.4-1986, ANSI,
  2052. 1986.
  2053. Berners-Lee, et al Informational [Page 53]
  2054. RFC 1945 HTTP/1.0 May 1996
  2055. [18] ISO-8859. International Standard -- Information Processing --
  2056. 8-bit Single-Byte Coded Graphic Character Sets --
  2057. Part 1: Latin alphabet No. 1, ISO 8859-1:1987.
  2058. Part 2: Latin alphabet No. 2, ISO 8859-2, 1987.
  2059. Part 3: Latin alphabet No. 3, ISO 8859-3, 1988.
  2060. Part 4: Latin alphabet No. 4, ISO 8859-4, 1988.
  2061. Part 5: Latin/Cyrillic alphabet, ISO 8859-5, 1988.
  2062. Part 6: Latin/Arabic alphabet, ISO 8859-6, 1987.
  2063. Part 7: Latin/Greek alphabet, ISO 8859-7, 1987.
  2064. Part 8: Latin/Hebrew alphabet, ISO 8859-8, 1988.
  2065. Part 9: Latin alphabet No. 5, ISO 8859-9, 1990.
  2066. 15. Authors' Addresses
  2067. Tim Berners-Lee
  2068. Director, W3 Consortium
  2069. MIT Laboratory for Computer Science
  2070. 545 Technology Square
  2071. Cambridge, MA 02139, U.S.A.
  2072. Fax: +1 (617) 258 8682
  2073. EMail: timbl@w3.org
  2074. Roy T. Fielding
  2075. Department of Information and Computer Science
  2076. University of California
  2077. Irvine, CA 92717-3425, U.S.A.
  2078. Fax: +1 (714) 824-4056
  2079. EMail: fielding@ics.uci.edu
  2080. Henrik Frystyk Nielsen
  2081. W3 Consortium
  2082. MIT Laboratory for Computer Science
  2083. 545 Technology Square
  2084. Cambridge, MA 02139, U.S.A.
  2085. Fax: +1 (617) 258 8682
  2086. EMail: frystyk@w3.org
  2087. Berners-Lee, et al Informational [Page 54]
  2088. RFC 1945 HTTP/1.0 May 1996
  2089. Appendices
  2090. These appendices are provided for informational reasons only -- they
  2091. do not form a part of the HTTP/1.0 specification.
  2092. A. Internet Media Type message/http
  2093. In addition to defining the HTTP/1.0 protocol, this document serves
  2094. as the specification for the Internet media type "message/http". The
  2095. following is to be registered with IANA [13].
  2096. Media Type name: message
  2097. Media subtype name: http
  2098. Required parameters: none
  2099. Optional parameters: version, msgtype
  2100. version: The HTTP-Version number of the enclosed message
  2101. (e.g., "1.0"). If not present, the version can be
  2102. determined from the first line of the body.
  2103. msgtype: The message type -- "request" or "response". If
  2104. not present, the type can be determined from the
  2105. first line of the body.
  2106. Encoding considerations: only "7bit", "8bit", or "binary" are
  2107. permitted
  2108. Security considerations: none
  2109. B. Tolerant Applications
  2110. Although this document specifies the requirements for the generation
  2111. of HTTP/1.0 messages, not all applications will be correct in their
  2112. implementation. We therefore recommend that operational applications
  2113. be tolerant of deviations whenever those deviations can be
  2114. interpreted unambiguously.
  2115. Clients should be tolerant in parsing the Status-Line and servers
  2116. tolerant when parsing the Request-Line. In particular, they should
  2117. accept any amount of SP or HT characters between fields, even though
  2118. only a single SP is required.
  2119. The line terminator for HTTP-header fields is the sequence CRLF.
  2120. However, we recommend that applications, when parsing such headers,
  2121. recognize a single LF as a line terminator and ignore the leading CR.
  2122. Berners-Lee, et al Informational [Page 55]
  2123. RFC 1945 HTTP/1.0 May 1996
  2124. C. Relationship to MIME
  2125. HTTP/1.0 uses many of the constructs defined for Internet Mail (RFC
  2126. 822 [7]) and the Multipurpose Internet Mail Extensions (MIME [5]) to
  2127. allow entities to be transmitted in an open variety of
  2128. representations and with extensible mechanisms. However, RFC 1521
  2129. discusses mail, and HTTP has a few features that are different than
  2130. those described in RFC 1521. These differences were carefully chosen
  2131. to optimize performance over binary connections, to allow greater
  2132. freedom in the use of new media types, to make date comparisons
  2133. easier, and to acknowledge the practice of some early HTTP servers
  2134. and clients.
  2135. At the time of this writing, it is expected that RFC 1521 will be
  2136. revised. The revisions may include some of the practices found in
  2137. HTTP/1.0 but not in RFC 1521.
  2138. This appendix describes specific areas where HTTP differs from RFC
  2139. 1521. Proxies and gateways to strict MIME environments should be
  2140. aware of these differences and provide the appropriate conversions
  2141. where necessary. Proxies and gateways from MIME environments to HTTP
  2142. also need to be aware of the differences because some conversions may
  2143. be required.
  2144. C.1 Conversion to Canonical Form
  2145. RFC 1521 requires that an Internet mail entity be converted to
  2146. canonical form prior to being transferred, as described in Appendix G
  2147. of RFC 1521 [5]. Section 3.6.1 of this document describes the forms
  2148. allowed for subtypes of the "text" media type when transmitted over
  2149. HTTP.
  2150. RFC 1521 requires that content with a Content-Type of "text"
  2151. represent line breaks as CRLF and forbids the use of CR or LF outside
  2152. of line break sequences. HTTP allows CRLF, bare CR, and bare LF to
  2153. indicate a line break within text content when a message is
  2154. transmitted over HTTP.
  2155. Where it is possible, a proxy or gateway from HTTP to a strict RFC
  2156. 1521 environment should translate all line breaks within the text
  2157. media types described in Section 3.6.1 of this document to the RFC
  2158. 1521 canonical form of CRLF. Note, however, that this may be
  2159. complicated by the presence of a Content-Encoding and by the fact
  2160. that HTTP allows the use of some character sets which do not use
  2161. octets 13 and 10 to represent CR and LF, as is the case for some
  2162. multi-byte character sets.
  2163. Berners-Lee, et al Informational [Page 56]
  2164. RFC 1945 HTTP/1.0 May 1996
  2165. C.2 Conversion of Date Formats
  2166. HTTP/1.0 uses a restricted set of date formats (Section 3.3) to
  2167. simplify the process of date comparison. Proxies and gateways from
  2168. other protocols should ensure that any Date header field present in a
  2169. message conforms to one of the HTTP/1.0 formats and rewrite the date
  2170. if necessary.
  2171. C.3 Introduction of Content-Encoding
  2172. RFC 1521 does not include any concept equivalent to HTTP/1.0's
  2173. Content-Encoding header field. Since this acts as a modifier on the
  2174. media type, proxies and gateways from HTTP to MIME-compliant
  2175. protocols must either change the value of the Content-Type header
  2176. field or decode the Entity-Body before forwarding the message. (Some
  2177. experimental applications of Content-Type for Internet mail have used
  2178. a media-type parameter of ";conversions=<content-coding>" to perform
  2179. an equivalent function as Content-Encoding. However, this parameter
  2180. is not part of RFC 1521.)
  2181. C.4 No Content-Transfer-Encoding
  2182. HTTP does not use the Content-Transfer-Encoding (CTE) field of RFC
  2183. 1521. Proxies and gateways from MIME-compliant protocols to HTTP must
  2184. remove any non-identity CTE ("quoted-printable" or "base64") encoding
  2185. prior to delivering the response message to an HTTP client.
  2186. Proxies and gateways from HTTP to MIME-compliant protocols are
  2187. responsible for ensuring that the message is in the correct format
  2188. and encoding for safe transport on that protocol, where "safe
  2189. transport" is defined by the limitations of the protocol being used.
  2190. Such a proxy or gateway should label the data with an appropriate
  2191. Content-Transfer-Encoding if doing so will improve the likelihood of
  2192. safe transport over the destination protocol.
  2193. C.5 HTTP Header Fields in Multipart Body-Parts
  2194. In RFC 1521, most header fields in multipart body-parts are generally
  2195. ignored unless the field name begins with "Content-". In HTTP/1.0,
  2196. multipart body-parts may contain any HTTP header fields which are
  2197. significant to the meaning of that part.
  2198. D. Additional Features
  2199. This appendix documents protocol elements used by some existing HTTP
  2200. implementations, but not consistently and correctly across most
  2201. HTTP/1.0 applications. Implementors should be aware of these
  2202. features, but cannot rely upon their presence in, or interoperability
  2203. Berners-Lee, et al Informational [Page 57]
  2204. RFC 1945 HTTP/1.0 May 1996
  2205. with, other HTTP/1.0 applications.
  2206. D.1 Additional Request Methods
  2207. D.1.1 PUT
  2208. The PUT method requests that the enclosed entity be stored under the
  2209. supplied Request-URI. If the Request-URI refers to an already
  2210. existing resource, the enclosed entity should be considered as a
  2211. modified version of the one residing on the origin server. If the
  2212. Request-URI does not point to an existing resource, and that URI is
  2213. capable of being defined as a new resource by the requesting user
  2214. agent, the origin server can create the resource with that URI.
  2215. The fundamental difference between the POST and PUT requests is
  2216. reflected in the different meaning of the Request-URI. The URI in a
  2217. POST request identifies the resource that will handle the enclosed
  2218. entity as data to be processed. That resource may be a data-accepting
  2219. process, a gateway to some other protocol, or a separate entity that
  2220. accepts annotations. In contrast, the URI in a PUT request identifies
  2221. the entity enclosed with the request -- the user agent knows what URI
  2222. is intended and the server should not apply the request to some other
  2223. resource.
  2224. D.1.2 DELETE
  2225. The DELETE method requests that the origin server delete the resource
  2226. identified by the Request-URI.
  2227. D.1.3 LINK
  2228. The LINK method establishes one or more Link relationships between
  2229. the existing resource identified by the Request-URI and other
  2230. existing resources.
  2231. D.1.4 UNLINK
  2232. The UNLINK method removes one or more Link relationships from the
  2233. existing resource identified by the Request-URI.
  2234. D.2 Additional Header Field Definitions
  2235. D.2.1 Accept
  2236. The Accept request-header field can be used to indicate a list of
  2237. media ranges which are acceptable as a response to the request. The
  2238. asterisk "*" character is used to group media types into ranges, with
  2239. "*/*" indicating all media types and "type/*" indicating all subtypes
  2240. Berners-Lee, et al Informational [Page 58]
  2241. RFC 1945 HTTP/1.0 May 1996
  2242. of that type. The set of ranges given by the client should represent
  2243. what types are acceptable given the context of the request.
  2244. D.2.2 Accept-Charset
  2245. The Accept-Charset request-header field can be used to indicate a
  2246. list of preferred character sets other than the default US-ASCII and
  2247. ISO-8859-1. This field allows clients capable of understanding more
  2248. comprehensive or special-purpose character sets to signal that
  2249. capability to a server which is capable of representing documents in
  2250. those character sets.
  2251. D.2.3 Accept-Encoding
  2252. The Accept-Encoding request-header field is similar to Accept, but
  2253. restricts the content-coding values which are acceptable in the
  2254. response.
  2255. D.2.4 Accept-Language
  2256. The Accept-Language request-header field is similar to Accept, but
  2257. restricts the set of natural languages that are preferred as a
  2258. response to the request.
  2259. D.2.5 Content-Language
  2260. The Content-Language entity-header field describes the natural
  2261. language(s) of the intended audience for the enclosed entity. Note
  2262. that this may not be equivalent to all the languages used within the
  2263. entity.
  2264. D.2.6 Link
  2265. The Link entity-header field provides a means for describing a
  2266. relationship between the entity and some other resource. An entity
  2267. may include multiple Link values. Links at the metainformation level
  2268. typically indicate relationships like hierarchical structure and
  2269. navigation paths.
  2270. D.2.7 MIME-Version
  2271. HTTP messages may include a single MIME-Version general-header field
  2272. to indicate what version of the MIME protocol was used to construct
  2273. the message. Use of the MIME-Version header field, as defined by RFC
  2274. 1521 [5], should indicate that the message is MIME-conformant.
  2275. Unfortunately, some older HTTP/1.0 servers send it indiscriminately,
  2276. and thus this field should be ignored.
  2277. Berners-Lee, et al Informational [Page 59]
  2278. RFC 1945 HTTP/1.0 May 1996
  2279. D.2.8 Retry-After
  2280. The Retry-After response-header field can be used with a 503 (service
  2281. unavailable) response to indicate how long the service is expected to
  2282. be unavailable to the requesting client. The value of this field can
  2283. be either an HTTP-date or an integer number of seconds (in decimal)
  2284. after the time of the response.
  2285. D.2.9 Title
  2286. The Title entity-header field indicates the title of the entity.
  2287. D.2.10 URI
  2288. The URI entity-header field may contain some or all of the Uniform
  2289. Resource Identifiers (Section 3.2) by which the Request-URI resource
  2290. can be identified. There is no guarantee that the resource can be
  2291. accessed using the URI(s) specified.
  2292. Berners-Lee, et al Informational [Page 60]