source: draft-ietf-httpbis/orig/rfc2817.html @ 698

Last change on this file since 698 was 598, checked in by julian.reschke@…, 14 years ago

fix Makefile, add RFC 2817/2818, re-gen HTML

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/html
File size: 48.7 KB
1<!DOCTYPE html
2  PUBLIC "-//W3C//DTD HTML 4.01//EN">
3<html lang="en">
4   <head profile="">
5      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6      <title>Upgrading to TLS Within HTTP/1.1</title><style type="text/css" title="Xml2Rfc (sans serif)">
7a {
8  text-decoration: none;
10a.smpl {
11  color: black;
13a:hover {
14  text-decoration: underline;
16a:active {
17  text-decoration: underline;
19address {
20  margin-top: 1em;
21  margin-left: 2em;
22  font-style: normal;
24body {
25  color: black;
26  font-family: verdana, helvetica, arial, sans-serif;
27  font-size: 10pt;
29cite {
30  font-style: normal;
32dd {
33  margin-right: 2em;
35dl {
36  margin-left: 2em;
39dl.empty dd {
40  margin-top: .5em;
42dl p {
43  margin-left: 0em;
45dt {
46  margin-top: .5em;
48h1 {
49  font-size: 14pt;
50  line-height: 21pt;
51  page-break-after: avoid;
52} {
54  page-break-before: always;
56h1 a {
57  color: #333333;
59h2 {
60  font-size: 12pt;
61  line-height: 15pt;
62  page-break-after: avoid;
64h3, h4, h5, h6 {
65  font-size: 10pt;
66  page-break-after: avoid;
68h2 a, h3 a, h4 a, h5 a, h6 a {
69  color: black;
71img {
72  margin-left: 3em;
74li {
75  margin-left: 2em;
76  margin-right: 2em;
78ol {
79  margin-left: 2em;
80  margin-right: 2em;
82ol p {
83  margin-left: 0em;
85p {
86  margin-left: 2em;
87  margin-right: 2em;
89pre {
90  margin-left: 3em;
91  background-color: lightyellow;
92  padding: .25em;
94pre.text2 {
95  border-style: dotted;
96  border-width: 1px;
97  background-color: #f0f0f0;
98  width: 69em;
100pre.inline {
101  background-color: white;
102  padding: 0em;
104pre.text {
105  border-style: dotted;
106  border-width: 1px;
107  background-color: #f8f8f8;
108  width: 69em;
110pre.drawing {
111  border-style: solid;
112  border-width: 1px;
113  background-color: #f8f8f8;
114  padding: 2em;
116table {
117  margin-left: 2em;
119table.header {
120  width: 95%;
121  font-size: 10pt;
122  color: white;
123} {
125  vertical-align: top;
127td.topnowrap {
128  vertical-align: top;
129  white-space: nowrap;
131td.header {
132  background-color: gray;
133  width: 50%;
135td.header a {
136  color: white;
138td.reference {
139  vertical-align: top;
140  white-space: nowrap;
141  padding-right: 1em;
143thead {
144  display:table-header-group;
146ul.toc {
147  list-style: none;
148  margin-left: 1.5em;
149  margin-right: 0em;
150  padding-left: 0em;
152li.tocline0 {
153  line-height: 150%;
154  font-weight: bold;
155  font-size: 10pt;
156  margin-left: 0em;
157  margin-right: 0em;
159li.tocline1 {
160  line-height: normal;
161  font-weight: normal;
162  font-size: 9pt;
163  margin-left: 0em;
164  margin-right: 0em;
166li.tocline2 {
167  font-size: 0pt;
169ul p {
170  margin-left: 0em;
172.bcp14 {
173  font-style: normal;
174  text-transform: lowercase;
175  font-variant: small-caps;
177.comment {
178  background-color: yellow;
179} {
181  text-align: center;
183.error {
184  color: red;
185  font-style: italic;
186  font-weight: bold;
188.figure {
189  font-weight: bold;
190  text-align: center;
191  font-size: 9pt;
193.filename {
194  color: #333333;
195  font-weight: bold;
196  font-size: 12pt;
197  line-height: 21pt;
198  text-align: center;
200.fn {
201  font-weight: bold;
203.hidden {
204  display: none;
206.left {
207  text-align: left;
209.right {
210  text-align: right;
212.title {
213  color: #990000;
214  font-size: 18pt;
215  line-height: 18pt;
216  font-weight: bold;
217  text-align: center;
218  margin-top: 36pt;
220.vcardline {
221  display: block;
223.warning {
224  font-size: 14pt;
225  background-color: yellow;
229@media print {
230  .noprint {
231    display: none;
232  }
234  a {
235    color: black;
236    text-decoration: none;
237  }
239  table.header {
240    width: 90%;
241  }
243  td.header {
244    width: 50%;
245    color: black;
246    background-color: white;
247    vertical-align: top;
248    font-size: 12pt;
249  }
251  ul.toc a::after {
252    content: leader('.') target-counter(attr(href), page);
253  }
255  a.iref {
256    content: target-counter(attr(href), page);
257  }
259  .print2col {
260    column-count: 2;
261    -moz-column-count: 2;
262    column-fill: auto;
263  }
266@page {
267  @top-left {
268       content: "RFC 2817";
269  }
270  @top-right {
271       content: "May 2000";
272  }
273  @top-center {
274       content: "Upgrading to TLS Within HTTP/1.1";
275  }
276  @bottom-left {
277       content: "Khare & Lawrence";
278  }
279  @bottom-center {
280       content: "Standards Track";
281  }
282  @bottom-right {
283       content: "[Page " counter(page) "]";
284  }
287@page:first {
288    @top-left {
289      content: normal;
290    }
291    @top-right {
292      content: normal;
293    }
294    @top-center {
295      content: normal;
296    }
298</style><link rel="Contents" href="#rfc.toc">
299      <link rel="Author" href="#rfc.authors">
300      <link rel="Copyright" href="#rfc.copyright">
301      <link rel="Chapter" title="1 Motivation" href="#rfc.section.1">
302      <link rel="Chapter" title="2 Introduction" href="#rfc.section.2">
303      <link rel="Chapter" title="3 Client Requested Upgrade to HTTP over TLS" href="#rfc.section.3">
304      <link rel="Chapter" title="4 Server Requested Upgrade to HTTP over TLS" href="#rfc.section.4">
305      <link rel="Chapter" title="5 Upgrade across Proxies" href="#rfc.section.5">
306      <link rel="Chapter" title="6 Rationale for the use of a 4xx (client error) Status Code" href="#rfc.section.6">
307      <link rel="Chapter" title="7 IANA Considerations" href="#rfc.section.7">
308      <link rel="Chapter" title="8 Security Considerations" href="#rfc.section.8">
309      <link rel="Chapter" href="#rfc.section.9" title="9 References">
310      <link rel="Appendix" title="A Acknowledgments" href="#rfc.section.A">
311      <link rel="Alternate" title="Authorative ASCII Version" href="">
312      <link rel="Help" title="Additional Information on" href="">
313      <meta name="generator" content=", Revision 1.438, 2009-05-27 13:34:05, XSLT vendor: SAXON 8.9 from Saxonica">
314      <link rel="schema.DC" href="">
315      <meta name="DC.Creator" content="Khare, R.">
316      <meta name="DC.Creator" content="Lawrence, S.">
317      <meta name="DC.Identifier" content="urn:ietf:rfc:2817">
318      <meta name="DC.Date.Issued" scheme="ISO8601" content="2000-05">
319      <meta name="DC.Description.Abstract" content="This memo explains how to use the Upgrade mechanism in HTTP/1.1 to initiate Transport Layer Security (TLS) over an existing TCP connection. This allows unsecured and secured HTTP traffic to share the same well known port (in this case, http: at 80 rather than https: at 443). It also enables &#34;virtual hosting&#34;, so a single HTTP + TLS server can disambiguate traffic intended for several hostnames at a single IP address. Since HTTP/1.1 defines Upgrade as a hop-by-hop mechanism, this memo also documents the HTTP CONNECT method for establishing end-to-end tunnels across HTTP proxies. Finally, this memo establishes new IANA registries for public HTTP status codes, as well as public or private Upgrade product tokens. This memo does NOT affect the current definition of the 'https' URI scheme, which already defines a separate namespace ( and are not equivalent).">
320      <meta name="DC.isPartOf" content="urn:ISSN:2070-1721">
321   </head>
322   <body>
323      <table summary="header information" class="header" border="0" cellpadding="1" cellspacing="1">
324         <tr>
325            <td class="header left">Network Working Group</td>
326            <td class="header right">R. Khare</td>
327         </tr>
328         <tr>
329            <td class="header left">Request for Comments: 2817</td>
330            <td class="header right">4K Associates / UC Irvine</td>
331         </tr>
332         <tr>
333            <td class="header left">Updates: <a href="">2616</a></td>
334            <td class="header right">S. Lawrence</td>
335         </tr>
336         <tr>
337            <td class="header left">Category: Standards Track</td>
338            <td class="header right">Agranat Systems, Inc.</td>
339         </tr>
340         <tr>
341            <td class="header left"></td>
342            <td class="header right">May 2000</td>
343         </tr>
344      </table>
345      <p class="title">Upgrading to TLS Within HTTP/1.1</p>
346      <h1><a id="rfc.status" href="#rfc.status">Status of this Memo</a></h1>
347      <p>This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions
348         for improvements. Please refer to the current edition of the “Internet Official Protocol Standards” (STD 1) for the standardization
349         state and status of this protocol. Distribution of this memo is unlimited.
350      </p>
351      <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1>
352      <p>Copyright © The Internet Society (2000). All Rights Reserved.</p>
353      <h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1>
354      <p>This memo explains how to use the Upgrade mechanism in HTTP/1.1 to initiate Transport Layer Security (TLS) over an existing
355         TCP connection. This allows unsecured and secured HTTP traffic to share the same well known port (in this case, http: at 80
356         rather than https: at 443). It also enables "virtual hosting", so a single HTTP + TLS server can disambiguate traffic intended
357         for several hostnames at a single IP address.
358      </p> 
359      <p>Since HTTP/1.1 <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[1]</cite></a> defines Upgrade as a hop-by-hop mechanism, this memo also documents the HTTP CONNECT method for establishing end-to-end tunnels
360         across HTTP proxies. Finally, this memo establishes new IANA registries for public HTTP status codes, as well as public or
361         private Upgrade product tokens.
362      </p> 
363      <p>This memo does NOT affect the current definition of the 'https' URI scheme, which already defines a separate namespace (
364         and are not equivalent).
365      </p>
366      <hr class="noprint">
367      <h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1>
368      <ul class="toc">
369         <li class="tocline0">1.&nbsp;&nbsp;&nbsp;<a href="#rfc.section.1">Motivation</a></li>
370         <li class="tocline0">2.&nbsp;&nbsp;&nbsp;<a href="#rfc.section.2">Introduction</a><ul class="toc">
371               <li class="tocline1">2.1&nbsp;&nbsp;&nbsp;<a href="#rfc.section.2.1">Requirements Terminology</a></li>
372            </ul>
373         </li>
374         <li class="tocline0">3.&nbsp;&nbsp;&nbsp;<a href="">Client Requested Upgrade to HTTP over TLS</a><ul class="toc">
375               <li class="tocline1">3.1&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.1">Optional Upgrade</a></li>
376               <li class="tocline1">3.2&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.2">Mandatory Upgrade</a></li>
377               <li class="tocline1">3.3&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.3">Server Acceptance of Upgrade Request</a></li>
378            </ul>
379         </li>
380         <li class="tocline0">4.&nbsp;&nbsp;&nbsp;<a href="">Server Requested Upgrade to HTTP over TLS</a><ul class="toc">
381               <li class="tocline1">4.1&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.1">Optional Advertisement</a></li>
382               <li class="tocline1">4.2&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.2">Mandatory Advertisement</a></li>
383            </ul>
384         </li>
385         <li class="tocline0">5.&nbsp;&nbsp;&nbsp;<a href="#upgrade.across.proxies">Upgrade across Proxies</a><ul class="toc">
386               <li class="tocline1">5.1&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5.1">Implications of Hop By Hop Upgrade</a></li>
387               <li class="tocline1">5.2&nbsp;&nbsp;&nbsp;<a href="#requesting.a.tunnel.with.connect">Requesting a Tunnel with CONNECT</a></li>
388               <li class="tocline1">5.3&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5.3">Establishing a Tunnel with CONNECT</a></li>
389            </ul>
390         </li>
391         <li class="tocline0">6.&nbsp;&nbsp;&nbsp;<a href="#rationale.for.the.use.of.a.4xx.status.code">Rationale for the use of a 4xx (client error) Status Code</a></li>
392         <li class="tocline0">7.&nbsp;&nbsp;&nbsp;<a href="#rfc.section.7">IANA Considerations</a><ul class="toc">
393               <li class="tocline1">7.1&nbsp;&nbsp;&nbsp;<a href="#rfc.section.7.1">HTTP Status Code Registry</a></li>
394               <li class="tocline1">7.2&nbsp;&nbsp;&nbsp;<a href="#rfc.section.7.2">HTTP Upgrade Token Registry</a></li>
395            </ul>
396         </li>
397         <li class="tocline0">8.&nbsp;&nbsp;&nbsp;<a href="#rfc.section.8">Security Considerations</a><ul class="toc">
398               <li class="tocline1">8.1&nbsp;&nbsp;&nbsp;<a href="#rfc.section.8.1">Implications for the https: URI Scheme</a></li>
399               <li class="tocline1">8.2&nbsp;&nbsp;&nbsp;<a href="#rfc.section.8.2">Security Considerations for CONNECT</a></li>
400            </ul>
401         </li>
402         <li class="tocline0">9.&nbsp;&nbsp;&nbsp;<a href="#rfc.references">References</a></li>
403         <li class="tocline0"><a href="#rfc.authors">Authors' Addresses</a></li>
404         <li class="tocline0">A.&nbsp;&nbsp;&nbsp;<a href="#rfc.section.A">Acknowledgments</a></li>
405         <li class="tocline0"><a href="#rfc.ipr">Intellectual Property and Copyright Statements</a></li>
406      </ul>
407      <hr class="noprint">
408      <h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;Motivation
409      </h1>
410      <p id="rfc.section.1.p.1">The historical practice of deploying HTTP over SSL3 <a href="#RFC2818"><cite title="HTTP Over TLS">[3]</cite></a> has distinguished the combination from HTTP alone by a unique URI scheme and the TCP port number. The scheme 'http' meant
411         the HTTP protocol alone on port 80, while 'https' meant the HTTP protocol over SSL on port 443. Parallel well-known port numbers
412         have similarly been requested -- and in some cases, granted -- to distinguish between secured and unsecured use of other application
413         protocols (e.g. snews, ftps). This approach effectively halves the number of available well known ports.
414      </p>
415      <p id="rfc.section.1.p.2">At the Washington DC IETF meeting in December 1997, the Applications Area Directors and the IESG reaffirmed that the practice
416         of issuing parallel "secure" port numbers should be deprecated. The HTTP/1.1 Upgrade mechanism can apply Transport Layer Security <a href="#RFC2246"><cite title="The TLS Protocol Version 1.0">[6]</cite></a> to an open HTTP connection.
417      </p>
418      <p id="rfc.section.1.p.3">In the nearly two years since, there has been broad acceptance of the concept behind this proposal, but little interest in
419         implementing alternatives to port 443 for generic Web browsing. In fact, nothing in this memo affects the current interpretation
420         of https: URIs. However, new application protocols built atop HTTP, such as the Internet Printing Protocol <a href="#RFC2565"><cite title="Internet Printing Protocol/1.0: Encoding and Transport">[7]</cite></a>, call for just such a mechanism in order to move ahead in the IETF standards process.
421      </p>
422      <p id="rfc.section.1.p.4">The Upgrade mechanism also solves the "virtual hosting" problem. Rather than allocating multiple IP addresses to a single
423         host, an HTTP/1.1 server will use the Host: header to disambiguate the intended web service. As HTTP/1.1 usage has grown more
424         prevalent, more ISPs are offering name-based virtual hosting, thus delaying IP address space exhaustion.
425      </p>
426      <p id="rfc.section.1.p.5">TLS (and SSL) have been hobbled by the same limitation as earlier versions of HTTP: the initial handshake does not specify
427         the intended hostname, relying exclusively on the IP address. Using a cleartext HTTP/1.1 Upgrade: preamble to the TLS handshake
428         -- choosing the certificates based on the initial Host: header -- will allow ISPs to provide secure name-based virtual hosting
429         as well.
430      </p>
431      <hr class="noprint">
432      <h1 id="rfc.section.2" class="np"><a href="#rfc.section.2">2.</a>&nbsp;Introduction
433      </h1>
434      <p id="rfc.section.2.p.1">TLS, a.k.a., SSL (Secure Sockets Layer), establishes a private end-to-end connection, optionally including strong mutual authentication,
435         using a variety of cryptosystems. Initially, a handshake phase uses three subprotocols to set up a record layer, authenticate
436         endpoints, set parameters, as well as report errors. Then, there is an ongoing layered record protocol that handles encryption,
437         compression, and reassembly for the remainder of the connection. The latter is intended to be completely transparent. For
438         example, there is no dependency between TLS's record markers and or certificates and HTTP/1.1's chunked encoding or authentication.
439      </p>
440      <p id="rfc.section.2.p.2">Either the client or server can use the HTTP/1.1 <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[1]</cite></a> Upgrade mechanism (<a href="">Section 14.42</a>) to indicate that a TLS-secured connection is desired or necessary. This memo defines the "TLS/1.0" Upgrade token, and a
441         new HTTP Status Code, "426 Upgrade Required".
442      </p>
443      <p id="rfc.section.2.p.3"> <a href="" title="Client Requested Upgrade to HTTP over TLS">Section&nbsp;3</a> and <a href="" title="Server Requested Upgrade to HTTP over TLS">Section&nbsp;4</a> describe the operation of a directly connected client and server. Intermediate proxies must establish an end-to-end tunnel
444         before applying those operations, as explained in <a href="#upgrade.across.proxies" title="Upgrade across Proxies">Section&nbsp;5</a>.
445      </p>
446      <h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a>&nbsp;Requirements Terminology
447      </h2>
448      <p id="rfc.section.2.1.p.1">Keywords "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT" and "MAY" that appear in this document are to be interpreted
449         as described in RFC 2119 <a href="#RFC2119"><cite title="Key words for use in RFCs to Indicate Requirement Levels">[11]</cite></a>.
450      </p>
451      <hr class="noprint">
452      <h1 id="rfc.section.3" class="np"><a href="#rfc.section.3">3.</a>&nbsp;<a id="" href="">Client Requested Upgrade to HTTP over TLS</a></h1>
453      <p id="rfc.section.3.p.1">When the client sends an HTTP/1.1 request with an Upgrade header field containing the token "TLS/1.0", it is requesting the
454         server to complete the current HTTP/1.1 request after switching to TLS/1.0.
455      </p>
456      <h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a>&nbsp;Optional Upgrade
457      </h2>
458      <p id="rfc.section.3.1.p.1">A client <em class="bcp14">MAY</em> offer to switch to secured operation during any clear HTTP request when an unsecured response would be acceptable:
459      </p>
460      <div id="rfc.figure.u.1"></div><pre class="text2">
461    GET HTTP/1.1
462    Host:
463    Upgrade: TLS/1.0
464    Connection: Upgrade
465</pre><p id="rfc.section.3.1.p.3">In this case, the server <em class="bcp14">MAY</em> respond to the clear HTTP operation normally, OR switch to secured operation (as detailed in the next section).
466      </p>
467      <p id="rfc.section.3.1.p.4">Note that HTTP/1.1 <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[1]</cite></a> specifies "the upgrade keyword <em class="bcp14">MUST</em> be supplied within a Connection header field (section 14.10) whenever Upgrade is present in an HTTP/1.1 message".
468      </p>
469      <h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a>&nbsp;Mandatory Upgrade
470      </h2>
471      <p id="rfc.section.3.2.p.1">If an unsecured response would be unacceptable, a client <em class="bcp14">MUST</em> send an OPTIONS request first to complete the switch to TLS/1.0 (if possible).
472      </p>
473      <div id="rfc.figure.u.2"></div><pre class="text2">
474    OPTIONS * HTTP/1.1
475    Host:
476    Upgrade: TLS/1.0
477    Connection: Upgrade
478</pre><h2 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a>&nbsp;Server Acceptance of Upgrade Request
479      </h2>
480      <p id="rfc.section.3.3.p.1">As specified in HTTP/1.1 <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[1]</cite></a>, if the server is prepared to initiate the TLS handshake, it <em class="bcp14">MUST</em> send the intermediate "101 Switching Protocol" and <em class="bcp14">MUST</em> include an Upgrade response header specifying the tokens of the protocol stack it is switching to:
481      </p>
482      <div id="rfc.figure.u.3"></div><pre class="text">
483    HTTP/1.1 101 Switching Protocols
484    Upgrade: TLS/1.0, HTTP/1.1
485    Connection: Upgrade
486</pre><p id="rfc.section.3.3.p.3">Note that the protocol tokens listed in the Upgrade header of a 101 Switching Protocols response specify an ordered 'bottom-up'
487         stack.
488      </p>
489      <p id="rfc.section.3.3.p.4">As specified in HTTP/1.1 <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[1]</cite></a>, <a href="">Section 10.1.2</a>: "The server will switch protocols to those defined by the response's Upgrade header field immediately after the empty line
490         which terminates the 101 response".
491      </p>
492      <p id="rfc.section.3.3.p.5">Once the TLS handshake completes successfully, the server <em class="bcp14">MUST</em> continue with the response to the original request. Any TLS handshake failure <em class="bcp14">MUST</em> lead to disconnection, per the TLS error alert specification.
493      </p>
494      <hr class="noprint">
495      <h1 id="rfc.section.4" class="np"><a href="#rfc.section.4">4.</a>&nbsp;<a id="" href="">Server Requested Upgrade to HTTP over TLS</a></h1>
496      <p id="rfc.section.4.p.1">The Upgrade response header field advertises possible protocol upgrades a server <em class="bcp14">MAY</em> accept. In conjunction with the "426 Upgrade Required" status code, a server can advertise the exact protocol upgrade(s) that
497         a client <em class="bcp14">MUST</em> accept to complete the request.
498      </p>
499      <h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a>&nbsp;Optional Advertisement
500      </h2>
501      <p id="rfc.section.4.1.p.1">As specified in HTTP/1.1 <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[1]</cite></a>, the server <em class="bcp14">MAY</em> include an Upgrade header in any response other than 101 or 426 to indicate a willingness to switch to any (combination) of
502         the protocols listed.
503      </p>
504      <h2 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2</a>&nbsp;Mandatory Advertisement
505      </h2>
506      <p id="rfc.section.4.2.p.1">A server <em class="bcp14">MAY</em> indicate that a client request can not be completed without TLS using the "426 Upgrade Required" status code, which <em class="bcp14">MUST</em> include an an Upgrade header field specifying the token of the required TLS version.
507      </p>
508      <div id="rfc.figure.u.4"></div><pre class="text2">
509    HTTP/1.1 426 Upgrade Required
510    Upgrade: TLS/1.0, HTTP/1.1
511    Connection: Upgrade
512</pre><p id="rfc.section.4.2.p.3">The server <em class="bcp14">SHOULD</em> include a message body in the 426 response which indicates in human readable form the reason for the error and describes any
513         alternative courses which may be available to the user.
514      </p>
515      <p id="rfc.section.4.2.p.4">Note that even if a client is willing to use TLS, it must use the operations in <a href="" title="Client Requested Upgrade to HTTP over TLS">Section&nbsp;3</a> to proceed; the TLS handshake cannot begin immediately after the 426 response.
516      </p>
517      <hr class="noprint">
518      <h1 id="rfc.section.5" class="np"><a href="#rfc.section.5">5.</a>&nbsp;<a id="upgrade.across.proxies" href="#upgrade.across.proxies">Upgrade across Proxies</a></h1>
519      <p id="rfc.section.5.p.1">As a hop-by-hop header, Upgrade is negotiated between each pair of HTTP counterparties. If a User Agent sends a request with
520         an Upgrade header to a proxy, it is requesting a change to the protocol between itself and the proxy, not an end-to-end change.
521      </p>
522      <p id="rfc.section.5.p.2">Since TLS, in particular, requires end-to-end connectivity to provide authentication and prevent man-in-the-middle attacks,
523         this memo specifies the CONNECT method to establish a tunnel across proxies.
524      </p>
525      <p id="rfc.section.5.p.3">Once a tunnel is established, any of the operations in <a href="" title="Client Requested Upgrade to HTTP over TLS">Section&nbsp;3</a> can be used to establish a TLS connection.
526      </p>
527      <h2 id="rfc.section.5.1"><a href="#rfc.section.5.1">5.1</a>&nbsp;Implications of Hop By Hop Upgrade
528      </h2>
529      <p id="rfc.section.5.1.p.1">If an origin server receives an Upgrade header from a proxy and responds with a 101 Switching Protocols response, it is changing
530         the protocol only on the connection between the proxy and itself. Similarly, a proxy might return a 101 response to its client
531         to change the protocol on that connection independently of the protocols it is using to communicate toward the origin server.
532      </p>
533      <p id="rfc.section.5.1.p.2">These scenarios also complicate diagnosis of a 426 response. Since Upgrade is a hop-by-hop header, a proxy that does not recognize
534         426 might remove the accompanying Upgrade header and prevent the client from determining the required protocol switch. If
535         a client receives a 426 status without an accompanying Upgrade header, it will need to request an end to end tunnel connection
536         as described in <a href="#requesting.a.tunnel.with.connect" title="Requesting a Tunnel with CONNECT">Section&nbsp;5.2</a> and repeat the request in order to obtain the required upgrade information.
537      </p>
538      <p id="rfc.section.5.1.p.3">This hop-by-hop definition of Upgrade was a deliberate choice. It allows for incremental deployment on either side of proxies,
539         and for optimized protocols between cascaded proxies without the knowledge of the parties that are not a part of the change.
540      </p>
541      <h2 id="rfc.section.5.2"><a href="#rfc.section.5.2">5.2</a>&nbsp;<a id="requesting.a.tunnel.with.connect" href="#requesting.a.tunnel.with.connect">Requesting a Tunnel with CONNECT</a></h2>
542      <p id="rfc.section.5.2.p.1">A CONNECT method requests that a proxy establish a tunnel connection on its behalf. The Request-URI portion of the Request-Line
543         is always an 'authority' as defined by URI Generic Syntax <a href="#RFC2396"><cite title="Uniform Resource Identifiers (URI): Generic Syntax">[2]</cite></a>, which is to say the host name and port number destination of the requested connection separated by a colon:
544      </p>
545      <div id="rfc.figure.u.5"></div><pre class="text2">
546   CONNECT HTTP/1.1
547   Host:
548</pre><p id="rfc.section.5.2.p.3">Other HTTP mechanisms can be used normally with the CONNECT method -- except end-to-end protocol Upgrade requests, of course,
549         since the tunnel must be established first.
550      </p>
551      <p id="rfc.section.5.2.p.4">For example, proxy authentication might be used to establish the authority to create a tunnel:</p>
552      <div id="rfc.figure.u.6"></div><pre class="text2">
553   CONNECT HTTP/1.1
554   Host:
555   Proxy-Authorization: basic aGVsbG86d29ybGQ=
556</pre><p id="rfc.section.5.2.p.6">Like any other pipelined HTTP/1.1 request, data to be tunneled may be sent immediately after the blank line. The usual caveats
557         also apply: data may be discarded if the eventual response is negative, and the connection may be reset with no response if
558         more than one TCP segment is outstanding.
559      </p>
560      <h2 id="rfc.section.5.3"><a href="#rfc.section.5.3">5.3</a>&nbsp;Establishing a Tunnel with CONNECT
561      </h2>
562      <p id="rfc.section.5.3.p.1">Any successful (2xx) response to a CONNECT request indicates that the proxy has established a connection to the requested
563         host and port, and has switched to tunneling the current connection to that server connection.
564      </p>
565      <p id="rfc.section.5.3.p.2">It may be the case that the proxy itself can only reach the requested origin server through another proxy. In this case, the
566         first proxy <em class="bcp14">SHOULD</em> make a CONNECT request of that next proxy, requesting a tunnel to the authority. A proxy <em class="bcp14">MUST NOT</em> respond with any 2xx status code unless it has either a direct or tunnel connection established to the authority.
567      </p>
568      <p id="rfc.section.5.3.p.3">An origin server which receives a CONNECT request for itself <em class="bcp14">MAY</em> respond with a 2xx status code to indicate that a connection is established.
569      </p>
570      <p id="rfc.section.5.3.p.4">If at any point either one of the peers gets disconnected, any outstanding data that came from that peer will be passed to
571         the other one, and after that also the other connection will be terminated by the proxy. If there is outstanding data to that
572         peer undelivered, that data will be discarded.
573      </p>
574      <hr class="noprint">
575      <h1 id="rfc.section.6" class="np"><a href="#rfc.section.6">6.</a>&nbsp;<a id="rationale.for.the.use.of.a.4xx.status.code" href="#rationale.for.the.use.of.a.4xx.status.code">Rationale for the use of a 4xx (client error) Status Code</a></h1>
576      <p id="rfc.section.6.p.1">Reliable, interoperable negotiation of Upgrade features requires an unambiguous failure signal. The 426 Upgrade Required status
577         code allows a server to definitively state the precise protocol extensions a given resource must be served with.
578      </p>
579      <p id="rfc.section.6.p.2">It might at first appear that the response should have been some form of redirection (a 3xx code), by analogy to an old-style
580         redirection to an https: URI. User agents that do not understand Upgrade: preclude this.
581      </p>
582      <p id="rfc.section.6.p.3">Suppose that a 3xx code had been assigned for "Upgrade Required"; a user agent that did not recognize it would treat it as
583         300. It would then properly look for a "Location" header in the response and attempt to repeat the request at the URL in that
584         header field. Since it did not know to Upgrade to incorporate the TLS layer, it would at best fail again at the new URL.
585      </p>
586      <hr class="noprint">
587      <h1 id="rfc.section.7" class="np"><a href="#rfc.section.7">7.</a>&nbsp;IANA Considerations
588      </h1>
589      <p id="rfc.section.7.p.1">IANA shall create registries for two name spaces, as described in BCP 26 <a href="#RFC2434"><cite title="Guidelines for Writing an IANA Considerations Section in RFCs">[10]</cite></a>:
590      </p>
591      <ul>
592         <li>HTTP Status Codes</li>
593         <li>HTTP Upgrade Tokens</li>
594      </ul>
595      <h2 id="rfc.section.7.1"><a href="#rfc.section.7.1">7.1</a>&nbsp;HTTP Status Code Registry
596      </h2>
597      <p id="rfc.section.7.1.p.1">The HTTP Status Code Registry defines the name space for the Status-Code token in the Status line of an HTTP response. The
598         initial values for this name space are those specified by:
599      </p>
600      <ol>
601         <li>Draft Standard for HTTP/1.1 <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[1]</cite></a></li>
602         <li>Web Distributed Authoring and Versioning <a href="#RFC2518"><cite title="HTTP Extensions for Distributed Authoring -- WEBDAV">[4]</cite></a> [defines 420-424]
603         </li>
604         <li>WebDAV Advanced Collections <a href="#ADVCOL"><cite title="WebDAV Advanced Collection Protocol">[5]</cite></a> (Work in Progress) [defines 425]
605         </li>
606         <li><a href="#rationale.for.the.use.of.a.4xx.status.code" title="Rationale for the use of a 4xx (client error) Status Code">Section&nbsp;6</a> [defines 426]
607         </li>
608      </ol>
609      <p id="rfc.section.7.1.p.2">Values to be added to this name space <em class="bcp14">SHOULD</em> be subject to review in the form of a standards track document within the IETF Applications Area. Any such document <em class="bcp14">SHOULD</em> be traceable through statuses of either 'Obsoletes' or 'Updates' to the Draft Standard for HTTP/1.1 <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[1]</cite></a>.
610      </p>
611      <h2 id="rfc.section.7.2"><a href="#rfc.section.7.2">7.2</a>&nbsp;HTTP Upgrade Token Registry
612      </h2>
613      <p id="rfc.section.7.2.p.1">The HTTP Upgrade Token Registry defines the name space for product tokens used to identify protocols in the Upgrade HTTP header
614         field. Each registered token should be associated with one or a set of specifications, and with contact information.
615      </p>
616      <p id="rfc.section.7.2.p.2">The Draft Standard for HTTP/1.1 <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[1]</cite></a> specifies that these tokens obey the production for 'product':
617      </p>
618      <div id="rfc.figure.u.7"></div><pre class="inline">
619   product         = token ["/" product-version]
620   product-version = token
621</pre><p id="rfc.section.7.2.p.4">Registrations should be allowed on a First Come First Served basis as described in BCP 26 <a href="#RFC2434"><cite title="Guidelines for Writing an IANA Considerations Section in RFCs">[10]</cite></a>. These specifications need not be IETF documents or be subject to IESG review, but should obey the following rules:
622      </p>
623      <ol>
624         <li>A token, once registered, stays registered forever.</li>
625         <li>The registration <em class="bcp14">MUST</em> name a responsible party for the registration.
626         </li>
627         <li>The registration <em class="bcp14">MUST</em> name a point of contact.
628         </li>
629         <li>The registration <em class="bcp14">MAY</em> name the documentation required for the token.
630         </li>
631         <li>The responsible party <em class="bcp14">MAY</em> change the registration at any time. The IANA will keep a record of all such changes, and make them available upon request.
632         </li>
633         <li>The responsible party for the first registration of a "product" token <em class="bcp14">MUST</em> approve later registrations of a "version" token together with that "product" token before they can be registered.
634         </li>
635         <li>If absolutely required, the IESG <em class="bcp14">MAY</em> reassign the responsibility for a token. This will normally only be used in the case when a responsible party cannot be contacted.
636         </li>
637      </ol>
638      <p id="rfc.section.7.2.p.5">This specification defines the protocol token "TLS/1.0" as the identifier for the protocol specified by The TLS Protocol <a href="#RFC2246"><cite title="The TLS Protocol Version 1.0">[6]</cite></a>.
639      </p>
640      <p id="rfc.section.7.2.p.6">It is NOT required that specifications for upgrade tokens be made publicly available, but the contact information for the
641         registration <em class="bcp14">SHOULD</em> be.
642      </p>
643      <hr class="noprint">
644      <h1 id="rfc.section.8" class="np"><a href="#rfc.section.8">8.</a>&nbsp;Security Considerations
645      </h1>
646      <p id="rfc.section.8.p.1">The potential for a man-in-the-middle attack (deleting the Upgrade header) remains the same as current, mixed http/https practice: </p>
647      <ul>
648         <li>Removing the Upgrade header is similar to rewriting web pages to change https:// links to http:// links.</li>
649         <li>The risk is only present if the server is willing to vend such information over both a secure and an insecure channel in the
650            first place.
651         </li>
652         <li>If the client knows for a fact that a server is TLS-compliant, it can insist on it by only sending an Upgrade request with
653            a no-op method like OPTIONS.
654         </li>
655         <li>Finally, as the https: specification warns, "users should carefully examine the certificate presented by the server to determine
656            if it meets their expectations".
657         </li>
658      </ul>
659      <p id="rfc.section.8.p.2">Furthermore, for clients that do not explicitly try to invoke TLS, servers can use the Upgrade header in any response other
660         than 101 or 426 to advertise TLS compliance. Since TLS compliance should be considered a feature of the server and not the
661         resource at hand, it should be sufficient to send it once, and let clients cache that fact.
662      </p>
663      <h2 id="rfc.section.8.1"><a href="#rfc.section.8.1">8.1</a>&nbsp;Implications for the https: URI Scheme
664      </h2>
665      <p id="rfc.section.8.1.p.1">While nothing in this memo affects the definition of the 'https' URI scheme, widespread adoption of this mechanism for HyperText
666         content could use 'http' to identify both secure and non-secure resources.
667      </p>
668      <p id="rfc.section.8.1.p.2">The choice of what security characteristics are required on the connection is left to the client and server. This allows either
669         party to use any information available in making this determination. For example, user agents may rely on user preference
670         settings or information about the security of the network such as 'TLS required on all POST operations not on my local net',
671         or servers may apply resource access rules such as 'the FORM on this page must be served and submitted using TLS'.
672      </p>
673      <h2 id="rfc.section.8.2"><a href="#rfc.section.8.2">8.2</a>&nbsp;Security Considerations for CONNECT
674      </h2>
675      <p id="rfc.section.8.2.p.1">A generic TCP tunnel is fraught with security risks. First, such authorization should be limited to a small number of known
676         ports. The Upgrade: mechanism defined here only requires onward tunneling at port 80. Second, since tunneled data is opaque
677         to the proxy, there are additional risks to tunneling to other well-known or reserved ports. A putative HTTP client CONNECTing
678         to port 25 could relay spam via SMTP, for example.
679      </p>
680      <h1 class="np" id="rfc.references"><a href="#rfc.section.9" id="rfc.section.9">9.</a> References
681      </h1>
682      <table summary="References">
683         <tr>
684            <td class="reference"><b id="RFC2616">[1]</b></td>
685            <td class="top"><a href="" title="University of California, Irvine">Fielding, R.</a>, <a href="" title="W3C">Gettys, J.</a>, <a href="" title="Compaq Computer Corporation">Mogul, J.</a>, <a href="" title="MIT Laboratory for Computer Science">Frystyk, H.</a>, <a href="" title="Xerox Corporation">Masinter, L.</a>, <a href="" title="Microsoft Corporation">Leach, P.</a>, and <a href="" title="W3C">T. Berners-Lee</a>, “<a href="">Hypertext Transfer Protocol -- HTTP/1.1</a>”, RFC&nbsp;2616, June&nbsp;1999.
686            </td>
687         </tr> 
688         <tr>
689            <td class="reference"><b id="RFC2396">[2]</b></td>
690            <td class="top"><a href="" title="World Wide Web Consortium">Berners-Lee, T.</a>, <a href="" title="University of California, Irvine">Fielding, R.T.</a>, and <a href="" title="Xerox PARC">L. Masinter</a>, “<a href="">Uniform Resource Identifiers (URI): Generic Syntax</a>”, RFC&nbsp;2396, August&nbsp;1998.
691            </td>
692         </tr> 
693         <tr>
694            <td class="reference"><b id="RFC2818">[3]</b></td>
695            <td class="top"><a href="" title="RTFM, Inc.">Rescorla, E.</a>, “<a href="">HTTP Over TLS</a>”, RFC&nbsp;2818, May&nbsp;2000.
696            </td>
697         </tr> 
698         <tr>
699            <td class="reference"><b id="RFC2518">[4]</b></td>
700            <td class="top"><a href="" title="Microsoft Corporation">Goland, Y.</a>, <a href="" title="Dept. Of Information and Computer Science, University of California, Irvine">Whitehead, E.</a>, <a href="" title="Netscape">Faizi, A.</a>, <a href="" title="Novell">Carter, S.R.</a>, and <a href="" title="Novell">D. Jensen</a>, “<a href="">HTTP Extensions for Distributed Authoring -- WEBDAV</a>”, RFC&nbsp;2518, February&nbsp;1999.
701            </td>
702         </tr> 
703         <tr>
704            <td class="reference"><b id="ADVCOL">[5]</b></td>
705            <td class="top">Slein, J. and E.J. Whitehead, “WebDAV Advanced Collection Protocol”.<br>Work In Progress.
706            </td>
707         </tr> 
708         <tr>
709            <td class="reference"><b id="RFC2246">[6]</b></td>
710            <td class="top"><a href="" title="Certicom">Dierks, T.</a> and <a href="" title="Certicom">C. Allen</a>, “<a href="">The TLS Protocol Version 1.0</a>”, RFC&nbsp;2246, January&nbsp;1999.
711            </td>
712         </tr> 
713         <tr>
714            <td class="reference"><b id="RFC2565">[7]</b></td>
715            <td class="top"><a href="" title="Xerox Corporation">Herriot, R.</a>, <a href="" title="Hewlett-Packard">Butler, S.</a>, <a href="" title="Microsoft">Moore, P.</a>, and <a href="" title="Sharp Laboratories">R. Turner</a>, “<a href="">Internet Printing Protocol/1.0: Encoding and Transport</a>”, RFC&nbsp;2565, April&nbsp;1999.
716            </td>
717         </tr> 
718         <tr>
719            <td class="reference"><b id="Luo97">[8]</b></td>
720            <td class="top">Luotonen, A., “Tunneling TCP based protocols through Web proxy servers”.<br>Work In Progress. (Also available in: Luotonen, Ari. Web Proxy Servers, Prentice-Hall, 1997 ISBN:0136806120.)
721            </td>
722         </tr> 
723         <tr>
724            <td class="reference"><b id="RFC2629">[9]</b></td>
725            <td class="top"><a href="" title="Invisible Worlds, Inc.">Rose, M.T.</a>, “<a href="">Writing I-Ds and RFCs using XML</a>”, RFC&nbsp;2629, June&nbsp;1999.
726            </td>
727         </tr> 
728         <tr>
729            <td class="reference"><b id="RFC2434">[10]</b></td>
730            <td class="top"><a href="" title="IBM Corporation">Narten, T.</a> and <a href="" title="Maxware">H.T. Alvestrand</a>, “<a href="">Guidelines for Writing an IANA Considerations Section in RFCs</a>”, BCP&nbsp;26, RFC&nbsp;2434, October&nbsp;1998.
731            </td>
732         </tr> 
733         <tr>
734            <td class="reference"><b id="RFC2119">[11]</b></td>
735            <td class="top"><a href="" title="Harvard University">Bradner, S.</a>, “<a href="">Key words for use in RFCs to Indicate Requirement Levels</a>”, BCP&nbsp;14, RFC&nbsp;2119, March&nbsp;1997.
736            </td>
737         </tr>
738      </table>
739      <hr class="noprint">
740      <h1 id="rfc.authors" class="np"><a href="#rfc.authors">Authors' Addresses</a></h1>
741      <address class="vcard"><span class="vcardline"><span class="fn">Rohit Khare</span><span class="n hidden"><span class="family-name">Khare</span><span class="given-name">Rohit</span></span></span><span class="org vcardline">4K Associates / UC Irvine</span><span class="vcardline">EMail: <a href=""><span class="email"></span></a></span></address>
742      <address class="vcard"><span class="vcardline"><span class="fn">Scott Lawrence</span><span class="n hidden"><span class="family-name">Lawrence</span><span class="given-name">Scott</span></span></span><span class="org vcardline">Agranat Systems, Inc.</span><span class="vcardline">EMail: <a href=""><span class="email"></span></a></span></address>
743      <hr class="noprint">
744      <h1 id="rfc.section.A" class="np"><a href="#rfc.section.A">A.</a>&nbsp;Acknowledgments
745      </h1>
746      <p id="rfc.section.A.p.1">The CONNECT method was originally described in a Work in Progress titled, "Tunneling TCP based protocols through Web proxy
747         servers", <a href="#Luo97"><cite title="Tunneling TCP based protocols through Web proxy servers">[8]</cite></a> by Ari Luotonen of Netscape Communications Corporation. It was widely implemented by HTTP proxies, but was never made a part
748         of any IETF Standards Track document. The method name CONNECT was reserved, but not defined in <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[1]</cite></a>.
749      </p>
750      <p id="rfc.section.A.p.2">The definition provided here is derived directly from that earlier memo, with some editorial changes and conformance to the
751         stylistic conventions since established in other HTTP specifications.
752      </p>
753      <p id="rfc.section.A.p.3">Additional Thanks to: </p>
754      <ul>
755         <li>Paul Hoffman for his work on the STARTTLS command extension for ESMTP.</li>
756         <li>Roy Fielding for assistance with the rationale behind Upgrade: and its interaction with OPTIONS.</li>
757         <li>Eric Rescorla for his work on standardizing the existing https: practice to compare with.</li>
758         <li>Marshall Rose, for the xml2rfc document type description and tools <a href="#RFC2629"><cite title="Writing I-Ds and RFCs using XML">[9]</cite></a>.
759         </li>
760         <li>Jim Whitehead, for sorting out the current range of available HTTP status codes.</li>
761         <li>Henrik Frystyk Nielsen, whose work on the Mandatory extension mechanism pointed out a hop-by-hop Upgrade still requires tunneling.</li>
762         <li>Harald Alvestrand for improvements to the token registration rules.</li>
763      </ul>
764      <h1><a id="rfc.copyright" href="#rfc.copyright">Full Copyright Statement</a></h1>
765      <p>Copyright © The Internet Society (2000). All Rights Reserved.</p>
766      <p>This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise
767         explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without
768         restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative
769         works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references
770         to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards
771         in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to
772         translate it into languages other than English.
773      </p>
774      <p>The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assignees.</p>
775      <p>This document and the information contained herein is provided on an “AS IS” basis and THE INTERNET SOCIETY AND THE INTERNET
778         PURPOSE.
779      </p>
780      <hr class="noprint">
781      <h1 class="np"><a id="rfc.ipr" href="#rfc.ipr">Intellectual Property</a></h1>
782      <p>The IETF takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed
783         to pertain to the implementation or use of the technology described in this document or the extent to which any license under
784         such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights.
785         Information on the IETF's procedures with respect to rights in standards-track and standards-related documentation can be
786         found in BCP-11. Copies of claims of rights made available for publication and any assurances of licenses to be made available,
787         or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors
788         or users of this specification can be obtained from the IETF Secretariat.
789      </p>
790      <p>The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary
791         rights which may cover technology that may be required to practice this standard. Please address the information to the IETF
792         Executive Director.
793      </p>
794      <h1>Acknowledgment</h1>
795      <p>Funding for the RFC Editor function is currently provided by the Internet Society.</p>
796   </body>
Note: See TracBrowser for help on using the repository browser.