Ignore:
Timestamp:
14/06/14 11:20:37 (7 years ago)
Author:
julian.reschke@…
Message:

update to latest version of rfc2629.xslt, regen all HTML

Location:
draft-ietf-httpbis-http2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • draft-ietf-httpbis-http2/00/draft-ietf-httpbis-http2.html

    r2011 r2726  
    22  PUBLIC "-//W3C//DTD HTML 4.01//EN">
    33<html lang="en">
    4    <head profile="http://www.w3.org/2006/03/hcard http://dublincore.org/documents/2008/08/04/dc-html/">
     4   <head profile="http://dublincore.org/documents/2008/08/04/dc-html/">
    55      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    66      <title>SPDY Protocol</title><script>
    77var buttonsAdded = false;
    88
    9 function init() {
     9function initFeedback() {
    1010  var fb = document.createElement("div");
    1111  fb.className = "feedback noprint";
     
    2222  toggleButtonsToElementsByName("h3");
    2323  toggleButtonsToElementsByName("h4");
    24  
     24
    2525  buttonsAdded = !buttonsAdded;
    2626}
     
    3535function toggleButton(node) {
    3636  if (! buttonsAdded) {
    37  
     37
    3838    // docname
    3939    var template = "mailto:ietf-http-wg@w3.org?subject={docname},%20%22{section}%22&body=<{ref}>:";
     
    5858      ref += "#" + id;
    5959    }
    60    
     60
    6161    // docname
    6262    var docname = "draft-ietf-httpbis-http2-00";
     
    6565    var section = node.textContent;
    6666    section = section.replace("\u00a0", " ");
    67    
     67
    6868    // build URI from template
    6969    var uri = template.replace("{docname}", encodeURIComponent(docname));
    7070    uri = uri.replace("{section}", encodeURIComponent(section));
    7171    uri = uri.replace("{ref}", encodeURIComponent(ref));
    72  
     72
    7373    var button = document.createElement("a");
    7474    button.className = "fbbutton noprint";
     
    106106body {
    107107  color: black;
    108   font-family: verdana, helvetica, arial, sans-serif;
    109   font-size: 10pt;
     108  font-family: cambria, helvetica, arial, sans-serif;
     109  font-size: 11pt;
    110110  margin-right: 2em;
    111111}
     
    129129}
    130130h1 {
    131   font-size: 14pt;
     131  font-size: 130%;
    132132  line-height: 21pt;
    133133  page-break-after: avoid;
     
    136136  page-break-before: always;
    137137}
    138 h1 a {
    139   color: #333333;
    140 }
    141138h2 {
    142   font-size: 12pt;
     139  font-size: 120%;
    143140  line-height: 15pt;
    144141  page-break-after: avoid;
    145142}
    146 h3, h4, h5, h6 {
    147   font-size: 10pt;
     143h3 {
     144  font-size: 110%;
    148145  page-break-after: avoid;
    149146}
    150 h2 a, h3 a, h4 a, h5 a, h6 a {
     147h4, h5, h6 {
     148  page-break-after: avoid;
     149}
     150h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    151151  color: black;
    152152}
     
    178178  page-break-inside: avoid;
    179179}
    180 pre.ccmarker {
    181   background-color: white;
    182   color: gray;
    183 }
    184 pre.ccmarker > span {
    185   font-size: small;
    186 }
    187 pre.cct {
    188   margin-bottom: -1em;
    189 }
    190 pre.ccb {
    191   margin-top: -1em;
    192 }
    193180pre.text2 {
    194181  border-style: dotted;
     
    219206  border-spacing: 1px;
    220207  width: 95%;
    221   font-size: 10pt;
     208  font-size: 11pt;
    222209  color: white;
    223210}
     
    227214td.topnowrap {
    228215  vertical-align: top;
    229   white-space: nowrap; 
     216  white-space: nowrap;
    230217}
    231218table.header td {
     
    249236  line-height: 150%;
    250237  font-weight: bold;
    251   font-size: 10pt;
    252238  margin-left: 0em;
    253239}
     
    255241  line-height: normal;
    256242  font-weight: normal;
    257   font-size: 9pt;
     243  font-size: 10pt;
    258244  margin-left: 0em;
    259245}
     
    263249ul p {
    264250  margin-left: 0em;
     251}
     252.title, .filename, h1, h2, h3, h4 {
     253  font-family: candara, helvetica, arial, sans-serif;
     254}
     255samp, tt, code, pre {
     256  font: consolas, monospace;
    265257}
    266258ul.ind, ul.ind ul {
     
    298290  font-weight: bold;
    299291  text-align: center;
    300   font-size: 9pt;
     292  font-size: 10pt;
    301293}
    302294.filename {
    303295  color: #333333;
     296  font-size: 75%;
    304297  font-weight: bold;
    305   font-size: 12pt;
    306298  line-height: 21pt;
    307299  text-align: center;
     
    310302  font-weight: bold;
    311303}
    312 .hidden {
    313   display: none;
    314 }
    315304.left {
    316305  text-align: left;
     
    320309}
    321310.title {
    322   color: #990000;
    323   font-size: 18pt;
     311  color: green;
     312  font-size: 150%;
    324313  line-height: 18pt;
    325314  font-weight: bold;
     
    327316  margin-top: 36pt;
    328317}
    329 .vcardline {
    330   display: block;
    331 }
    332318.warning {
    333   font-size: 14pt;
     319  font-size: 130%;
    334320  background-color: yellow;
    335321}
     
    359345    display: none;
    360346  }
    361  
     347
    362348  a {
    363349    color: black;
     
    374360    background-color: white;
    375361    vertical-align: top;
    376     font-size: 12pt;
     362    font-size: 110%;
    377363  }
    378364
     
    380366    content: leader('.') target-counter(attr(href), page);
    381367  }
    382  
     368
    383369  ul.ind li li a {
    384370    content: target-counter(attr(href), page);
    385371  }
    386  
     372
    387373  .print2col {
    388374    column-count: 2;
     
    394380@page {
    395381  @top-left {
    396        content: "Internet-Draft"; 
    397   } 
     382       content: "Internet-Draft";
     383  }
    398384  @top-right {
    399        content: "November 2012"; 
    400   } 
     385       content: "November 2012";
     386  }
    401387  @top-center {
    402        content: "SPDY"; 
    403   } 
     388       content: "SPDY";
     389  }
    404390  @bottom-left {
    405        content: "Belshe, et al."; 
    406   } 
     391       content: "Belshe, et al.";
     392  }
    407393  @bottom-center {
    408        content: "Expires June 1, 2013"; 
    409   } 
     394       content: "Expires June 1, 2013";
     395  }
    410396  @bottom-right {
    411        content: "[Page " counter(page) "]"; 
    412   } 
    413 }
    414 
    415 @page:first { 
     397       content: "[Page " counter(page) "]";
     398  }
     399}
     400
     401@page:first {
    416402    @top-left {
    417403      content: normal;
     
    439425      <link rel="Chapter" href="#rfc.section.10" title="10 Normative References">
    440426      <link rel="Appendix" title="A Change Log (to be removed by RFC Editor before publication)" href="#rfc.section.A">
    441       <meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.588, 2012-08-25 12:28:24, XSLT vendor: SAXON 8.9 from Saxonica http://www.saxonica.com/">
     427      <meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.640, 2014/06/13 12:42:58, XSLT vendor: SAXON 8.9 from Saxonica http://www.saxonica.com/">
    442428      <meta name="keywords" content="HTTP">
    443429      <link rel="schema.dct" href="http://purl.org/dc/terms/">
     
    451437      <meta name="description" content="This document describes SPDY, a protocol designed for low-latency transport of content over the World Wide Web. SPDY introduces two layers of protocol. The lower layer is a general purpose framing layer which can be used atop a reliable transport (likely TCP) for multiplexed, prioritized, and compressed data communication of many concurrent streams. The upper layer of the protocol provides HTTP-like RFC2616 semantics for compatibility with existing HTTP application servers.">
    452438   </head>
    453    <body onload="init();">
     439   <body onload="initFeedback();">
    454440      <table class="header">
    455441         <tbody>
     
    493479      </table>
    494480      <p class="title">SPDY Protocol<br><span class="filename">draft-ietf-httpbis-http2-00</span></p>
    495       <h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1> 
     481      <h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1>
    496482      <p>This document describes SPDY, a protocol designed for low-latency transport of content over the World Wide Web. SPDY introduces
    497483         two layers of protocol. The lower layer is a general purpose framing layer which can be used atop a reliable transport (likely
    498484         TCP) for multiplexed, prioritized, and compressed data communication of many concurrent streams. The upper layer of the protocol
    499485         provides HTTP-like <a href="#RFC2616">RFC2616</a> <cite title="Hypertext Transfer Protocol -- HTTP/1.1" id="rfc.xref.RFC2616.1">[RFC2616]</cite> semantics for compatibility with existing HTTP application servers.
    500       </p> 
    501       <h1 id="rfc.note.1"><a href="#rfc.note.1">Editorial Note (To be removed by RFC Editor)</a></h1> 
    502       <p>This draft is a work-in-progress, and does not yet reflect Working Group consensus.</p> 
     486      </p>
     487      <h1 id="rfc.note.1"><a href="#rfc.note.1">Editorial Note (To be removed by RFC Editor)</a></h1>
     488      <p>This draft is a work-in-progress, and does not yet reflect Working Group consensus.</p>
    503489      <p>This first draft uses the SPDY Protocol as a starting point, as per the Working Group's charter. Future drafts will add, remove
    504490         and change text, based upon the Working Group's decisions.
    505       </p> 
     491      </p>
    506492      <p>Discussion of this draft takes place on the HTTPBIS working group mailing list (ietf-http-wg@w3.org), which is archived at &lt;<a href="http://lists.w3.org/Archives/Public/ietf-http-wg/">http://lists.w3.org/Archives/Public/ietf-http-wg/</a>&gt;.
    507       </p> 
     493      </p>
    508494      <p>The current issues list is at &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/report/21">http://tools.ietf.org/wg/httpbis/trac/report/21</a>&gt; and related documents (including fancy diffs) can be found at &lt;<a href="http://tools.ietf.org/wg/httpbis/">http://tools.ietf.org/wg/httpbis/</a>&gt;.
    509       </p> 
     495      </p>
    510496      <p>The changes in this draft are summarized in <a href="#changes.since.draft-mbelshe-httpbis-spdy-00" title="Since draft-mbelshe-httpbis-spdy-00">Appendix&nbsp;A.1</a>.
    511       </p>
    512       <h1><a id="rfc.status" href="#rfc.status">Status of This Memo</a></h1>
    513       <p>This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.</p>
    514       <p>Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute
    515          working documents as Internet-Drafts. The list of current Internet-Drafts is at <a href="http://datatracker.ietf.org/drafts/current/">http://datatracker.ietf.org/drafts/current/</a>.
    516497      </p>
    517       <p>Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other
    518          documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as “work
    519          in progress”.
    520       </p>
    521       <p>This Internet-Draft will expire on June 1, 2013.</p>
    522       <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1>
    523       <p>Copyright © 2012 IETF Trust and the persons identified as the document authors. All rights reserved.</p>
    524       <p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights
    525          and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License
    526          text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified
    527          BSD License.
    528       </p>
     498      <div id="rfc.status">
     499         <h1><a href="#rfc.status">Status of This Memo</a></h1>
     500         <p>This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.</p>
     501         <p>Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute
     502            working documents as Internet-Drafts. The list of current Internet-Drafts is at <a href="http://datatracker.ietf.org/drafts/current/">http://datatracker.ietf.org/drafts/current/</a>.
     503         </p>
     504         <p>Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other
     505            documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as “work
     506            in progress”.
     507         </p>
     508         <p>This Internet-Draft will expire on June 1, 2013.</p>
     509      </div>
     510      <div id="rfc.copyrightnotice">
     511         <h1><a href="#rfc.copyrightnotice">Copyright Notice</a></h1>
     512         <p>Copyright © 2012 IETF Trust and the persons identified as the document authors. All rights reserved.</p>
     513         <p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights
     514            and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License
     515            text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified
     516            BSD License.
     517         </p>
     518      </div>
    529519      <hr class="noprint">
    530520      <h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1>
     
    544534               <li><a href="#rfc.section.2.3">2.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.2.3">Streams</a><ul>
    545535                     <li><a href="#rfc.section.2.3.1">2.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#StreamFrames">Stream frames</a></li>
    546                      <li><a href="#rfc.section.2.3.2">2.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#StreamCreation">Stream creation</a><ul>
    547                            <li><a href="#rfc.section.2.3.2.1">2.3.2.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.2.3.2.1">Unidirectional streams</a></li>
    548                            <li><a href="#rfc.section.2.3.2.2">2.3.2.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.2.3.2.2">Bidirectional streams</a></li>
    549                         </ul>
    550                      </li>
     536                     <li><a href="#rfc.section.2.3.2">2.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#StreamCreation">Stream creation</a></li>
    551537                     <li><a href="#rfc.section.2.3.3">2.3.3</a>&nbsp;&nbsp;&nbsp;<a href="#StreamPriority">Stream priority</a></li>
    552538                     <li><a href="#rfc.section.2.3.4">2.3.4</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.2.3.4">Stream headers</a></li>
     
    572558                     <li><a href="#rfc.section.2.6.8">2.6.8</a>&nbsp;&nbsp;&nbsp;<a href="#WINDOW_UPDATE">WINDOW_UPDATE</a></li>
    573559                     <li><a href="#rfc.section.2.6.9">2.6.9</a>&nbsp;&nbsp;&nbsp;<a href="#CREDENTIAL">CREDENTIAL</a></li>
    574                      <li><a href="#rfc.section.2.6.10">2.6.10</a>&nbsp;&nbsp;&nbsp;<a href="#HeaderBlock">Name/Value Header Block</a><ul>
    575                            <li><a href="#rfc.section.2.6.10.1">2.6.10.1</a>&nbsp;&nbsp;&nbsp;<a href="#Compression">Compression</a></li>
    576                         </ul>
    577                      </li>
     560                     <li><a href="#rfc.section.2.6.10">2.6.10</a>&nbsp;&nbsp;&nbsp;<a href="#HeaderBlock">Name/Value Header Block</a></li>
    578561                  </ul>
    579562               </li>
     
    588571                     <li><a href="#rfc.section.3.2.1">3.2.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.2.1">Request</a></li>
    589572                     <li><a href="#rfc.section.3.2.2">3.2.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.2.2">Response</a></li>
    590                      <li><a href="#rfc.section.3.2.3">3.2.3</a>&nbsp;&nbsp;&nbsp;<a href="#Authentication">Authentication</a><ul>
    591                            <li><a href="#rfc.section.3.2.3.1">3.2.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.2.3.1">Stateless Authentication</a></li>
    592                            <li><a href="#rfc.section.3.2.3.2">3.2.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.2.3.2">Stateful Authentication</a></li>
    593                         </ul>
    594                      </li>
     573                     <li><a href="#rfc.section.3.2.3">3.2.3</a>&nbsp;&nbsp;&nbsp;<a href="#Authentication">Authentication</a></li>
    595574                  </ul>
    596575               </li>
     
    629608         <li><a href="#rfc.section.9">9.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.9">Acknowledgements</a></li>
    630609         <li><a href="#rfc.section.10">10.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references">Normative References</a></li>
    631          <li><a href="#rfc.authors">Authors' Addresses</a></li>
    632610         <li><a href="#rfc.section.A">A.</a>&nbsp;&nbsp;&nbsp;<a href="#change.log">Change Log (to be removed by RFC Editor before publication)</a><ul>
    633611               <li><a href="#rfc.section.A.1">A.1</a>&nbsp;&nbsp;&nbsp;<a href="#changes.since.draft-mbelshe-httpbis-spdy-00">Since draft-mbelshe-httpbis-spdy-00</a></li>
     
    635613         </li>
    636614         <li><a href="#rfc.index">Index</a></li>
     615         <li><a href="#rfc.authors">Authors' Addresses</a></li>
    637616      </ul>
    638       <h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a id="intro" href="#intro">Overview</a></h1>
    639       <p id="rfc.section.1.p.1">One of the bottlenecks of HTTP implementations is that HTTP relies on multiple connections for concurrency. This causes several
    640          problems, including additional round trips for connection setup, slow-start delays, and connection rationing by the client,
    641          where it tries to avoid opening too many connections to any single server. HTTP pipelining helps some, but only achieves partial
    642          multiplexing. In addition, pipelining has proven non-deployable in existing browsers due to intermediary interference.
    643       </p>
    644       <p id="rfc.section.1.p.2">SPDY adds a framing layer for multiplexing multiple, concurrent streams across a single TCP connection (or any reliable transport
    645          stream). The framing layer is optimized for HTTP-like request-response streams, such that applications which run over HTTP
    646          today can work over SPDY with little or no change on behalf of the web application writer.
    647       </p>
    648       <p id="rfc.section.1.p.3">The SPDY session offers four improvements over HTTP: </p>
    649       <ul class="empty">
    650          <li>Multiplexed requests: There is no limit to the number of requests that can be issued concurrently over a single SPDY connection.</li>
    651          <li>Prioritized requests: Clients can request certain resources to be delivered first. This avoids the problem of congesting the
    652             network channel with non-critical resources when a high-priority request is pending.
    653          </li>
    654          <li>Compressed headers: Clients today send a significant amount of redundant data in the form of HTTP headers. Because a single
    655             web page may require 50 or 100 subrequests, this data is significant.
    656          </li>
    657          <li>Server pushed streams: Server Push enables content to be pushed from servers to clients without a request.</li>
    658       </ul>
    659       <p id="rfc.section.1.p.4">SPDY attempts to preserve the existing semantics of HTTP. All features such as cookies, ETags, Vary headers, Content-Encoding
    660          negotiations, etc work as they do with HTTP; SPDY only replaces the way the data is written to the network.
    661       </p>
    662       <h2 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1</a>&nbsp;Document Organization
    663       </h2>
    664       <p id="rfc.section.1.1.p.1">The SPDY Specification is split into two parts: a framing layer (<a href="#FramingLayer" title="SPDY Framing Layer">Section&nbsp;2</a>), which multiplexes a TCP connection into independent, length-prefixed frames, and an HTTP layer (<a href="#HTTPLayer" title="HTTP Layering over SPDY">Section&nbsp;3</a>), which specifies the mechanism for overlaying HTTP request/response pairs on top of the framing layer. While some of the
    665          framing layer concepts are isolated from the HTTP layer, building a generic framing layer has not been a goal. The framing
    666          layer is tailored to the needs of the HTTP protocol and server push.
    667       </p>
    668       <h2 id="rfc.section.1.2"><a href="#rfc.section.1.2">1.2</a>&nbsp;Definitions
    669       </h2>
    670       <p id="rfc.section.1.2.p.1"> </p>
    671       <ul class="empty">
    672          <li>client: The endpoint initiating the SPDY session.</li>
    673          <li>connection: A transport-level connection between two endpoints.</li>
    674          <li>endpoint: Either the client or server of a connection.</li>
    675          <li>frame: A header-prefixed sequence of bytes sent over a SPDY session.</li>
    676          <li>server: The endpoint which did not initiate the SPDY session.</li>
    677          <li>session: A synonym for a connection.</li>
    678          <li>session error: An error on the SPDY session.</li>
    679          <li>stream: A bi-directional flow of bytes across a virtual channel within a SPDY session.</li>
    680          <li>stream error: An error on an individual SPDY stream.</li>
    681       </ul>
    682       <h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a id="FramingLayer" href="#FramingLayer">SPDY Framing Layer</a></h1>
    683       <h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a>&nbsp;Session (Connections)
    684       </h2>
    685       <p id="rfc.section.2.1.p.1">The SPDY framing layer (or "session") runs atop a reliable transport layer such as <a href="#RFC0793">TCP</a> <cite title="Transmission Control Protocol" id="rfc.xref.RFC0793.1">[RFC0793]</cite>. The client is the TCP connection initiator. SPDY connections are persistent connections.
    686       </p>
    687       <p id="rfc.section.2.1.p.2">For best performance, it is expected that clients will not close open connections until the user navigates away from all web
    688          pages referencing a connection, or until the server closes the connection. Servers are encouraged to leave connections open
    689          for as long as possible, but can terminate idle connections if necessary. When either endpoint closes the transport-level
    690          connection, it MUST first send a GOAWAY (<a href="#GOAWAY" title="GOAWAY">Section&nbsp;2.6.6</a>) frame so that the endpoints can reliably determine if requests finished before the close.
    691       </p>
    692       <h2 id="rfc.section.2.2"><a href="#rfc.section.2.2">2.2</a>&nbsp;Framing
    693       </h2>
    694       <p id="rfc.section.2.2.p.1">Once the connection is established, clients and servers exchange framed messages. There are two types of frames: control frames (<a href="#ControlFrames" title="Control frames">Section&nbsp;2.2.1</a>) and data frames (<a href="#DataFrames" title="Data frames">Section&nbsp;2.2.2</a>). Frames always have a common header which is 8 bytes in length.
    695       </p>
    696       <p id="rfc.section.2.2.p.2">The first bit is a control bit indicating whether a frame is a control frame or data frame. Control frames carry a version
    697          number, a frame type, flags, and a length. Data frames contain the stream ID, flags, and the length for the payload carried
    698          after the common header. The simple header is designed to make reading and writing of frames easy.
    699       </p>
    700       <p id="rfc.section.2.2.p.3">All integer values, including length, version, and type, are in network byte order. SPDY does not enforce alignment of types
    701          in dynamically sized frames.
    702       </p>
    703       <h3 id="rfc.section.2.2.1"><a href="#rfc.section.2.2.1">2.2.1</a>&nbsp;<a id="ControlFrames" href="#ControlFrames">Control frames</a></h3>
    704       <div id="rfc.figure.u.1"></div> <pre>+----------------------------------+
     617      <div id="intro">
     618         <h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a href="#intro">Overview</a></h1>
     619         <p id="rfc.section.1.p.1">One of the bottlenecks of HTTP implementations is that HTTP relies on multiple connections for concurrency. This causes several
     620            problems, including additional round trips for connection setup, slow-start delays, and connection rationing by the client,
     621            where it tries to avoid opening too many connections to any single server. HTTP pipelining helps some, but only achieves partial
     622            multiplexing. In addition, pipelining has proven non-deployable in existing browsers due to intermediary interference.
     623         </p>
     624         <p id="rfc.section.1.p.2">SPDY adds a framing layer for multiplexing multiple, concurrent streams across a single TCP connection (or any reliable transport
     625            stream). The framing layer is optimized for HTTP-like request-response streams, such that applications which run over HTTP
     626            today can work over SPDY with little or no change on behalf of the web application writer.
     627         </p>
     628         <p id="rfc.section.1.p.3">The SPDY session offers four improvements over HTTP: </p>
     629         <ul class="empty">
     630            <li>Multiplexed requests: There is no limit to the number of requests that can be issued concurrently over a single SPDY connection.</li>
     631            <li>Prioritized requests: Clients can request certain resources to be delivered first. This avoids the problem of congesting the
     632               network channel with non-critical resources when a high-priority request is pending.
     633            </li>
     634            <li>Compressed headers: Clients today send a significant amount of redundant data in the form of HTTP headers. Because a single
     635               web page may require 50 or 100 subrequests, this data is significant.
     636            </li>
     637            <li>Server pushed streams: Server Push enables content to be pushed from servers to clients without a request.</li>
     638         </ul>
     639         <p id="rfc.section.1.p.4">SPDY attempts to preserve the existing semantics of HTTP. All features such as cookies, ETags, Vary headers, Content-Encoding
     640            negotiations, etc work as they do with HTTP; SPDY only replaces the way the data is written to the network.
     641         </p>
     642         <div>
     643            <h2 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1</a>&nbsp;Document Organization
     644            </h2>
     645            <p id="rfc.section.1.1.p.1">The SPDY Specification is split into two parts: a framing layer (<a href="#FramingLayer" title="SPDY Framing Layer">Section&nbsp;2</a>), which multiplexes a TCP connection into independent, length-prefixed frames, and an HTTP layer (<a href="#HTTPLayer" title="HTTP Layering over SPDY">Section&nbsp;3</a>), which specifies the mechanism for overlaying HTTP request/response pairs on top of the framing layer. While some of the
     646               framing layer concepts are isolated from the HTTP layer, building a generic framing layer has not been a goal. The framing
     647               layer is tailored to the needs of the HTTP protocol and server push.
     648            </p>
     649         </div>
     650         <div>
     651            <h2 id="rfc.section.1.2"><a href="#rfc.section.1.2">1.2</a>&nbsp;Definitions
     652            </h2>
     653            <p id="rfc.section.1.2.p.1"></p>
     654            <ul class="empty">
     655               <li>client: The endpoint initiating the SPDY session.</li>
     656               <li>connection: A transport-level connection between two endpoints.</li>
     657               <li>endpoint: Either the client or server of a connection.</li>
     658               <li>frame: A header-prefixed sequence of bytes sent over a SPDY session.</li>
     659               <li>server: The endpoint which did not initiate the SPDY session.</li>
     660               <li>session: A synonym for a connection.</li>
     661               <li>session error: An error on the SPDY session.</li>
     662               <li>stream: A bi-directional flow of bytes across a virtual channel within a SPDY session.</li>
     663               <li>stream error: An error on an individual SPDY stream.</li>
     664            </ul>
     665         </div>
     666      </div>
     667      <div id="FramingLayer">
     668         <h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a href="#FramingLayer">SPDY Framing Layer</a></h1>
     669         <div>
     670            <h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a>&nbsp;Session (Connections)
     671            </h2>
     672            <p id="rfc.section.2.1.p.1">The SPDY framing layer (or "session") runs atop a reliable transport layer such as <a href="#RFC0793">TCP</a> <cite title="Transmission Control Protocol" id="rfc.xref.RFC0793.1">[RFC0793]</cite>. The client is the TCP connection initiator. SPDY connections are persistent connections.
     673            </p>
     674            <p id="rfc.section.2.1.p.2">For best performance, it is expected that clients will not close open connections until the user navigates away from all web
     675               pages referencing a connection, or until the server closes the connection. Servers are encouraged to leave connections open
     676               for as long as possible, but can terminate idle connections if necessary. When either endpoint closes the transport-level
     677               connection, it MUST first send a GOAWAY (<a href="#GOAWAY" title="GOAWAY">Section&nbsp;2.6.6</a>) frame so that the endpoints can reliably determine if requests finished before the close.
     678            </p>
     679         </div>
     680         <div>
     681            <h2 id="rfc.section.2.2"><a href="#rfc.section.2.2">2.2</a>&nbsp;Framing
     682            </h2>
     683            <p id="rfc.section.2.2.p.1">Once the connection is established, clients and servers exchange framed messages. There are two types of frames: control frames (<a href="#ControlFrames" title="Control frames">Section&nbsp;2.2.1</a>) and data frames (<a href="#DataFrames" title="Data frames">Section&nbsp;2.2.2</a>). Frames always have a common header which is 8 bytes in length.
     684            </p>
     685            <p id="rfc.section.2.2.p.2">The first bit is a control bit indicating whether a frame is a control frame or data frame. Control frames carry a version
     686               number, a frame type, flags, and a length. Data frames contain the stream ID, flags, and the length for the payload carried
     687               after the common header. The simple header is designed to make reading and writing of frames easy.
     688            </p>
     689            <p id="rfc.section.2.2.p.3">All integer values, including length, version, and type, are in network byte order. SPDY does not enforce alignment of types
     690               in dynamically sized frames.
     691            </p>
     692            <div id="ControlFrames">
     693               <h3 id="rfc.section.2.2.1"><a href="#rfc.section.2.2.1">2.2.1</a>&nbsp;<a href="#ControlFrames">Control frames</a></h3>
     694               <div id="rfc.figure.u.1"></div><pre>+----------------------------------+
    705695|C| Version(15bits) | Type(16bits) |
    706696+----------------------------------+
     
    709699|               Data               |
    710700+----------------------------------+
    711   </pre> <p id="rfc.section.2.2.1.p.2">Control bit: The 'C' bit is a single bit indicating if this is a control message. For control frames this value is always
    712          1.
    713       </p>
    714       <p id="rfc.section.2.2.1.p.3">Version: The version number of the SPDY protocol. This document describes SPDY version 3.</p>
    715       <p id="rfc.section.2.2.1.p.4">Type: The type of control frame. See Control Frames for the complete list of control frames.</p>
    716       <p id="rfc.section.2.2.1.p.5">Flags: Flags related to this frame. Flags for control frames and data frames are different.</p>
    717       <p id="rfc.section.2.2.1.p.6">Length: An unsigned 24-bit value representing the number of bytes after the length field.</p>
    718       <p id="rfc.section.2.2.1.p.7">Data: data associated with this control frame. The format and length of this data is controlled by the control frame type.</p>
    719       <p id="rfc.section.2.2.1.p.8">Control frame processing requirements: </p>
    720       <ul class="empty">
    721          <li>Note that full length control frames (16MB) can be large for implementations running on resource-limited hardware. In such
    722             cases, implementations MAY limit the maximum length frame supported. However, all implementations MUST be able to receive
    723             control frames of at least 8192 octets in length.
    724          </li>
    725       </ul>
    726       <h3 id="rfc.section.2.2.2"><a href="#rfc.section.2.2.2">2.2.2</a>&nbsp;<a id="DataFrames" href="#DataFrames">Data frames</a></h3>
    727       <div id="rfc.figure.u.2"></div> <pre>+----------------------------------+
     701  </pre><p id="rfc.section.2.2.1.p.2">Control bit: The 'C' bit is a single bit indicating if this is a control message. For control frames this value is always
     702                  1.
     703               </p>
     704               <p id="rfc.section.2.2.1.p.3">Version: The version number of the SPDY protocol. This document describes SPDY version 3.</p>
     705               <p id="rfc.section.2.2.1.p.4">Type: The type of control frame. See Control Frames for the complete list of control frames.</p>
     706               <p id="rfc.section.2.2.1.p.5">Flags: Flags related to this frame. Flags for control frames and data frames are different.</p>
     707               <p id="rfc.section.2.2.1.p.6">Length: An unsigned 24-bit value representing the number of bytes after the length field.</p>
     708               <p id="rfc.section.2.2.1.p.7">Data: data associated with this control frame. The format and length of this data is controlled by the control frame type.</p>
     709               <p id="rfc.section.2.2.1.p.8">Control frame processing requirements: </p>
     710               <ul class="empty">
     711                  <li>Note that full length control frames (16MB) can be large for implementations running on resource-limited hardware. In such
     712                     cases, implementations MAY limit the maximum length frame supported. However, all implementations MUST be able to receive
     713                     control frames of at least 8192 octets in length.
     714                  </li>
     715               </ul>
     716            </div>
     717            <div id="DataFrames">
     718               <h3 id="rfc.section.2.2.2"><a href="#rfc.section.2.2.2">2.2.2</a>&nbsp;<a href="#DataFrames">Data frames</a></h3>
     719               <div id="rfc.figure.u.2"></div><pre>+----------------------------------+
    728720|C|       Stream-ID (31bits)       |
    729721+----------------------------------+
     
    732724|               Data               |
    733725+----------------------------------+
    734   </pre> <p id="rfc.section.2.2.2.p.2">Control bit: For data frames this value is always 0.</p>
    735       <p id="rfc.section.2.2.2.p.3">Stream-ID: A 31-bit value identifying the stream.</p>
    736       <p id="rfc.section.2.2.2.p.4">Flags: Flags related to this frame. Valid flags are: </p>
    737       <ul class="empty">
    738          <li>0x01 = FLAG_FIN - signifies that this frame represents the last frame to be transmitted on this stream. See Stream Close (<a href="#StreamClose" title="Stream close">Section&nbsp;2.3.7</a>) below.
    739          </li>
    740          <li>0x02 = FLAG_COMPRESS - indicates that the data in this frame has been compressed.</li>
    741       </ul>
    742       <p id="rfc.section.2.2.2.p.5">Length: An unsigned 24-bit value representing the number of bytes after the length field. The total size of a data frame is
    743          8 bytes + length. It is valid to have a zero-length data frame.
    744       </p>
    745       <p id="rfc.section.2.2.2.p.6">Data: The variable-length data payload; the length was defined in the length field.</p>
    746       <p id="rfc.section.2.2.2.p.7">Data frame processing requirements: </p>
    747       <ul class="empty">
    748          <li>If an endpoint receives a data frame for a stream-id which is not open and the endpoint has not sent a GOAWAY (<a href="#GOAWAY" title="GOAWAY">Section&nbsp;2.6.6</a>) frame, it MUST send issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with the error code INVALID_STREAM for the stream-id.
    749          </li>
    750          <li>If the endpoint which created the stream receives a data frame before receiving a SYN_REPLY on that stream, it is a protocol
    751             error, and the recipient MUST issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with the status code PROTOCOL_ERROR for the stream-id.
    752          </li>
    753          <li>Implementors note: If an endpoint receives multiple data frames for invalid stream-ids, it MAY close the session.</li>
    754          <li>All SPDY endpoints MUST accept compressed data frames. Compression of data frames is always done using zlib compression. Each
    755             stream initializes and uses its own compression context dedicated to use within that stream. Endpoints are encouraged to use
    756             application level compression rather than SPDY stream level compression.
    757          </li>
    758          <li>Each SPDY stream sending compressed frames creates its own zlib context for that stream, and these compression contexts MUST
    759             be distinct from the compression contexts used with SYN_STREAM/SYN_REPLY/HEADER compression. (Thus, if both endpoints of a
    760             stream are compressing data on the stream, there will be two zlib contexts, one for sending and one for receiving).
    761          </li>
    762       </ul>
    763       <h2 id="rfc.section.2.3"><a href="#rfc.section.2.3">2.3</a>&nbsp;Streams
    764       </h2>
    765       <p id="rfc.section.2.3.p.1">Streams are independent sequences of bi-directional data divided into frames with several properties: </p>
    766       <ul class="empty">
    767          <li>Streams may be created by either the client or server.</li>
    768          <li>Streams optionally carry a set of name/value header pairs.</li>
    769          <li>Streams can concurrently send data interleaved with other streams.</li>
    770          <li>Streams may be cancelled.</li>
    771       </ul>
    772       <h3 id="rfc.section.2.3.1"><a href="#rfc.section.2.3.1">2.3.1</a>&nbsp;<a id="StreamFrames" href="#StreamFrames">Stream frames</a></h3>
    773       <p id="rfc.section.2.3.1.p.1">SPDY defines 3 control frames to manage the lifecycle of a stream: </p>
    774       <ul class="empty">
    775          <li>SYN_STREAM - Open a new stream</li>
    776          <li>SYN_REPLY - Remote acknowledgement of a new, open stream</li>
    777          <li>RST_STREAM - Close a stream</li>
    778       </ul>
    779       <h3 id="rfc.section.2.3.2"><a href="#rfc.section.2.3.2">2.3.2</a>&nbsp;<a id="StreamCreation" href="#StreamCreation">Stream creation</a></h3>
    780       <p id="rfc.section.2.3.2.p.1">A stream is created by sending a control frame with the type set to SYN_STREAM (<a href="#SYN_STREAM" title="SYN_STREAM">Section&nbsp;2.6.1</a>). If the server is initiating the stream, the Stream-ID must be even. If the client is initiating the stream, the Stream-ID
    781          must be odd. 0 is not a valid Stream-ID. Stream-IDs from each side of the connection must increase monotonically as new streams
    782          are created. E.g. Stream 2 may be created after stream 3, but stream 7 must not be created after stream 9. Stream IDs do not
    783          wrap: when a client or server cannot create a new stream id without exceeding a 31 bit value, it MUST NOT create a new stream.
    784       </p>
    785       <p id="rfc.section.2.3.2.p.2">The stream-id MUST increase with each new stream. If an endpoint receives a SYN_STREAM with a stream id which is less than
    786          any previously received SYN_STREAM, it MUST issue a session error (<a href="#SessionErrorHandler" title="Session Error Handling">Section&nbsp;2.4.1</a>) with the status PROTOCOL_ERROR.
    787       </p>
    788       <p id="rfc.section.2.3.2.p.3">It is a protocol error to send two SYN_STREAMs with the same stream-id. If a recipient receives a second SYN_STREAM for the
    789          same stream, it MUST issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with the status code PROTOCOL_ERROR.
    790       </p>
    791       <p id="rfc.section.2.3.2.p.4">Upon receipt of a SYN_STREAM, the recipient can reject the stream by sending a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with the error code REFUSED_STREAM. Note, however, that the creating endpoint may have already sent additional frames for
    792          that stream which cannot be immediately stopped.
    793       </p>
    794       <p id="rfc.section.2.3.2.p.5">Once the stream is created, the creator may immediately send HEADERS or DATA frames for that stream, without needing to wait
    795          for the recipient to acknowledge.
    796       </p>
    797       <h4 id="rfc.section.2.3.2.1"><a href="#rfc.section.2.3.2.1">2.3.2.1</a>&nbsp;Unidirectional streams
    798       </h4>
    799       <p id="rfc.section.2.3.2.1.p.1">When an endpoint creates a stream with the FLAG_UNIDIRECTIONAL flag set, it creates a unidirectional stream which the creating
    800          endpoint can use to send frames, but the receiving endpoint cannot. The receiving endpoint is implicitly already in the half-closed (<a href="#StreamHalfClose" title="Stream half-close">Section&nbsp;2.3.6</a>) state.
    801       </p>
    802       <h4 id="rfc.section.2.3.2.2"><a href="#rfc.section.2.3.2.2">2.3.2.2</a>&nbsp;Bidirectional streams
    803       </h4>
    804       <p id="rfc.section.2.3.2.2.p.1">SYN_STREAM frames which do not use the FLAG_UNIDIRECTIONAL flag are bidirectional streams. Both endpoints can send data on
    805          a bi-directional stream.
    806       </p>
    807       <h3 id="rfc.section.2.3.3"><a href="#rfc.section.2.3.3">2.3.3</a>&nbsp;<a id="StreamPriority" href="#StreamPriority">Stream priority</a></h3>
    808       <p id="rfc.section.2.3.3.p.1">The creator of a stream assigns a priority for that stream. Priority is represented as an integer from 0 to 7. 0 represents
    809          the highest priority and 7 represents the lowest priority.
    810       </p>
    811       <p id="rfc.section.2.3.3.p.2">The sender and recipient SHOULD use best-effort to process streams in the order of highest priority to lowest priority.</p>
    812       <h3 id="rfc.section.2.3.4"><a href="#rfc.section.2.3.4">2.3.4</a>&nbsp;Stream headers
    813       </h3>
    814       <p id="rfc.section.2.3.4.p.1">Streams carry optional sets of name/value pair headers which carry metadata about the stream. After the stream has been created,
    815          and as long as the sender is not closed (<a href="#StreamClose" title="Stream close">Section&nbsp;2.3.7</a>) or half-closed (<a href="#StreamHalfClose" title="Stream half-close">Section&nbsp;2.3.6</a>), each side may send HEADERS frame(s) containing the header data. Header data can be sent in multiple HEADERS frames, and
    816          HEADERS frames may be interleaved with data frames.
    817       </p>
    818       <h3 id="rfc.section.2.3.5"><a href="#rfc.section.2.3.5">2.3.5</a>&nbsp;Stream data exchange
    819       </h3>
    820       <p id="rfc.section.2.3.5.p.1">Once a stream is created, it can be used to send arbitrary amounts of data. Generally this means that a series of data frames
    821          will be sent on the stream until a frame containing the FLAG_FIN flag is set. The FLAG_FIN can be set on a SYN_STREAM (<a href="#SYN_STREAM" title="SYN_STREAM">Section&nbsp;2.6.1</a>), SYN_REPLY (<a href="#SYN_REPLY" title="SYN_REPLY">Section&nbsp;2.6.2</a>), HEADERS (<a href="#HEADERS" title="HEADERS">Section&nbsp;2.6.7</a>) or a DATA (<a href="#DataFrames" title="Data frames">Section&nbsp;2.2.2</a>) frame. Once the FLAG_FIN has been sent, the stream is considered to be half-closed.
    822       </p>
    823       <h3 id="rfc.section.2.3.6"><a href="#rfc.section.2.3.6">2.3.6</a>&nbsp;<a id="StreamHalfClose" href="#StreamHalfClose">Stream half-close</a></h3>
    824       <p id="rfc.section.2.3.6.p.1">When one side of the stream sends a frame with the FLAG_FIN flag set, the stream is half-closed from that endpoint. The sender
    825          of the FLAG_FIN MUST NOT send further frames on that stream. When both sides have half-closed, the stream is closed.
    826       </p>
    827       <p id="rfc.section.2.3.6.p.2">If an endpoint receives a data frame after the stream is half-closed from the sender (e.g. the endpoint has already received
    828          a prior frame for the stream with the FIN flag set), it MUST send a RST_STREAM to the sender with the status STREAM_ALREADY_CLOSED.
    829       </p>
    830       <h3 id="rfc.section.2.3.7"><a href="#rfc.section.2.3.7">2.3.7</a>&nbsp;<a id="StreamClose" href="#StreamClose">Stream close</a></h3>
    831       <p id="rfc.section.2.3.7.p.1">There are 3 ways that streams can be terminated: </p>
    832       <ul class="empty">
    833          <li>Normal termination: Normal stream termination occurs when both sender and recipient have half-closed the stream by sending
    834             a FLAG_FIN.
    835          </li>
    836          <li>Abrupt termination: Either the client or server can send a RST_STREAM control frame at any time. A RST_STREAM contains an
    837             error code to indicate the reason for failure. When a RST_STREAM is sent from the stream originator, it indicates a failure
    838             to complete the stream and that no further data will be sent on the stream. When a RST_STREAM is sent from the stream recipient,
    839             the sender, upon receipt, should stop sending any data on the stream. The stream recipient should be aware that there is a
    840             race between data already in transit from the sender and the time the RST_STREAM is received. See Stream Error Handling (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>)
    841          </li>
    842          <li>TCP connection teardown: If the TCP connection is torn down while un-closed streams exist, then the endpoint must assume that
    843             the stream was abnormally interrupted and may be incomplete.
    844          </li>
    845       </ul>
    846       <p id="rfc.section.2.3.7.p.2">If an endpoint receives a data frame after the stream is closed, it must send a RST_STREAM to the sender with the status PROTOCOL_ERROR.</p>
    847       <h2 id="rfc.section.2.4"><a href="#rfc.section.2.4">2.4</a>&nbsp;Error Handling
    848       </h2>
    849       <p id="rfc.section.2.4.p.1">The SPDY framing layer has only two types of errors, and they are always handled consistently. Any reference in this specification
    850          to "issue a session error" refers to <a href="#SessionErrorHandler" title="Session Error Handling">Section&nbsp;2.4.1</a>. Any reference to "issue a stream error" refers to <a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>.
    851       </p>
    852       <h3 id="rfc.section.2.4.1"><a href="#rfc.section.2.4.1">2.4.1</a>&nbsp;<a id="SessionErrorHandler" href="#SessionErrorHandler">Session Error Handling</a></h3>
    853       <p id="rfc.section.2.4.1.p.1">A session error is any error which prevents further processing of the framing layer or which corrupts the session compression
    854          state. When a session error occurs, the endpoint encountering the error MUST first send a GOAWAY (<a href="#GOAWAY" title="GOAWAY">Section&nbsp;2.6.6</a>) frame with the stream id of most recently received stream from the remote endpoint, and the error code for why the session
    855          is terminating. After sending the GOAWAY frame, the endpoint MUST close the TCP connection.
    856       </p>
    857       <p id="rfc.section.2.4.1.p.2">Note that the session compression state is dependent upon both endpoints always processing all compressed data. If an endpoint
    858          partially processes a frame containing compressed data without updating compression state properly, future control frames
    859          which use compression will be always be errored. Implementations SHOULD always try to process compressed data so that errors
    860          which could be handled as stream errors do not become session errors.
    861       </p>
    862       <p id="rfc.section.2.4.1.p.3">Note that because this GOAWAY is sent during a session error case, it is possible that the GOAWAY will not be reliably received
    863          by the receiving endpoint. It is a best-effort attempt to communicate with the remote about why the session is going down.
    864       </p>
    865       <h3 id="rfc.section.2.4.2"><a href="#rfc.section.2.4.2">2.4.2</a>&nbsp;<a id="StreamErrorHandler" href="#StreamErrorHandler">Stream Error Handling</a></h3>
    866       <p id="rfc.section.2.4.2.p.1">A stream error is an error related to a specific stream-id which does not affect processing of other streams at the framing
    867          layer. Upon a stream error, the endpoint MUST send a RST_STREAM (<a href="#RST_STREAM" title="RST_STREAM">Section&nbsp;2.6.3</a>) frame which contains the stream id of the stream where the error occurred and the error status which caused the error. After
    868          sending the RST_STREAM, the stream is closed to the sending endpoint. After sending the RST_STREAM, if the sender receives
    869          any frames other than a RST_STREAM for that stream id, it will result in sending additional RST_STREAM frames. An endpoint
    870          MUST NOT send a RST_STREAM in response to an RST_STREAM, as doing so would lead to RST_STREAM loops. Sending a RST_STREAM
    871          does not cause the SPDY session to be closed.
    872       </p>
    873       <p id="rfc.section.2.4.2.p.2">If an endpoint has multiple RST_STREAM frames to send in succession for the same stream-id and the same error code, it MAY
    874          coalesce them into a single RST_STREAM frame. (This can happen if a stream is closed, but the remote sends multiple data frames.
    875          There is no reason to send a RST_STREAM for each frame in succession).
    876       </p>
    877       <h2 id="rfc.section.2.5"><a href="#rfc.section.2.5">2.5</a>&nbsp;Data flow
    878       </h2>
    879       <p id="rfc.section.2.5.p.1">Because TCP provides a single stream of data on which SPDY multiplexes multiple logical streams, clients and servers must
    880          intelligently interleave data messages for concurrent sessions.
    881       </p>
    882       <h2 id="rfc.section.2.6"><a href="#rfc.section.2.6">2.6</a>&nbsp;Control frame types
    883       </h2>
    884       <h3 id="rfc.section.2.6.1"><a href="#rfc.section.2.6.1">2.6.1</a>&nbsp;<a id="SYN_STREAM" href="#SYN_STREAM">SYN_STREAM</a></h3>
    885       <p id="rfc.section.2.6.1.p.1">The SYN_STREAM control frame allows the sender to asynchronously create a stream between the endpoints. See Stream Creation (<a href="#StreamCreation" title="Stream creation">Section&nbsp;2.3.2</a>)
    886       </p>
    887       <div id="rfc.figure.u.3"></div> <pre>+------------------------------------+
     726  </pre><p id="rfc.section.2.2.2.p.2">Control bit: For data frames this value is always 0.</p>
     727               <p id="rfc.section.2.2.2.p.3">Stream-ID: A 31-bit value identifying the stream.</p>
     728               <p id="rfc.section.2.2.2.p.4">Flags: Flags related to this frame. Valid flags are: </p>
     729               <ul class="empty">
     730                  <li>0x01 = FLAG_FIN - signifies that this frame represents the last frame to be transmitted on this stream. See Stream Close (<a href="#StreamClose" title="Stream close">Section&nbsp;2.3.7</a>) below.
     731                  </li>
     732                  <li>0x02 = FLAG_COMPRESS - indicates that the data in this frame has been compressed.</li>
     733               </ul>
     734               <p id="rfc.section.2.2.2.p.5">Length: An unsigned 24-bit value representing the number of bytes after the length field. The total size of a data frame is
     735                  8 bytes + length. It is valid to have a zero-length data frame.
     736               </p>
     737               <p id="rfc.section.2.2.2.p.6">Data: The variable-length data payload; the length was defined in the length field.</p>
     738               <p id="rfc.section.2.2.2.p.7">Data frame processing requirements: </p>
     739               <ul class="empty">
     740                  <li>If an endpoint receives a data frame for a stream-id which is not open and the endpoint has not sent a GOAWAY (<a href="#GOAWAY" title="GOAWAY">Section&nbsp;2.6.6</a>) frame, it MUST send issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with the error code INVALID_STREAM for the stream-id.
     741                  </li>
     742                  <li>If the endpoint which created the stream receives a data frame before receiving a SYN_REPLY on that stream, it is a protocol
     743                     error, and the recipient MUST issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with the status code PROTOCOL_ERROR for the stream-id.
     744                  </li>
     745                  <li>Implementors note: If an endpoint receives multiple data frames for invalid stream-ids, it MAY close the session.</li>
     746                  <li>All SPDY endpoints MUST accept compressed data frames. Compression of data frames is always done using zlib compression. Each
     747                     stream initializes and uses its own compression context dedicated to use within that stream. Endpoints are encouraged to use
     748                     application level compression rather than SPDY stream level compression.
     749                  </li>
     750                  <li>Each SPDY stream sending compressed frames creates its own zlib context for that stream, and these compression contexts MUST
     751                     be distinct from the compression contexts used with SYN_STREAM/SYN_REPLY/HEADER compression. (Thus, if both endpoints of a
     752                     stream are compressing data on the stream, there will be two zlib contexts, one for sending and one for receiving).
     753                  </li>
     754               </ul>
     755            </div>
     756         </div>
     757         <div>
     758            <h2 id="rfc.section.2.3"><a href="#rfc.section.2.3">2.3</a>&nbsp;Streams
     759            </h2>
     760            <p id="rfc.section.2.3.p.1">Streams are independent sequences of bi-directional data divided into frames with several properties: </p>
     761            <ul class="empty">
     762               <li>Streams may be created by either the client or server.</li>
     763               <li>Streams optionally carry a set of name/value header pairs.</li>
     764               <li>Streams can concurrently send data interleaved with other streams.</li>
     765               <li>Streams may be cancelled.</li>
     766            </ul>
     767            <div id="StreamFrames">
     768               <h3 id="rfc.section.2.3.1"><a href="#rfc.section.2.3.1">2.3.1</a>&nbsp;<a href="#StreamFrames">Stream frames</a></h3>
     769               <p id="rfc.section.2.3.1.p.1">SPDY defines 3 control frames to manage the lifecycle of a stream: </p>
     770               <ul class="empty">
     771                  <li>SYN_STREAM - Open a new stream</li>
     772                  <li>SYN_REPLY - Remote acknowledgement of a new, open stream</li>
     773                  <li>RST_STREAM - Close a stream</li>
     774               </ul>
     775            </div>
     776            <div id="StreamCreation">
     777               <h3 id="rfc.section.2.3.2"><a href="#rfc.section.2.3.2">2.3.2</a>&nbsp;<a href="#StreamCreation">Stream creation</a></h3>
     778               <p id="rfc.section.2.3.2.p.1">A stream is created by sending a control frame with the type set to SYN_STREAM (<a href="#SYN_STREAM" title="SYN_STREAM">Section&nbsp;2.6.1</a>). If the server is initiating the stream, the Stream-ID must be even. If the client is initiating the stream, the Stream-ID
     779                  must be odd. 0 is not a valid Stream-ID. Stream-IDs from each side of the connection must increase monotonically as new streams
     780                  are created. E.g. Stream 2 may be created after stream 3, but stream 7 must not be created after stream 9. Stream IDs do not
     781                  wrap: when a client or server cannot create a new stream id without exceeding a 31 bit value, it MUST NOT create a new stream.
     782               </p>
     783               <p id="rfc.section.2.3.2.p.2">The stream-id MUST increase with each new stream. If an endpoint receives a SYN_STREAM with a stream id which is less than
     784                  any previously received SYN_STREAM, it MUST issue a session error (<a href="#SessionErrorHandler" title="Session Error Handling">Section&nbsp;2.4.1</a>) with the status PROTOCOL_ERROR.
     785               </p>
     786               <p id="rfc.section.2.3.2.p.3">It is a protocol error to send two SYN_STREAMs with the same stream-id. If a recipient receives a second SYN_STREAM for the
     787                  same stream, it MUST issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with the status code PROTOCOL_ERROR.
     788               </p>
     789               <p id="rfc.section.2.3.2.p.4">Upon receipt of a SYN_STREAM, the recipient can reject the stream by sending a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with the error code REFUSED_STREAM. Note, however, that the creating endpoint may have already sent additional frames for
     790                  that stream which cannot be immediately stopped.
     791               </p>
     792               <p id="rfc.section.2.3.2.p.5">Once the stream is created, the creator may immediately send HEADERS or DATA frames for that stream, without needing to wait
     793                  for the recipient to acknowledge.
     794               </p>
     795               <div>
     796                  <h4 id="rfc.section.2.3.2.1"><a href="#rfc.section.2.3.2.1">2.3.2.1</a>&nbsp;Unidirectional streams
     797                  </h4>
     798                  <p id="rfc.section.2.3.2.1.p.1">When an endpoint creates a stream with the FLAG_UNIDIRECTIONAL flag set, it creates a unidirectional stream which the creating
     799                     endpoint can use to send frames, but the receiving endpoint cannot. The receiving endpoint is implicitly already in the half-closed (<a href="#StreamHalfClose" title="Stream half-close">Section&nbsp;2.3.6</a>) state.
     800                  </p>
     801               </div>
     802               <div>
     803                  <h4 id="rfc.section.2.3.2.2"><a href="#rfc.section.2.3.2.2">2.3.2.2</a>&nbsp;Bidirectional streams
     804                  </h4>
     805                  <p id="rfc.section.2.3.2.2.p.1">SYN_STREAM frames which do not use the FLAG_UNIDIRECTIONAL flag are bidirectional streams. Both endpoints can send data on
     806                     a bi-directional stream.
     807                  </p>
     808               </div>
     809            </div>
     810            <div id="StreamPriority">
     811               <h3 id="rfc.section.2.3.3"><a href="#rfc.section.2.3.3">2.3.3</a>&nbsp;<a href="#StreamPriority">Stream priority</a></h3>
     812               <p id="rfc.section.2.3.3.p.1">The creator of a stream assigns a priority for that stream. Priority is represented as an integer from 0 to 7. 0 represents
     813                  the highest priority and 7 represents the lowest priority.
     814               </p>
     815               <p id="rfc.section.2.3.3.p.2">The sender and recipient SHOULD use best-effort to process streams in the order of highest priority to lowest priority.</p>
     816            </div>
     817            <div>
     818               <h3 id="rfc.section.2.3.4"><a href="#rfc.section.2.3.4">2.3.4</a>&nbsp;Stream headers
     819               </h3>
     820               <p id="rfc.section.2.3.4.p.1">Streams carry optional sets of name/value pair headers which carry metadata about the stream. After the stream has been created,
     821                  and as long as the sender is not closed (<a href="#StreamClose" title="Stream close">Section&nbsp;2.3.7</a>) or half-closed (<a href="#StreamHalfClose" title="Stream half-close">Section&nbsp;2.3.6</a>), each side may send HEADERS frame(s) containing the header data. Header data can be sent in multiple HEADERS frames, and
     822                  HEADERS frames may be interleaved with data frames.
     823               </p>
     824            </div>
     825            <div>
     826               <h3 id="rfc.section.2.3.5"><a href="#rfc.section.2.3.5">2.3.5</a>&nbsp;Stream data exchange
     827               </h3>
     828               <p id="rfc.section.2.3.5.p.1">Once a stream is created, it can be used to send arbitrary amounts of data. Generally this means that a series of data frames
     829                  will be sent on the stream until a frame containing the FLAG_FIN flag is set. The FLAG_FIN can be set on a SYN_STREAM (<a href="#SYN_STREAM" title="SYN_STREAM">Section&nbsp;2.6.1</a>), SYN_REPLY (<a href="#SYN_REPLY" title="SYN_REPLY">Section&nbsp;2.6.2</a>), HEADERS (<a href="#HEADERS" title="HEADERS">Section&nbsp;2.6.7</a>) or a DATA (<a href="#DataFrames" title="Data frames">Section&nbsp;2.2.2</a>) frame. Once the FLAG_FIN has been sent, the stream is considered to be half-closed.
     830               </p>
     831            </div>
     832            <div id="StreamHalfClose">
     833               <h3 id="rfc.section.2.3.6"><a href="#rfc.section.2.3.6">2.3.6</a>&nbsp;<a href="#StreamHalfClose">Stream half-close</a></h3>
     834               <p id="rfc.section.2.3.6.p.1">When one side of the stream sends a frame with the FLAG_FIN flag set, the stream is half-closed from that endpoint. The sender
     835                  of the FLAG_FIN MUST NOT send further frames on that stream. When both sides have half-closed, the stream is closed.
     836               </p>
     837               <p id="rfc.section.2.3.6.p.2">If an endpoint receives a data frame after the stream is half-closed from the sender (e.g. the endpoint has already received
     838                  a prior frame for the stream with the FIN flag set), it MUST send a RST_STREAM to the sender with the status STREAM_ALREADY_CLOSED.
     839               </p>
     840            </div>
     841            <div id="StreamClose">
     842               <h3 id="rfc.section.2.3.7"><a href="#rfc.section.2.3.7">2.3.7</a>&nbsp;<a href="#StreamClose">Stream close</a></h3>
     843               <p id="rfc.section.2.3.7.p.1">There are 3 ways that streams can be terminated: </p>
     844               <ul class="empty">
     845                  <li>Normal termination: Normal stream termination occurs when both sender and recipient have half-closed the stream by sending
     846                     a FLAG_FIN.
     847                  </li>
     848                  <li>Abrupt termination: Either the client or server can send a RST_STREAM control frame at any time. A RST_STREAM contains an
     849                     error code to indicate the reason for failure. When a RST_STREAM is sent from the stream originator, it indicates a failure
     850                     to complete the stream and that no further data will be sent on the stream. When a RST_STREAM is sent from the stream recipient,
     851                     the sender, upon receipt, should stop sending any data on the stream. The stream recipient should be aware that there is a
     852                     race between data already in transit from the sender and the time the RST_STREAM is received. See Stream Error Handling (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>)
     853                  </li>
     854                  <li>TCP connection teardown: If the TCP connection is torn down while un-closed streams exist, then the endpoint must assume that
     855                     the stream was abnormally interrupted and may be incomplete.
     856                  </li>
     857               </ul>
     858               <p id="rfc.section.2.3.7.p.2">If an endpoint receives a data frame after the stream is closed, it must send a RST_STREAM to the sender with the status PROTOCOL_ERROR.</p>
     859            </div>
     860         </div>
     861         <div>
     862            <h2 id="rfc.section.2.4"><a href="#rfc.section.2.4">2.4</a>&nbsp;Error Handling
     863            </h2>
     864            <p id="rfc.section.2.4.p.1">The SPDY framing layer has only two types of errors, and they are always handled consistently. Any reference in this specification
     865               to "issue a session error" refers to <a href="#SessionErrorHandler" title="Session Error Handling">Section&nbsp;2.4.1</a>. Any reference to "issue a stream error" refers to <a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>.
     866            </p>
     867            <div id="SessionErrorHandler">
     868               <h3 id="rfc.section.2.4.1"><a href="#rfc.section.2.4.1">2.4.1</a>&nbsp;<a href="#SessionErrorHandler">Session Error Handling</a></h3>
     869               <p id="rfc.section.2.4.1.p.1">A session error is any error which prevents further processing of the framing layer or which corrupts the session compression
     870                  state. When a session error occurs, the endpoint encountering the error MUST first send a GOAWAY (<a href="#GOAWAY" title="GOAWAY">Section&nbsp;2.6.6</a>) frame with the stream id of most recently received stream from the remote endpoint, and the error code for why the session
     871                  is terminating. After sending the GOAWAY frame, the endpoint MUST close the TCP connection.
     872               </p>
     873               <p id="rfc.section.2.4.1.p.2">Note that the session compression state is dependent upon both endpoints always processing all compressed data. If an endpoint
     874                  partially processes a frame containing compressed data without updating compression state properly, future control frames
     875                  which use compression will be always be errored. Implementations SHOULD always try to process compressed data so that errors
     876                  which could be handled as stream errors do not become session errors.
     877               </p>
     878               <p id="rfc.section.2.4.1.p.3">Note that because this GOAWAY is sent during a session error case, it is possible that the GOAWAY will not be reliably received
     879                  by the receiving endpoint. It is a best-effort attempt to communicate with the remote about why the session is going down.
     880               </p>
     881            </div>
     882            <div id="StreamErrorHandler">
     883               <h3 id="rfc.section.2.4.2"><a href="#rfc.section.2.4.2">2.4.2</a>&nbsp;<a href="#StreamErrorHandler">Stream Error Handling</a></h3>
     884               <p id="rfc.section.2.4.2.p.1">A stream error is an error related to a specific stream-id which does not affect processing of other streams at the framing
     885                  layer. Upon a stream error, the endpoint MUST send a RST_STREAM (<a href="#RST_STREAM" title="RST_STREAM">Section&nbsp;2.6.3</a>) frame which contains the stream id of the stream where the error occurred and the error status which caused the error. After
     886                  sending the RST_STREAM, the stream is closed to the sending endpoint. After sending the RST_STREAM, if the sender receives
     887                  any frames other than a RST_STREAM for that stream id, it will result in sending additional RST_STREAM frames. An endpoint
     888                  MUST NOT send a RST_STREAM in response to an RST_STREAM, as doing so would lead to RST_STREAM loops. Sending a RST_STREAM
     889                  does not cause the SPDY session to be closed.
     890               </p>
     891               <p id="rfc.section.2.4.2.p.2">If an endpoint has multiple RST_STREAM frames to send in succession for the same stream-id and the same error code, it MAY
     892                  coalesce them into a single RST_STREAM frame. (This can happen if a stream is closed, but the remote sends multiple data frames.
     893                  There is no reason to send a RST_STREAM for each frame in succession).
     894               </p>
     895            </div>
     896         </div>
     897         <div>
     898            <h2 id="rfc.section.2.5"><a href="#rfc.section.2.5">2.5</a>&nbsp;Data flow
     899            </h2>
     900            <p id="rfc.section.2.5.p.1">Because TCP provides a single stream of data on which SPDY multiplexes multiple logical streams, clients and servers must
     901               intelligently interleave data messages for concurrent sessions.
     902            </p>
     903         </div>
     904         <div>
     905            <h2 id="rfc.section.2.6"><a href="#rfc.section.2.6">2.6</a>&nbsp;Control frame types
     906            </h2>
     907            <div id="SYN_STREAM">
     908               <h3 id="rfc.section.2.6.1"><a href="#rfc.section.2.6.1">2.6.1</a>&nbsp;<a href="#SYN_STREAM">SYN_STREAM</a></h3>
     909               <p id="rfc.section.2.6.1.p.1">The SYN_STREAM control frame allows the sender to asynchronously create a stream between the endpoints. See Stream Creation (<a href="#StreamCreation" title="Stream creation">Section&nbsp;2.3.2</a>)
     910               </p>
     911               <div id="rfc.figure.u.3"></div><pre>+------------------------------------+
    888912|1|    version    |         1        |
    889913+------------------------------------+
     
    907931+------------------------------------+    |
    908932|           (repeats)                |   &lt;+
    909             </pre> <p id="rfc.section.2.6.1.p.3">Flags: Flags related to this frame. Valid flags are: </p>
    910       <ul class="empty">
    911          <li>0x01 = FLAG_FIN - marks this frame as the last frame to be transmitted on this stream and puts the sender in the half-closed (<a href="#StreamHalfClose" title="Stream half-close">Section&nbsp;2.3.6</a>) state.
    912          </li>
    913          <li>0x02 = FLAG_UNIDIRECTIONAL - a stream created with this flag puts the recipient in the half-closed (<a href="#StreamHalfClose" title="Stream half-close">Section&nbsp;2.3.6</a>) state.
    914          </li>
    915       </ul>
    916       <p id="rfc.section.2.6.1.p.4">Length: The length is the number of bytes which follow the length field in the frame. For SYN_STREAM frames, this is 10 bytes
    917          plus the length of the compressed Name/Value block.
    918       </p>
    919       <p id="rfc.section.2.6.1.p.5">Stream-ID: The 31-bit identifier for this stream. This stream-id will be used in frames which are part of this stream.</p>
    920       <p id="rfc.section.2.6.1.p.6">Associated-To-Stream-ID: The 31-bit identifier for a stream which this stream is associated to. If this stream is independent
    921          of all other streams, it should be 0.
    922       </p>
    923       <p id="rfc.section.2.6.1.p.7">Priority: A 3-bit priority (<a href="#StreamPriority" title="Stream priority">Section&nbsp;2.3.3</a>) field.
    924       </p>
    925       <p id="rfc.section.2.6.1.p.8">Unused: 5 bits of unused space, reserved for future use.</p>
    926       <p id="rfc.section.2.6.1.p.9">Slot: An 8 bit unsigned integer specifying the index in the server's CREDENTIAL vector of the client certificate to be used
    927          for this request. see CREDENTIAL frame (<a href="#CREDENTIAL" title="CREDENTIAL">Section&nbsp;2.6.9</a>). The value 0 means no client certificate should be associated with this stream.
    928       </p>
    929       <p id="rfc.section.2.6.1.p.10">Name/Value Header Block: A set of name/value pairs carried as part of the SYN_STREAM. see Name/Value Header Block (<a href="#HeaderBlock" title="Name/Value Header Block">Section&nbsp;2.6.10</a>).
    930       </p>
    931       <p id="rfc.section.2.6.1.p.11">If an endpoint receives a SYN_STREAM which is larger than the implementation supports, it MAY send a RST_STREAM with error
    932          code FRAME_TOO_LARGE. All implementations MUST support the minimum size limits defined in the Control Frames section (<a href="#ControlFrames" title="Control frames">Section&nbsp;2.2.1</a>).
    933       </p>
    934       <h3 id="rfc.section.2.6.2"><a href="#rfc.section.2.6.2">2.6.2</a>&nbsp;<a id="SYN_REPLY" href="#SYN_REPLY">SYN_REPLY</a></h3>
    935       <p id="rfc.section.2.6.2.p.1">SYN_REPLY indicates the acceptance of a stream creation by the recipient of a SYN_STREAM frame.</p>
    936       <div id="rfc.figure.u.4"></div> <pre>+------------------------------------+
     933            </pre><p id="rfc.section.2.6.1.p.3">Flags: Flags related to this frame. Valid flags are: </p>
     934               <ul class="empty">
     935                  <li>0x01 = FLAG_FIN - marks this frame as the last frame to be transmitted on this stream and puts the sender in the half-closed (<a href="#StreamHalfClose" title="Stream half-close">Section&nbsp;2.3.6</a>) state.
     936                  </li>
     937                  <li>0x02 = FLAG_UNIDIRECTIONAL - a stream created with this flag puts the recipient in the half-closed (<a href="#StreamHalfClose" title="Stream half-close">Section&nbsp;2.3.6</a>) state.
     938                  </li>
     939               </ul>
     940               <p id="rfc.section.2.6.1.p.4">Length: The length is the number of bytes which follow the length field in the frame. For SYN_STREAM frames, this is 10 bytes
     941                  plus the length of the compressed Name/Value block.
     942               </p>
     943               <p id="rfc.section.2.6.1.p.5">Stream-ID: The 31-bit identifier for this stream. This stream-id will be used in frames which are part of this stream.</p>
     944               <p id="rfc.section.2.6.1.p.6">Associated-To-Stream-ID: The 31-bit identifier for a stream which this stream is associated to. If this stream is independent
     945                  of all other streams, it should be 0.
     946               </p>
     947               <p id="rfc.section.2.6.1.p.7">Priority: A 3-bit priority (<a href="#StreamPriority" title="Stream priority">Section&nbsp;2.3.3</a>) field.
     948               </p>
     949               <p id="rfc.section.2.6.1.p.8">Unused: 5 bits of unused space, reserved for future use.</p>
     950               <p id="rfc.section.2.6.1.p.9">Slot: An 8 bit unsigned integer specifying the index in the server's CREDENTIAL vector of the client certificate to be used
     951                  for this request. see CREDENTIAL frame (<a href="#CREDENTIAL" title="CREDENTIAL">Section&nbsp;2.6.9</a>). The value 0 means no client certificate should be associated with this stream.
     952               </p>
     953               <p id="rfc.section.2.6.1.p.10">Name/Value Header Block: A set of name/value pairs carried as part of the SYN_STREAM. see Name/Value Header Block (<a href="#HeaderBlock" title="Name/Value Header Block">Section&nbsp;2.6.10</a>).
     954               </p>
     955               <p id="rfc.section.2.6.1.p.11">If an endpoint receives a SYN_STREAM which is larger than the implementation supports, it MAY send a RST_STREAM with error
     956                  code FRAME_TOO_LARGE. All implementations MUST support the minimum size limits defined in the Control Frames section (<a href="#ControlFrames" title="Control frames">Section&nbsp;2.2.1</a>).
     957               </p>
     958            </div>
     959            <div id="SYN_REPLY">
     960               <h3 id="rfc.section.2.6.2"><a href="#rfc.section.2.6.2">2.6.2</a>&nbsp;<a href="#SYN_REPLY">SYN_REPLY</a></h3>
     961               <p id="rfc.section.2.6.2.p.1">SYN_REPLY indicates the acceptance of a stream creation by the recipient of a SYN_STREAM frame.</p>
     962               <div id="rfc.figure.u.4"></div><pre>+------------------------------------+
    937963|1|    version    |         2        |
    938964+------------------------------------+
     
    952978+------------------------------------+    |
    953979|           (repeats)                |   &lt;+
    954             </pre> <p id="rfc.section.2.6.2.p.3">Flags: Flags related to this frame. Valid flags are: </p>
    955       <ul class="empty">
    956          <li>0x01 = FLAG_FIN - marks this frame as the last frame to be transmitted on this stream and puts the sender in the half-closed (<a href="#StreamHalfClose" title="Stream half-close">Section&nbsp;2.3.6</a>) state.
    957          </li>
    958       </ul>
    959       <p id="rfc.section.2.6.2.p.4">Length: The length is the number of bytes which follow the length field in the frame. For SYN_REPLY frames, this is 4 bytes
    960          plus the length of the compressed Name/Value block.
    961       </p>
    962       <p id="rfc.section.2.6.2.p.5">Stream-ID: The 31-bit identifier for this stream.</p>
    963       <p id="rfc.section.2.6.2.p.6">If an endpoint receives multiple SYN_REPLY frames for the same active stream ID, it MUST issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with the error code STREAM_IN_USE.
    964       </p>
    965       <p id="rfc.section.2.6.2.p.7">Name/Value Header Block: A set of name/value pairs carried as part of the SYN_STREAM. see Name/Value Header Block (<a href="#HeaderBlock" title="Name/Value Header Block">Section&nbsp;2.6.10</a>).
    966       </p>
    967       <p id="rfc.section.2.6.2.p.8">If an endpoint receives a SYN_REPLY which is larger than the implementation supports, it MAY send a RST_STREAM with error
    968          code FRAME_TOO_LARGE. All implementations MUST support the minimum size limits defined in the Control Frames section (<a href="#ControlFrames" title="Control frames">Section&nbsp;2.2.1</a>).
    969       </p>
    970       <h3 id="rfc.section.2.6.3"><a href="#rfc.section.2.6.3">2.6.3</a>&nbsp;<a id="RST_STREAM" href="#RST_STREAM">RST_STREAM</a></h3>
    971       <p id="rfc.section.2.6.3.p.1">The RST_STREAM frame allows for abnormal termination of a stream. When sent by the creator of a stream, it indicates the creator
    972          wishes to cancel the stream. When sent by the recipient of a stream, it indicates an error or that the recipient did not want
    973          to accept the stream, so the stream should be closed.
    974       </p>
    975       <div id="rfc.figure.u.5"></div> <pre>+----------------------------------+
     980            </pre><p id="rfc.section.2.6.2.p.3">Flags: Flags related to this frame. Valid flags are: </p>
     981               <ul class="empty">
     982                  <li>0x01 = FLAG_FIN - marks this frame as the last frame to be transmitted on this stream and puts the sender in the half-closed (<a href="#StreamHalfClose" title="Stream half-close">Section&nbsp;2.3.6</a>) state.
     983                  </li>
     984               </ul>
     985               <p id="rfc.section.2.6.2.p.4">Length: The length is the number of bytes which follow the length field in the frame. For SYN_REPLY frames, this is 4 bytes
     986                  plus the length of the compressed Name/Value block.
     987               </p>
     988               <p id="rfc.section.2.6.2.p.5">Stream-ID: The 31-bit identifier for this stream.</p>
     989               <p id="rfc.section.2.6.2.p.6">If an endpoint receives multiple SYN_REPLY frames for the same active stream ID, it MUST issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with the error code STREAM_IN_USE.
     990               </p>
     991               <p id="rfc.section.2.6.2.p.7">Name/Value Header Block: A set of name/value pairs carried as part of the SYN_STREAM. see Name/Value Header Block (<a href="#HeaderBlock" title="Name/Value Header Block">Section&nbsp;2.6.10</a>).
     992               </p>
     993               <p id="rfc.section.2.6.2.p.8">If an endpoint receives a SYN_REPLY which is larger than the implementation supports, it MAY send a RST_STREAM with error
     994                  code FRAME_TOO_LARGE. All implementations MUST support the minimum size limits defined in the Control Frames section (<a href="#ControlFrames" title="Control frames">Section&nbsp;2.2.1</a>).
     995               </p>
     996            </div>
     997            <div id="RST_STREAM">
     998               <h3 id="rfc.section.2.6.3"><a href="#rfc.section.2.6.3">2.6.3</a>&nbsp;<a href="#RST_STREAM">RST_STREAM</a></h3>
     999               <p id="rfc.section.2.6.3.p.1">The RST_STREAM frame allows for abnormal termination of a stream. When sent by the creator of a stream, it indicates the creator
     1000                  wishes to cancel the stream. When sent by the recipient of a stream, it indicates an error or that the recipient did not want
     1001                  to accept the stream, so the stream should be closed.
     1002               </p>
     1003               <div id="rfc.figure.u.5"></div><pre>+----------------------------------+
    9761004|1|   version    |         3       |
    9771005+----------------------------------+
     
    9821010|          Status code             |
    9831011+----------------------------------+
    984             </pre> <p id="rfc.section.2.6.3.p.3">Flags: Flags related to this frame. RST_STREAM does not define any flags. This value must be 0.</p>
    985       <p id="rfc.section.2.6.3.p.4">Length: An unsigned 24-bit value representing the number of bytes after the length field. For RST_STREAM control frames, this
    986          value is always 8.
    987       </p>
    988       <p id="rfc.section.2.6.3.p.5">Stream-ID: The 31-bit identifier for this stream.</p>
    989       <p id="rfc.section.2.6.3.p.6">Status code: (32 bits) An indicator for why the stream is being terminated.The following status codes are defined: </p>
    990       <ul class="empty">
    991          <li>1 - PROTOCOL_ERROR. This is a generic error, and should only be used if a more specific error is not available.</li>
    992          <li>2 - INVALID_STREAM. This is returned when a frame is received for a stream which is not active.</li>
    993          <li>3 - REFUSED_STREAM. Indicates that the stream was refused before any processing has been done on the stream.</li>
    994          <li>4 - UNSUPPORTED_VERSION. Indicates that the recipient of a stream does not support the SPDY version requested.</li>
    995          <li>5 - CANCEL. Used by the creator of a stream to indicate that the stream is no longer needed.</li>
    996          <li>6 - INTERNAL_ERROR. This is a generic error which can be used when the implementation has internally failed, not due to anything
    997             in the protocol.
    998          </li>
    999          <li>7 - FLOW_CONTROL_ERROR. The endpoint detected that its peer violated the flow control protocol.</li>
    1000          <li>8 - STREAM_IN_USE. The endpoint received a SYN_REPLY for a stream already open.</li>
    1001          <li>9 - STREAM_ALREADY_CLOSED. The endpoint received a data or SYN_REPLY frame for a stream which is half closed.</li>
    1002          <li>10 - INVALID_CREDENTIALS. The server received a request for a resource whose origin does not have valid credentials in the
    1003             client certificate vector.
    1004          </li>
    1005          <li>11 - FRAME_TOO_LARGE. The endpoint received a frame which this implementation could not support. If FRAME_TOO_LARGE is sent
    1006             for a SYN_STREAM, HEADERS, or SYN_REPLY frame without fully processing the compressed portion of those frames, then the compression
    1007             state will be out-of-sync with the other endpoint. In this case, senders of FRAME_TOO_LARGE MUST close the session.
    1008          </li>
    1009          <li>Note: 0 is not a valid status code for a RST_STREAM.</li>
    1010       </ul>
    1011       <p id="rfc.section.2.6.3.p.7">After receiving a RST_STREAM on a stream, the recipient must not send additional frames for that stream, and the stream moves
    1012          into the closed state.
    1013       </p>
    1014       <h3 id="rfc.section.2.6.4"><a href="#rfc.section.2.6.4">2.6.4</a>&nbsp;<a id="SETTINGS" href="#SETTINGS">SETTINGS</a></h3>
    1015       <p id="rfc.section.2.6.4.p.1">A SETTINGS frame contains a set of id/value pairs for communicating configuration data about how the two endpoints may communicate.
    1016          SETTINGS frames can be sent at any time by either endpoint, are optionally sent, and are fully asynchronous. When the server
    1017          is the sender, the sender can request that configuration data be persisted by the client across SPDY sessions and returned
    1018          to the server in future communications.
    1019       </p>
    1020       <p id="rfc.section.2.6.4.p.2">Persistence of SETTINGS ID/Value pairs is done on a per origin/IP pair (the "origin" is the set of scheme, host, and port
    1021          from the URI. See <a href="#RFC6454" id="rfc.xref.RFC6454.1"><cite title="The Web Origin Concept">[RFC6454]</cite></a>). That is, when a client connects to a server, and the server persists settings within the client, the client SHOULD return
    1022          the persisted settings on future connections to the same origin AND IP address and TCP port. Clients MUST NOT request servers
    1023          to use the persistence features of the SETTINGS frames, and servers MUST ignore persistence related flags sent by a client.
    1024       </p>
    1025       <div id="rfc.figure.u.6"></div> <pre>+----------------------------------+
     1012            </pre><p id="rfc.section.2.6.3.p.3">Flags: Flags related to this frame. RST_STREAM does not define any flags. This value must be 0.</p>
     1013               <p id="rfc.section.2.6.3.p.4">Length: An unsigned 24-bit value representing the number of bytes after the length field. For RST_STREAM control frames, this
     1014                  value is always 8.
     1015               </p>
     1016               <p id="rfc.section.2.6.3.p.5">Stream-ID: The 31-bit identifier for this stream.</p>
     1017               <p id="rfc.section.2.6.3.p.6">Status code: (32 bits) An indicator for why the stream is being terminated.The following status codes are defined: </p>
     1018               <ul class="empty">
     1019                  <li>1 - PROTOCOL_ERROR. This is a generic error, and should only be used if a more specific error is not available.</li>
     1020                  <li>2 - INVALID_STREAM. This is returned when a frame is received for a stream which is not active.</li>
     1021                  <li>3 - REFUSED_STREAM. Indicates that the stream was refused before any processing has been done on the stream.</li>
     1022                  <li>4 - UNSUPPORTED_VERSION. Indicates that the recipient of a stream does not support the SPDY version requested.</li>
     1023                  <li>5 - CANCEL. Used by the creator of a stream to indicate that the stream is no longer needed.</li>
     1024                  <li>6 - INTERNAL_ERROR. This is a generic error which can be used when the implementation has internally failed, not due to anything
     1025                     in the protocol.
     1026                  </li>
     1027                  <li>7 - FLOW_CONTROL_ERROR. The endpoint detected that its peer violated the flow control protocol.</li>
     1028                  <li>8 - STREAM_IN_USE. The endpoint received a SYN_REPLY for a stream already open.</li>
     1029                  <li>9 - STREAM_ALREADY_CLOSED. The endpoint received a data or SYN_REPLY frame for a stream which is half closed.</li>
     1030                  <li>10 - INVALID_CREDENTIALS. The server received a request for a resource whose origin does not have valid credentials in the
     1031                     client certificate vector.
     1032                  </li>
     1033                  <li>11 - FRAME_TOO_LARGE. The endpoint received a frame which this implementation could not support. If FRAME_TOO_LARGE is sent
     1034                     for a SYN_STREAM, HEADERS, or SYN_REPLY frame without fully processing the compressed portion of those frames, then the compression
     1035                     state will be out-of-sync with the other endpoint. In this case, senders of FRAME_TOO_LARGE MUST close the session.
     1036                  </li>
     1037                  <li>Note: 0 is not a valid status code for a RST_STREAM.</li>
     1038               </ul>
     1039               <p id="rfc.section.2.6.3.p.7">After receiving a RST_STREAM on a stream, the recipient must not send additional frames for that stream, and the stream moves
     1040                  into the closed state.
     1041               </p>
     1042            </div>
     1043            <div id="SETTINGS">
     1044               <h3 id="rfc.section.2.6.4"><a href="#rfc.section.2.6.4">2.6.4</a>&nbsp;<a href="#SETTINGS">SETTINGS</a></h3>
     1045               <p id="rfc.section.2.6.4.p.1">A SETTINGS frame contains a set of id/value pairs for communicating configuration data about how the two endpoints may communicate.
     1046                  SETTINGS frames can be sent at any time by either endpoint, are optionally sent, and are fully asynchronous. When the server
     1047                  is the sender, the sender can request that configuration data be persisted by the client across SPDY sessions and returned
     1048                  to the server in future communications.
     1049               </p>
     1050               <p id="rfc.section.2.6.4.p.2">Persistence of SETTINGS ID/Value pairs is done on a per origin/IP pair (the "origin" is the set of scheme, host, and port
     1051                  from the URI. See <a href="#RFC6454" id="rfc.xref.RFC6454.1"><cite title="The Web Origin Concept">[RFC6454]</cite></a>). That is, when a client connects to a server, and the server persists settings within the client, the client SHOULD return
     1052                  the persisted settings on future connections to the same origin AND IP address and TCP port. Clients MUST NOT request servers
     1053                  to use the persistence features of the SETTINGS frames, and servers MUST ignore persistence related flags sent by a client.
     1054               </p>
     1055               <div id="rfc.figure.u.6"></div><pre>+----------------------------------+
    10261056|1|   version    |         4       |
    10271057+----------------------------------+
     
    10321062|          ID/Value Pairs          |
    10331063|             ...                  |
    1034             </pre> <p id="rfc.section.2.6.4.p.4">Control bit: The control bit is always 1 for this message.</p>
    1035       <p id="rfc.section.2.6.4.p.5">Version: The SPDY version number.</p>
    1036       <p id="rfc.section.2.6.4.p.6">Type: The message type for a SETTINGS message is 4.</p>
    1037       <p id="rfc.section.2.6.4.p.7">Flags: FLAG_SETTINGS_CLEAR_SETTINGS (0x1): When set, the client should clear any previously persisted SETTINGS ID/Value pairs.
    1038          If this frame contains ID/Value pairs with the FLAG_SETTINGS_PERSIST_VALUE set, then the client will first clear its existing,
    1039          persisted settings, and then persist the values with the flag set which are contained within this frame. Because persistence
    1040          is only implemented on the client, this flag can only be used when the sender is the server.
    1041       </p>
    1042       <p id="rfc.section.2.6.4.p.8">Length: An unsigned 24-bit value representing the number of bytes after the length field. The total size of a SETTINGS frame
    1043          is 8 bytes + length.
    1044       </p>
    1045       <p id="rfc.section.2.6.4.p.9">Number of entries: A 32-bit value representing the number of ID/value pairs in this message.</p>
    1046       <p id="rfc.section.2.6.4.p.10">ID: A 32-bit ID number, comprised of 8 bits of flags and 24 bits of unique ID. </p>
    1047       <ul class="empty">
    1048          <li>ID.flags:
    1049             <ul class="empty">
    1050                <li>FLAG_SETTINGS_PERSIST_VALUE (0x1): When set, the sender of this SETTINGS frame is requesting that the recipient persist the
    1051                   ID/Value and return it in future SETTINGS frames sent from the sender to this recipient. Because persistence is only implemented
    1052                   on the client, this flag is only sent by the server.
    1053                </li>
    1054                <li>FLAG_SETTINGS_PERSISTED (0x2): When set, the sender is notifying the recipient that this ID/Value pair was previously sent
    1055                   to the sender by the recipient with the FLAG_SETTINGS_PERSIST_VALUE, and the sender is returning it. Because persistence is
    1056                   only implemented on the client, this flag is only sent by the client.
    1057                </li>
    1058             </ul>
    1059          </li>
    1060          <li>Defined IDs:
    1061             <ul class="empty">
    1062                <li>1 - SETTINGS_UPLOAD_BANDWIDTH allows the sender to send its expected upload bandwidth on this channel. This number is an estimate.
    1063                   The value should be the integral number of kilobytes per second that the sender predicts as an expected maximum upload channel
    1064                   capacity.
    1065                </li>
    1066                <li>2 - SETTINGS_DOWNLOAD_BANDWIDTH allows the sender to send its expected download bandwidth on this channel. This number is
    1067                   an estimate. The value should be the integral number of kilobytes per second that the sender predicts as an expected maximum
    1068                   download channel capacity.
    1069                </li>
    1070                <li>3 - SETTINGS_ROUND_TRIP_TIME allows the sender to send its expected round-trip-time on this channel. The round trip time is
    1071                   defined as the minimum amount of time to send a control frame from this client to the remote and receive a response. The value
    1072                   is represented in milliseconds.
    1073                </li>
    1074                <li>4 - SETTINGS_MAX_CONCURRENT_STREAMS allows the sender to inform the remote endpoint the maximum number of concurrent streams
    1075                   which it will allow. By default there is no limit. For implementors it is recommended that this value be no smaller than 100.
    1076                </li>
    1077                <li>5 - SETTINGS_CURRENT_CWND allows the sender to inform the remote endpoint of the current TCP CWND value.</li>
    1078                <li>6 - SETTINGS_DOWNLOAD_RETRANS_RATE allows the sender to inform the remote endpoint the retransmission rate (bytes retransmitted
    1079                   / total bytes transmitted).
    1080                </li>
    1081                <li>7 - SETTINGS_INITIAL_WINDOW_SIZE allows the sender to inform the remote endpoint the initial window size (in bytes) for new
    1082                   streams.
    1083                </li>
    1084                <li>8 - SETTINGS_CLIENT_CERTIFICATE_VECTOR_SIZE allows the server to inform the client if the new size of the client certificate
    1085                   vector.
    1086                </li>
    1087             </ul>
    1088          </li>
    1089       </ul>
    1090       <p id="rfc.section.2.6.4.p.11">Value: A 32-bit value.</p>
    1091       <p id="rfc.section.2.6.4.p.12">The message is intentionally extensible for future information which may improve client-server communications. The sender
    1092          does not need to send every type of ID/value. It must only send those for which it has accurate values to convey. When multiple
    1093          ID/value pairs are sent, they should be sent in order of lowest id to highest id. A single SETTINGS frame MUST not contain
    1094          multiple values for the same ID. If the recipient of a SETTINGS frame discovers multiple values for the same ID, it MUST ignore
    1095          all values except the first one.
    1096       </p>
    1097       <p id="rfc.section.2.6.4.p.13">A server may send multiple SETTINGS frames containing different ID/Value pairs. When the same ID/Value is sent twice, the
    1098          most recent value overrides any previously sent values. If the server sends IDs 1, 2, and 3 with the FLAG_SETTINGS_PERSIST_VALUE
    1099          in a first SETTINGS frame, and then sends IDs 4 and 5 with the FLAG_SETTINGS_PERSIST_VALUE, when the client returns the persisted
    1100          state on its next SETTINGS frame, it SHOULD send all 5 settings (1, 2, 3, 4, and 5 in this example) to the server.
    1101       </p>
    1102       <h3 id="rfc.section.2.6.5"><a href="#rfc.section.2.6.5">2.6.5</a>&nbsp;<a id="PING" href="#PING">PING</a></h3>
    1103       <p id="rfc.section.2.6.5.p.1">The PING control frame is a mechanism for measuring a minimal round-trip time from the sender. It can be sent from the client
    1104          or the server. Recipients of a PING frame should send an identical frame to the sender as soon as possible (if there is other
    1105          pending data waiting to be sent, PING should take highest priority). Each ping sent by a sender should use a unique ID.
    1106       </p>
    1107       <div id="rfc.figure.u.7"></div> <pre>+----------------------------------+
     1064            </pre><p id="rfc.section.2.6.4.p.4">Control bit: The control bit is always 1 for this message.</p>
     1065               <p id="rfc.section.2.6.4.p.5">Version: The SPDY version number.</p>
     1066               <p id="rfc.section.2.6.4.p.6">Type: The message type for a SETTINGS message is 4.</p>
     1067               <p id="rfc.section.2.6.4.p.7">Flags: FLAG_SETTINGS_CLEAR_SETTINGS (0x1): When set, the client should clear any previously persisted SETTINGS ID/Value pairs.
     1068                  If this frame contains ID/Value pairs with the FLAG_SETTINGS_PERSIST_VALUE set, then the client will first clear its existing,
     1069                  persisted settings, and then persist the values with the flag set which are contained within this frame. Because persistence
     1070                  is only implemented on the client, this flag can only be used when the sender is the server.
     1071               </p>
     1072               <p id="rfc.section.2.6.4.p.8">Length: An unsigned 24-bit value representing the number of bytes after the length field. The total size of a SETTINGS frame
     1073                  is 8 bytes + length.
     1074               </p>
     1075               <p id="rfc.section.2.6.4.p.9">Number of entries: A 32-bit value representing the number of ID/value pairs in this message.</p>
     1076               <p id="rfc.section.2.6.4.p.10">ID: A 32-bit ID number, comprised of 8 bits of flags and 24 bits of unique ID. </p>
     1077               <ul class="empty">
     1078                  <li>ID.flags:
     1079                     <ul class="empty">
     1080                        <li>FLAG_SETTINGS_PERSIST_VALUE (0x1): When set, the sender of this SETTINGS frame is requesting that the recipient persist the
     1081                           ID/Value and return it in future SETTINGS frames sent from the sender to this recipient. Because persistence is only implemented
     1082                           on the client, this flag is only sent by the server.
     1083                        </li>
     1084                        <li>FLAG_SETTINGS_PERSISTED (0x2): When set, the sender is notifying the recipient that this ID/Value pair was previously sent
     1085                           to the sender by the recipient with the FLAG_SETTINGS_PERSIST_VALUE, and the sender is returning it. Because persistence is
     1086                           only implemented on the client, this flag is only sent by the client.
     1087                        </li>
     1088                     </ul>
     1089                  </li>
     1090                  <li>Defined IDs:
     1091                     <ul class="empty">
     1092                        <li>1 - SETTINGS_UPLOAD_BANDWIDTH allows the sender to send its expected upload bandwidth on this channel. This number is an estimate.
     1093                           The value should be the integral number of kilobytes per second that the sender predicts as an expected maximum upload channel
     1094                           capacity.
     1095                        </li>
     1096                        <li>2 - SETTINGS_DOWNLOAD_BANDWIDTH allows the sender to send its expected download bandwidth on this channel. This number is
     1097                           an estimate. The value should be the integral number of kilobytes per second that the sender predicts as an expected maximum
     1098                           download channel capacity.
     1099                        </li>
     1100                        <li>3 - SETTINGS_ROUND_TRIP_TIME allows the sender to send its expected round-trip-time on this channel. The round trip time is
     1101                           defined as the minimum amount of time to send a control frame from this client to the remote and receive a response. The value
     1102                           is represented in milliseconds.
     1103                        </li>
     1104                        <li>4 - SETTINGS_MAX_CONCURRENT_STREAMS allows the sender to inform the remote endpoint the maximum number of concurrent streams
     1105                           which it will allow. By default there is no limit. For implementors it is recommended that this value be no smaller than 100.
     1106                        </li>
     1107                        <li>5 - SETTINGS_CURRENT_CWND allows the sender to inform the remote endpoint of the current TCP CWND value.</li>
     1108                        <li>6 - SETTINGS_DOWNLOAD_RETRANS_RATE allows the sender to inform the remote endpoint the retransmission rate (bytes retransmitted
     1109                           / total bytes transmitted).
     1110                        </li>
     1111                        <li>7 - SETTINGS_INITIAL_WINDOW_SIZE allows the sender to inform the remote endpoint the initial window size (in bytes) for new
     1112                           streams.
     1113                        </li>
     1114                        <li>8 - SETTINGS_CLIENT_CERTIFICATE_VECTOR_SIZE allows the server to inform the client if the new size of the client certificate
     1115                           vector.
     1116                        </li>
     1117                     </ul>
     1118                  </li>
     1119               </ul>
     1120               <p id="rfc.section.2.6.4.p.11">Value: A 32-bit value.</p>
     1121               <p id="rfc.section.2.6.4.p.12">The message is intentionally extensible for future information which may improve client-server communications. The sender
     1122                  does not need to send every type of ID/value. It must only send those for which it has accurate values to convey. When multiple
     1123                  ID/value pairs are sent, they should be sent in order of lowest id to highest id. A single SETTINGS frame MUST not contain
     1124                  multiple values for the same ID. If the recipient of a SETTINGS frame discovers multiple values for the same ID, it MUST ignore
     1125                  all values except the first one.
     1126               </p>
     1127               <p id="rfc.section.2.6.4.p.13">A server may send multiple SETTINGS frames containing different ID/Value pairs. When the same ID/Value is sent twice, the
     1128                  most recent value overrides any previously sent values. If the server sends IDs 1, 2, and 3 with the FLAG_SETTINGS_PERSIST_VALUE
     1129                  in a first SETTINGS frame, and then sends IDs 4 and 5 with the FLAG_SETTINGS_PERSIST_VALUE, when the client returns the persisted
     1130                  state on its next SETTINGS frame, it SHOULD send all 5 settings (1, 2, 3, 4, and 5 in this example) to the server.
     1131               </p>
     1132            </div>
     1133            <div id="PING">
     1134               <h3 id="rfc.section.2.6.5"><a href="#rfc.section.2.6.5">2.6.5</a>&nbsp;<a href="#PING">PING</a></h3>
     1135               <p id="rfc.section.2.6.5.p.1">The PING control frame is a mechanism for measuring a minimal round-trip time from the sender. It can be sent from the client
     1136                  or the server. Recipients of a PING frame should send an identical frame to the sender as soon as possible (if there is other
     1137                  pending data waiting to be sent, PING should take highest priority). Each ping sent by a sender should use a unique ID.
     1138               </p>
     1139               <div id="rfc.figure.u.7"></div><pre>+----------------------------------+
    11081140|1|   version    |         6       |
    11091141+----------------------------------+
     
    11121144|            32-bit ID             |
    11131145+----------------------------------+
    1114             </pre> <p id="rfc.section.2.6.5.p.3">Control bit: The control bit is always 1 for this message.</p>
    1115       <p id="rfc.section.2.6.5.p.4">Version: The SPDY version number.</p>
    1116       <p id="rfc.section.2.6.5.p.5">Type: The message type for a PING message is 6.</p>
    1117       <p id="rfc.section.2.6.5.p.6">Length: This frame is always 4 bytes long.</p>
    1118       <p id="rfc.section.2.6.5.p.7">ID: A unique ID for this ping, represented as an unsigned 32 bit value. When the client initiates a ping, it must use an odd
    1119          numbered ID. When the server initiates a ping, it must use an even numbered ping. Use of odd/even IDs is required in order
    1120          to avoid accidental looping on PINGs (where each side initiates an identical PING at the same time).
    1121       </p>
    1122       <p id="rfc.section.2.6.5.p.8">Note: If a sender uses all possible PING ids (e.g. has sent all 2^31 possible IDs), it can wrap and start re-using IDs.</p>
    1123       <p id="rfc.section.2.6.5.p.9">If a server receives an even numbered PING which it did not initiate, it must ignore the PING. If a client receives an odd
    1124          numbered PING which it did not initiate, it must ignore the PING.
    1125       </p>
    1126       <h3 id="rfc.section.2.6.6"><a href="#rfc.section.2.6.6">2.6.6</a>&nbsp;<a id="GOAWAY" href="#GOAWAY">GOAWAY</a></h3>
    1127       <p id="rfc.section.2.6.6.p.1">The GOAWAY control frame is a mechanism to tell the remote side of the connection to stop creating streams on this session.
    1128          It can be sent from the client or the server. Once sent, the sender will not respond to any new SYN_STREAMs on this session.
    1129          Recipients of a GOAWAY frame must not send additional streams on this session, although a new session can be established for
    1130          new streams. The purpose of this message is to allow an endpoint to gracefully stop accepting new streams (perhaps for a reboot
    1131          or maintenance), while still finishing processing of previously established streams.
    1132       </p>
    1133       <p id="rfc.section.2.6.6.p.2">There is an inherent race condition between an endpoint sending SYN_STREAMs and the remote sending a GOAWAY message. To deal
    1134          with this case, the GOAWAY contains a last-stream-id indicating the stream-id of the last stream which was created on the
    1135          sending endpoint in this session. If the receiver of the GOAWAY sent new SYN_STREAMs for sessions after this last-stream-id,
    1136          they were not processed by the server and the receiver may treat the stream as though it had never been created at all (hence
    1137          the receiver may want to re-create the stream later on a new session).
    1138       </p>
    1139       <p id="rfc.section.2.6.6.p.3">Endpoints should always send a GOAWAY message before closing a connection so that the remote can know whether a stream has
    1140          been partially processed or not. (For example, if an HTTP client sends a POST at the same time that a server closes a connection,
    1141          the client cannot know if the server started to process that POST request if the server does not send a GOAWAY frame to indicate
    1142          where it stopped working).
    1143       </p>
    1144       <p id="rfc.section.2.6.6.p.4">After sending a GOAWAY message, the sender must ignore all SYN_STREAM frames for new streams.</p>
    1145       <div id="rfc.figure.u.8"></div> <pre>+----------------------------------+
     1146            </pre><p id="rfc.section.2.6.5.p.3">Control bit: The control bit is always 1 for this message.</p>
     1147               <p id="rfc.section.2.6.5.p.4">Version: The SPDY version number.</p>
     1148               <p id="rfc.section.2.6.5.p.5">Type: The message type for a PING message is 6.</p>
     1149               <p id="rfc.section.2.6.5.p.6">Length: This frame is always 4 bytes long.</p>
     1150               <p id="rfc.section.2.6.5.p.7">ID: A unique ID for this ping, represented as an unsigned 32 bit value. When the client initiates a ping, it must use an odd
     1151                  numbered ID. When the server initiates a ping, it must use an even numbered ping. Use of odd/even IDs is required in order
     1152                  to avoid accidental looping on PINGs (where each side initiates an identical PING at the same time).
     1153               </p>
     1154               <p id="rfc.section.2.6.5.p.8">Note: If a sender uses all possible PING ids (e.g. has sent all 2^31 possible IDs), it can wrap and start re-using IDs.</p>
     1155               <p id="rfc.section.2.6.5.p.9">If a server receives an even numbered PING which it did not initiate, it must ignore the PING. If a client receives an odd
     1156                  numbered PING which it did not initiate, it must ignore the PING.
     1157               </p>
     1158            </div>
     1159            <div id="GOAWAY">
     1160               <h3 id="rfc.section.2.6.6"><a href="#rfc.section.2.6.6">2.6.6</a>&nbsp;<a href="#GOAWAY">GOAWAY</a></h3>
     1161               <p id="rfc.section.2.6.6.p.1">The GOAWAY control frame is a mechanism to tell the remote side of the connection to stop creating streams on this session.
     1162                  It can be sent from the client or the server. Once sent, the sender will not respond to any new SYN_STREAMs on this session.
     1163                  Recipients of a GOAWAY frame must not send additional streams on this session, although a new session can be established for
     1164                  new streams. The purpose of this message is to allow an endpoint to gracefully stop accepting new streams (perhaps for a reboot
     1165                  or maintenance), while still finishing processing of previously established streams.
     1166               </p>
     1167               <p id="rfc.section.2.6.6.p.2">There is an inherent race condition between an endpoint sending SYN_STREAMs and the remote sending a GOAWAY message. To deal
     1168                  with this case, the GOAWAY contains a last-stream-id indicating the stream-id of the last stream which was created on the
     1169                  sending endpoint in this session. If the receiver of the GOAWAY sent new SYN_STREAMs for sessions after this last-stream-id,
     1170                  they were not processed by the server and the receiver may treat the stream as though it had never been created at all (hence
     1171                  the receiver may want to re-create the stream later on a new session).
     1172               </p>
     1173               <p id="rfc.section.2.6.6.p.3">Endpoints should always send a GOAWAY message before closing a connection so that the remote can know whether a stream has
     1174                  been partially processed or not. (For example, if an HTTP client sends a POST at the same time that a server closes a connection,
     1175                  the client cannot know if the server started to process that POST request if the server does not send a GOAWAY frame to indicate
     1176                  where it stopped working).
     1177               </p>
     1178               <p id="rfc.section.2.6.6.p.4">After sending a GOAWAY message, the sender must ignore all SYN_STREAM frames for new streams.</p>
     1179               <div id="rfc.figure.u.8"></div><pre>+----------------------------------+
    11461180|1|   version    |         7       |
    11471181+----------------------------------+
     
    11521186|          Status code             |
    11531187+----------------------------------+
    1154             </pre> <p id="rfc.section.2.6.6.p.6">Control bit: The control bit is always 1 for this message.</p>
    1155       <p id="rfc.section.2.6.6.p.7">Version: The SPDY version number.</p>
    1156       <p id="rfc.section.2.6.6.p.8">Type: The message type for a GOAWAY message is 7.</p>
    1157       <p id="rfc.section.2.6.6.p.9">Length: This frame is always 8 bytes long.</p>
    1158       <p id="rfc.section.2.6.6.p.10">Last-good-stream-Id: The last stream id which was replied to (with either a SYN_REPLY or RST_STREAM) by the sender of the
    1159          GOAWAY message. If no streams were replied to, this value MUST be 0.
    1160       </p>
    1161       <p id="rfc.section.2.6.6.p.11">Status: The reason for closing the session. </p>
    1162       <ul class="empty">
    1163          <li>0 - OK. This is a normal session teardown.</li>
    1164          <li>1 - PROTOCOL_ERROR. This is a generic error, and should only be used if a more specific error is not available.</li>
    1165          <li>11 - INTERNAL_ERROR. This is a generic error which can be used when the implementation has internally failed, not due to anything
    1166             in the protocol.
    1167          </li>
    1168       </ul>
    1169       <h3 id="rfc.section.2.6.7"><a href="#rfc.section.2.6.7">2.6.7</a>&nbsp;<a id="HEADERS" href="#HEADERS">HEADERS</a></h3>
    1170       <p id="rfc.section.2.6.7.p.1">The HEADERS frame augments a stream with additional headers. It may be optionally sent on an existing stream at any time.
    1171          Specific application of the headers in this frame is application-dependent. The name/value header block within this frame
    1172          is compressed.
    1173       </p>
    1174       <div id="rfc.figure.u.9"></div> <pre>+------------------------------------+
     1188            </pre><p id="rfc.section.2.6.6.p.6">Control bit: The control bit is always 1 for this message.</p>
     1189               <p id="rfc.section.2.6.6.p.7">Version: The SPDY version number.</p>
     1190               <p id="rfc.section.2.6.6.p.8">Type: The message type for a GOAWAY message is 7.</p>
     1191               <p id="rfc.section.2.6.6.p.9">Length: This frame is always 8 bytes long.</p>
     1192               <p id="rfc.section.2.6.6.p.10">Last-good-stream-Id: The last stream id which was replied to (with either a SYN_REPLY or RST_STREAM) by the sender of the
     1193                  GOAWAY message. If no streams were replied to, this value MUST be 0.
     1194               </p>
     1195               <p id="rfc.section.2.6.6.p.11">Status: The reason for closing the session. </p>
     1196               <ul class="empty">
     1197                  <li>0 - OK. This is a normal session teardown.</li>
     1198                  <li>1 - PROTOCOL_ERROR. This is a generic error, and should only be used if a more specific error is not available.</li>
     1199                  <li>11 - INTERNAL_ERROR. This is a generic error which can be used when the implementation has internally failed, not due to anything
     1200                     in the protocol.
     1201                  </li>
     1202               </ul>
     1203            </div>
     1204            <div id="HEADERS">
     1205               <h3 id="rfc.section.2.6.7"><a href="#rfc.section.2.6.7">2.6.7</a>&nbsp;<a href="#HEADERS">HEADERS</a></h3>
     1206               <p id="rfc.section.2.6.7.p.1">The HEADERS frame augments a stream with additional headers. It may be optionally sent on an existing stream at any time.
     1207                  Specific application of the headers in this frame is application-dependent. The name/value header block within this frame
     1208                  is compressed.
     1209               </p>
     1210               <div id="rfc.figure.u.9"></div><pre>+------------------------------------+
    11751211|1|   version     |          8       |
    11761212+------------------------------------+
     
    11901226+------------------------------------+    |
    11911227|           (repeats)                |   &lt;+
    1192             </pre> <p id="rfc.section.2.6.7.p.3">Flags: Flags related to this frame. Valid flags are: </p>
    1193       <ul class="empty">
    1194          <li>0x01 = FLAG_FIN - marks this frame as the last frame to be transmitted on this stream and puts the sender in the half-closed (<a href="#StreamHalfClose" title="Stream half-close">Section&nbsp;2.3.6</a>) state.
    1195          </li>
    1196       </ul>
    1197       <p id="rfc.section.2.6.7.p.4">Length: An unsigned 24 bit value representing the number of bytes after the length field. The minimum length of the length
    1198          field is 4 (when the number of name value pairs is 0).
    1199       </p>
    1200       <p id="rfc.section.2.6.7.p.5">Stream-ID: The stream this HEADERS block is associated with.</p>
    1201       <p id="rfc.section.2.6.7.p.6">Name/Value Header Block: A set of name/value pairs carried as part of the SYN_STREAM. see Name/Value Header Block (<a href="#HeaderBlock" title="Name/Value Header Block">Section&nbsp;2.6.10</a>).
    1202       </p>
    1203       <h3 id="rfc.section.2.6.8"><a href="#rfc.section.2.6.8">2.6.8</a>&nbsp;<a id="WINDOW_UPDATE" href="#WINDOW_UPDATE">WINDOW_UPDATE</a></h3>
    1204       <p id="rfc.section.2.6.8.p.1">The WINDOW_UPDATE control frame is used to implement per stream flow control in SPDY. Flow control in SPDY is per hop, that
    1205          is, only between the two endpoints of a SPDY connection. If there are one or more intermediaries between the client and the
    1206          origin server, flow control signals are not explicitly forwarded by the intermediaries. (However, throttling of data transfer
    1207          by any recipient may have the effect of indirectly propagating flow control information upstream back to the original sender.)
    1208          Flow control only applies to the data portion of data frames. Recipients must buffer all control frames. If a recipient fails
    1209          to buffer an entire control frame, it MUST issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with the status code FLOW_CONTROL_ERROR for the stream.
    1210       </p>
    1211       <p id="rfc.section.2.6.8.p.2">Flow control in SPDY is implemented by a data transfer window kept by the sender of each stream. The data transfer window
    1212          is a simple uint32 that indicates how many bytes of data the sender can transmit. After a stream is created, but before any
    1213          data frames have been transmitted, the sender begins with the initial window size. This window size is a measure of the buffering
    1214          capability of the recipient. The sender must not send a data frame with data length greater than the transfer window size.
    1215          After sending each data frame, the sender decrements its transfer window size by the amount of data transmitted. When the
    1216          window size becomes less than or equal to 0, the sender must pause transmitting data frames. At the other end of the stream,
    1217          the recipient sends a WINDOW_UPDATE control back to notify the sender that it has consumed some data and freed up buffer space
    1218          to receive more data.
    1219       </p>
    1220       <div id="rfc.figure.u.10"></div> <pre>+----------------------------------+
     1228            </pre><p id="rfc.section.2.6.7.p.3">Flags: Flags related to this frame. Valid flags are: </p>
     1229               <ul class="empty">
     1230                  <li>0x01 = FLAG_FIN - marks this frame as the last frame to be transmitted on this stream and puts the sender in the half-closed (<a href="#StreamHalfClose" title="Stream half-close">Section&nbsp;2.3.6</a>) state.
     1231                  </li>
     1232               </ul>
     1233               <p id="rfc.section.2.6.7.p.4">Length: An unsigned 24 bit value representing the number of bytes after the length field. The minimum length of the length
     1234                  field is 4 (when the number of name value pairs is 0).
     1235               </p>
     1236               <p id="rfc.section.2.6.7.p.5">Stream-ID: The stream this HEADERS block is associated with.</p>
     1237               <p id="rfc.section.2.6.7.p.6">Name/Value Header Block: A set of name/value pairs carried as part of the SYN_STREAM. see Name/Value Header Block (<a href="#HeaderBlock" title="Name/Value Header Block">Section&nbsp;2.6.10</a>).
     1238               </p>
     1239            </div>
     1240            <div id="WINDOW_UPDATE">
     1241               <h3 id="rfc.section.2.6.8"><a href="#rfc.section.2.6.8">2.6.8</a>&nbsp;<a href="#WINDOW_UPDATE">WINDOW_UPDATE</a></h3>
     1242               <p id="rfc.section.2.6.8.p.1">The WINDOW_UPDATE control frame is used to implement per stream flow control in SPDY. Flow control in SPDY is per hop, that
     1243                  is, only between the two endpoints of a SPDY connection. If there are one or more intermediaries between the client and the
     1244                  origin server, flow control signals are not explicitly forwarded by the intermediaries. (However, throttling of data transfer
     1245                  by any recipient may have the effect of indirectly propagating flow control information upstream back to the original sender.)
     1246                  Flow control only applies to the data portion of data frames. Recipients must buffer all control frames. If a recipient fails
     1247                  to buffer an entire control frame, it MUST issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with the status code FLOW_CONTROL_ERROR for the stream.
     1248               </p>
     1249               <p id="rfc.section.2.6.8.p.2">Flow control in SPDY is implemented by a data transfer window kept by the sender of each stream. The data transfer window
     1250                  is a simple uint32 that indicates how many bytes of data the sender can transmit. After a stream is created, but before any
     1251                  data frames have been transmitted, the sender begins with the initial window size. This window size is a measure of the buffering
     1252                  capability of the recipient. The sender must not send a data frame with data length greater than the transfer window size.
     1253                  After sending each data frame, the sender decrements its transfer window size by the amount of data transmitted. When the
     1254                  window size becomes less than or equal to 0, the sender must pause transmitting data frames. At the other end of the stream,
     1255                  the recipient sends a WINDOW_UPDATE control back to notify the sender that it has consumed some data and freed up buffer space
     1256                  to receive more data.
     1257               </p>
     1258               <div id="rfc.figure.u.10"></div><pre>+----------------------------------+
    12211259|1|   version    |         9       |
    12221260+----------------------------------+
     
    12271265|X|  Delta-Window-Size (31-bits)   |
    12281266+----------------------------------+
    1229             </pre> <p id="rfc.section.2.6.8.p.4">Control bit: The control bit is always 1 for this message.</p>
    1230       <p id="rfc.section.2.6.8.p.5">Version: The SPDY version number.</p>
    1231       <p id="rfc.section.2.6.8.p.6">Type: The message type for a WINDOW_UPDATE message is 9.</p>
    1232       <p id="rfc.section.2.6.8.p.7">Length: The length field is always 8 for this frame (there are 8 bytes after the length field).</p>
    1233       <p id="rfc.section.2.6.8.p.8">Stream-ID: The stream ID that this WINDOW_UPDATE control frame is for.</p>
    1234       <p id="rfc.section.2.6.8.p.9">Delta-Window-Size: The additional number of bytes that the sender can transmit in addition to existing remaining window size.
    1235          The legal range for this field is 1 to 2^31 - 1 (0x7fffffff) bytes.
    1236       </p>
    1237       <p id="rfc.section.2.6.8.p.10">The window size as kept by the sender must never exceed 2^31 (although it can become negative in one special case). If a sender
    1238          receives a WINDOW_UPDATE that causes the its window size to exceed this limit, it must send RST_STREAM with status code FLOW_CONTROL_ERROR
    1239          to terminate the stream.
    1240       </p>
    1241       <p id="rfc.section.2.6.8.p.11">When a SPDY connection is first established, the default initial window size for all streams is 64KB. An endpoint can use
    1242          the SETTINGS control frame to adjust the initial window size for the connection. That is, its peer can start out using the
    1243          64KB default initial window size when sending data frames before receiving the SETTINGS. Because SETTINGS is asynchronous,
    1244          there may be a race condition if the recipient wants to decrease the initial window size, but its peer immediately sends 64KB
    1245          on the creation of a new connection, before waiting for the SETTINGS to arrive. This is one case where the window size kept
    1246          by the sender will become negative. Once the sender detects this condition, it must stop sending data frames and wait for
    1247          the recipient to catch up. The recipient has two choices:
    1248       </p>
    1249       <ul class="empty">
    1250          <li>immediately send RST_STREAM with FLOW_CONTROL_ERROR status code.</li>
    1251          <li>allow the head of line blocking (as there is only one stream for the session and the amount of data in flight is bounded by
    1252             the default initial window size), and send WINDOW_UPDATE as it consumes data.
    1253          </li>
    1254       </ul>
    1255       <p id="rfc.section.2.6.8.p.12">In the case of option 2, both sides must compute the window size based on the initial window size in the SETTINGS. For example,
    1256          if the recipient sets the initial window size to be 16KB, and the sender sends 64KB immediately on connection establishment,
    1257          the sender will discover its window size is -48KB on receipt of the SETTINGS. As the recipient consumes the first 16KB, it
    1258          must send a WINDOW_UPDATE of 16KB back to the sender. This interaction continues until the sender's window size becomes positive
    1259          again, and it can resume transmitting data frames.
    1260       </p>
    1261       <p id="rfc.section.2.6.8.p.13">After the recipient reads in a data frame with FLAG_FIN that marks the end of the data stream, it should not send WINDOW_UPDATE
    1262          frames as it consumes the last data frame. A sender should ignore all the WINDOW_UPDATE frames associated with the stream
    1263          after it send the last frame for the stream.
    1264       </p>
    1265       <p id="rfc.section.2.6.8.p.14">The data frames from the sender and the WINDOW_UPDATE frames from the recipient are completely asynchronous with respect to
    1266          each other. This property allows a recipient to aggressively update the window size kept by the sender to prevent the stream
    1267          from stalling.
    1268       </p>
    1269       <h3 id="rfc.section.2.6.9"><a href="#rfc.section.2.6.9">2.6.9</a>&nbsp;<a id="CREDENTIAL" href="#CREDENTIAL">CREDENTIAL</a></h3>
    1270       <p id="rfc.section.2.6.9.p.1">The CREDENTIAL control frame is used by the client to send additional client certificates to the server. A SPDY client may
    1271          decide to send requests for resources from different origins on the same SPDY session if it decides that that server handles
    1272          both origins. For example if the IP address associated with both hostnames matches and the SSL server certificate presented
    1273          in the initial handshake is valid for both hostnames. However, because the SSL connection can contain at most one client certificate,
    1274          the client needs a mechanism to send additional client certificates to the server.
    1275       </p>
    1276       <p id="rfc.section.2.6.9.p.2">The server is required to maintain a vector of client certificates associated with a SPDY session. When the client needs to
    1277          send a client certificate to the server, it will send a CREDENTIAL frame that specifies the index of the slot in which to
    1278          store the certificate as well as proof that the client posesses the corresponding private key. The initial size of this vector
    1279          must be 8. If the client provides a client certificate during the first TLS handshake, the contents of this certificate must
    1280          be copied into the first slot (index 1) in the CREDENTIAL vector, though it may be overwritten by subsequent CREDENTIAL frames.
    1281          The server must exclusively use the CREDNETIAL vector when evaluating the client certificates associated with an origin. The
    1282          server may change the size of this vector by sending a SETTINGS frame with the setting SETTINGS_CLIENT_CERTIFICATE_VECTOR_SIZE
    1283          value specified. In the event that the new size is smaller than the current size, truncation occurs preserving lower-index
    1284          slots as possible.
    1285       </p>
    1286       <p id="rfc.section.2.6.9.p.3">TLS renegotiation with client authentication is incompatible with SPDY given the multiplexed nature of SPDY. Specifically,
    1287          imagine that the client has 2 requests outstanding to the server for two different pages (in different tabs). When the renegotiation
    1288          + client certificate request comes in, the browser is unable to determine which resource triggered the client certificate
    1289          request, in order to prompt the user accordingly.
    1290       </p>
    1291       <div id="rfc.figure.u.11"></div> <pre>+----------------------------------+
     1267            </pre><p id="rfc.section.2.6.8.p.4">Control bit: The control bit is always 1 for this message.</p>
     1268               <p id="rfc.section.2.6.8.p.5">Version: The SPDY version number.</p>
     1269               <p id="rfc.section.2.6.8.p.6">Type: The message type for a WINDOW_UPDATE message is 9.</p>
     1270               <p id="rfc.section.2.6.8.p.7">Length: The length field is always 8 for this frame (there are 8 bytes after the length field).</p>
     1271               <p id="rfc.section.2.6.8.p.8">Stream-ID: The stream ID that this WINDOW_UPDATE control frame is for.</p>
     1272               <p id="rfc.section.2.6.8.p.9">Delta-Window-Size: The additional number of bytes that the sender can transmit in addition to existing remaining window size.
     1273                  The legal range for this field is 1 to 2^31 - 1 (0x7fffffff) bytes.
     1274               </p>
     1275               <p id="rfc.section.2.6.8.p.10">The window size as kept by the sender must never exceed 2^31 (although it can become negative in one special case). If a sender
     1276                  receives a WINDOW_UPDATE that causes the its window size to exceed this limit, it must send RST_STREAM with status code FLOW_CONTROL_ERROR
     1277                  to terminate the stream.
     1278               </p>
     1279               <p id="rfc.section.2.6.8.p.11">When a SPDY connection is first established, the default initial window size for all streams is 64KB. An endpoint can use
     1280                  the SETTINGS control frame to adjust the initial window size for the connection. That is, its peer can start out using the
     1281                  64KB default initial window size when sending data frames before receiving the SETTINGS. Because SETTINGS is asynchronous,
     1282                  there may be a race condition if the recipient wants to decrease the initial window size, but its peer immediately sends 64KB
     1283                  on the creation of a new connection, before waiting for the SETTINGS to arrive. This is one case where the window size kept
     1284                  by the sender will become negative. Once the sender detects this condition, it must stop sending data frames and wait for
     1285                  the recipient to catch up. The recipient has two choices:
     1286               </p>
     1287               <ul class="empty">
     1288                  <li>immediately send RST_STREAM with FLOW_CONTROL_ERROR status code.</li>
     1289                  <li>allow the head of line blocking (as there is only one stream for the session and the amount of data in flight is bounded by
     1290                     the default initial window size), and send WINDOW_UPDATE as it consumes data.
     1291                  </li>
     1292               </ul>
     1293               <p id="rfc.section.2.6.8.p.12">In the case of option 2, both sides must compute the window size based on the initial window size in the SETTINGS. For example,
     1294                  if the recipient sets the initial window size to be 16KB, and the sender sends 64KB immediately on connection establishment,
     1295                  the sender will discover its window size is -48KB on receipt of the SETTINGS. As the recipient consumes the first 16KB, it
     1296                  must send a WINDOW_UPDATE of 16KB back to the sender. This interaction continues until the sender's window size becomes positive
     1297                  again, and it can resume transmitting data frames.
     1298               </p>
     1299               <p id="rfc.section.2.6.8.p.13">After the recipient reads in a data frame with FLAG_FIN that marks the end of the data stream, it should not send WINDOW_UPDATE
     1300                  frames as it consumes the last data frame. A sender should ignore all the WINDOW_UPDATE frames associated with the stream
     1301                  after it send the last frame for the stream.
     1302               </p>
     1303               <p id="rfc.section.2.6.8.p.14">The data frames from the sender and the WINDOW_UPDATE frames from the recipient are completely asynchronous with respect to
     1304                  each other. This property allows a recipient to aggressively update the window size kept by the sender to prevent the stream
     1305                  from stalling.
     1306               </p>
     1307            </div>
     1308            <div id="CREDENTIAL">
     1309               <h3 id="rfc.section.2.6.9"><a href="#rfc.section.2.6.9">2.6.9</a>&nbsp;<a href="#CREDENTIAL">CREDENTIAL</a></h3>
     1310               <p id="rfc.section.2.6.9.p.1">The CREDENTIAL control frame is used by the client to send additional client certificates to the server. A SPDY client may
     1311                  decide to send requests for resources from different origins on the same SPDY session if it decides that that server handles
     1312                  both origins. For example if the IP address associated with both hostnames matches and the SSL server certificate presented
     1313                  in the initial handshake is valid for both hostnames. However, because the SSL connection can contain at most one client certificate,
     1314                  the client needs a mechanism to send additional client certificates to the server.
     1315               </p>
     1316               <p id="rfc.section.2.6.9.p.2">The server is required to maintain a vector of client certificates associated with a SPDY session. When the client needs to
     1317                  send a client certificate to the server, it will send a CREDENTIAL frame that specifies the index of the slot in which to
     1318                  store the certificate as well as proof that the client posesses the corresponding private key. The initial size of this vector
     1319                  must be 8. If the client provides a client certificate during the first TLS handshake, the contents of this certificate must
     1320                  be copied into the first slot (index 1) in the CREDENTIAL vector, though it may be overwritten by subsequent CREDENTIAL frames.
     1321                  The server must exclusively use the CREDNETIAL vector when evaluating the client certificates associated with an origin. The
     1322                  server may change the size of this vector by sending a SETTINGS frame with the setting SETTINGS_CLIENT_CERTIFICATE_VECTOR_SIZE
     1323                  value specified. In the event that the new size is smaller than the current size, truncation occurs preserving lower-index
     1324                  slots as possible.
     1325               </p>
     1326               <p id="rfc.section.2.6.9.p.3">TLS renegotiation with client authentication is incompatible with SPDY given the multiplexed nature of SPDY. Specifically,
     1327                  imagine that the client has 2 requests outstanding to the server for two different pages (in different tabs). When the renegotiation
     1328                  + client certificate request comes in, the browser is unable to determine which resource triggered the client certificate
     1329                  request, in order to prompt the user accordingly.
     1330               </p>
     1331               <div id="rfc.figure.u.11"></div><pre>+----------------------------------+
    12921332|1|000000000000001|0000000000001011|
    12931333+----------------------------------+
     
    13041344|            Certificate           |  |
    13051345+----------------------------------+ &lt;+
    1306             </pre> <p id="rfc.section.2.6.9.p.5">Slot: The index in the server's client certificate vector where this certificate should be stored. If there is already a certificate
    1307          stored at this index, it will be overwritten. The index is one based, not zero based; zero is an invalid slot index.
    1308       </p>
    1309       <p id="rfc.section.2.6.9.p.6">Proof: Cryptographic proof that the client has possession of the private key associated with the certificate. The format is
    1310          a TLS digitally-signed element (<a href="#RFC5246" id="rfc.xref.RFC5246.1"><cite title="The Transport Layer Security (TLS) Protocol Version 1.2">[RFC5246]</cite></a>, <a href="http://tools.ietf.org/html/rfc5246#section-4.7">Section 4.7</a>). The signature algorithm must be the same as that used in the CertificateVerify message. However, since the MD5+SHA1 signature
    1311          type used in TLS 1.0 connections can not be correctly encoded in a digitally-signed element, SHA1 must be used when MD5+SHA1
    1312          was used in the SSL connection. The signature is calculated over a 32 byte TLS extractor value (http://tools.ietf.org/html/rfc5705)
    1313          with a label of "EXPORTER SPDY certificate proof" using the empty string as context. ForRSA certificates the signature would
    1314          be a PKCS#1 v1.5 signature. For ECDSA, it would be an ECDSA-Sig-Value (http://tools.ietf.org/html/rfc5480#appendix-A). For
    1315          a 1024-bit RSA key, the CREDENTIAL message would be ~500 bytes.
    1316       </p>
    1317       <p id="rfc.section.2.6.9.p.7">Certificate: The certificate chain, starting with the leaf certificate. Each certificate must be encoded as a 32 bit length,
    1318          followed by a DER encoded certificate. The certificate must be of the same type (RSA, ECDSA, etc) as the client certificate
    1319          associated with the SSL connection.
    1320       </p>
    1321       <p id="rfc.section.2.6.9.p.8">If the server receives a request for a resource with unacceptable credential (either missing or invalid), it must reply with
    1322          a RST_STREAM frame with the status code INVALID_CREDENTIALS. Upon receipt of a RST_STREAM frame with INVALID_CREDENTIALS,
    1323          the client should initiate a new stream directly to the requested origin and resend the request. Note, SPDY does not allow
    1324          the server to request different client authentication for different resources in the same origin.
    1325       </p>
    1326       <p id="rfc.section.2.6.9.p.9">If the server receives an invalid CREDENTIAL frame, it MUST respond with a GOAWAY frame and shutdown the session.</p>
    1327       <h3 id="rfc.section.2.6.10"><a href="#rfc.section.2.6.10">2.6.10</a>&nbsp;<a id="HeaderBlock" href="#HeaderBlock">Name/Value Header Block</a></h3>
    1328       <p id="rfc.section.2.6.10.p.1">The Name/Value Header Block is found in the SYN_STREAM, SYN_REPLY and HEADERS control frames, and shares a common format:</p>
    1329       <div id="rfc.figure.u.12"></div> <pre>+------------------------------------+
     1346            </pre><p id="rfc.section.2.6.9.p.5">Slot: The index in the server's client certificate vector where this certificate should be stored. If there is already a certificate
     1347                  stored at this index, it will be overwritten. The index is one based, not zero based; zero is an invalid slot index.
     1348               </p>
     1349               <p id="rfc.section.2.6.9.p.6">Proof: Cryptographic proof that the client has possession of the private key associated with the certificate. The format is
     1350                  a TLS digitally-signed element (<a href="#RFC5246" id="rfc.xref.RFC5246.1"><cite title="The Transport Layer Security (TLS) Protocol Version 1.2">[RFC5246]</cite></a>, <a href="https://tools.ietf.org/html/rfc5246#section-4.7">Section 4.7</a>). The signature algorithm must be the same as that used in the CertificateVerify message. However, since the MD5+SHA1 signature
     1351                  type used in TLS 1.0 connections can not be correctly encoded in a digitally-signed element, SHA1 must be used when MD5+SHA1
     1352                  was used in the SSL connection. The signature is calculated over a 32 byte TLS extractor value (http://tools.ietf.org/html/rfc5705)
     1353                  with a label of "EXPORTER SPDY certificate proof" using the empty string as context. ForRSA certificates the signature would
     1354                  be a PKCS#1 v1.5 signature. For ECDSA, it would be an ECDSA-Sig-Value (http://tools.ietf.org/html/rfc5480#appendix-A). For
     1355                  a 1024-bit RSA key, the CREDENTIAL message would be ~500 bytes.
     1356               </p>
     1357               <p id="rfc.section.2.6.9.p.7">Certificate: The certificate chain, starting with the leaf certificate. Each certificate must be encoded as a 32 bit length,
     1358                  followed by a DER encoded certificate. The certificate must be of the same type (RSA, ECDSA, etc) as the client certificate
     1359                  associated with the SSL connection.
     1360               </p>
     1361               <p id="rfc.section.2.6.9.p.8">If the server receives a request for a resource with unacceptable credential (either missing or invalid), it must reply with
     1362                  a RST_STREAM frame with the status code INVALID_CREDENTIALS. Upon receipt of a RST_STREAM frame with INVALID_CREDENTIALS,
     1363                  the client should initiate a new stream directly to the requested origin and resend the request. Note, SPDY does not allow
     1364                  the server to request different client authentication for different resources in the same origin.
     1365               </p>
     1366               <p id="rfc.section.2.6.9.p.9">If the server receives an invalid CREDENTIAL frame, it MUST respond with a GOAWAY frame and shutdown the session.</p>
     1367            </div>
     1368            <div id="HeaderBlock">
     1369               <h3 id="rfc.section.2.6.10"><a href="#rfc.section.2.6.10">2.6.10</a>&nbsp;<a href="#HeaderBlock">Name/Value Header Block</a></h3>
     1370               <p id="rfc.section.2.6.10.p.1">The Name/Value Header Block is found in the SYN_STREAM, SYN_REPLY and HEADERS control frames, and shares a common format:</p>
     1371               <div id="rfc.figure.u.12"></div><pre>+------------------------------------+
    13301372| Number of Name/Value pairs (int32) |
    13311373+------------------------------------+
     
    13391381+------------------------------------+
    13401382|           (repeats)                |
    1341             </pre> <p id="rfc.section.2.6.10.p.3">Number of Name/Value pairs: The number of repeating name/value pairs following this field.</p>
    1342       <p id="rfc.section.2.6.10.p.4">List of Name/Value pairs: </p>
    1343       <ul class="empty">
    1344          <li>Length of Name: a 32-bit value containing the number of octets in the name field. Note that in practice, this length must
    1345             not exceed 2^24, as that is the maximum size of a SPDY frame.
    1346          </li>
    1347          <li>Name: 0 or more octets, 8-bit sequences of data, excluding 0.</li>
    1348          <li>Length of Value: a 32-bit value containing the number of octets in the value field. Note that in practice, this length must
    1349             not exceed 2^24, as that is the maximum size of a SPDY frame.
    1350          </li>
    1351          <li>Value: 0 or more octets, 8-bit sequences of data, excluding 0.</li>
    1352       </ul>
    1353       <p id="rfc.section.2.6.10.p.5">Each header name must have at least one value. Header names are encoded using the <a href="#ASCII">US-ASCII character set</a> <cite title="US-ASCII. Coded Character Set - 7-Bit American Standard Code for Information Interchange. Standard ANSI X3.4-1986, ANSI, 1986." id="rfc.xref.ASCII.1">[ASCII]</cite> and must be all lower case. The length of each name must be greater than zero. A recipient of a zero-length name MUST issue
    1354          a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with the status code PROTOCOL_ERROR for the stream-id.
    1355       </p>
    1356       <p id="rfc.section.2.6.10.p.6">Duplicate header names are not allowed. To send two identically named headers, send a header with two values, where the values
    1357          are separated by a single NUL (0) byte. A header value can either be empty (e.g. the length is zero) or it can contain multiple,
    1358          NUL-separated values, each with length greater than zero. The value never starts nor ends with a NUL character. Recipients
    1359          of illegal value fields MUST issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with the status code PROTOCOL_ERROR for the stream-id.
    1360       </p>
    1361       <h4 id="rfc.section.2.6.10.1"><a href="#rfc.section.2.6.10.1">2.6.10.1</a>&nbsp;<a id="Compression" href="#Compression">Compression</a></h4>
    1362       <p id="rfc.section.2.6.10.1.p.1">The Name/Value Header Block is a section of the SYN_STREAM, SYN_REPLY, and HEADERS frames used to carry header meta-data.
    1363          This block is always compressed using zlib compression. Within this specification, any reference to 'zlib' is referring to
    1364          the <a href="#RFC1950">ZLIB Compressed Data Format Specification Version 3.3 as part of RFC1950.</a> <cite title="ZLIB Compressed Data Format Specification version 3.3" id="rfc.xref.RFC1950.1">[RFC1950]</cite></p>
    1365       <p id="rfc.section.2.6.10.1.p.2">For each HEADERS compression instance, the initial state is initialized using the following <a href="#UDELCOMPRESSION">dictionary</a> <cite title="A Methodology to Derive SPDY's Initial Dictionary for Zlib Compression" id="rfc.xref.UDELCOMPRESSION.1">[UDELCOMPRESSION]</cite>:
    1366       </p>
    1367       <div id="rfc.figure.u.13"></div> <pre class="ccmarker cct"><span>&lt;CODE BEGINS&gt;</span></pre><pre class="text">const unsigned char SPDY_dictionary_txt[] = {
     1383            </pre><p id="rfc.section.2.6.10.p.3">Number of Name/Value pairs: The number of repeating name/value pairs following this field.</p>
     1384               <p id="rfc.section.2.6.10.p.4">List of Name/Value pairs: </p>
     1385               <ul class="empty">
     1386                  <li>Length of Name: a 32-bit value containing the number of octets in the name field. Note that in practice, this length must
     1387                     not exceed 2^24, as that is the maximum size of a SPDY frame.
     1388                  </li>
     1389                  <li>Name: 0 or more octets, 8-bit sequences of data, excluding 0.</li>
     1390                  <li>Length of Value: a 32-bit value containing the number of octets in the value field. Note that in practice, this length must
     1391                     not exceed 2^24, as that is the maximum size of a SPDY frame.
     1392                  </li>
     1393                  <li>Value: 0 or more octets, 8-bit sequences of data, excluding 0.</li>
     1394               </ul>
     1395               <p id="rfc.section.2.6.10.p.5">Each header name must have at least one value. Header names are encoded using the <a href="#ASCII">US-ASCII character set</a> <cite title="US-ASCII. Coded Character Set - 7-Bit American Standard Code for Information Interchange. Standard ANSI X3.4-1986, ANSI, 1986." id="rfc.xref.ASCII.1">[ASCII]</cite> and must be all lower case. The length of each name must be greater than zero. A recipient of a zero-length name MUST issue
     1396                  a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with the status code PROTOCOL_ERROR for the stream-id.
     1397               </p>
     1398               <p id="rfc.section.2.6.10.p.6">Duplicate header names are not allowed. To send two identically named headers, send a header with two values, where the values
     1399                  are separated by a single NUL (0) byte. A header value can either be empty (e.g. the length is zero) or it can contain multiple,
     1400                  NUL-separated values, each with length greater than zero. The value never starts nor ends with a NUL character. Recipients
     1401                  of illegal value fields MUST issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with the status code PROTOCOL_ERROR for the stream-id.
     1402               </p>
     1403               <div id="Compression">
     1404                  <h4 id="rfc.section.2.6.10.1"><a href="#rfc.section.2.6.10.1">2.6.10.1</a>&nbsp;<a href="#Compression">Compression</a></h4>
     1405                  <p id="rfc.section.2.6.10.1.p.1">The Name/Value Header Block is a section of the SYN_STREAM, SYN_REPLY, and HEADERS frames used to carry header meta-data.
     1406                     This block is always compressed using zlib compression. Within this specification, any reference to 'zlib' is referring to
     1407                     the <a href="#RFC1950">ZLIB Compressed Data Format Specification Version 3.3 as part of RFC1950.</a> <cite title="ZLIB Compressed Data Format Specification version 3.3" id="rfc.xref.RFC1950.1">[RFC1950]</cite></p>
     1408                  <p id="rfc.section.2.6.10.1.p.2">For each HEADERS compression instance, the initial state is initialized using the following <a href="#UDELCOMPRESSION">dictionary</a> <cite title="A Methodology to Derive SPDY's Initial Dictionary for Zlib Compression" id="rfc.xref.UDELCOMPRESSION.1">[UDELCOMPRESSION]</cite>:
     1409                  </p>
     1410                  <div id="rfc.figure.u.13"></div><pre class="text">const unsigned char SPDY_dictionary_txt[] = {
    13681411  0x00, 0x00, 0x00, 0x07, 0x6f, 0x70, 0x74, 0x69,  \\ - - - - o p t i
    13691412  0x6f, 0x6e, 0x73, 0x00, 0x00, 0x00, 0x04, 0x68,  \\ o n s - - - - h
     
    15451588  0x2c, 0x65, 0x6e, 0x71, 0x3d, 0x30, 0x2e         \\ - e n q - 0 -
    15461589};
    1547 </pre><pre class="ccmarker ccb"><span>&lt;CODE ENDS&gt;</span></pre> <p id="rfc.section.2.6.10.1.p.4">The entire contents of the name/value header block is compressed using zlib. There is a single zlib stream for all name value
    1548          pairs in one direction on a connection. SPDY uses a SYNC_FLUSH between each compressed frame.
    1549       </p>
    1550       <p id="rfc.section.2.6.10.1.p.5">Implementation notes: the compression engine can be tuned to favor speed or size. Optimizing for size increases memory use
    1551          and CPU consumption. Because header blocks are generally small, implementors may want to reduce the window-size of the compression
    1552          engine from the default 15bits (a 32KB window) to more like 11bits (a 2KB window). The exact setting is chosen by the compressor,
    1553          the decompressor will work with any setting.
    1554       </p>
    1555       <h1 id="rfc.section.3"><a href="#rfc.section.3">3.</a>&nbsp;<a id="HTTPLayer" href="#HTTPLayer">HTTP Layering over SPDY</a></h1>
    1556       <p id="rfc.section.3.p.1">SPDY is intended to be as compatible as possible with current web-based applications. This means that, from the perspective
    1557          of the server business logic or application API, the features of HTTP are unchanged. To achieve this, all of the application
    1558          request and response header semantics are preserved, although the syntax of conveying those semantics has changed. Thus, the
    1559          rules from the <a href="#RFC2616">HTTP/1.1 specification in RFC2616</a> <cite title="Hypertext Transfer Protocol -- HTTP/1.1" id="rfc.xref.RFC2616.2">[RFC2616]</cite> apply with the changes in the sections below.
    1560       </p>
    1561       <h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a>&nbsp;Connection Management
    1562       </h2>
    1563       <p id="rfc.section.3.1.p.1">Clients SHOULD NOT open more than one SPDY session to a given <a href="#RFC6454">origin</a> <cite title="The Web Origin Concept" id="rfc.xref.RFC6454.2">[RFC6454]</cite> concurrently.
    1564       </p>
    1565       <p id="rfc.section.3.1.p.2">Note that it is possible for one SPDY session to be finishing (e.g. a GOAWAY message has been sent, but not all streams have
    1566          finished), while another SPDY session is starting.
    1567       </p>
    1568       <h3 id="rfc.section.3.1.1"><a href="#rfc.section.3.1.1">3.1.1</a>&nbsp;Use of GOAWAY
    1569       </h3>
    1570       <p id="rfc.section.3.1.1.p.1">SPDY provides a GOAWAY message which can be used when closing a connection from either the client or server. Without a server
    1571          GOAWAY message, HTTP has a race condition where the client sends a request (a new SYN_STREAM) just as the server is closing
    1572          the connection, and the client cannot know if the server received the stream or not. By using the last-stream-id in the GOAWAY,
    1573          servers can indicate to the client if a request was processed or not.
    1574       </p>
    1575       <p id="rfc.section.3.1.1.p.2">Note that some servers will choose to send the GOAWAY and immediately terminate the connection without waiting for active
    1576          streams to finish. The client will be able to determine this because SPDY streams are determinstically closed. This abrupt
    1577          termination will force the client to heuristically decide whether to retry the pending requests. Clients always need to be
    1578          capable of dealing with this case because they must deal with accidental connection termination cases, which are the same
    1579          as the server never having sent a GOAWAY.
    1580       </p>
    1581       <p id="rfc.section.3.1.1.p.3">More sophisticated servers will use GOAWAY to implement a graceful teardown. They will send the GOAWAY and provide some time
    1582          for the active streams to finish before terminating the connection.
    1583       </p>
    1584       <p id="rfc.section.3.1.1.p.4">If a SPDY client closes the connection, it should also send a GOAWAY message. This allows the server to know if any server-push
    1585          streams were received by the client.
    1586       </p>
    1587       <p id="rfc.section.3.1.1.p.5">If the endpoint closing the connection has not received any SYN_STREAMs from the remote, the GOAWAY will contain a last-stream-id
    1588          of 0.
    1589       </p>
    1590       <h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a>&nbsp;HTTP Request/Response
    1591       </h2>
    1592       <h3 id="rfc.section.3.2.1"><a href="#rfc.section.3.2.1">3.2.1</a>&nbsp;Request
    1593       </h3>
    1594       <p id="rfc.section.3.2.1.p.1">The client initiates a request by sending a SYN_STREAM frame. For requests which do not contain a body, the SYN_STREAM frame
    1595          MUST set the FLAG_FIN, indicating that the client intends to send no further data on this stream. For requests which do contain
    1596          a body, the SYN_STREAM will not contain the FLAG_FIN, and the body will follow the SYN_STREAM in a series of DATA frames.
    1597          The last DATA frame will set the FLAG_FIN to indicate the end of the body.
    1598       </p>
    1599       <p id="rfc.section.3.2.1.p.2">The SYN_STREAM Name/Value section will contain all of the HTTP headers which are associated with an HTTP request. The header
    1600          block in SPDY is mostly unchanged from today's HTTP header block, with the following differences:
    1601       </p>
    1602       <ul class="empty">
    1603          <li>The first line of the request is unfolded into name/value pairs like other HTTP headers and MUST be present:
    1604             <ul class="empty">
    1605                <li>":method" - the HTTP method for this request (e.g. "GET", "POST", "HEAD", etc)</li>
    1606                <li>":path" - the url-path for this url with "/" prefixed. (See <a href="#RFC1738">RFC1738</a> <cite title="Uniform Resource Locators (URL)" id="rfc.xref.RFC1738.1">[RFC1738]</cite>). For example, for "http://www.google.com/search?q=dogs" the path would be "/search?q=dogs".
    1607                </li>
    1608                <li>":version" - the HTTP version of this request (e.g. "HTTP/1.1")</li>
    1609             </ul>
    1610          </li>
    1611          <li>In addition, the following two name/value pairs must also be present in every request:
    1612             <ul class="empty">
    1613                <li>":host" - the hostport (See <a href="#RFC1738">RFC1738</a> <cite title="Uniform Resource Locators (URL)" id="rfc.xref.RFC1738.2">[RFC1738]</cite>) portion of the URL for this request (e.g. "www.google.com:1234"). This header is the same as the HTTP 'Host' header.
    1614                </li>
    1615                <li>":scheme" - the scheme portion of the URL for this request (e.g. "https"))</li>
    1616             </ul>
    1617          </li>
    1618          <li>Header names are all lowercase.</li>
    1619          <li>The Connection, Host, Keep-Alive, Proxy-Connection, and Transfer-Encoding headers are not valid and MUST not be sent.</li>
    1620          <li>User-agents MUST support gzip compression. Regardless of the Accept-Encoding sent by the user-agent, the server may always
    1621             send content encoded with gzip or deflate encoding.
    1622          </li>
    1623          <li>If a server receives a request where the sum of the data frame payload lengths does not equal the size of the Content-Length
    1624             header, the server MUST return a 400 (Bad Request) error.
    1625          </li>
    1626          <li>POST-specific changes:
    1627             <ul class="empty">
    1628                <li>Although POSTs are inherently chunked, POST requests SHOULD also be accompanied by a Content-Length header. There are two
    1629                   reasons for this: First, it assists with upload progress meters for an improved user experience. But second, we know from
    1630                   early versions of SPDY that failure to send a content length header is incompatible with many existing HTTP server implementations.
    1631                   Existing user-agents do not omit the Content-Length header, and server implementations have come to depend upon this.
    1632                </li>
    1633             </ul>
    1634          </li>
    1635       </ul>
    1636       <p id="rfc.section.3.2.1.p.3">The user-agent is free to prioritize requests as it sees fit. If the user-agent cannot make progress without receiving a resource,
    1637          it should attempt to raise the priority of that resource. Resources such as images, SHOULD generally use the lowest priority.
    1638       </p>
    1639       <p id="rfc.section.3.2.1.p.4">If a client sends a SYN_STREAM without all of the method, host, path, scheme, and version headers, the server MUST reply with
    1640          a HTTP 400 Bad Request reply.
    1641       </p>
    1642       <h3 id="rfc.section.3.2.2"><a href="#rfc.section.3.2.2">3.2.2</a>&nbsp;Response
    1643       </h3>
    1644       <p id="rfc.section.3.2.2.p.1">The server responds to a client request with a SYN_REPLY frame. Symmetric to the client's upload stream, server will send
    1645          data after the SYN_REPLY frame via a series of DATA frames, and the last data frame will contain the FLAG_FIN to indicate
    1646          successful end-of-stream. If a response (like a 202 or 204 response) contains no body, the SYN_REPLY frame may contain the
    1647          FLAG_FIN flag to indicate no further data will be sent on the stream.
    1648       </p>
    1649       <p id="rfc.section.3.2.2.p.2"> </p>
    1650       <ul class="empty">
    1651          <li>The response status line is unfolded into name/value pairs like other HTTP headers and must be present:
    1652             <ul class="empty">
    1653                <li>":status" - The HTTP response status code (e.g. "200" or "200 OK")</li>
    1654                <li>":version" - The HTTP response version (e.g. "HTTP/1.1")</li>
    1655             </ul>
    1656          </li>
    1657          <li>All header names must be lowercase.</li>
    1658          <li>The Connection, Keep-Alive, Proxy-Connection, and Transfer-Encoding headers are not valid and MUST not be sent.</li>
    1659          <li>Responses MAY be accompanied by a Content-Length header for advisory purposes. (e.g. for UI progress meters)</li>
    1660          <li>If a client receives a response where the sum of the data frame payload lengths does not equal the size of the Content-Length
    1661             header, the client MUST ignore the content length header.
    1662          </li>
    1663       </ul>
    1664       <p id="rfc.section.3.2.2.p.3">If a client receives a SYN_REPLY without a status or without a version header, the client must reply with a RST_STREAM frame
    1665          indicating a PROTOCOL ERROR.
    1666       </p>
    1667       <h3 id="rfc.section.3.2.3"><a href="#rfc.section.3.2.3">3.2.3</a>&nbsp;<a id="Authentication" href="#Authentication">Authentication</a></h3>
    1668       <p id="rfc.section.3.2.3.p.1">When a client sends a request to an origin server that requires authentication, the server can reply with a "401 Unauthorized"
    1669          response, and include a WWW-Authenticate challenge header that defines the authentication scheme to be used. The client then
    1670          retries the request with an Authorization header appropriate to the specified authentication scheme.
    1671       </p>
    1672       <p id="rfc.section.3.2.3.p.2">There are four options for proxy authentication, Basic, Digest, NTLM and Negotiate (SPNEGO). The first two options were defined
    1673          in <a href="#RFC2617">RFC2617</a> <cite title="HTTP Authentication: Basic and Digest Access Authentication" id="rfc.xref.RFC2617.1">[RFC2617]</cite>, and are stateless. The second two options were developed by Microsoft and specified in <a href="#RFC4559">RFC4559</a> <cite title="SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows" id="rfc.xref.RFC4559.1">[RFC4559]</cite>, and are stateful; otherwise known as multi-round authentication, or connection authentication.
    1674       </p>
    1675       <h4 id="rfc.section.3.2.3.1"><a href="#rfc.section.3.2.3.1">3.2.3.1</a>&nbsp;Stateless Authentication
    1676       </h4>
    1677       <p id="rfc.section.3.2.3.1.p.1">Stateless Authentication over SPDY is identical to how it is performed over HTTP. If multiple SPDY streams are concurrently
    1678          sent to a single server, each will authenticate independently, similar to how two HTTP connections would independently authenticate
    1679          to a proxy server.
    1680       </p>
    1681       <h4 id="rfc.section.3.2.3.2"><a href="#rfc.section.3.2.3.2">3.2.3.2</a>&nbsp;Stateful Authentication
    1682       </h4>
    1683       <p id="rfc.section.3.2.3.2.p.1">Unfortunately, the stateful authentication mechanisms were implemented and defined in a such a way that directly violates
    1684          RFC2617 - they do not include a "realm" as part of the request. This is problematic in SPDY because it makes it impossible
    1685          for a client to disambiguate two concurrent server authentication challenges.
    1686       </p>
    1687       <p id="rfc.section.3.2.3.2.p.2">To deal with this case, SPDY servers using Stateful Authentication MUST implement one of two changes: </p>
    1688       <ul class="empty">
    1689          <li>Servers can add a "realm=&lt;desired realm&gt;" header so that the two authentication requests can be disambiguated and run concurrently.
    1690             Unfortunately, given how these mechanisms work, this is probably not practical.
    1691          </li>
    1692          <li>Upon sending the first stateful challenge response, the server MUST buffer and defer all further frames which are not part
    1693             of completing the challenge until the challenge has completed. Completing the authentication challenge may take multiple round
    1694             trips. Once the client receives a "401 Authenticate" response for a stateful authentication type, it MUST stop sending new
    1695             requests to the server until the authentication has completed by receiving a non-401 response on at least one stream.
    1696          </li>
    1697       </ul>
    1698       <h2 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a>&nbsp;Server Push Transactions
    1699       </h2>
    1700       <p id="rfc.section.3.3.p.1">SPDY enables a server to send multiple replies to a client for a single request. The rationale for this feature is that sometimes
    1701          a server knows that it will need to send multiple resources in response to a single request. Without server push features,
    1702          the client must first download the primary resource, then discover the secondary resource(s), and request them. Pushing of
    1703          resources avoids the round-trip delay, but also creates a potential race where a server can be pushing content which a user-agent
    1704          is in the process of requesting. The following mechanics attempt to prevent the race condition while enabling the performance
    1705          benefit.
    1706       </p>
    1707       <p id="rfc.section.3.3.p.2">Browsers receiving a pushed response MUST validate that the server is authorized to push the URL using the <a href="#RFC6454">browser same-origin</a> <cite title="The Web Origin Concept" id="rfc.xref.RFC6454.3">[RFC6454]</cite> policy. For example, a SPDY connection to www.foo.com is generally not permitted to push a response for www.evil.com.
    1708       </p>
    1709       <p id="rfc.section.3.3.p.3">If the browser accepts a pushed response (e.g. it does not send a RST_STREAM), the browser MUST attempt to cache the pushed
    1710          response in same way that it would cache any other response. This means validating the response headers and inserting into
    1711          the disk cache.
    1712       </p>
    1713       <p id="rfc.section.3.3.p.4">Because pushed responses have no request, they have no request headers associated with them. At the framing layer, SPDY pushed
    1714          streams contain an "associated-stream-id" which indicates the requested stream for which the pushed stream is related. The
    1715          pushed stream inherits all of the headers from the associated-stream-id with the exception of ":host", ":scheme", and ":path",
    1716          which are provided as part of the pushed response stream headers. The browser MUST store these inherited and implied request
    1717          headers with the cached resource.
    1718       </p>
    1719       <p id="rfc.section.3.3.p.5">Implementation note: With server push, it is theoretically possible for servers to push unreasonable amounts of content or
    1720          resources to the user-agent. Browsers MUST implement throttles to protect against unreasonable push attacks.
    1721       </p>
    1722       <h3 id="rfc.section.3.3.1"><a href="#rfc.section.3.3.1">3.3.1</a>&nbsp;Server implementation
    1723       </h3>
    1724       <p id="rfc.section.3.3.1.p.1">When the server intends to push a resource to the user-agent, it opens a new stream by sending a unidirectional SYN_STREAM.
    1725          The SYN_STREAM MUST include an Associated-To-Stream-ID, and MUST set the FLAG_UNIDIRECTIONAL flag. The SYN_STREAM MUST include
    1726          headers for ":scheme", ":host", ":path", which represent the URL for the resource being pushed. Subsequent headers may follow
    1727          in HEADERS frames. The purpose of the association is so that the user-agent can differentiate which request induced the pushed
    1728          stream; without it, if the user-agent had two tabs open to the same page, each pushing unique content under a fixed URL, the
    1729          user-agent would not be able to differentiate the requests.
    1730       </p>
    1731       <p id="rfc.section.3.3.1.p.2">The Associated-To-Stream-ID must be the ID of an existing, open stream. The reason for this restriction is to have a clear
    1732          endpoint for pushed content. If the user-agent requested a resource on stream 11, the server replies on stream 11. It can
    1733          push any number of additional streams to the client before sending a FLAG_FIN on stream 11. However, once the originating
    1734          stream is closed no further push streams may be associated with it. The pushed streams do not need to be closed (FIN set)
    1735          before the originating stream is closed, they only need to be created before the originating stream closes.
    1736       </p>
    1737       <p id="rfc.section.3.3.1.p.3">It is illegal for a server to push a resource with the Associated-To-Stream-ID of 0.</p>
    1738       <p id="rfc.section.3.3.1.p.4">To minimize race conditions with the client, the SYN_STREAM for the pushed resources MUST be sent prior to sending any content
    1739          which could allow the client to discover the pushed resource and request it.
    1740       </p>
    1741       <p id="rfc.section.3.3.1.p.5">The server MUST only push resources which would have been returned from a GET request.</p>
    1742       <p id="rfc.section.3.3.1.p.6">Note: If the server does not have all of the Name/Value Response headers available at the time it issues the HEADERS frame
    1743          for the pushed resource, it may later use an additional HEADERS frame to augment the name/value pairs to be associated with
    1744          the pushed stream. The subsequent HEADERS frame(s) must not contain a header for ':host', ':scheme', or ':path' (e.g. the
    1745          server can't change the identity of the resource to be pushed). The HEADERS frame must not contain duplicate headers with
    1746          a previously sent HEADERS frame. The server must send a HEADERS frame including the scheme/host/port headers before sending
    1747          any data frames on the stream.
    1748       </p>
    1749       <h3 id="rfc.section.3.3.2"><a href="#rfc.section.3.3.2">3.3.2</a>&nbsp;Client implementation
    1750       </h3>
    1751       <p id="rfc.section.3.3.2.p.1">When fetching a resource the client has 3 possibilities: </p>
    1752       <ul class="empty">
    1753          <li>the resource is not being pushed</li>
    1754          <li>the resource is being pushed, but the data has not yet arrived</li>
    1755          <li>the resource is being pushed, and the data has started to arrive</li>
    1756       </ul>
    1757       <p id="rfc.section.3.3.2.p.2">When a SYN_STREAM and HEADERS frame which contains an Associated-To-Stream-ID is received, the client must not issue GET requests
    1758          for the resource in the pushed stream, and instead wait for the pushed stream to arrive.
    1759       </p>
    1760       <p id="rfc.section.3.3.2.p.3">If a client receives a server push stream with stream-id 0, it MUST issue a session error (<a href="#SessionErrorHandler" title="Session Error Handling">Section&nbsp;2.4.1</a>) with the status code PROTOCOL_ERROR.
    1761       </p>
    1762       <p id="rfc.section.3.3.2.p.4">When a client receives a SYN_STREAM from the server without a the ':host', ':scheme', and ':path' headers in the Name/Value
    1763          section, it MUST reply with a RST_STREAM with error code HTTP_PROTOCOL_ERROR.
    1764       </p>
    1765       <p id="rfc.section.3.3.2.p.5">To cancel individual server push streams, the client can issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with error code CANCEL. Upon receipt, the server MUST stop sending on this stream immediately (this is an Abrupt termination).
    1766       </p>
    1767       <p id="rfc.section.3.3.2.p.6">To cancel all server push streams related to a request, the client may issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with error code CANCEL on the associated-stream-id. By cancelling that stream, the server MUST immediately stop sending frames
    1768          for any streams with in-association-to for the original stream.
    1769       </p>
    1770       <p id="rfc.section.3.3.2.p.7">If the server sends a HEADER frame containing duplicate headers with a previous HEADERS frame for the same stream, the client
    1771          must issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with error code PROTOCOL ERROR.
    1772       </p>
    1773       <p id="rfc.section.3.3.2.p.8">If the server sends a HEADERS frame after sending a data frame for the same stream, the client MAY ignore the HEADERS frame.
    1774          Ignoring the HEADERS frame after a data frame prevents handling of HTTP's trailing headers (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.40).
    1775       </p>
    1776       <h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a>&nbsp;Design Rationale and Notes
    1777       </h1>
    1778       <p id="rfc.section.4.p.1">Authors' notes: The notes in this section have no bearing on the SPDY protocol as specified within this document, and none
    1779          of these notes should be considered authoritative about how the protocol works. However, these notes may prove useful in future
    1780          debates about how to resolve protocol ambiguities or how to evolve the protocol going forward. They may be removed before
    1781          the final draft.
    1782       </p>
    1783       <h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a>&nbsp;Separation of Framing Layer and Application Layer
    1784       </h2>
    1785       <p id="rfc.section.4.1.p.1">Readers may note that this specification sometimes blends the framing layer (<a href="#FramingLayer" title="SPDY Framing Layer">Section&nbsp;2</a>) with requirements of a specific application - HTTP (<a href="#HTTPLayer" title="HTTP Layering over SPDY">Section&nbsp;3</a>). This is reflected in the request/response nature of the streams, the definition of the HEADERS and compression contexts
    1786          which are very similar to HTTP, and other areas as well.
    1787       </p>
    1788       <p id="rfc.section.4.1.p.2">This blending is intentional - the primary goal of this protocol is to create a low-latency protocol for use with HTTP. Isolating
    1789          the two layers is convenient for description of the protocol and how it relates to existing HTTP implementations. However,
    1790          the ability to reuse the SPDY framing layer is a non goal.
    1791       </p>
    1792       <h2 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2</a>&nbsp;Error handling - Framing Layer
    1793       </h2>
    1794       <p id="rfc.section.4.2.p.1">Error handling at the SPDY layer splits errors into two groups: Those that affect an individual SPDY stream, and those that
    1795          do not.
    1796       </p>
    1797       <p id="rfc.section.4.2.p.2">When an error is confined to a single stream, but general framing is in tact, SPDY attempts to use the RST_STREAM as a mechanism
    1798          to invalidate the stream but move forward without aborting the connection altogether.
    1799       </p>
    1800       <p id="rfc.section.4.2.p.3">For errors occuring outside of a single stream context, SPDY assumes the entire session is hosed. In this case, the endpoint
    1801          detecting the error should initiate a connection close.
    1802       </p>
    1803       <h2 id="rfc.section.4.3"><a href="#rfc.section.4.3">4.3</a>&nbsp;One Connection Per Domain
    1804       </h2>
    1805       <p id="rfc.section.4.3.p.1">SPDY attempts to use fewer connections than other protocols have traditionally used. The rationale for this behavior is because
    1806          it is very difficult to provide a consistent level of service (e.g. TCP slow-start), prioritization, or optimal compression
    1807          when the client is connecting to the server through multiple channels.
    1808       </p>
    1809       <p id="rfc.section.4.3.p.2">Through lab measurements, we have seen consistent latency benefits by using fewer connections from the client. The overall
    1810          number of packets sent by SPDY can be as much as 40% less than HTTP. Handling large numbers of concurrent connections on the
    1811          server also does become a scalability problem, and SPDY reduces this load.
    1812       </p>
    1813       <p id="rfc.section.4.3.p.3">The use of multiple connections is not without benefit, however. Because SPDY multiplexes multiple, independent streams onto
    1814          a single stream, it creates a potential for head-of-line blocking problems at the transport level. In tests so far, the negative
    1815          effects of head-of-line blocking (especially in the presence of packet loss) is outweighed by the benefits of compression
    1816          and prioritization.
    1817       </p>
    1818       <h2 id="rfc.section.4.4"><a href="#rfc.section.4.4">4.4</a>&nbsp;Fixed vs Variable Length Fields
    1819       </h2>
    1820       <p id="rfc.section.4.4.p.1">SPDY favors use of fixed length 32bit fields in cases where smaller, variable length encodings could have been used. To some,
    1821          this seems like a tragic waste of bandwidth. SPDY choses the simple encoding for speed and simplicity.
    1822       </p>
    1823       <p id="rfc.section.4.4.p.2">The goal of SPDY is to reduce latency on the network. The overhead of SPDY frames is generally quite low. Each data frame
    1824          is only an 8 byte overhead for a 1452 byte payload (~0.6%). At the time of this writing, bandwidth is already plentiful, and
    1825          there is a strong trend indicating that bandwidth will continue to increase. With an average worldwide bandwidth of 1Mbps,
    1826          and assuming that a variable length encoding could reduce the overhead by 50%, the latency saved by using a variable length
    1827          encoding would be less than 100 nanoseconds. More interesting are the effects when the larger encodings force a packet boundary,
    1828          in which case a round-trip could be induced. However, by addressing other aspects of SPDY and TCP interactions, we believe
    1829          this is completely mitigated.
    1830       </p>
    1831       <h2 id="rfc.section.4.5"><a href="#rfc.section.4.5">4.5</a>&nbsp;Compression Context(s)
    1832       </h2>
    1833       <p id="rfc.section.4.5.p.1">When isolating the compression contexts used for communicating with multiple origins, we had a few choices to make. We could
    1834          have maintained a map (or list) of compression contexts usable for each origin. The basic case is easy - each HEADERS frame
    1835          would need to identify the context to use for that frame. However, compression contexts are not cheap, so the lifecycle of
    1836          each context would need to be bounded. For proxy servers, where we could churn through many contexts, this would be a concern.
    1837          We considered using a static set of contexts, say 16 of them, which would bound the memory use. We also considered dynamic
    1838          contexts, which could be created on the fly, and would need to be subsequently destroyed. All of these are complicated, and
    1839          ultimately we decided that such a mechanism creates too many problems to solve.
    1840       </p>
    1841       <p id="rfc.section.4.5.p.2">Alternatively, we've chosen the simple approach, which is to simply provide a flag for resetting the compression context.
    1842          For the common case (no proxy), this fine because most requests are to the same origin and we never need to reset the context.
    1843          For cases where we are using two different origins over a single SPDY session, we simply reset the compression state between
    1844          each transition.
    1845       </p>
    1846       <h2 id="rfc.section.4.6"><a href="#rfc.section.4.6">4.6</a>&nbsp;Unidirectional streams
    1847       </h2>
    1848       <p id="rfc.section.4.6.p.1">Many readers notice that unidirectional streams are both a bit confusing in concept and also somewhat redundant. If the recipient
    1849          of a stream doesn't wish to send data on a stream, it could simply send a SYN_REPLY with the FLAG_FIN bit set. The FLAG_UNIDIRECTIONAL
    1850          is, therefore, not necessary.
    1851       </p>
    1852       <p id="rfc.section.4.6.p.2">It is true that we don't need the UNIDIRECTIONAL markings. It is added because it avoids the recipient of pushed streams from
    1853          needing to send a set of empty frames (e.g. the SYN_STREAM w/ FLAG_FIN) which otherwise serve no purpose.
    1854       </p>
    1855       <h2 id="rfc.section.4.7"><a href="#rfc.section.4.7">4.7</a>&nbsp;Data Compression
    1856       </h2>
    1857       <p id="rfc.section.4.7.p.1">Generic compression of data portion of the streams (as opposed to compression of the headers) without knowing the content
    1858          of the stream is redundant. There is no value in compressing a stream which is already compressed. Because of this, SPDY does
    1859          allow data compression to be optional. We included it because study of existing websites shows that many sites are not using
    1860          compression as they should, and users suffer because of it. We wanted a mechanism where, at the SPDY layer, site administrators
    1861          could simply force compression - it is better to compress twice than to not compress.
    1862       </p>
    1863       <p id="rfc.section.4.7.p.2">Overall, however, with this feature being optional and sometimes redundant, it is unclear if it is useful at all. We will
    1864          likely remove it from the specification.
    1865       </p>
    1866       <h2 id="rfc.section.4.8"><a href="#rfc.section.4.8">4.8</a>&nbsp;Server Push
    1867       </h2>
    1868       <p id="rfc.section.4.8.p.1">A subtle but important point is that server push streams must be declared before the associated stream is closed. The reason
    1869          for this is so that proxies have a lifetime for which they can discard information about previous streams. If a pushed stream
    1870          could associate itself with an already-closed stream, then endpoints would not have a specific lifecycle for when they could
    1871          disavow knowledge of the streams which went before.
    1872       </p>
    1873       <h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a>&nbsp;Security Considerations
    1874       </h1>
    1875       <h2 id="rfc.section.5.1"><a href="#rfc.section.5.1">5.1</a>&nbsp;Use of Same-origin constraints
    1876       </h2>
    1877       <p id="rfc.section.5.1.p.1">This specification uses the <a href="#RFC6454">same-origin policy</a> <cite title="The Web Origin Concept" id="rfc.xref.RFC6454.4">[RFC6454]</cite> in all cases where verification of content is required.
    1878       </p>
    1879       <h2 id="rfc.section.5.2"><a href="#rfc.section.5.2">5.2</a>&nbsp;HTTP Headers and SPDY Headers
    1880       </h2>
    1881       <p id="rfc.section.5.2.p.1">At the application level, HTTP uses name/value pairs in its headers. Because SPDY merges the existing HTTP headers with SPDY
    1882          headers, there is a possibility that some HTTP applications already use a particular header name. To avoid any conflicts,
    1883          all headers introduced for layering HTTP over SPDY are prefixed with ":". ":" is not a valid sequence in HTTP header naming,
    1884          preventing any possible conflict.
    1885       </p>
    1886       <h2 id="rfc.section.5.3"><a href="#rfc.section.5.3">5.3</a>&nbsp;Cross-Protocol Attacks
    1887       </h2>
    1888       <p id="rfc.section.5.3.p.1">By utilizing TLS, we believe that SPDY introduces no new cross-protocol attacks. TLS encrypts the contents of all transmission
    1889          (except the handshake itself), making it difficult for attackers to control the data which could be used in a cross-protocol
    1890          attack.
    1891       </p>
    1892       <h2 id="rfc.section.5.4"><a href="#rfc.section.5.4">5.4</a>&nbsp;Server Push Implicit Headers
    1893       </h2>
    1894       <p id="rfc.section.5.4.p.1">Pushed resources do not have an associated request. In order for existing HTTP cache control validations (such as the Vary
    1895          header) to work, however, all cached resources must have a set of request headers. For this reason, browsers MUST be careful
    1896          to inherit request headers from the associated stream for the push. This includes the 'Cookie' header.
    1897       </p>
    1898       <h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a>&nbsp;Privacy Considerations
    1899       </h1>
    1900       <h2 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a>&nbsp;Long Lived Connections
    1901       </h2>
    1902       <p id="rfc.section.6.1.p.1">SPDY aims to keep connections open longer between clients and servers in order to reduce the latency when a user makes a request.
    1903          The maintenance of these connections over time could be used to expose private information. For example, a user using a browser
    1904          hours after the previous user stopped using that browser may be able to learn about what the previous user was doing. This
    1905          is a problem with HTTP in its current form as well, however the short lived connections make it less of a risk.
    1906       </p>
    1907       <h2 id="rfc.section.6.2"><a href="#rfc.section.6.2">6.2</a>&nbsp;SETTINGS frame
    1908       </h2>
    1909       <p id="rfc.section.6.2.p.1">The SPDY SETTINGS frame allows servers to store out-of-band transmitted information about the communication between client
    1910          and server on the client. Although this is intended only to be used to reduce latency, renegade servers could use it as a
    1911          mechanism to store identifying information about the client in future requests.
    1912       </p>
    1913       <p id="rfc.section.6.2.p.2">Clients implementing privacy modes, such as Google Chrome's "incognito mode", may wish to disable client-persisted SETTINGS
    1914          storage.
    1915       </p>
    1916       <p id="rfc.section.6.2.p.3">Clients MUST clear persisted SETTINGS information when clearing the cookies.</p>
    1917       <p id="rfc.section.6.2.p.4">TODO: Put range maximums on each type of setting to limit inappropriate uses.</p>
    1918       <h1 id="rfc.section.7"><a href="#rfc.section.7">7.</a>&nbsp;Incompatibilities with SPDY draft #2
    1919       </h1>
    1920       <p id="rfc.section.7.p.1">Here is a list of the major changes between this draft and draft #2. </p>
    1921       <ul class="empty">
    1922          <li>Addition of flow control</li>
    1923          <li>Increased 16 bit length fields in SYN_STREAM and SYN_REPLY to 32 bits.</li>
    1924          <li>Changed definition of compression for DATA frames</li>
    1925          <li>Updated compression dictionary</li>
    1926          <li>Fixed off-by-one on the compression dictionary for headers</li>
    1927          <li>Increased priority field from 2bits to 3bits.</li>
    1928          <li>Removed NOOP frame</li>
    1929          <li>Split the request "url" into "scheme", "host", and "path"</li>
    1930          <li>Added the requirement that POSTs contain content-length.</li>
    1931          <li>Removed wasted 16bits of unused space from the end of the SYN_REPLY and HEADERS frames.</li>
    1932          <li>Fixed bug: Priorities were described backward (0 was lowest instead of highest).</li>
    1933          <li>Fixed bug: Name/Value header counts were duplicated in both the Name Value header block and also the containing frame.</li>
    1934       </ul>
    1935       <h1 id="rfc.section.8"><a href="#rfc.section.8">8.</a>&nbsp;Requirements Notation
    1936       </h1>
    1937       <p id="rfc.section.8.p.1">The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL"
    1938          in this document are to be interpreted as described in <a href="#RFC2119">RFC 2119</a> <cite title="Key words for use in RFCs to Indicate Requirement Levels" id="rfc.xref.RFC2119.1">[RFC2119]</cite>.
    1939       </p>
    1940       <h1 id="rfc.section.9"><a href="#rfc.section.9">9.</a>&nbsp;Acknowledgements
    1941       </h1>
    1942       <p id="rfc.section.9.p.1">Many individuals have contributed to the design and evolution of SPDY: Adam Langley, Wan-Teh Chang, Jim Morrison, Mark Nottingham,
    1943          Alyssa Wilk, Costin Manolache, William Chan, Vitaliy Lvin, Joe Chan, Adam Barth, Ryan Hamilton, Gavin Peters, Kent Alstad,
    1944          Kevin Lindsay, Paul Amer, Fan Yang, Jonathan Leighton.
    1945       </p>
     1590</pre><p id="rfc.section.2.6.10.1.p.4">The entire contents of the name/value header block is compressed using zlib. There is a single zlib stream for all name value
     1591                     pairs in one direction on a connection. SPDY uses a SYNC_FLUSH between each compressed frame.
     1592                  </p>
     1593                  <p id="rfc.section.2.6.10.1.p.5">Implementation notes: the compression engine can be tuned to favor speed or size. Optimizing for size increases memory use
     1594                     and CPU consumption. Because header blocks are generally small, implementors may want to reduce the window-size of the compression
     1595                     engine from the default 15bits (a 32KB window) to more like 11bits (a 2KB window). The exact setting is chosen by the compressor,
     1596                     the decompressor will work with any setting.
     1597                  </p>
     1598               </div>
     1599            </div>
     1600         </div>
     1601      </div>
     1602      <div id="HTTPLayer">
     1603         <h1 id="rfc.section.3"><a href="#rfc.section.3">3.</a>&nbsp;<a href="#HTTPLayer">HTTP Layering over SPDY</a></h1>
     1604         <p id="rfc.section.3.p.1">SPDY is intended to be as compatible as possible with current web-based applications. This means that, from the perspective
     1605            of the server business logic or application API, the features of HTTP are unchanged. To achieve this, all of the application
     1606            request and response header semantics are preserved, although the syntax of conveying those semantics has changed. Thus, the
     1607            rules from the <a href="#RFC2616">HTTP/1.1 specification in RFC2616</a> <cite title="Hypertext Transfer Protocol -- HTTP/1.1" id="rfc.xref.RFC2616.2">[RFC2616]</cite> apply with the changes in the sections below.
     1608         </p>
     1609         <div>
     1610            <h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a>&nbsp;Connection Management
     1611            </h2>
     1612            <p id="rfc.section.3.1.p.1">Clients SHOULD NOT open more than one SPDY session to a given <a href="#RFC6454">origin</a> <cite title="The Web Origin Concept" id="rfc.xref.RFC6454.2">[RFC6454]</cite> concurrently.
     1613            </p>
     1614            <p id="rfc.section.3.1.p.2">Note that it is possible for one SPDY session to be finishing (e.g. a GOAWAY message has been sent, but not all streams have
     1615               finished), while another SPDY session is starting.
     1616            </p>
     1617            <div>
     1618               <h3 id="rfc.section.3.1.1"><a href="#rfc.section.3.1.1">3.1.1</a>&nbsp;Use of GOAWAY
     1619               </h3>
     1620               <p id="rfc.section.3.1.1.p.1">SPDY provides a GOAWAY message which can be used when closing a connection from either the client or server. Without a server
     1621                  GOAWAY message, HTTP has a race condition where the client sends a request (a new SYN_STREAM) just as the server is closing
     1622                  the connection, and the client cannot know if the server received the stream or not. By using the last-stream-id in the GOAWAY,
     1623                  servers can indicate to the client if a request was processed or not.
     1624               </p>
     1625               <p id="rfc.section.3.1.1.p.2">Note that some servers will choose to send the GOAWAY and immediately terminate the connection without waiting for active
     1626                  streams to finish. The client will be able to determine this because SPDY streams are determinstically closed. This abrupt
     1627                  termination will force the client to heuristically decide whether to retry the pending requests. Clients always need to be
     1628                  capable of dealing with this case because they must deal with accidental connection termination cases, which are the same
     1629                  as the server never having sent a GOAWAY.
     1630               </p>
     1631               <p id="rfc.section.3.1.1.p.3">More sophisticated servers will use GOAWAY to implement a graceful teardown. They will send the GOAWAY and provide some time
     1632                  for the active streams to finish before terminating the connection.
     1633               </p>
     1634               <p id="rfc.section.3.1.1.p.4">If a SPDY client closes the connection, it should also send a GOAWAY message. This allows the server to know if any server-push
     1635                  streams were received by the client.
     1636               </p>
     1637               <p id="rfc.section.3.1.1.p.5">If the endpoint closing the connection has not received any SYN_STREAMs from the remote, the GOAWAY will contain a last-stream-id
     1638                  of 0.
     1639               </p>
     1640            </div>
     1641         </div>
     1642         <div>
     1643            <h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a>&nbsp;HTTP Request/Response
     1644            </h2>
     1645            <div>
     1646               <h3 id="rfc.section.3.2.1"><a href="#rfc.section.3.2.1">3.2.1</a>&nbsp;Request
     1647               </h3>
     1648               <p id="rfc.section.3.2.1.p.1">The client initiates a request by sending a SYN_STREAM frame. For requests which do not contain a body, the SYN_STREAM frame
     1649                  MUST set the FLAG_FIN, indicating that the client intends to send no further data on this stream. For requests which do contain
     1650                  a body, the SYN_STREAM will not contain the FLAG_FIN, and the body will follow the SYN_STREAM in a series of DATA frames.
     1651                  The last DATA frame will set the FLAG_FIN to indicate the end of the body.
     1652               </p>
     1653               <p id="rfc.section.3.2.1.p.2">The SYN_STREAM Name/Value section will contain all of the HTTP headers which are associated with an HTTP request. The header
     1654                  block in SPDY is mostly unchanged from today's HTTP header block, with the following differences:
     1655               </p>
     1656               <ul class="empty">
     1657                  <li>The first line of the request is unfolded into name/value pairs like other HTTP headers and MUST be present:
     1658                     <ul class="empty">
     1659                        <li>":method" - the HTTP method for this request (e.g. "GET", "POST", "HEAD", etc)</li>
     1660                        <li>":path" - the url-path for this url with "/" prefixed. (See <a href="#RFC1738">RFC1738</a> <cite title="Uniform Resource Locators (URL)" id="rfc.xref.RFC1738.1">[RFC1738]</cite>). For example, for "http://www.google.com/search?q=dogs" the path would be "/search?q=dogs".
     1661                        </li>
     1662                        <li>":version" - the HTTP version of this request (e.g. "HTTP/1.1")</li>
     1663                     </ul>
     1664                  </li>
     1665                  <li>In addition, the following two name/value pairs must also be present in every request:
     1666                     <ul class="empty">
     1667                        <li>":host" - the hostport (See <a href="#RFC1738">RFC1738</a> <cite title="Uniform Resource Locators (URL)" id="rfc.xref.RFC1738.2">[RFC1738]</cite>) portion of the URL for this request (e.g. "www.google.com:1234"). This header is the same as the HTTP 'Host' header.
     1668                        </li>
     1669                        <li>":scheme" - the scheme portion of the URL for this request (e.g. "https"))</li>
     1670                     </ul>
     1671                  </li>
     1672                  <li>Header names are all lowercase.</li>
     1673                  <li>The Connection, Host, Keep-Alive, Proxy-Connection, and Transfer-Encoding headers are not valid and MUST not be sent.</li>
     1674                  <li>User-agents MUST support gzip compression. Regardless of the Accept-Encoding sent by the user-agent, the server may always
     1675                     send content encoded with gzip or deflate encoding.
     1676                  </li>
     1677                  <li>If a server receives a request where the sum of the data frame payload lengths does not equal the size of the Content-Length
     1678                     header, the server MUST return a 400 (Bad Request) error.
     1679                  </li>
     1680                  <li>POST-specific changes:
     1681                     <ul class="empty">
     1682                        <li>Although POSTs are inherently chunked, POST requests SHOULD also be accompanied by a Content-Length header. There are two
     1683                           reasons for this: First, it assists with upload progress meters for an improved user experience. But second, we know from
     1684                           early versions of SPDY that failure to send a content length header is incompatible with many existing HTTP server implementations.
     1685                           Existing user-agents do not omit the Content-Length header, and server implementations have come to depend upon this.
     1686                        </li>
     1687                     </ul>
     1688                  </li>
     1689               </ul>
     1690               <p id="rfc.section.3.2.1.p.3">The user-agent is free to prioritize requests as it sees fit. If the user-agent cannot make progress without receiving a resource,
     1691                  it should attempt to raise the priority of that resource. Resources such as images, SHOULD generally use the lowest priority.
     1692               </p>
     1693               <p id="rfc.section.3.2.1.p.4">If a client sends a SYN_STREAM without all of the method, host, path, scheme, and version headers, the server MUST reply with
     1694                  a HTTP 400 Bad Request reply.
     1695               </p>
     1696            </div>
     1697            <div>
     1698               <h3 id="rfc.section.3.2.2"><a href="#rfc.section.3.2.2">3.2.2</a>&nbsp;Response
     1699               </h3>
     1700               <p id="rfc.section.3.2.2.p.1">The server responds to a client request with a SYN_REPLY frame. Symmetric to the client's upload stream, server will send
     1701                  data after the SYN_REPLY frame via a series of DATA frames, and the last data frame will contain the FLAG_FIN to indicate
     1702                  successful end-of-stream. If a response (like a 202 or 204 response) contains no body, the SYN_REPLY frame may contain the
     1703                  FLAG_FIN flag to indicate no further data will be sent on the stream.
     1704               </p>
     1705               <p id="rfc.section.3.2.2.p.2"></p>
     1706               <ul class="empty">
     1707                  <li>The response status line is unfolded into name/value pairs like other HTTP headers and must be present:
     1708                     <ul class="empty">
     1709                        <li>":status" - The HTTP response status code (e.g. "200" or "200 OK")</li>
     1710                        <li>":version" - The HTTP response version (e.g. "HTTP/1.1")</li>
     1711                     </ul>
     1712                  </li>
     1713                  <li>All header names must be lowercase.</li>
     1714                  <li>The Connection, Keep-Alive, Proxy-Connection, and Transfer-Encoding headers are not valid and MUST not be sent.</li>
     1715                  <li>Responses MAY be accompanied by a Content-Length header for advisory purposes. (e.g. for UI progress meters)</li>
     1716                  <li>If a client receives a response where the sum of the data frame payload lengths does not equal the size of the Content-Length
     1717                     header, the client MUST ignore the content length header.
     1718                  </li>
     1719               </ul>
     1720               <p id="rfc.section.3.2.2.p.3">If a client receives a SYN_REPLY without a status or without a version header, the client must reply with a RST_STREAM frame
     1721                  indicating a PROTOCOL ERROR.
     1722               </p>
     1723            </div>
     1724            <div id="Authentication">
     1725               <h3 id="rfc.section.3.2.3"><a href="#rfc.section.3.2.3">3.2.3</a>&nbsp;<a href="#Authentication">Authentication</a></h3>
     1726               <p id="rfc.section.3.2.3.p.1">When a client sends a request to an origin server that requires authentication, the server can reply with a "401 Unauthorized"
     1727                  response, and include a WWW-Authenticate challenge header that defines the authentication scheme to be used. The client then
     1728                  retries the request with an Authorization header appropriate to the specified authentication scheme.
     1729               </p>
     1730               <p id="rfc.section.3.2.3.p.2">There are four options for proxy authentication, Basic, Digest, NTLM and Negotiate (SPNEGO). The first two options were defined
     1731                  in <a href="#RFC2617">RFC2617</a> <cite title="HTTP Authentication: Basic and Digest Access Authentication" id="rfc.xref.RFC2617.1">[RFC2617]</cite>, and are stateless. The second two options were developed by Microsoft and specified in <a href="#RFC4559">RFC4559</a> <cite title="SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows" id="rfc.xref.RFC4559.1">[RFC4559]</cite>, and are stateful; otherwise known as multi-round authentication, or connection authentication.
     1732               </p>
     1733               <div>
     1734                  <h4 id="rfc.section.3.2.3.1"><a href="#rfc.section.3.2.3.1">3.2.3.1</a>&nbsp;Stateless Authentication
     1735                  </h4>
     1736                  <p id="rfc.section.3.2.3.1.p.1">Stateless Authentication over SPDY is identical to how it is performed over HTTP. If multiple SPDY streams are concurrently
     1737                     sent to a single server, each will authenticate independently, similar to how two HTTP connections would independently authenticate
     1738                     to a proxy server.
     1739                  </p>
     1740               </div>
     1741               <div>
     1742                  <h4 id="rfc.section.3.2.3.2"><a href="#rfc.section.3.2.3.2">3.2.3.2</a>&nbsp;Stateful Authentication
     1743                  </h4>
     1744                  <p id="rfc.section.3.2.3.2.p.1">Unfortunately, the stateful authentication mechanisms were implemented and defined in a such a way that directly violates
     1745                     RFC2617 - they do not include a "realm" as part of the request. This is problematic in SPDY because it makes it impossible
     1746                     for a client to disambiguate two concurrent server authentication challenges.
     1747                  </p>
     1748                  <p id="rfc.section.3.2.3.2.p.2">To deal with this case, SPDY servers using Stateful Authentication MUST implement one of two changes: </p>
     1749                  <ul class="empty">
     1750                     <li>Servers can add a "realm=&lt;desired realm&gt;" header so that the two authentication requests can be disambiguated and run concurrently.
     1751                        Unfortunately, given how these mechanisms work, this is probably not practical.
     1752                     </li>
     1753                     <li>Upon sending the first stateful challenge response, the server MUST buffer and defer all further frames which are not part
     1754                        of completing the challenge until the challenge has completed. Completing the authentication challenge may take multiple round
     1755                        trips. Once the client receives a "401 Authenticate" response for a stateful authentication type, it MUST stop sending new
     1756                        requests to the server until the authentication has completed by receiving a non-401 response on at least one stream.
     1757                     </li>
     1758                  </ul>
     1759               </div>
     1760            </div>
     1761         </div>
     1762         <div>
     1763            <h2 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a>&nbsp;Server Push Transactions
     1764            </h2>
     1765            <p id="rfc.section.3.3.p.1">SPDY enables a server to send multiple replies to a client for a single request. The rationale for this feature is that sometimes
     1766               a server knows that it will need to send multiple resources in response to a single request. Without server push features,
     1767               the client must first download the primary resource, then discover the secondary resource(s), and request them. Pushing of
     1768               resources avoids the round-trip delay, but also creates a potential race where a server can be pushing content which a user-agent
     1769               is in the process of requesting. The following mechanics attempt to prevent the race condition while enabling the performance
     1770               benefit.
     1771            </p>
     1772            <p id="rfc.section.3.3.p.2">Browsers receiving a pushed response MUST validate that the server is authorized to push the URL using the <a href="#RFC6454">browser same-origin</a> <cite title="The Web Origin Concept" id="rfc.xref.RFC6454.3">[RFC6454]</cite> policy. For example, a SPDY connection to www.foo.com is generally not permitted to push a response for www.evil.com.
     1773            </p>
     1774            <p id="rfc.section.3.3.p.3">If the browser accepts a pushed response (e.g. it does not send a RST_STREAM), the browser MUST attempt to cache the pushed
     1775               response in same way that it would cache any other response. This means validating the response headers and inserting into
     1776               the disk cache.
     1777            </p>
     1778            <p id="rfc.section.3.3.p.4">Because pushed responses have no request, they have no request headers associated with them. At the framing layer, SPDY pushed
     1779               streams contain an "associated-stream-id" which indicates the requested stream for which the pushed stream is related. The
     1780               pushed stream inherits all of the headers from the associated-stream-id with the exception of ":host", ":scheme", and ":path",
     1781               which are provided as part of the pushed response stream headers. The browser MUST store these inherited and implied request
     1782               headers with the cached resource.
     1783            </p>
     1784            <p id="rfc.section.3.3.p.5">Implementation note: With server push, it is theoretically possible for servers to push unreasonable amounts of content or
     1785               resources to the user-agent. Browsers MUST implement throttles to protect against unreasonable push attacks.
     1786            </p>
     1787            <div>
     1788               <h3 id="rfc.section.3.3.1"><a href="#rfc.section.3.3.1">3.3.1</a>&nbsp;Server implementation
     1789               </h3>
     1790               <p id="rfc.section.3.3.1.p.1">When the server intends to push a resource to the user-agent, it opens a new stream by sending a unidirectional SYN_STREAM.
     1791                  The SYN_STREAM MUST include an Associated-To-Stream-ID, and MUST set the FLAG_UNIDIRECTIONAL flag. The SYN_STREAM MUST include
     1792                  headers for ":scheme", ":host", ":path", which represent the URL for the resource being pushed. Subsequent headers may follow
     1793                  in HEADERS frames. The purpose of the association is so that the user-agent can differentiate which request induced the pushed
     1794                  stream; without it, if the user-agent had two tabs open to the same page, each pushing unique content under a fixed URL, the
     1795                  user-agent would not be able to differentiate the requests.
     1796               </p>
     1797               <p id="rfc.section.3.3.1.p.2">The Associated-To-Stream-ID must be the ID of an existing, open stream. The reason for this restriction is to have a clear
     1798                  endpoint for pushed content. If the user-agent requested a resource on stream 11, the server replies on stream 11. It can
     1799                  push any number of additional streams to the client before sending a FLAG_FIN on stream 11. However, once the originating
     1800                  stream is closed no further push streams may be associated with it. The pushed streams do not need to be closed (FIN set)
     1801                  before the originating stream is closed, they only need to be created before the originating stream closes.
     1802               </p>
     1803               <p id="rfc.section.3.3.1.p.3">It is illegal for a server to push a resource with the Associated-To-Stream-ID of 0.</p>
     1804               <p id="rfc.section.3.3.1.p.4">To minimize race conditions with the client, the SYN_STREAM for the pushed resources MUST be sent prior to sending any content
     1805                  which could allow the client to discover the pushed resource and request it.
     1806               </p>
     1807               <p id="rfc.section.3.3.1.p.5">The server MUST only push resources which would have been returned from a GET request.</p>
     1808               <p id="rfc.section.3.3.1.p.6">Note: If the server does not have all of the Name/Value Response headers available at the time it issues the HEADERS frame
     1809                  for the pushed resource, it may later use an additional HEADERS frame to augment the name/value pairs to be associated with
     1810                  the pushed stream. The subsequent HEADERS frame(s) must not contain a header for ':host', ':scheme', or ':path' (e.g. the
     1811                  server can't change the identity of the resource to be pushed). The HEADERS frame must not contain duplicate headers with
     1812                  a previously sent HEADERS frame. The server must send a HEADERS frame including the scheme/host/port headers before sending
     1813                  any data frames on the stream.
     1814               </p>
     1815            </div>
     1816            <div>
     1817               <h3 id="rfc.section.3.3.2"><a href="#rfc.section.3.3.2">3.3.2</a>&nbsp;Client implementation
     1818               </h3>
     1819               <p id="rfc.section.3.3.2.p.1">When fetching a resource the client has 3 possibilities: </p>
     1820               <ul class="empty">
     1821                  <li>the resource is not being pushed</li>
     1822                  <li>the resource is being pushed, but the data has not yet arrived</li>
     1823                  <li>the resource is being pushed, and the data has started to arrive</li>
     1824               </ul>
     1825               <p id="rfc.section.3.3.2.p.2">When a SYN_STREAM and HEADERS frame which contains an Associated-To-Stream-ID is received, the client must not issue GET requests
     1826                  for the resource in the pushed stream, and instead wait for the pushed stream to arrive.
     1827               </p>
     1828               <p id="rfc.section.3.3.2.p.3">If a client receives a server push stream with stream-id 0, it MUST issue a session error (<a href="#SessionErrorHandler" title="Session Error Handling">Section&nbsp;2.4.1</a>) with the status code PROTOCOL_ERROR.
     1829               </p>
     1830               <p id="rfc.section.3.3.2.p.4">When a client receives a SYN_STREAM from the server without a the ':host', ':scheme', and ':path' headers in the Name/Value
     1831                  section, it MUST reply with a RST_STREAM with error code HTTP_PROTOCOL_ERROR.
     1832               </p>
     1833               <p id="rfc.section.3.3.2.p.5">To cancel individual server push streams, the client can issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with error code CANCEL. Upon receipt, the server MUST stop sending on this stream immediately (this is an Abrupt termination).
     1834               </p>
     1835               <p id="rfc.section.3.3.2.p.6">To cancel all server push streams related to a request, the client may issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with error code CANCEL on the associated-stream-id. By cancelling that stream, the server MUST immediately stop sending frames
     1836                  for any streams with in-association-to for the original stream.
     1837               </p>
     1838               <p id="rfc.section.3.3.2.p.7">If the server sends a HEADER frame containing duplicate headers with a previous HEADERS frame for the same stream, the client
     1839                  must issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with error code PROTOCOL ERROR.
     1840               </p>
     1841               <p id="rfc.section.3.3.2.p.8">If the server sends a HEADERS frame after sending a data frame for the same stream, the client MAY ignore the HEADERS frame.
     1842                  Ignoring the HEADERS frame after a data frame prevents handling of HTTP's trailing headers (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.40).
     1843               </p>
     1844            </div>
     1845         </div>
     1846      </div>
     1847      <div>
     1848         <h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a>&nbsp;Design Rationale and Notes
     1849         </h1>
     1850         <p id="rfc.section.4.p.1">Authors' notes: The notes in this section have no bearing on the SPDY protocol as specified within this document, and none
     1851            of these notes should be considered authoritative about how the protocol works. However, these notes may prove useful in future
     1852            debates about how to resolve protocol ambiguities or how to evolve the protocol going forward. They may be removed before
     1853            the final draft.
     1854         </p>
     1855         <div>
     1856            <h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a>&nbsp;Separation of Framing Layer and Application Layer
     1857            </h2>
     1858            <p id="rfc.section.4.1.p.1">Readers may note that this specification sometimes blends the framing layer (<a href="#FramingLayer" title="SPDY Framing Layer">Section&nbsp;2</a>) with requirements of a specific application - HTTP (<a href="#HTTPLayer" title="HTTP Layering over SPDY">Section&nbsp;3</a>). This is reflected in the request/response nature of the streams, the definition of the HEADERS and compression contexts
     1859               which are very similar to HTTP, and other areas as well.
     1860            </p>
     1861            <p id="rfc.section.4.1.p.2">This blending is intentional - the primary goal of this protocol is to create a low-latency protocol for use with HTTP. Isolating
     1862               the two layers is convenient for description of the protocol and how it relates to existing HTTP implementations. However,
     1863               the ability to reuse the SPDY framing layer is a non goal.
     1864            </p>
     1865         </div>
     1866         <div>
     1867            <h2 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2</a>&nbsp;Error handling - Framing Layer
     1868            </h2>
     1869            <p id="rfc.section.4.2.p.1">Error handling at the SPDY layer splits errors into two groups: Those that affect an individual SPDY stream, and those that
     1870               do not.
     1871            </p>
     1872            <p id="rfc.section.4.2.p.2">When an error is confined to a single stream, but general framing is in tact, SPDY attempts to use the RST_STREAM as a mechanism
     1873               to invalidate the stream but move forward without aborting the connection altogether.
     1874            </p>
     1875            <p id="rfc.section.4.2.p.3">For errors occuring outside of a single stream context, SPDY assumes the entire session is hosed. In this case, the endpoint
     1876               detecting the error should initiate a connection close.
     1877            </p>
     1878         </div>
     1879         <div>
     1880            <h2 id="rfc.section.4.3"><a href="#rfc.section.4.3">4.3</a>&nbsp;One Connection Per Domain
     1881            </h2>
     1882            <p id="rfc.section.4.3.p.1">SPDY attempts to use fewer connections than other protocols have traditionally used. The rationale for this behavior is because
     1883               it is very difficult to provide a consistent level of service (e.g. TCP slow-start), prioritization, or optimal compression
     1884               when the client is connecting to the server through multiple channels.
     1885            </p>
     1886            <p id="rfc.section.4.3.p.2">Through lab measurements, we have seen consistent latency benefits by using fewer connections from the client. The overall
     1887               number of packets sent by SPDY can be as much as 40% less than HTTP. Handling large numbers of concurrent connections on the
     1888               server also does become a scalability problem, and SPDY reduces this load.
     1889            </p>
     1890            <p id="rfc.section.4.3.p.3">The use of multiple connections is not without benefit, however. Because SPDY multiplexes multiple, independent streams onto
     1891               a single stream, it creates a potential for head-of-line blocking problems at the transport level. In tests so far, the negative
     1892               effects of head-of-line blocking (especially in the presence of packet loss) is outweighed by the benefits of compression
     1893               and prioritization.
     1894            </p>
     1895         </div>
     1896         <div>
     1897            <h2 id="rfc.section.4.4"><a href="#rfc.section.4.4">4.4</a>&nbsp;Fixed vs Variable Length Fields
     1898            </h2>
     1899            <p id="rfc.section.4.4.p.1">SPDY favors use of fixed length 32bit fields in cases where smaller, variable length encodings could have been used. To some,
     1900               this seems like a tragic waste of bandwidth. SPDY choses the simple encoding for speed and simplicity.
     1901            </p>
     1902            <p id="rfc.section.4.4.p.2">The goal of SPDY is to reduce latency on the network. The overhead of SPDY frames is generally quite low. Each data frame
     1903               is only an 8 byte overhead for a 1452 byte payload (~0.6%). At the time of this writing, bandwidth is already plentiful, and
     1904               there is a strong trend indicating that bandwidth will continue to increase. With an average worldwide bandwidth of 1Mbps,
     1905               and assuming that a variable length encoding could reduce the overhead by 50%, the latency saved by using a variable length
     1906               encoding would be less than 100 nanoseconds. More interesting are the effects when the larger encodings force a packet boundary,
     1907               in which case a round-trip could be induced. However, by addressing other aspects of SPDY and TCP interactions, we believe
     1908               this is completely mitigated.
     1909            </p>
     1910         </div>
     1911         <div>
     1912            <h2 id="rfc.section.4.5"><a href="#rfc.section.4.5">4.5</a>&nbsp;Compression Context(s)
     1913            </h2>
     1914            <p id="rfc.section.4.5.p.1">When isolating the compression contexts used for communicating with multiple origins, we had a few choices to make. We could
     1915               have maintained a map (or list) of compression contexts usable for each origin. The basic case is easy - each HEADERS frame
     1916               would need to identify the context to use for that frame. However, compression contexts are not cheap, so the lifecycle of
     1917               each context would need to be bounded. For proxy servers, where we could churn through many contexts, this would be a concern.
     1918               We considered using a static set of contexts, say 16 of them, which would bound the memory use. We also considered dynamic
     1919               contexts, which could be created on the fly, and would need to be subsequently destroyed. All of these are complicated, and
     1920               ultimately we decided that such a mechanism creates too many problems to solve.
     1921            </p>
     1922            <p id="rfc.section.4.5.p.2">Alternatively, we've chosen the simple approach, which is to simply provide a flag for resetting the compression context.
     1923               For the common case (no proxy), this fine because most requests are to the same origin and we never need to reset the context.
     1924               For cases where we are using two different origins over a single SPDY session, we simply reset the compression state between
     1925               each transition.
     1926            </p>
     1927         </div>
     1928         <div>
     1929            <h2 id="rfc.section.4.6"><a href="#rfc.section.4.6">4.6</a>&nbsp;Unidirectional streams
     1930            </h2>
     1931            <p id="rfc.section.4.6.p.1">Many readers notice that unidirectional streams are both a bit confusing in concept and also somewhat redundant. If the recipient
     1932               of a stream doesn't wish to send data on a stream, it could simply send a SYN_REPLY with the FLAG_FIN bit set. The FLAG_UNIDIRECTIONAL
     1933               is, therefore, not necessary.
     1934            </p>
     1935            <p id="rfc.section.4.6.p.2">It is true that we don't need the UNIDIRECTIONAL markings. It is added because it avoids the recipient of pushed streams from
     1936               needing to send a set of empty frames (e.g. the SYN_STREAM w/ FLAG_FIN) which otherwise serve no purpose.
     1937            </p>
     1938         </div>
     1939         <div>
     1940            <h2 id="rfc.section.4.7"><a href="#rfc.section.4.7">4.7</a>&nbsp;Data Compression
     1941            </h2>
     1942            <p id="rfc.section.4.7.p.1">Generic compression of data portion of the streams (as opposed to compression of the headers) without knowing the content
     1943               of the stream is redundant. There is no value in compressing a stream which is already compressed. Because of this, SPDY does
     1944               allow data compression to be optional. We included it because study of existing websites shows that many sites are not using
     1945               compression as they should, and users suffer because of it. We wanted a mechanism where, at the SPDY layer, site administrators
     1946               could simply force compression - it is better to compress twice than to not compress.
     1947            </p>
     1948            <p id="rfc.section.4.7.p.2">Overall, however, with this feature being optional and sometimes redundant, it is unclear if it is useful at all. We will
     1949               likely remove it from the specification.
     1950            </p>
     1951         </div>
     1952         <div>
     1953            <h2 id="rfc.section.4.8"><a href="#rfc.section.4.8">4.8</a>&nbsp;Server Push
     1954            </h2>
     1955            <p id="rfc.section.4.8.p.1">A subtle but important point is that server push streams must be declared before the associated stream is closed. The reason
     1956               for this is so that proxies have a lifetime for which they can discard information about previous streams. If a pushed stream
     1957               could associate itself with an already-closed stream, then endpoints would not have a specific lifecycle for when they could
     1958               disavow knowledge of the streams which went before.
     1959            </p>
     1960         </div>
     1961      </div>
     1962      <div>
     1963         <h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a>&nbsp;Security Considerations
     1964         </h1>
     1965         <div>
     1966            <h2 id="rfc.section.5.1"><a href="#rfc.section.5.1">5.1</a>&nbsp;Use of Same-origin constraints
     1967            </h2>
     1968            <p id="rfc.section.5.1.p.1">This specification uses the <a href="#RFC6454">same-origin policy</a> <cite title="The Web Origin Concept" id="rfc.xref.RFC6454.4">[RFC6454]</cite> in all cases where verification of content is required.
     1969            </p>
     1970         </div>
     1971         <div>
     1972            <h2 id="rfc.section.5.2"><a href="#rfc.section.5.2">5.2</a>&nbsp;HTTP Headers and SPDY Headers
     1973            </h2>
     1974            <p id="rfc.section.5.2.p.1">At the application level, HTTP uses name/value pairs in its headers. Because SPDY merges the existing HTTP headers with SPDY
     1975               headers, there is a possibility that some HTTP applications already use a particular header name. To avoid any conflicts,
     1976               all headers introduced for layering HTTP over SPDY are prefixed with ":". ":" is not a valid sequence in HTTP header naming,
     1977               preventing any possible conflict.
     1978            </p>
     1979         </div>
     1980         <div>
     1981            <h2 id="rfc.section.5.3"><a href="#rfc.section.5.3">5.3</a>&nbsp;Cross-Protocol Attacks
     1982            </h2>
     1983            <p id="rfc.section.5.3.p.1">By utilizing TLS, we believe that SPDY introduces no new cross-protocol attacks. TLS encrypts the contents of all transmission
     1984               (except the handshake itself), making it difficult for attackers to control the data which could be used in a cross-protocol
     1985               attack.
     1986            </p>
     1987         </div>
     1988         <div>
     1989            <h2 id="rfc.section.5.4"><a href="#rfc.section.5.4">5.4</a>&nbsp;Server Push Implicit Headers
     1990            </h2>
     1991            <p id="rfc.section.5.4.p.1">Pushed resources do not have an associated request. In order for existing HTTP cache control validations (such as the Vary
     1992               header) to work, however, all cached resources must have a set of request headers. For this reason, browsers MUST be careful
     1993               to inherit request headers from the associated stream for the push. This includes the 'Cookie' header.
     1994            </p>
     1995         </div>
     1996      </div>
     1997      <div>
     1998         <h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a>&nbsp;Privacy Considerations
     1999         </h1>
     2000         <div>
     2001            <h2 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a>&nbsp;Long Lived Connections
     2002            </h2>
     2003            <p id="rfc.section.6.1.p.1">SPDY aims to keep connections open longer between clients and servers in order to reduce the latency when a user makes a request.
     2004               The maintenance of these connections over time could be used to expose private information. For example, a user using a browser
     2005               hours after the previous user stopped using that browser may be able to learn about what the previous user was doing. This
     2006               is a problem with HTTP in its current form as well, however the short lived connections make it less of a risk.
     2007            </p>
     2008         </div>
     2009         <div>
     2010            <h2 id="rfc.section.6.2"><a href="#rfc.section.6.2">6.2</a>&nbsp;SETTINGS frame
     2011            </h2>
     2012            <p id="rfc.section.6.2.p.1">The SPDY SETTINGS frame allows servers to store out-of-band transmitted information about the communication between client
     2013               and server on the client. Although this is intended only to be used to reduce latency, renegade servers could use it as a
     2014               mechanism to store identifying information about the client in future requests.
     2015            </p>
     2016            <p id="rfc.section.6.2.p.2">Clients implementing privacy modes, such as Google Chrome's "incognito mode", may wish to disable client-persisted SETTINGS
     2017               storage.
     2018            </p>
     2019            <p id="rfc.section.6.2.p.3">Clients MUST clear persisted SETTINGS information when clearing the cookies.</p>
     2020            <p id="rfc.section.6.2.p.4">TODO: Put range maximums on each type of setting to limit inappropriate uses.</p>
     2021         </div>
     2022      </div>
     2023      <div>
     2024         <h1 id="rfc.section.7"><a href="#rfc.section.7">7.</a>&nbsp;Incompatibilities with SPDY draft #2
     2025         </h1>
     2026         <p id="rfc.section.7.p.1">Here is a list of the major changes between this draft and draft #2. </p>
     2027         <ul class="empty">
     2028            <li>Addition of flow control</li>
     2029            <li>Increased 16 bit length fields in SYN_STREAM and SYN_REPLY to 32 bits.</li>
     2030            <li>Changed definition of compression for DATA frames</li>
     2031            <li>Updated compression dictionary</li>
     2032            <li>Fixed off-by-one on the compression dictionary for headers</li>
     2033            <li>Increased priority field from 2bits to 3bits.</li>
     2034            <li>Removed NOOP frame</li>
     2035            <li>Split the request "url" into "scheme", "host", and "path"</li>
     2036            <li>Added the requirement that POSTs contain content-length.</li>
     2037            <li>Removed wasted 16bits of unused space from the end of the SYN_REPLY and HEADERS frames.</li>
     2038            <li>Fixed bug: Priorities were described backward (0 was lowest instead of highest).</li>
     2039            <li>Fixed bug: Name/Value header counts were duplicated in both the Name Value header block and also the containing frame.</li>
     2040         </ul>
     2041      </div>
     2042      <div>
     2043         <h1 id="rfc.section.8"><a href="#rfc.section.8">8.</a>&nbsp;Requirements Notation
     2044         </h1>
     2045         <p id="rfc.section.8.p.1">The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL"
     2046            in this document are to be interpreted as described in <a href="#RFC2119">RFC 2119</a> <cite title="Key words for use in RFCs to Indicate Requirement Levels" id="rfc.xref.RFC2119.1">[RFC2119]</cite>.
     2047         </p>
     2048      </div>
     2049      <div>
     2050         <h1 id="rfc.section.9"><a href="#rfc.section.9">9.</a>&nbsp;Acknowledgements
     2051         </h1>
     2052         <p id="rfc.section.9.p.1">Many individuals have contributed to the design and evolution of SPDY: Adam Langley, Wan-Teh Chang, Jim Morrison, Mark Nottingham,
     2053            Alyssa Wilk, Costin Manolache, William Chan, Vitaliy Lvin, Joe Chan, Adam Barth, Ryan Hamilton, Gavin Peters, Kent Alstad,
     2054            Kevin Lindsay, Paul Amer, Fan Yang, Jonathan Leighton.
     2055         </p>
     2056      </div>
    19462057      <h1 id="rfc.references"><a href="#rfc.section.10" id="rfc.section.10">10.</a> Normative References
    19472058      </h1>
    1948       <table>                           
     2059      <table>
    19492060         <tr>
    19502061            <td class="reference"><b id="ASCII">[ASCII]</b></td>
     
    19532064         <tr>
    19542065            <td class="reference"><b id="RFC0793">[RFC0793]</b></td>
    1955             <td class="top">Postel, J., “<a href="http://tools.ietf.org/html/rfc793">Transmission Control Protocol</a>”, STD&nbsp;7, RFC&nbsp;793, September&nbsp;1981.
     2066            <td class="top">Postel, J., “<a href="https://tools.ietf.org/html/rfc793">Transmission Control Protocol</a>”, STD&nbsp;7, RFC&nbsp;793, September&nbsp;1981.
    19562067            </td>
    19572068         </tr>
    19582069         <tr>
    19592070            <td class="reference"><b id="RFC1738">[RFC1738]</b></td>
    1960             <td class="top">Berners-Lee, T., Masinter, L., and M. McCahill, “<a href="http://tools.ietf.org/html/rfc1738">Uniform Resource Locators (URL)</a>”, RFC&nbsp;1738, December&nbsp;1994.
     2071            <td class="top">Berners-Lee, T., Masinter, L., and M. McCahill, “<a href="https://tools.ietf.org/html/rfc1738">Uniform Resource Locators (URL)</a>”, RFC&nbsp;1738, December&nbsp;1994.
    19612072            </td>
    19622073         </tr>
    19632074         <tr>
    19642075            <td class="reference"><b id="RFC1950">[RFC1950]</b></td>
    1965             <td class="top"><a href="mailto:ghost@aladdin.com" title="Aladdin Enterprises">Deutsch, L.</a> and J. Gailly, “<a href="http://tools.ietf.org/html/rfc1950">ZLIB Compressed Data Format Specification version 3.3</a>”, RFC&nbsp;1950, May&nbsp;1996.
     2076            <td class="top"><a href="mailto:ghost@aladdin.com" title="Aladdin Enterprises">Deutsch, L.</a> and J. Gailly, “<a href="https://tools.ietf.org/html/rfc1950">ZLIB Compressed Data Format Specification version 3.3</a>”, RFC&nbsp;1950, May&nbsp;1996.
    19662077            </td>
    19672078         </tr>
    19682079         <tr>
    19692080            <td class="reference"><b id="RFC2119">[RFC2119]</b></td>
    1970             <td class="top"><a href="mailto:sob@harvard.edu" title="Harvard University">Bradner, S.</a>, “<a href="http://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>”, BCP&nbsp;14, RFC&nbsp;2119, March&nbsp;1997.
     2081            <td class="top"><a href="mailto:sob@harvard.edu" title="Harvard University">Bradner, S.</a>, “<a href="https://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>”, BCP&nbsp;14, RFC&nbsp;2119, March&nbsp;1997.
    19712082            </td>
    19722083         </tr>
    19732084         <tr>
    19742085            <td class="reference"><b id="RFC2285">[RFC2285]</b></td>
    1975             <td class="top">Mandeville, R., “<a href="http://tools.ietf.org/html/rfc2285">Benchmarking Terminology for LAN Switching Devices</a>”, RFC&nbsp;2285, February&nbsp;1998.
     2086            <td class="top">Mandeville, R., “<a href="https://tools.ietf.org/html/rfc2285">Benchmarking Terminology for LAN Switching Devices</a>”, RFC&nbsp;2285, February&nbsp;1998.
    19762087            </td>
    19772088         </tr>
    19782089         <tr>
    19792090            <td class="reference"><b id="RFC2616">[RFC2616]</b></td>
    1980             <td class="top"><a href="mailto:fielding@ics.uci.edu" title="University of California, Irvine">Fielding, R.</a>, <a href="mailto:jg@w3.org" title="W3C">Gettys, J.</a>, <a href="mailto:mogul@wrl.dec.com" title="Compaq Computer Corporation">Mogul, J.</a>, <a href="mailto:frystyk@w3.org" title="MIT Laboratory for Computer Science">Frystyk, H.</a>, <a href="mailto:masinter@parc.xerox.com" title="Xerox Corporation">Masinter, L.</a>, <a href="mailto:paulle@microsoft.com" title="Microsoft Corporation">Leach, P.</a>, and <a href="mailto:timbl@w3.org" title="W3C">T. Berners-Lee</a>, “<a href="http://tools.ietf.org/html/rfc2616">Hypertext Transfer Protocol -- HTTP/1.1</a>”, RFC&nbsp;2616, June&nbsp;1999.
     2091            <td class="top"><a href="mailto:fielding@ics.uci.edu" title="University of California, Irvine">Fielding, R.</a>, <a href="mailto:jg@w3.org" title="W3C">Gettys, J.</a>, <a href="mailto:mogul@wrl.dec.com" title="Compaq Computer Corporation">Mogul, J.</a>, <a href="mailto:frystyk@w3.org" title="MIT Laboratory for Computer Science">Frystyk, H.</a>, <a href="mailto:masinter@parc.xerox.com" title="Xerox Corporation">Masinter, L.</a>, <a href="mailto:paulle@microsoft.com" title="Microsoft Corporation">Leach, P.</a>, and <a href="mailto:timbl@w3.org" title="W3C">T. Berners-Lee</a>, “<a href="https://tools.ietf.org/html/rfc2616">Hypertext Transfer Protocol -- HTTP/1.1</a>”, RFC&nbsp;2616, June&nbsp;1999.
    19812092            </td>
    19822093         </tr>
    19832094         <tr>
    19842095            <td class="reference"><b id="RFC2617">[RFC2617]</b></td>
    1985             <td class="top"><a href="mailto:john@math.nwu.edu" title="Northwestern University, Department of Mathematics">Franks, J.</a>, <a href="mailto:pbaker@verisign.com" title="Verisign Inc.">Hallam-Baker, P.</a>, <a href="mailto:jeff@AbiSource.com" title="AbiSource, Inc.">Hostetler, J.</a>, <a href="mailto:lawrence@agranat.com" title="Agranat Systems, Inc.">Lawrence, S.</a>, <a href="mailto:paulle@microsoft.com" title="Microsoft Corporation">Leach, P.</a>, Luotonen, A., and <a href="mailto:stewart@OpenMarket.com" title="Open Market, Inc.">L. Stewart</a>, “<a href="http://tools.ietf.org/html/rfc2617">HTTP Authentication: Basic and Digest Access Authentication</a>”, RFC&nbsp;2617, June&nbsp;1999.
     2096            <td class="top"><a href="mailto:john@math.nwu.edu" title="Northwestern University, Department of Mathematics">Franks, J.</a>, <a href="mailto:pbaker@verisign.com" title="Verisign Inc.">Hallam-Baker, P.</a>, <a href="mailto:jeff@AbiSource.com" title="AbiSource, Inc.">Hostetler, J.</a>, <a href="mailto:lawrence@agranat.com" title="Agranat Systems, Inc.">Lawrence, S.</a>, <a href="mailto:paulle@microsoft.com" title="Microsoft Corporation">Leach, P.</a>, Luotonen, A., and <a href="mailto:stewart@OpenMarket.com" title="Open Market, Inc.">L. Stewart</a>, “<a href="https://tools.ietf.org/html/rfc2617">HTTP Authentication: Basic and Digest Access Authentication</a>”, RFC&nbsp;2617, June&nbsp;1999.
    19862097            </td>
    19872098         </tr>
    19882099         <tr>
    19892100            <td class="reference"><b id="RFC4366">[RFC4366]</b></td>
    1990             <td class="top">Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J., and T. Wright, “<a href="http://tools.ietf.org/html/rfc4366">Transport Layer Security (TLS) Extensions</a>”, RFC&nbsp;4366, April&nbsp;2006.
     2101            <td class="top">Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J., and T. Wright, “<a href="https://tools.ietf.org/html/rfc4366">Transport Layer Security (TLS) Extensions</a>”, RFC&nbsp;4366, April&nbsp;2006.
    19912102            </td>
    19922103         </tr>
    19932104         <tr>
    19942105            <td class="reference"><b id="RFC4559">[RFC4559]</b></td>
    1995             <td class="top">Jaganathan, K., Zhu, L., and J. Brezak, “<a href="http://tools.ietf.org/html/rfc4559">SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows</a>”, RFC&nbsp;4559, June&nbsp;2006.
     2106            <td class="top">Jaganathan, K., Zhu, L., and J. Brezak, “<a href="https://tools.ietf.org/html/rfc4559">SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows</a>”, RFC&nbsp;4559, June&nbsp;2006.
    19962107            </td>
    19972108         </tr>
    19982109         <tr>
    19992110            <td class="reference"><b id="RFC5246">[RFC5246]</b></td>
    2000             <td class="top">Dierks, T. and E. Rescorla, “<a href="http://tools.ietf.org/html/rfc5246">The Transport Layer Security (TLS) Protocol Version 1.2</a>”, RFC&nbsp;5246, August&nbsp;2008.
     2111            <td class="top">Dierks, T. and E. Rescorla, “<a href="https://tools.ietf.org/html/rfc5246">The Transport Layer Security (TLS) Protocol Version 1.2</a>”, RFC&nbsp;5246, August&nbsp;2008.
    20012112            </td>
    20022113         </tr>
    20032114         <tr>
    20042115            <td class="reference"><b id="RFC6454">[RFC6454]</b></td>
    2005             <td class="top">Barth, A., “<a href="http://tools.ietf.org/html/rfc6454">The Web Origin Concept</a>”, RFC&nbsp;6454, December&nbsp;2011.
     2116            <td class="top">Barth, A., “<a href="https://tools.ietf.org/html/rfc6454">The Web Origin Concept</a>”, RFC&nbsp;6454, December&nbsp;2011.
    20062117            </td>
    20072118         </tr>
    20082119         <tr>
    20092120            <td class="reference"><b id="TLSNPN">[TLSNPN]</b></td>
    2010             <td class="top">Langley, A., “<a href="http://tools.ietf.org/html/draft-agl-tls-nextprotoneg-01">TLS Next Protocol Negotiation</a>”, Internet-Draft&nbsp;draft-agl-tls-nextprotoneg-01 (work in progress), August&nbsp;2010.
     2121            <td class="top">Langley, A., “<a href="https://tools.ietf.org/html/draft-agl-tls-nextprotoneg-01">TLS Next Protocol Negotiation</a>”, Internet-Draft&nbsp;draft-agl-tls-nextprotoneg-01 (work in progress), August&nbsp;2010.
    20112122            </td>
    20122123         </tr>
     
    20172128         </tr>
    20182129      </table>
    2019       <div class="avoidbreak">
    2020          <h1 id="rfc.authors"><a href="#rfc.authors">Authors' Addresses</a></h1>
    2021          <address class="vcard"><span class="vcardline"><span class="fn">Mike Belshe</span><span class="n hidden"><span class="family-name">Belshe</span><span class="given-name">Mike</span></span></span><span class="org vcardline">Twist</span><span class="vcardline">Email: <a href="mailto:mbelshe@chromium.org"><span class="email">mbelshe@chromium.org</span></a></span></address>
    2022          <address class="vcard"><span class="vcardline"><span class="fn">Roberto Peon</span><span class="n hidden"><span class="family-name">Peon</span><span class="given-name">Roberto</span></span></span><span class="org vcardline">Google, Inc</span><span class="vcardline">Email: <a href="mailto:fenix@google.com"><span class="email">fenix@google.com</span></a></span></address>
    2023          <address class="vcard"><span class="vcardline"><span class="fn">Martin Thomson</span>
    2024                (editor)
    2025                <span class="n hidden"><span class="family-name">Thomson</span><span class="given-name">Martin</span></span></span><span class="org vcardline">Microsoft</span><span class="adr"><span class="street-address vcardline">3210 Porter Drive</span><span class="vcardline"><span class="locality">Palo Alto</span>, <span class="postal-code">94043</span></span><span class="country-name vcardline">US</span></span><span class="vcardline">Email: <a href="mailto:martin.thomson@skype.net"><span class="email">martin.thomson@skype.net</span></a></span></address>
    2026          <address class="vcard"><span class="vcardline"><span class="fn">Alexey Melnikov</span>
    2027                (editor)
    2028                <span class="n hidden"><span class="family-name">Melnikov</span><span class="given-name">Alexey</span></span></span><span class="org vcardline">Isode Ltd</span><span class="adr"><span class="street-address vcardline">5 Castle Business Village</span><span class="street-address vcardline">36 Station Road</span><span class="vcardline"><span class="locality">Hampton</span>, <span class="region">Middlesex</span>&nbsp;<span class="postal-code">TW12 2BX</span></span><span class="country-name vcardline">UK</span></span><span class="vcardline">Email: <a href="mailto:Alexey.Melnikov@isode.com"><span class="email">Alexey.Melnikov@isode.com</span></a></span></address>
     2130      <div id="change.log">
     2131         <h1 id="rfc.section.A" class="np"><a href="#rfc.section.A">A.</a>&nbsp;<a href="#change.log">Change Log (to be removed by RFC Editor before publication)</a></h1>
     2132         <div id="changes.since.draft-mbelshe-httpbis-spdy-00">
     2133            <h2 id="rfc.section.A.1"><a href="#rfc.section.A.1">A.1</a>&nbsp;<a href="#changes.since.draft-mbelshe-httpbis-spdy-00">Since draft-mbelshe-httpbis-spdy-00</a></h2>
     2134            <p id="rfc.section.A.1.p.1">Adopted as base for draft-ietf-httpbis-http2.</p>
     2135            <p id="rfc.section.A.1.p.2">Updated authors/editors list.</p>
     2136            <p id="rfc.section.A.1.p.3">Added status note.</p>
     2137         </div>
    20292138      </div>
    2030       <h1 id="rfc.section.A" class="np"><a href="#rfc.section.A">A.</a>&nbsp;<a id="change.log" href="#change.log">Change Log (to be removed by RFC Editor before publication)</a></h1>
    2031       <h2 id="rfc.section.A.1"><a href="#rfc.section.A.1">A.1</a>&nbsp;<a id="changes.since.draft-mbelshe-httpbis-spdy-00" href="#changes.since.draft-mbelshe-httpbis-spdy-00">Since draft-mbelshe-httpbis-spdy-00</a></h2>
    2032       <p id="rfc.section.A.1.p.1">Adopted as base for draft-ietf-httpbis-http2.</p>
    2033       <p id="rfc.section.A.1.p.2">Updated authors/editors list.</p>
    2034       <p id="rfc.section.A.1.p.3">Added status note.</p>
    20352139      <h1 id="rfc.index"><a href="#rfc.index">Index</a></h1>
    20362140      <p class="noprint"><a href="#rfc.index.A">A</a> <a href="#rfc.index.R">R</a> <a href="#rfc.index.T">T</a> <a href="#rfc.index.U">U</a>
     
    20692173         </ul>
    20702174      </div>
     2175      <div class="avoidbreak">
     2176         <h1 id="rfc.authors"><a href="#rfc.authors">Authors' Addresses</a></h1>
     2177         <p><b>Mike Belshe</b><br>Twist<br>Email: <a href="mailto:mbelshe@chromium.org">mbelshe@chromium.org</a></p>
     2178         <p><b>Roberto Peon</b><br>Google, Inc<br>Email: <a href="mailto:fenix@google.com">fenix@google.com</a></p>
     2179         <p><b>Martin Thomson</b>
     2180            (editor)
     2181            <br>Microsoft<br>3210 Porter Drive<br>Palo Alto, 94043<br>US<br>Email: <a href="mailto:martin.thomson@skype.net">martin.thomson@skype.net</a></p>
     2182         <p><b>Alexey Melnikov</b>
     2183            (editor)
     2184            <br>Isode Ltd<br>5 Castle Business Village<br>36 Station Road<br>Hampton, Middlesex&nbsp;TW12 2BX<br>UK<br>Email: <a href="mailto:Alexey.Melnikov@isode.com">Alexey.Melnikov@isode.com</a></p>
     2185      </div>
    20712186   </body>
    20722187</html>
  • draft-ietf-httpbis-http2/latest/draft-ietf-httpbis-http2.html

    r2174 r2726  
    1 <!DOCTYPE html
    2   PUBLIC "-//W3C//DTD HTML 4.01//EN">
    3 <html lang="en">
    4    <head profile="http://www.w3.org/2006/03/hcard http://dublincore.org/documents/2008/08/04/dc-html/">
    5       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    6       <title>Hypertext Transfer Protocol version 2.0</title><script>
    7 var buttonsAdded = false;
    8 
    9 function init() {
    10   var fb = document.createElement("div");
    11   fb.className = "feedback noprint";
    12   fb.setAttribute("onclick", "feedback();");
    13   fb.appendChild(document.createTextNode("feedback"));
    14 
    15   var bodyl = document.getElementsByTagName("body");
    16   bodyl.item(0).appendChild(fb);
    17 }
    18 
    19 function feedback() {
    20   toggleButtonsToElementsByName("h1");
    21   toggleButtonsToElementsByName("h2");
    22   toggleButtonsToElementsByName("h3");
    23   toggleButtonsToElementsByName("h4");
    24  
    25   buttonsAdded = !buttonsAdded;
    26 }
    27 
    28 function toggleButtonsToElementsByName(name) {
    29   var list = document.getElementsByTagName(name);
    30   for (var i = 0; i < list.length; i++) {
    31     toggleButton(list.item(i));
    32   }
    33 }
    34 
    35 function toggleButton(node) {
    36   if (! buttonsAdded) {
    37  
    38     // docname
    39     var template = "mailto:ietf-http-wg@w3.org?subject={docname},%20%22{section}%22&body=<{ref}>:";
    40 
    41     var id = node.getAttribute("id");
    42     // better id available?
    43     var titlelinks = node.getElementsByTagName("a");
    44     for (var i = 0; i < titlelinks.length; i++) {
    45       var tl = titlelinks.item(i);
    46       if (tl.getAttribute("id")) {
    47         id = tl.getAttribute("id");
    48       }
    49     }
    50 
    51     // ref
    52     var ref = window.location.toString();
    53     var hash = ref.indexOf("#");
    54     if (hash != -1) {
    55       ref = ref.substring(0, hash);
    56     }
    57     if (id != "") {
    58       ref += "#" + id;
    59     }
    60    
    61     // docname
    62     var docname = "draft-ietf-httpbis-http2-latest";
    63 
    64     // section
    65     var section = node.textContent;
    66     section = section.replace("\u00a0", " ");
    67    
    68     // build URI from template
    69     var uri = template.replace("{docname}", encodeURIComponent(docname));
    70     uri = uri.replace("{section}", encodeURIComponent(section));
    71     uri = uri.replace("{ref}", encodeURIComponent(ref));
    72  
    73     var button = document.createElement("a");
    74     button.className = "fbbutton noprint";
    75     button.setAttribute("href", uri);
    76     button.appendChild(document.createTextNode("send feedback"));
    77     node.appendChild(button);
    78   }
    79   else {
    80     var buttons = node.getElementsByTagName("a");
    81     for (var i = 0; i < buttons.length; i++) {
    82       var b = buttons.item(i);
    83       if (b.className == "fbbutton noprint") {
    84         node.removeChild(b);
    85       }
    86     }
    87   }
    88 }</script><style type="text/css" title="Xml2Rfc (sans serif)">
    89 a {
    90   text-decoration: none;
    91 }
    92 a.smpl {
    93   color: black;
    94 }
    95 a:hover {
    96   text-decoration: underline;
    97 }
    98 a:active {
    99   text-decoration: underline;
    100 }
    101 address {
    102   margin-top: 1em;
    103   margin-left: 2em;
    104   font-style: normal;
    105 }
    106 body {
    107   color: black;
    108   font-family: verdana, helvetica, arial, sans-serif;
    109   font-size: 10pt;
    110   margin-right: 2em;
    111 }
    112 cite {
    113   font-style: normal;
    114 }
    115 dl {
    116   margin-left: 2em;
    117 }
    118 ul.empty {
    119   list-style-type: none;
    120 }
    121 ul.empty li {
    122   margin-top: .5em;
    123 }
    124 dl p {
    125   margin-left: 0em;
    126 }
    127 dt {
    128   margin-top: .5em;
    129 }
    130 h1 {
    131   font-size: 14pt;
    132   line-height: 21pt;
    133   page-break-after: avoid;
    134 }
    135 h1.np {
    136   page-break-before: always;
    137 }
    138 h1 a {
    139   color: #333333;
    140 }
    141 h2 {
    142   font-size: 12pt;
    143   line-height: 15pt;
    144   page-break-after: avoid;
    145 }
    146 h3, h4, h5, h6 {
    147   font-size: 10pt;
    148   page-break-after: avoid;
    149 }
    150 h2 a, h3 a, h4 a, h5 a, h6 a {
    151   color: black;
    152 }
    153 img {
    154   margin-left: 3em;
    155 }
    156 li {
    157   margin-left: 2em;
    158 }
    159 ol {
    160   margin-left: 2em;
    161 }
    162 ol.la {
    163   list-style-type: lower-alpha;
    164 }
    165 ol.ua {
    166   list-style-type: upper-alpha;
    167 }
    168 ol p {
    169   margin-left: 0em;
    170 }
    171 p {
    172   margin-left: 2em;
    173 }
    174 pre {
    175   margin-left: 3em;
    176   background-color: lightyellow;
    177   padding: .25em;
    178   page-break-inside: avoid;
    179 }
    180 pre.ccmarker {
    181   background-color: white;
    182   color: gray;
    183 }
    184 pre.ccmarker > span {
    185   font-size: small;
    186 }
    187 pre.cct {
    188   margin-bottom: -1em;
    189 }
    190 pre.ccb {
    191   margin-top: -1em;
    192 }
    193 pre.text2 {
    194   border-style: dotted;
    195   border-width: 1px;
    196   background-color: #f0f0f0;
    197   width: 69em;
    198 }
    199 pre.inline {
    200   background-color: white;
    201   padding: 0em;
    202 }
    203 pre.text {
    204   border-style: dotted;
    205   border-width: 1px;
    206   background-color: #f8f8f8;
    207   width: 69em;
    208 }
    209 pre.drawing {
    210   border-style: solid;
    211   border-width: 1px;
    212   background-color: #f8f8f8;
    213   padding: 2em;
    214 }
    215 table {
    216   margin-left: 2em;
    217 }
    218 table.header {
    219   border-spacing: 1px;
    220   width: 95%;
    221   font-size: 10pt;
    222   color: white;
    223 }
    224 td.top {
    225   vertical-align: top;
    226 }
    227 td.topnowrap {
    228   vertical-align: top;
    229   white-space: nowrap;
    230 }
    231 table.header td {
    232   background-color: gray;
    233   width: 50%;
    234 }
    235 td.reference {
    236   vertical-align: top;
    237   white-space: nowrap;
    238   padding-right: 1em;
    239 }
    240 thead {
    241   display:table-header-group;
    242 }
    243 ul.toc, ul.toc ul {
    244   list-style: none;
    245   margin-left: 1.5em;
    246   padding-left: 0em;
    247 }
    248 ul.toc li {
    249   line-height: 150%;
    250   font-weight: bold;
    251   font-size: 10pt;
    252   margin-left: 0em;
    253 }
    254 ul.toc li li {
    255   line-height: normal;
    256   font-weight: normal;
    257   font-size: 9pt;
    258   margin-left: 0em;
    259 }
    260 li.excluded {
    261   font-size: 0pt;
    262 }
    263 ul p {
    264   margin-left: 0em;
    265 }
    266 ul.ind, ul.ind ul {
    267   list-style: none;
    268   margin-left: 1.5em;
    269   padding-left: 0em;
    270   page-break-before: avoid;
    271 }
    272 ul.ind li {
    273   font-weight: bold;
    274   line-height: 200%;
    275   margin-left: 0em;
    276 }
    277 ul.ind li li {
    278   font-weight: normal;
    279   line-height: 150%;
    280   margin-left: 0em;
    281 }
    282 .avoidbreak {
    283   page-break-inside: avoid;
    284 }
    285 
    286 .comment {
    287   background-color: yellow;
    288 }
    289 .center {
    290   text-align: center;
    291 }
    292 .error {
    293   color: red;
    294   font-style: italic;
    295   font-weight: bold;
    296 }
    297 .figure {
    298   font-weight: bold;
    299   text-align: center;
    300   font-size: 9pt;
    301 }
    302 .filename {
    303   color: #333333;
    304   font-weight: bold;
    305   font-size: 12pt;
    306   line-height: 21pt;
    307   text-align: center;
    308 }
    309 .fn {
    310   font-weight: bold;
    311 }
    312 .hidden {
    313   display: none;
    314 }
    315 .left {
    316   text-align: left;
    317 }
    318 .right {
    319   text-align: right;
    320 }
    321 .title {
    322   color: #990000;
    323   font-size: 18pt;
    324   line-height: 18pt;
    325   font-weight: bold;
    326   text-align: center;
    327   margin-top: 36pt;
    328 }
    329 .vcardline {
    330   display: block;
    331 }
    332 .warning {
    333   font-size: 14pt;
    334   background-color: yellow;
    335 }
    336 .feedback {
    337   position: fixed;
    338   bottom: 1%;
    339   right: 1%;
    340   padding: 3px 5px;
    341   color: white;
    342   border-radius: 5px;
    343   background: #a00000;
    344   border: 1px solid silver;
    345 }
    346 .fbbutton {
    347   margin-left: 1em;
    348   color: #303030;
    349   font-size: small;
    350   font-weight: normal;
    351   background: #d0d000;
    352   padding: 1px 4px;
    353   border: 1px solid silver;
    354   border-radius: 5px;
    355 }
    356 
    357 @media print {
    358   .noprint {
    359     display: none;
    360   }
    361  
    362   a {
    363     color: black;
    364     text-decoration: none;
    365   }
    366 
    367   table.header {
    368     width: 90%;
    369   }
    370 
    371   td.header {
    372     width: 50%;
    373     color: black;
    374     background-color: white;
    375     vertical-align: top;
    376     font-size: 12pt;
    377   }
    378 
    379   ul.toc a:nth-child(2)::after {
    380     content: leader('.') target-counter(attr(href), page);
    381   }
    382  
    383   ul.ind li li a {
    384     content: target-counter(attr(href), page);
    385   }
    386  
    387   .print2col {
    388     column-count: 2;
    389     -moz-column-count: 2;
    390     column-fill: auto;
    391   }
    392 }
    393 
    394 @page {
    395   @top-left {
    396        content: "Internet-Draft";
    397   }
    398   @top-right {
    399        content: "January 2013";
    400   }
    401   @top-center {
    402        content: "HTTP/2.0";
    403   }
    404   @bottom-left {
    405        content: "Belshe, et al.";
    406   }
    407   @bottom-center {
    408        content: "Expires August 4, 2013";
    409   }
    410   @bottom-right {
    411        content: "[Page " counter(page) "]";
    412   }
    413 }
    414 
    415 @page:first {
    416     @top-left {
    417       content: normal;
    418     }
    419     @top-right {
    420       content: normal;
    421     }
    422     @top-center {
    423       content: normal;
    424     }
    425 }
    426 </style><link rel="Contents" href="#rfc.toc">
    427       <link rel="Author" href="#rfc.authors">
    428       <link rel="Copyright" href="#rfc.copyrightnotice">
    429       <link rel="Index" href="#rfc.index">
    430       <link rel="Chapter" title="1 Introduction" href="#rfc.section.1">
    431       <link rel="Chapter" title="2 Starting HTTP/2.0" href="#rfc.section.2">
    432       <link rel="Chapter" title="3 HTTP/2.0 Framing Layer" href="#rfc.section.3">
    433       <link rel="Chapter" title="4 HTTP Layering over HTTP/2.0" href="#rfc.section.4">
    434       <link rel="Chapter" title="5 Design Rationale and Notes" href="#rfc.section.5">
    435       <link rel="Chapter" title="6 Security Considerations" href="#rfc.section.6">
    436       <link rel="Chapter" title="7 Privacy Considerations" href="#rfc.section.7">
    437       <link rel="Chapter" title="8 Requirements Notation" href="#rfc.section.8">
    438       <link rel="Chapter" title="9 Acknowledgements" href="#rfc.section.9">
    439       <link rel="Chapter" href="#rfc.section.10" title="10 Normative References">
    440       <link rel="Appendix" title="A Change Log (to be removed by RFC Editor before publication)" href="#rfc.section.A">
    441       <meta name="generator" content="http://greenbytes.de/tech/webdav/rfc2629.xslt, Revision 1.588, 2012-08-25 12:28:24, XSLT vendor: SAXON 8.9 from Saxonica http://www.saxonica.com/">
    442       <meta name="keywords" content="HTTP">
    443       <link rel="schema.dct" href="http://purl.org/dc/terms/">
    444       <meta name="dct.creator" content="Belshe, M.">
    445       <meta name="dct.creator" content="Peon, R.">
    446       <meta name="dct.creator" content="Thomson, M.">
    447       <meta name="dct.creator" content="Melnikov, A.">
    448       <meta name="dct.identifier" content="urn:ietf:id:draft-ietf-httpbis-http2-latest">
    449       <meta name="dct.issued" scheme="ISO8601" content="2013-01-31">
    450       <meta name="dct.abstract" content="This document describes an optimised expression of the semantics of the HTTP protocol. The HTTP/2.0 encapsulation enables more efficient transfer of resources over HTTP by providing compressed headers, simultaneous requests, and unsolicited push of resources from server to client. This document is an alternative to, but does not obsolete RFC{http-p1}. The HTTP protocol semantics described in RFC{http-p2..p7} are unmodified.">
    451       <meta name="description" content="This document describes an optimised expression of the semantics of the HTTP protocol. The HTTP/2.0 encapsulation enables more efficient transfer of resources over HTTP by providing compressed headers, simultaneous requests, and unsolicited push of resources from server to client. This document is an alternative to, but does not obsolete RFC{http-p1}. The HTTP protocol semantics described in RFC{http-p2..p7} are unmodified.">
    452    </head>
    453    <body onload="init();">
    454       <table class="header">
    455          <tbody>
    456             <tr>
    457                <td class="left">HTTPbis Working Group</td>
    458                <td class="right">M. Belshe</td>
    459             </tr>
    460             <tr>
    461                <td class="left">Internet-Draft</td>
    462                <td class="right">Twist</td>
    463             </tr>
    464             <tr>
    465                <td class="left">Intended status: Informational</td>
    466                <td class="right">R. Peon</td>
    467             </tr>
    468             <tr>
    469                <td class="left">Expires: August 4, 2013</td>
    470                <td class="right">Google, Inc</td>
    471             </tr>
    472             <tr>
    473                <td class="left"></td>
    474                <td class="right">M. Thomson, Editor</td>
    475             </tr>
    476             <tr>
    477                <td class="left"></td>
    478                <td class="right">Microsoft</td>
    479             </tr>
    480             <tr>
    481                <td class="left"></td>
    482                <td class="right">A. Melnikov, Editor</td>
    483             </tr>
    484             <tr>
    485                <td class="left"></td>
    486                <td class="right">Isode Ltd</td>
    487             </tr>
    488             <tr>
    489                <td class="left"></td>
    490                <td class="right">January 31, 2013</td>
    491             </tr>
    492          </tbody>
    493       </table>
    494       <p class="title">Hypertext Transfer Protocol version 2.0<br><span class="filename">draft-ietf-httpbis-http2-latest</span></p>
    495       <h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1>
    496       <p>This document describes an optimised expression of the semantics of the HTTP protocol. The HTTP/2.0 encapsulation enables
    497          more efficient transfer of resources over HTTP by providing compressed headers, simultaneous requests, and unsolicited push
    498          of resources from server to client.
    499       </p> 
    500       <p>This document is an alternative to, but does not obsolete RFC{http-p1}. The HTTP protocol semantics described in RFC{http-p2..p7}
    501          are unmodified.
    502       </p>
    503       <h1 id="rfc.note.1"><a href="#rfc.note.1">Editorial Note (To be removed by RFC Editor)</a></h1>
    504       <p>This draft is a work-in-progress, and does not yet reflect Working Group consensus.</p> 
    505       <p>This draft contains features from the SPDY Protocol as a starting point, as per the Working Group's charter. Future drafts
    506          will add, remove and change text, based upon the Working Group's decisions.
    507       </p> 
    508       <p>Discussion of this draft takes place on the HTTPBIS working group mailing list (ietf-http-wg@w3.org), which is archived at &lt;<a href="http://lists.w3.org/Archives/Public/ietf-http-wg/">http://lists.w3.org/Archives/Public/ietf-http-wg/</a>&gt;.
    509       </p> 
    510       <p>The current issues list is at &lt;<a href="http://tools.ietf.org/wg/httpbis/trac/report/21">http://tools.ietf.org/wg/httpbis/trac/report/21</a>&gt; and related documents (including fancy diffs) can be found at &lt;<a href="http://tools.ietf.org/wg/httpbis/">http://tools.ietf.org/wg/httpbis/</a>&gt;.
    511       </p> 
    512       <p>The changes in this draft are summarized in <a href="#changes.since.draft-ietf-httpbis-http2-01" title="Since draft-ietf-httpbis-http2-01">Appendix&nbsp;A.1</a>.
    513       </p>
    514       <h1><a id="rfc.status" href="#rfc.status">Status of This Memo</a></h1>
    515       <p>This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.</p>
    516       <p>Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute
    517          working documents as Internet-Drafts. The list of current Internet-Drafts is at <a href="http://datatracker.ietf.org/drafts/current/">http://datatracker.ietf.org/drafts/current/</a>.
    518       </p>
    519       <p>Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other
    520          documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as “work
    521          in progress”.
    522       </p>
    523       <p>This Internet-Draft will expire on August 4, 2013.</p>
    524       <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1>
    525       <p>Copyright © 2013 IETF Trust and the persons identified as the document authors. All rights reserved.</p>
    526       <p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights
    527          and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License
    528          text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified
    529          BSD License.
    530       </p>
    531       <hr class="noprint">
    532       <h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1>
    533       <ul class="toc">
    534          <li><a href="#rfc.section.1">1.</a>&nbsp;&nbsp;&nbsp;<a href="#intro">Introduction</a><ul>
    535                <li><a href="#rfc.section.1.1">1.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.1.1">Document Organization</a></li>
    536                <li><a href="#rfc.section.1.2">1.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.1.2">Definitions</a></li>
    537             </ul>
    538          </li>
    539          <li><a href="#rfc.section.2">2.</a>&nbsp;&nbsp;&nbsp;<a href="#starting">Starting HTTP/2.0</a><ul>
    540                <li><a href="#rfc.section.2.1">2.1</a>&nbsp;&nbsp;&nbsp;<a href="#versioning">HTTP/2.0 Version Identification</a></li>
    541                <li><a href="#rfc.section.2.2">2.2</a>&nbsp;&nbsp;&nbsp;<a href="#discover-http">Starting HTTP/2.0 for "http:" URIs</a></li>
    542                <li><a href="#rfc.section.2.3">2.3</a>&nbsp;&nbsp;&nbsp;<a href="#discover-https">Starting HTTP/2.0 for "https:" URIs</a></li>
    543             </ul>
    544          </li>
    545          <li><a href="#rfc.section.3">3.</a>&nbsp;&nbsp;&nbsp;<a href="#FramingLayer">HTTP/2.0 Framing Layer</a><ul>
    546                <li><a href="#rfc.section.3.1">3.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.1">Session (Connections)</a></li>
    547                <li><a href="#rfc.section.3.2">3.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.2">Framing</a><ul>
    548                      <li><a href="#rfc.section.3.2.1">3.2.1</a>&nbsp;&nbsp;&nbsp;<a href="#ControlFrames">Control frames</a></li>
    549                      <li><a href="#rfc.section.3.2.2">3.2.2</a>&nbsp;&nbsp;&nbsp;<a href="#DataFrames">Data frames</a></li>
    550                   </ul>
    551                </li>
    552                <li><a href="#rfc.section.3.3">3.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.3">Streams</a><ul>
    553                      <li><a href="#rfc.section.3.3.1">3.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#StreamFrames">Stream frames</a></li>
    554                      <li><a href="#rfc.section.3.3.2">3.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#StreamCreation">Stream creation</a><ul>
    555                            <li><a href="#rfc.section.3.3.2.1">3.3.2.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.3.2.1">Unidirectional streams</a></li>
    556                            <li><a href="#rfc.section.3.3.2.2">3.3.2.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.3.2.2">Bidirectional streams</a></li>
    557                         </ul>
    558                      </li>
    559                      <li><a href="#rfc.section.3.3.3">3.3.3</a>&nbsp;&nbsp;&nbsp;<a href="#StreamPriority">Stream priority</a></li>
    560                      <li><a href="#rfc.section.3.3.4">3.3.4</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.3.4">Stream headers</a></li>
    561                      <li><a href="#rfc.section.3.3.5">3.3.5</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.3.5">Stream data exchange</a></li>
    562                      <li><a href="#rfc.section.3.3.6">3.3.6</a>&nbsp;&nbsp;&nbsp;<a href="#StreamHalfClose">Stream half-close</a></li>
    563                      <li><a href="#rfc.section.3.3.7">3.3.7</a>&nbsp;&nbsp;&nbsp;<a href="#StreamClose">Stream close</a></li>
    564                   </ul>
    565                </li>
    566                <li><a href="#rfc.section.3.4">3.4</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.4">Error Handling</a><ul>
    567                      <li><a href="#rfc.section.3.4.1">3.4.1</a>&nbsp;&nbsp;&nbsp;<a href="#SessionErrorHandler">Session Error Handling</a></li>
    568                      <li><a href="#rfc.section.3.4.2">3.4.2</a>&nbsp;&nbsp;&nbsp;<a href="#StreamErrorHandler">Stream Error Handling</a></li>
    569                   </ul>
    570                </li>
    571                <li><a href="#rfc.section.3.5">3.5</a>&nbsp;&nbsp;&nbsp;<a href="#flowcontrol">Stream Flow Control</a><ul>
    572                      <li><a href="#rfc.section.3.5.1">3.5.1</a>&nbsp;&nbsp;&nbsp;<a href="#fc-principles">Flow Control Principles</a></li>
    573                      <li><a href="#rfc.section.3.5.2">3.5.2</a>&nbsp;&nbsp;&nbsp;<a href="#fc-basic">Basic Flow Control Algorithm</a></li>
    574                   </ul>
    575                </li>
    576                <li><a href="#rfc.section.3.6">3.6</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.6">Control frame types</a><ul>
    577                      <li><a href="#rfc.section.3.6.1">3.6.1</a>&nbsp;&nbsp;&nbsp;<a href="#SYN_STREAM">SYN_STREAM</a></li>
    578                      <li><a href="#rfc.section.3.6.2">3.6.2</a>&nbsp;&nbsp;&nbsp;<a href="#SYN_REPLY">SYN_REPLY</a></li>
    579                      <li><a href="#rfc.section.3.6.3">3.6.3</a>&nbsp;&nbsp;&nbsp;<a href="#RST_STREAM">RST_STREAM</a></li>
    580                      <li><a href="#rfc.section.3.6.4">3.6.4</a>&nbsp;&nbsp;&nbsp;<a href="#SETTINGS">SETTINGS</a></li>
    581                      <li><a href="#rfc.section.3.6.5">3.6.5</a>&nbsp;&nbsp;&nbsp;<a href="#PING">PING</a></li>
    582                      <li><a href="#rfc.section.3.6.6">3.6.6</a>&nbsp;&nbsp;&nbsp;<a href="#GOAWAY">GOAWAY</a></li>
    583                      <li><a href="#rfc.section.3.6.7">3.6.7</a>&nbsp;&nbsp;&nbsp;<a href="#HEADERS">HEADERS</a></li>
    584                      <li><a href="#rfc.section.3.6.8">3.6.8</a>&nbsp;&nbsp;&nbsp;<a href="#WINDOW_UPDATE">WINDOW_UPDATE</a></li>
    585                      <li><a href="#rfc.section.3.6.9">3.6.9</a>&nbsp;&nbsp;&nbsp;<a href="#CREDENTIAL">CREDENTIAL</a></li>
    586                      <li><a href="#rfc.section.3.6.10">3.6.10</a>&nbsp;&nbsp;&nbsp;<a href="#HeaderBlock">Name/Value Header Block</a><ul>
    587                            <li><a href="#rfc.section.3.6.10.1">3.6.10.1</a>&nbsp;&nbsp;&nbsp;<a href="#Compression">Compression</a></li>
    588                         </ul>
    589                      </li>
    590                   </ul>
    591                </li>
    592             </ul>
    593          </li>
    594          <li><a href="#rfc.section.4">4.</a>&nbsp;&nbsp;&nbsp;<a href="#HTTPLayer">HTTP Layering over HTTP/2.0</a><ul>
    595                <li><a href="#rfc.section.4.1">4.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.1">Connection Management</a><ul>
    596                      <li><a href="#rfc.section.4.1.1">4.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.1.1">Use of GOAWAY</a></li>
    597                   </ul>
    598                </li>
    599                <li><a href="#rfc.section.4.2">4.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.2">HTTP Request/Response</a><ul>
    600                      <li><a href="#rfc.section.4.2.1">4.2.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.2.1">Request</a></li>
    601                      <li><a href="#rfc.section.4.2.2">4.2.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.2.2">Response</a></li>
    602                      <li><a href="#rfc.section.4.2.3">4.2.3</a>&nbsp;&nbsp;&nbsp;<a href="#Authentication">Authentication</a><ul>
    603                            <li><a href="#rfc.section.4.2.3.1">4.2.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.2.3.1">Stateless Authentication</a></li>
    604                            <li><a href="#rfc.section.4.2.3.2">4.2.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.2.3.2">Stateful Authentication</a></li>
    605                         </ul>
    606                      </li>
    607                   </ul>
    608                </li>
    609                <li><a href="#rfc.section.4.3">4.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.3">Server Push Transactions</a><ul>
    610                      <li><a href="#rfc.section.4.3.1">4.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.3.1">Server implementation</a></li>
    611                      <li><a href="#rfc.section.4.3.2">4.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.3.2">Client implementation</a></li>
    612                   </ul>
    613                </li>
    614             </ul>
    615          </li>
    616          <li><a href="#rfc.section.5">5.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5">Design Rationale and Notes</a><ul>
    617                <li><a href="#rfc.section.5.1">5.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5.1">Separation of Framing Layer and Application Layer</a></li>
    618                <li><a href="#rfc.section.5.2">5.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5.2">Error handling - Framing Layer</a></li>
    619                <li><a href="#rfc.section.5.3">5.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5.3">One Connection Per Domain</a></li>
    620                <li><a href="#rfc.section.5.4">5.4</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5.4">Fixed vs Variable Length Fields</a></li>
    621                <li><a href="#rfc.section.5.5">5.5</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5.5">Compression Context(s)</a></li>
    622                <li><a href="#rfc.section.5.6">5.6</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5.6">Unidirectional streams</a></li>
    623                <li><a href="#rfc.section.5.7">5.7</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5.7">Data Compression</a></li>
    624                <li><a href="#rfc.section.5.8">5.8</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5.8">Server Push</a></li>
    625             </ul>
    626          </li>
    627          <li><a href="#rfc.section.6">6.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.6">Security Considerations</a><ul>
    628                <li><a href="#rfc.section.6.1">6.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.6.1">Use of Same-origin constraints</a></li>
    629                <li><a href="#rfc.section.6.2">6.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.6.2">HTTP Headers and HTTP/2.0 Headers</a></li>
    630                <li><a href="#rfc.section.6.3">6.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.6.3">Cross-Protocol Attacks</a></li>
    631                <li><a href="#rfc.section.6.4">6.4</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.6.4">Server Push Implicit Headers</a></li>
    632             </ul>
    633          </li>
    634          <li><a href="#rfc.section.7">7.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.7">Privacy Considerations</a><ul>
    635                <li><a href="#rfc.section.7.1">7.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.7.1">Long Lived Connections</a></li>
    636                <li><a href="#rfc.section.7.2">7.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.7.2">SETTINGS frame</a></li>
    637             </ul>
    638          </li>
    639          <li><a href="#rfc.section.8">8.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.8">Requirements Notation</a></li>
    640          <li><a href="#rfc.section.9">9.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.9">Acknowledgements</a></li>
    641          <li><a href="#rfc.section.10">10.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references">Normative References</a></li>
    642          <li><a href="#rfc.authors">Authors' Addresses</a></li>
    643          <li><a href="#rfc.section.A">A.</a>&nbsp;&nbsp;&nbsp;<a href="#change.log">Change Log (to be removed by RFC Editor before publication)</a><ul>
    644                <li><a href="#rfc.section.A.1">A.1</a>&nbsp;&nbsp;&nbsp;<a href="#changes.since.draft-ietf-httpbis-http2-01">Since draft-ietf-httpbis-http2-01</a></li>
    645                <li><a href="#rfc.section.A.2">A.2</a>&nbsp;&nbsp;&nbsp;<a href="#changes.since.draft-ietf-httpbis-http2-00">Since draft-ietf-httpbis-http2-00</a></li>
    646                <li><a href="#rfc.section.A.3">A.3</a>&nbsp;&nbsp;&nbsp;<a href="#changes.since.draft-mbelshe-httpbis-spdy-00">Since draft-mbelshe-httpbis-spdy-00</a></li>
    647             </ul>
    648          </li>
    649          <li><a href="#rfc.index">Index</a></li>
    650       </ul>
    651       <h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a id="intro" href="#intro">Introduction</a></h1>
    652       <p id="rfc.section.1.p.1">HTTP is a wildly successful protocol. <a href="#HTTP-p1">HTTP/1.1 message encapsulation</a> <cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing" id="rfc.xref.HTTP-p1.1">[HTTP-p1]</cite> is optimized for implementation simplicity and accessibility, not application performance. As such it has several characteristics
    653          that have a negative overall effect on application performance.
    654       </p>
    655       <p id="rfc.section.1.p.2">The HTTP/1.1 encapsulation ensures that only one request can be delivered at a time on a given connection. HTTP/1.1 pipelining,
    656          which is not widely deployed, only partially addresses these concerns. Clients that need to make multiple requests therefore
    657          use commonly multiple connections to a server or servers in order to reduce the overall latency of those requests.
    658       </p>
    659       <p id="rfc.section.1.p.3">Furthermore, HTTP/1.1 headers are represented in an inefficient fashion, which, in addition to generating more or larger network
    660          packets, can cause the small initial TCP window to fill more quickly than is ideal. This results in excessive latency where
    661          multiple requests are made on a new TCP connection.
    662       </p>
    663       <p id="rfc.section.1.p.4">This document defines an optimized mapping of the HTTP semantics to a TCP connection. This optimization reduces the latency
    664          costs of HTTP by allowing parallel requests on the same connection and by using an efficient coding for HTTP headers. Prioritization
    665          of requests lets more important requests complete faster, further improving application performance.
    666       </p>
    667       <p id="rfc.section.1.p.5">HTTP/2.0 applications have an improved impact on network congestion due to the use of fewer TCP connections to achieve the
    668          same effect. Fewer TCP connections compete more fairly with other flows. Long-lived connections are also more able to take
    669          better advantage of the available network capacity, rather than operating in the slow start phase of TCP.
    670       </p>
    671       <p id="rfc.section.1.p.6">The HTTP/2.0 encapsulation also enables more efficient processing of messages by providing efficient message framing. Processing
    672          of headers in HTTP/2.0 messages is more efficient (for entities that process many messages).
    673       </p>
    674       <h2 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1</a>&nbsp;Document Organization
    675       </h2>
    676       <p id="rfc.section.1.1.p.1">The HTTP/2.0 Specification is split into three parts: starting HTTP/2.0 (<a href="#starting" title="Starting HTTP/2.0">Section&nbsp;2</a>), which covers how a HTTP/2.0 is started; a framing layer (<a href="#FramingLayer" title="HTTP/2.0 Framing Layer">Section&nbsp;3</a>), which multiplexes a TCP connection into independent, length-prefixed frames; and an HTTP layer (<a href="#HTTPLayer" title="HTTP Layering over HTTP/2.0">Section&nbsp;4</a>), which specifies the mechanism for overlaying HTTP request/response pairs on top of the framing layer. While some of the
    677          framing layer concepts are isolated from the HTTP layer, building a generic framing layer has not been a goal. The framing
    678          layer is tailored to the needs of the HTTP protocol and server push.
    679       </p>
    680       <h2 id="rfc.section.1.2"><a href="#rfc.section.1.2">1.2</a>&nbsp;Definitions
    681       </h2>
    682       <p id="rfc.section.1.2.p.1"> </p>
    683       <ul class="empty">
    684          <li>client: The endpoint initiating the HTTP/2.0 session.</li>
    685          <li>connection: A transport-level connection between two endpoints.</li>
    686          <li>endpoint: Either the client or server of a connection.</li>
    687          <li>frame: A header-prefixed sequence of bytes sent over a HTTP/2.0 session.</li>
    688          <li>server: The endpoint which did not initiate the HTTP/2.0 session.</li>
    689          <li>session: A synonym for a connection.</li>
    690          <li>session error: An error on the HTTP/2.0 session.</li>
    691          <li>stream: A bi-directional flow of bytes across a virtual channel within a HTTP/2.0 session.</li>
    692          <li>stream error: An error on an individual HTTP/2.0 stream.</li>
    693       </ul>
    694       <h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a id="starting" href="#starting">Starting HTTP/2.0</a></h1>
    695       <p id="rfc.section.2.p.1">Just as HTTP/1.1 does, HTTP/2.0 uses the "http:" and "https:" URI schemes. An HTTP/2.0-capable client is therefore required
    696          to discover whether a server (or intermediary) supports HTTP/2.0.
    697       </p>
    698       <p id="rfc.section.2.p.2">Different discovery mechanisms are defined for "http:" and "https:" URIs. Discovery for "http:" URIs is described in <a href="#discover-http" title="Starting HTTP/2.0 for &#34;http:&#34; URIs">Section&nbsp;2.2</a>; discovery for "https:" URIs is described in <a href="#discover-https" title="Starting HTTP/2.0 for &#34;https:&#34; URIs">Section&nbsp;2.3</a>.
    699       </p>
    700       <h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a>&nbsp;<a id="versioning" href="#versioning">HTTP/2.0 Version Identification</a></h2>
    701       <p id="rfc.section.2.1.p.1">HTTP/2.0 is identified using the string "HTTP/2.0". This identification is used in the HTTP/1.1 Upgrade header, in the <a href="#TLSNPN">TLS-NPN</a> <cite title="TLS Next Protocol Negotiation" id="rfc.xref.TLSNPN.1">[TLSNPN]</cite> [[TBD]] field and other places where protocol identification is required.
    702       </p>
    703       <p id="rfc.section.2.1.p.2">Negotiating "HTTP/2.0" implies the use of the transport, security, framing and message semantics described in this document.</p>
    704       <p id="rfc.section.2.1.p.3">[[Editor's Note: please remove the following text prior to the publication of a final version of this document.]]</p>
    705       <p id="rfc.section.2.1.p.4">Only implementations of the final, published RFC can identify themselves as "HTTP/2.0". Until such an RFC exists, implementations
    706          MUST NOT identify themselves using "HTTP/2.0".
    707       </p>
    708       <p id="rfc.section.2.1.p.5">Examples and text throughout the rest of this document use "HTTP/2.0" as a matter of editorial convenience only. Implementations
    709          of draft versions MUST NOT identify using this string.
    710       </p>
    711       <p id="rfc.section.2.1.p.6">Implementations of draft versions of the protocol MUST add the corresponding draft number to the identifier before the separator
    712          ('/'). For example, draft-ietf-httpbis-http2-03 is identified using the string "HTTP-03/2.0".
    713       </p>
    714       <p id="rfc.section.2.1.p.7">Non-compatible experiments that are based on these draft versions MUST include a further identifier. For example, an experimental
    715          implementation of packet mood-based encoding based on draft-ietf-httpbis-http2-07 might identify itself as "HTTP-07-emo/2.0".
    716          Note that any label MUST conform with the "token" syntax defined in Section 3.2.4 of <a href="#HTTP-p1" id="rfc.xref.HTTP-p1.2"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing">[HTTP-p1]</cite></a>. Experimenters are encouraged to coordinate their experiments on the ietf-http-wg@w3.org mailing list.
    717       </p>
    718       <h2 id="rfc.section.2.2"><a href="#rfc.section.2.2">2.2</a>&nbsp;<a id="discover-http" href="#discover-http">Starting HTTP/2.0 for "http:" URIs</a></h2>
    719       <p id="rfc.section.2.2.p.1">A client that makes a request to an "http:" URI without prior knowledge about support for HTTP/2.0 uses the HTTP Upgrade mechanism <a href="#HTTP-p2" id="rfc.xref.HTTP-p2.1"><cite title="Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content">[HTTP-p2]</cite></a>. The client makes an HTTP/1.1 request that includes an Upgrade header field identifying HTTP/2.0.
    720       </p>
    721       <p id="rfc.section.2.2.p.2">For example:</p>
    722       <div id="rfc.figure.u.1"></div><pre>   GET /default.htm HTTP/1.1
    723    Host: server.example.com
    724    Connection: Upgrade
    725    Upgrade: HTTP/2.0
    726 </pre><p id="rfc.section.2.2.p.4">A server that does not support HTTP/2.0 can respond to the request as though the Upgrade header field were absent:</p>
    727       <div id="rfc.figure.u.2"></div><pre>   HTTP/1.1 200 OK
    728    Content-length: 243
    729    Content-type: text/html
    730       ...
    731 </pre><p id="rfc.section.2.2.p.6">A server that supports HTTP/2.0 can accept the upgrade with a 101 (Switching Protocols) status code. After the empty line
    732          that terminates the 101 response, the server can begin sending HTTP/2.0 frames. These frames MUST include a response to the
    733          request that initiated the Upgrade.
    734       </p>
    735       <div id="rfc.figure.u.3"></div><pre>   HTTP/1.1 101 Switching Protocols
    736    Connection: Upgrade
    737    Upgrade: HTTP/2.0
    738 
    739    [ HTTP/2.0 frames ...
    740 </pre><p id="rfc.section.2.2.p.8">A client can learn that a particular server supports HTTP/2.0 by other means. A client MAY immediately send HTTP/2.0 frames
    741          to a server that is known to support HTTP/2.0. [[Open Issue: This is not definite. We may yet choose to perform negotiation
    742          for every connection. Reasons include intermediaries; phased upgrade of load-balanced server farms; etc...]] [[Open Issue:
    743          We need to enumerate the ways that clients can learn of HTTP/2.0 support.]]
    744       </p>
    745       <h2 id="rfc.section.2.3"><a href="#rfc.section.2.3">2.3</a>&nbsp;<a id="discover-https" href="#discover-https">Starting HTTP/2.0 for "https:" URIs</a></h2>
    746       <p id="rfc.section.2.3.p.1">[[TBD, maybe NPN]]</p>
    747       <h1 id="rfc.section.3"><a href="#rfc.section.3">3.</a>&nbsp;<a id="FramingLayer" href="#FramingLayer">HTTP/2.0 Framing Layer</a></h1>
    748       <h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a>&nbsp;Session (Connections)
    749       </h2>
    750       <p id="rfc.section.3.1.p.1">The HTTP/2.0 framing layer (or "session") runs atop a reliable transport layer such as <a href="#RFC0793">TCP</a> <cite title="Transmission Control Protocol" id="rfc.xref.RFC0793.1">[RFC0793]</cite>. The client is the TCP connection initiator. HTTP/2.0 connections are persistent connections.
    751       </p>
    752       <p id="rfc.section.3.1.p.2">For best performance, it is expected that clients will not close open connections until the user navigates away from all web
    753          pages referencing a connection, or until the server closes the connection. Servers are encouraged to leave connections open
    754          for as long as possible, but can terminate idle connections if necessary. When either endpoint closes the transport-level
    755          connection, it MUST first send a GOAWAY (<a href="#GOAWAY" title="GOAWAY">Section&nbsp;3.6.6</a>) frame so that the endpoints can reliably determine if requests finished before the close.
    756       </p>
    757       <h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a>&nbsp;Framing
    758       </h2>
    759       <p id="rfc.section.3.2.p.1">Once the connection is established, clients and servers exchange framed messages. There are two types of frames: control frames (<a href="#ControlFrames" title="Control frames">Section&nbsp;3.2.1</a>) and data frames (<a href="#DataFrames" title="Data frames">Section&nbsp;3.2.2</a>). Frames always have a common header which is 8 bytes in length.
    760       </p>
    761       <p id="rfc.section.3.2.p.2">The first bit is a control bit indicating whether a frame is a control frame or data frame. Control frames carry a frame type,
    762          flags, and a length. Data frames contain the stream ID, flags, and the length for the payload carried after the common header.
    763          The simple header is designed to make reading and writing of frames easy.
    764       </p>
    765       <p id="rfc.section.3.2.p.3">All integer values, including length and type, are in network byte order. HTTP/2.0 does not enforce alignment of types in
    766          dynamically sized frames.
    767       </p>
    768       <h3 id="rfc.section.3.2.1"><a href="#rfc.section.3.2.1">3.2.1</a>&nbsp;<a id="ControlFrames" href="#ControlFrames">Control frames</a></h3>
    769       <div id="rfc.figure.u.4"></div> <pre>+----------------------------------+
    770 |C| Unused (15bits) | Type(16bits) |
    771 +----------------------------------+
    772 | Flags (8)  |  Length (24 bits)   |
    773 +----------------------------------+
    774 |               Data               |
    775 +----------------------------------+
    776   </pre> <p id="rfc.section.3.2.1.p.2">Control bit: The 'C' bit is a single bit indicating if this is a control message. For control frames this value is always
    777          1.
    778       </p>
    779       <p id="rfc.section.3.2.1.p.3">Unused: these 15 bits are unused.</p>
    780       <p id="rfc.section.3.2.1.p.4">Type: The type of control frame. See Control Frames for the complete list of control frames.</p>
    781       <p id="rfc.section.3.2.1.p.5">Flags: Flags related to this frame. Flags for control frames and data frames are different.</p>
    782       <p id="rfc.section.3.2.1.p.6">Length: An unsigned 24-bit value representing the number of bytes after the length field.</p>
    783       <p id="rfc.section.3.2.1.p.7">Data: data associated with this control frame. The format and length of this data is controlled by the control frame type.</p>
    784       <p id="rfc.section.3.2.1.p.8">Control frame processing requirements: </p>
    785       <ul class="empty">
    786          <li>Note that full length control frames (16MB) can be large for implementations running on resource-limited hardware. In such
    787             cases, implementations MAY limit the maximum length frame supported. However, all implementations MUST be able to receive
    788             control frames of at least 8192 octets in length.
    789          </li>
    790       </ul>
    791       <h3 id="rfc.section.3.2.2"><a href="#rfc.section.3.2.2">3.2.2</a>&nbsp;<a id="DataFrames" href="#DataFrames">Data frames</a></h3>
    792       <div id="rfc.figure.u.5"></div> <pre>+----------------------------------+
    793 |C|       Stream-ID (31bits)       |
    794 +----------------------------------+
    795 | Flags (8)  |  Length (24 bits)   |
    796 +----------------------------------+
    797 |               Data               |
    798 +----------------------------------+
    799   </pre> <p id="rfc.section.3.2.2.p.2">Control bit: For data frames this value is always 0.</p>
    800       <p id="rfc.section.3.2.2.p.3">Stream-ID: A 31-bit value identifying the stream.</p>
    801       <p id="rfc.section.3.2.2.p.4">Flags: Flags related to this frame. Valid flags are: </p>
    802       <ul class="empty">
    803          <li>0x01 = FLAG_FIN - signifies that this frame represents the last frame to be transmitted on this stream. See Stream Close (<a href="#StreamClose" title="Stream close">Section&nbsp;3.3.7</a>) below.
    804          </li>
    805          <li>0x02 = FLAG_COMPRESS - indicates that the data in this frame has been compressed.</li>
    806       </ul>
    807       <p id="rfc.section.3.2.2.p.5">Length: An unsigned 24-bit value representing the number of bytes after the length field. The total size of a data frame is
    808          8 bytes + length. It is valid to have a zero-length data frame.
    809       </p>
    810       <p id="rfc.section.3.2.2.p.6">Data: The variable-length data payload; the length was defined in the length field.</p>
    811       <p id="rfc.section.3.2.2.p.7">Data frame processing requirements: </p>
    812       <ul class="empty">
    813          <li>If an endpoint receives a data frame for a stream-id which is not open and the endpoint has not sent a GOAWAY (<a href="#GOAWAY" title="GOAWAY">Section&nbsp;3.6.6</a>) frame, it MUST send issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;3.4.2</a>) with the error code INVALID_STREAM for the stream-id.
    814          </li>
    815          <li>If the endpoint which created the stream receives a data frame before receiving a SYN_REPLY on that stream, it is a protocol
    816             error, and the recipient MUST issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;3.4.2</a>) with the status code PROTOCOL_ERROR for the stream-id.
    817          </li>
    818          <li>Implementors note: If an endpoint receives multiple data frames for invalid stream-ids, it MAY close the session.</li>
    819          <li>All HTTP/2.0 endpoints MUST accept compressed data frames. Compression of data frames is always done using zlib compression.
    820             Each stream initializes and uses its own compression context dedicated to use within that stream. Endpoints are encouraged
    821             to use application level compression rather than HTTP/2.0 stream level compression.
    822          </li>
    823          <li>Each HTTP/2.0 stream sending compressed frames creates its own zlib context for that stream, and these compression contexts
    824             MUST be distinct from the compression contexts used with SYN_STREAM/SYN_REPLY/HEADER compression. (Thus, if both endpoints
    825             of a stream are compressing data on the stream, there will be two zlib contexts, one for sending and one for receiving).
    826          </li>
    827       </ul>
    828       <h2 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a>&nbsp;Streams
    829       </h2>
    830       <p id="rfc.section.3.3.p.1">Streams are independent sequences of bi-directional data divided into frames with several properties: </p>
    831       <ul class="empty">
    832          <li>Streams may be created by either the client or server.</li>
    833          <li>Streams optionally carry a set of name/value header pairs.</li>
    834          <li>Streams can concurrently send data interleaved with other streams.</li>
    835          <li>Streams may be cancelled.</li>
    836       </ul>
    837       <h3 id="rfc.section.3.3.1"><a href="#rfc.section.3.3.1">3.3.1</a>&nbsp;<a id="StreamFrames" href="#StreamFrames">Stream frames</a></h3>
    838       <p id="rfc.section.3.3.1.p.1">HTTP/2.0 defines 3 control frames to manage the lifecycle of a stream: </p>
    839       <ul class="empty">
    840          <li>SYN_STREAM - Open a new stream</li>
    841          <li>SYN_REPLY - Remote acknowledgement of a new, open stream</li>
    842          <li>RST_STREAM - Close a stream</li>
    843       </ul>
    844       <h3 id="rfc.section.3.3.2"><a href="#rfc.section.3.3.2">3.3.2</a>&nbsp;<a id="StreamCreation" href="#StreamCreation">Stream creation</a></h3>
    845       <p id="rfc.section.3.3.2.p.1">A stream is created by sending a control frame with the type set to SYN_STREAM (<a href="#SYN_STREAM" title="SYN_STREAM">Section&nbsp;3.6.1</a>). If the server is initiating the stream, the Stream-ID must be even. If the client is initiating the stream, the Stream-ID
    846          must be odd. 0 is not a valid Stream-ID. Stream-IDs from each side of the connection must increase monotonically as new streams
    847          are created. E.g. Stream 2 may be created after stream 3, but stream 7 must not be created after stream 9. Stream IDs do not
    848          wrap: when a client or server cannot create a new stream id without exceeding a 31 bit value, it MUST NOT create a new stream.
    849       </p>
    850       <p id="rfc.section.3.3.2.p.2">The stream-id MUST increase with each new stream. If an endpoint receives a SYN_STREAM with a stream id which is less than
    851          any previously received SYN_STREAM, it MUST issue a session error (<a href="#SessionErrorHandler" title="Session Error Handling">Section&nbsp;3.4.1</a>) with the status PROTOCOL_ERROR.
    852       </p>
    853       <p id="rfc.section.3.3.2.p.3">It is a protocol error to send two SYN_STREAMs with the same stream-id. If a recipient receives a second SYN_STREAM for the
    854          same stream, it MUST issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;3.4.2</a>) with the status code PROTOCOL_ERROR.
    855       </p>
    856       <p id="rfc.section.3.3.2.p.4">Upon receipt of a SYN_STREAM, the recipient can reject the stream by sending a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;3.4.2</a>) with the error code REFUSED_STREAM. Note, however, that the creating endpoint may have already sent additional frames for
    857          that stream which cannot be immediately stopped.
    858       </p>
    859       <p id="rfc.section.3.3.2.p.5">Once the stream is created, the creator may immediately send HEADERS or DATA frames for that stream, without needing to wait
    860          for the recipient to acknowledge.
    861       </p>
    862       <h4 id="rfc.section.3.3.2.1"><a href="#rfc.section.3.3.2.1">3.3.2.1</a>&nbsp;Unidirectional streams
    863       </h4>
    864       <p id="rfc.section.3.3.2.1.p.1">When an endpoint creates a stream with the FLAG_UNIDIRECTIONAL flag set, it creates a unidirectional stream which the creating
    865          endpoint can use to send frames, but the receiving endpoint cannot. The receiving endpoint is implicitly already in the half-closed (<a href="#StreamHalfClose" title="Stream half-close">Section&nbsp;3.3.6</a>) state.
    866       </p>
    867       <h4 id="rfc.section.3.3.2.2"><a href="#rfc.section.3.3.2.2">3.3.2.2</a>&nbsp;Bidirectional streams
    868       </h4>
    869       <p id="rfc.section.3.3.2.2.p.1">SYN_STREAM frames which do not use the FLAG_UNIDIRECTIONAL flag are bidirectional streams. Both endpoints can send data on
    870          a bi-directional stream.
    871       </p>
    872       <h3 id="rfc.section.3.3.3"><a href="#rfc.section.3.3.3">3.3.3</a>&nbsp;<a id="StreamPriority" href="#StreamPriority">Stream priority</a></h3>
    873       <p id="rfc.section.3.3.3.p.1">The creator of a stream assigns a priority for that stream. Priority is represented as an integer from 0 to 7. 0 represents
    874          the highest priority and 7 represents the lowest priority.
    875       </p>
    876       <p id="rfc.section.3.3.3.p.2">The sender and recipient SHOULD use best-effort to process streams in the order of highest priority to lowest priority.</p>
    877       <h3 id="rfc.section.3.3.4"><a href="#rfc.section.3.3.4">3.3.4</a>&nbsp;Stream headers
    878       </h3>
    879       <p id="rfc.section.3.3.4.p.1">Streams carry optional sets of name/value pair headers which carry metadata about the stream. After the stream has been created,
    880          and as long as the sender is not closed (<a href="#StreamClose" title="Stream close">Section&nbsp;3.3.7</a>) or half-closed (<a href="#StreamHalfClose" title="Stream half-close">Section&nbsp;3.3.6</a>), each side may send HEADERS frame(s) containing the header data. Header data can be sent in multiple HEADERS frames, and
    881          HEADERS frames may be interleaved with data frames.
    882       </p>
    883       <h3 id="rfc.section.3.3.5"><a href="#rfc.section.3.3.5">3.3.5</a>&nbsp;Stream data exchange
    884       </h3>
    885       <p id="rfc.section.3.3.5.p.1">Once a stream is created, it can be used to send arbitrary amounts of data. Generally this means that a series of data frames
    886          will be sent on the stream until a frame containing the FLAG_FIN flag is set. The FLAG_FIN can be set on a SYN_STREAM (<a href="#SYN_STREAM" title="SYN_STREAM">Section&nbsp;3.6.1</a>), SYN_REPLY (<a href="#SYN_REPLY" title="SYN_REPLY">Section&nbsp;3.6.2</a>), HEADERS (<a href="#HEADERS" title="HEADERS">Section&nbsp;3.6.7</a>) or a DATA (<a href="#DataFrames" title="Data frames">Section&nbsp;3.2.2</a>) frame. Once the FLAG_FIN has been sent, the stream is considered to be half-closed.
    887       </p>
    888       <h3 id="rfc.section.3.3.6"><a href="#rfc.section.3.3.6">3.3.6</a>&nbsp;<a id="StreamHalfClose" href="#StreamHalfClose">Stream half-close</a></h3>
    889       <p id="rfc.section.3.3.6.p.1">When one side of the stream sends a frame with the FLAG_FIN flag set, the stream is half-closed from that endpoint. The sender
    890          of the FLAG_FIN MUST NOT send further frames on that stream. When both sides have half-closed, the stream is closed.
    891       </p>
    892       <p id="rfc.section.3.3.6.p.2">If an endpoint receives a data frame after the stream is half-closed from the sender (e.g. the endpoint has already received
    893          a prior frame for the stream with the FIN flag set), it MUST send a RST_STREAM to the sender with the status STREAM_ALREADY_CLOSED.
    894       </p>
    895       <h3 id="rfc.section.3.3.7"><a href="#rfc.section.3.3.7">3.3.7</a>&nbsp;<a id="StreamClose" href="#StreamClose">Stream close</a></h3>
    896       <p id="rfc.section.3.3.7.p.1">There are 3 ways that streams can be terminated: </p>
    897       <ul class="empty">
    898          <li>Normal termination: Normal stream termination occurs when both sender and recipient have half-closed the stream by sending
    899             a FLAG_FIN.
    900          </li>
    901          <li>Abrupt termination: Either the client or server can send a RST_STREAM control frame at any time. A RST_STREAM contains an
    902             error code to indicate the reason for failure. When a RST_STREAM is sent from the stream originator, it indicates a failure
    903             to complete the stream and that no further data will be sent on the stream. When a RST_STREAM is sent from the stream recipient,
    904             the sender, upon receipt, should stop sending any data on the stream. The stream recipient should be aware that there is a
    905             race between data already in transit from the sender and the time the RST_STREAM is received. See Stream Error Handling (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;3.4.2</a>)
    906          </li>
    907          <li>TCP connection teardown: If the TCP connection is torn down while un-closed streams exist, then the endpoint must assume that
    908             the stream was abnormally interrupted and may be incomplete.
    909          </li>
    910       </ul>
    911       <p id="rfc.section.3.3.7.p.2">If an endpoint receives a data frame after the stream is closed, it must send a RST_STREAM to the sender with the status PROTOCOL_ERROR.</p>
    912       <h2 id="rfc.section.3.4"><a href="#rfc.section.3.4">3.4</a>&nbsp;Error Handling
    913       </h2>
    914       <p id="rfc.section.3.4.p.1">The HTTP/2.0 framing layer has only two types of errors, and they are always handled consistently. Any reference in this specification
    915          to "issue a session error" refers to <a href="#SessionErrorHandler" title="Session Error Handling">Section&nbsp;3.4.1</a>. Any reference to "issue a stream error" refers to <a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;3.4.2</a>.
    916       </p>
    917       <h3 id="rfc.section.3.4.1"><a href="#rfc.section.3.4.1">3.4.1</a>&nbsp;<a id="SessionErrorHandler" href="#SessionErrorHandler">Session Error Handling</a></h3>
    918       <p id="rfc.section.3.4.1.p.1">A session error is any error which prevents further processing of the framing layer or which corrupts the session compression
    919          state. When a session error occurs, the endpoint encountering the error MUST first send a GOAWAY (<a href="#GOAWAY" title="GOAWAY">Section&nbsp;3.6.6</a>) frame with the stream id of most recently received stream from the remote endpoint, and the error code for why the session
    920          is terminating. After sending the GOAWAY frame, the endpoint MUST close the TCP connection.
    921       </p>
    922       <p id="rfc.section.3.4.1.p.2">Note that the session compression state is dependent upon both endpoints always processing all compressed data. If an endpoint
    923          partially processes a frame containing compressed data without updating compression state properly, future control frames
    924          which use compression will be always be errored. Implementations SHOULD always try to process compressed data so that errors
    925          which could be handled as stream errors do not become session errors.
    926       </p>
    927       <p id="rfc.section.3.4.1.p.3">Note that because this GOAWAY is sent during a session error case, it is possible that the GOAWAY will not be reliably received
    928          by the receiving endpoint. It is a best-effort attempt to communicate with the remote about why the session is going down.
    929       </p>
    930       <h3 id="rfc.section.3.4.2"><a href="#rfc.section.3.4.2">3.4.2</a>&nbsp;<a id="StreamErrorHandler" href="#StreamErrorHandler">Stream Error Handling</a></h3>
    931       <p id="rfc.section.3.4.2.p.1">A stream error is an error related to a specific stream-id which does not affect processing of other streams at the framing
    932          layer. Upon a stream error, the endpoint MUST send a RST_STREAM (<a href="#RST_STREAM" title="RST_STREAM">Section&nbsp;3.6.3</a>) frame which contains the stream id of the stream where the error occurred and the error status which caused the error. After
    933          sending the RST_STREAM, the stream is closed to the sending endpoint. After sending the RST_STREAM, if the sender receives
    934          any frames other than a RST_STREAM for that stream id, it will result in sending additional RST_STREAM frames. An endpoint
    935          MUST NOT send a RST_STREAM in response to an RST_STREAM, as doing so would lead to RST_STREAM loops. Sending a RST_STREAM
    936          does not cause the HTTP/2.0 session to be closed.
    937       </p>
    938       <p id="rfc.section.3.4.2.p.2">If an endpoint has multiple RST_STREAM frames to send in succession for the same stream-id and the same error code, it MAY
    939          coalesce them into a single RST_STREAM frame. (This can happen if a stream is closed, but the remote sends multiple data frames.
    940          There is no reason to send a RST_STREAM for each frame in succession).
    941       </p>
    942       <h2 id="rfc.section.3.5"><a href="#rfc.section.3.5">3.5</a>&nbsp;<a id="flowcontrol" href="#flowcontrol">Stream Flow Control</a></h2>
    943       <p id="rfc.section.3.5.p.1">Multiplexing streams introduces contention for access to the shared TCP connection. Stream contention can result in streams
    944          being blocked by other streams. A flow control scheme ensures that streams do not destructively interfere with other streams
    945          on the same TCP connection.
    946       </p>
    947       <h3 id="rfc.section.3.5.1"><a href="#rfc.section.3.5.1">3.5.1</a>&nbsp;<a id="fc-principles" href="#fc-principles">Flow Control Principles</a></h3>
    948       <p id="rfc.section.3.5.1.p.1">Experience with TCP congestion control has shown that algorithms can evolve over time to become more sophisticated without
    949          requiring protocol changes. TCP congestion control and its evolution is clearly different from HTTP/2.0 flow control, though
    950          the evolution of TCP congestion control algorithms shows that a similar approach could be feasible for HTTP/2.0 flow control.
    951       </p>
    952       <p id="rfc.section.3.5.1.p.2">HTTP/2.0 stream flow control aims to allow for future improvements to flow control algorithms without requiring protocol changes.
    953          Flow control in HTTP/2.0 has the following characteristics:
    954       </p>
    955       <ol>
    956          <li>Flow control is hop-by-hop, not end-to-end.</li>
    957          <li>Flow control is based on window update messages. Receivers advertise how many octets they are prepared to receive on a stream.
    958             This is a credit-based scheme.
    959          </li>
    960          <li>Flow control is directional with overall control provided by the receiver. A receiver MAY choose to set any window size that
    961             it desires for each stream and for the entire connection. A sender MUST respect flow control limits imposed by a receiver.
    962             Clients, servers and intermediaries all independently advertise their flow control preferences as a receiver and abide by
    963             the flow control limits set by their peer when sending.
    964          </li>
    965          <li>The initial value for the flow control window is 65536 bytes for both new streams and the overall connection.</li>
    966          <li>Flow control only applies to data frames. Control frames do not consume space in the advertised flow control window.</li>
    967          <li>Flow control can be disabled by a receiver. A receiver can choose to either disable flow control for a stream or connection
    968             by declaring an infinite flow control limit.
    969          </li>
    970          <li>HTTP/2.0 standardizes only the format of the window update message (<a href="#WINDOW_UPDATE" title="WINDOW_UPDATE">Section&nbsp;3.6.8</a>). This does not stipulate how a receiver decides when to send this message or the value that it sends. Nor does it specify
    971             how a sender chooses to send packets. Implementations are able to select any algorithm that suits their needs. An example
    972             flow control algorithm is described in <a href="#fc-basic" title="Basic Flow Control Algorithm">Section&nbsp;3.5.2</a>.
    973          </li>
    974       </ol>
    975       <p id="rfc.section.3.5.1.p.3">Implementations are also responsible for managing how requests and responses are sent based on priority; choosing how to avoid
    976          head of line blocking for requests; and managing the creation of new streams. Algorithm choices for these could interact with
    977          any flow control algorithm.
    978       </p>
    979       <h3 id="rfc.section.3.5.2"><a href="#rfc.section.3.5.2">3.5.2</a>&nbsp;<a id="fc-basic" href="#fc-basic">Basic Flow Control Algorithm</a></h3>
    980       <p id="rfc.section.3.5.2.p.1">This section describes a basic flow control algorithm. This algorithm is provided as an example, implementations can use any
    981          algorithm that complies with flow control requirements.
    982       </p>
    983       <p id="rfc.section.3.5.2.p.2">[[Algorithm TBD]]</p>
    984       <h2 id="rfc.section.3.6"><a href="#rfc.section.3.6">3.6</a>&nbsp;Control frame types
    985       </h2>
    986       <h3 id="rfc.section.3.6.1"><a href="#rfc.section.3.6.1">3.6.1</a>&nbsp;<a id="SYN_STREAM" href="#SYN_STREAM">SYN_STREAM</a></h3>
    987       <p id="rfc.section.3.6.1.p.1">The SYN_STREAM control frame allows the sender to asynchronously create a stream between the endpoints. See Stream Creation (<a href="#StreamCreation" title="Stream creation">Section&nbsp;3.3.2</a>)
    988       </p>
    989       <div id="rfc.figure.u.6"></div> <pre>+------------------------------------+
    990 |1|    unused     |         1        |
    991 +------------------------------------+
    992 |  Flags (8)  |  Length (24 bits)    |
    993 +------------------------------------+
    994 |X|           Stream-ID (31bits)     |
    995 +------------------------------------+
    996 |X| Associated-To-Stream-ID (31bits) |
    997 +------------------------------------+
    998 | Pri|Unused | Slot |                |
    999 +-------------------+                |
    1000 | Number of Name/Value pairs (int32) |   &lt;+
    1001 +------------------------------------+    |
    1002 |     Length of name (int32)         |    | This section is the
    1003 +------------------------------------+    | "Name/Value Header
    1004 |           Name (string)            |    | Block", and is
    1005 +------------------------------------+    | compressed.
    1006 |     Length of value  (int32)       |    |
    1007 +------------------------------------+    |
    1008 |          Value   (string)          |    |
    1009 +------------------------------------+    |
    1010 |           (repeats)                |   &lt;+
    1011             </pre> <p id="rfc.section.3.6.1.p.3">Flags: Flags related to this frame. Valid flags are: </p>
    1012       <ul class="empty">
    1013          <li>0x01 = FLAG_FIN - marks this frame as the last frame to be transmitted on this stream and puts the sender in the half-closed (<a href="#StreamHalfClose" title="Stream half-close">Section&nbsp;3.3.6</a>) state.
    1014          </li>
    1015          <li>0x02 = FLAG_UNIDIRECTIONAL - a stream created with this flag puts the recipient in the half-closed (<a href="#StreamHalfClose" title="Stream half-close">Section&nbsp;3.3.6</a>) state.
    1016          </li>
    1017       </ul>
    1018       <p id="rfc.section.3.6.1.p.4">Length: The length is the number of bytes which follow the length field in the frame. For SYN_STREAM frames, this is 10 bytes
    1019          plus the length of the compressed Name/Value block.
    1020       </p>
    1021       <p id="rfc.section.3.6.1.p.5">Stream-ID: The 31-bit identifier for this stream. This stream-id will be used in frames which are part of this stream.</p>
    1022       <p id="rfc.section.3.6.1.p.6">Associated-To-Stream-ID: The 31-bit identifier for a stream which this stream is associated to. If this stream is independent
    1023          of all other streams, it should be 0.
    1024       </p>
    1025       <p id="rfc.section.3.6.1.p.7">Priority: A 3-bit priority (<a href="#StreamPriority" title="Stream priority">Section&nbsp;3.3.3</a>) field.
    1026       </p>
    1027       <p id="rfc.section.3.6.1.p.8">Unused: 5 bits of unused space, reserved for future use.</p>
    1028       <p id="rfc.section.3.6.1.p.9">Slot: An 8 bit unsigned integer specifying the index in the server's CREDENTIAL vector of the client certificate to be used
    1029          for this request. see CREDENTIAL frame (<a href="#CREDENTIAL" title="CREDENTIAL">Section&nbsp;3.6.9</a>). The value 0 means no client certificate should be associated with this stream.
    1030       </p>
    1031       <p id="rfc.section.3.6.1.p.10">Name/Value Header Block: A set of name/value pairs carried as part of the SYN_STREAM. see Name/Value Header Block (<a href="#HeaderBlock" title="Name/Value Header Block">Section&nbsp;3.6.10</a>).
    1032       </p>
    1033       <p id="rfc.section.3.6.1.p.11">If an endpoint receives a SYN_STREAM which is larger than the implementation supports, it MAY send a RST_STREAM with error
    1034          code FRAME_TOO_LARGE. All implementations MUST support the minimum size limits defined in the Control Frames section (<a href="#ControlFrames" title="Control frames">Section&nbsp;3.2.1</a>).
    1035       </p>
    1036       <h3 id="rfc.section.3.6.2"><a href="#rfc.section.3.6.2">3.6.2</a>&nbsp;<a id="SYN_REPLY" href="#SYN_REPLY">SYN_REPLY</a></h3>
    1037       <p id="rfc.section.3.6.2.p.1">SYN_REPLY indicates the acceptance of a stream creation by the recipient of a SYN_STREAM frame.</p>
    1038       <div id="rfc.figure.u.7"></div> <pre>+------------------------------------+
    1039 |1|    unused     |         2        |
    1040 +------------------------------------+
    1041 |  Flags (8)  |  Length (24 bits)    |
    1042 +------------------------------------+
    1043 |X|           Stream-ID (31bits)     |
    1044 +------------------------------------+
    1045 | Number of Name/Value pairs (int32) |   &lt;+
    1046 +------------------------------------+    |
    1047 |     Length of name (int32)         |    | This section is the
    1048 +------------------------------------+    | "Name/Value Header
    1049 |           Name (string)            |    | Block", and is
    1050 +------------------------------------+    | compressed.
    1051 |     Length of value  (int32)       |    |
    1052 +------------------------------------+    |
    1053 |          Value   (string)          |    |
    1054 +------------------------------------+    |
    1055 |           (repeats)                |   &lt;+
    1056             </pre> <p id="rfc.section.3.6.2.p.3">Flags: Flags related to this frame. Valid flags are: </p>
    1057       <ul class="empty">
    1058          <li>0x01 = FLAG_FIN - marks this frame as the last frame to be transmitted on this stream and puts the sender in the half-closed (<a href="#StreamHalfClose" title="Stream half-close">Section&nbsp;3.3.6</a>) state.
    1059          </li>
    1060       </ul>
    1061       <p id="rfc.section.3.6.2.p.4">Length: The length is the number of bytes which follow the length field in the frame. For SYN_REPLY frames, this is 4 bytes
    1062          plus the length of the compressed Name/Value block.
    1063       </p>
    1064       <p id="rfc.section.3.6.2.p.5">Stream-ID: The 31-bit identifier for this stream.</p>
    1065       <p id="rfc.section.3.6.2.p.6">If an endpoint receives multiple SYN_REPLY frames for the same active stream ID, it MUST issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;3.4.2</a>) with the error code STREAM_IN_USE.
    1066       </p>
    1067       <p id="rfc.section.3.6.2.p.7">Name/Value Header Block: A set of name/value pairs carried as part of the SYN_STREAM. see Name/Value Header Block (<a href="#HeaderBlock" title="Name/Value Header Block">Section&nbsp;3.6.10</a>).
    1068       </p>
    1069       <p id="rfc.section.3.6.2.p.8">If an endpoint receives a SYN_REPLY which is larger than the implementation supports, it MAY send a RST_STREAM with error
    1070          code FRAME_TOO_LARGE. All implementations MUST support the minimum size limits defined in the Control Frames section (<a href="#ControlFrames" title="Control frames">Section&nbsp;3.2.1</a>).
    1071       </p>
    1072       <h3 id="rfc.section.3.6.3"><a href="#rfc.section.3.6.3">3.6.3</a>&nbsp;<a id="RST_STREAM" href="#RST_STREAM">RST_STREAM</a></h3>
    1073       <p id="rfc.section.3.6.3.p.1">The RST_STREAM frame allows for abnormal termination of a stream. When sent by the creator of a stream, it indicates the creator
    1074          wishes to cancel the stream. When sent by the recipient of a stream, it indicates an error or that the recipient did not want
    1075          to accept the stream, so the stream should be closed.
    1076       </p>
    1077       <div id="rfc.figure.u.8"></div> <pre>+----------------------------------+
    1078 |1|   unused     |         3       |
    1079 +----------------------------------+
    1080 | Flags (8)  |         8           |
    1081 +----------------------------------+
    1082 |X|          Stream-ID (31bits)    |
    1083 +----------------------------------+
    1084 |          Status code             |
    1085 +----------------------------------+
    1086             </pre> <p id="rfc.section.3.6.3.p.3">Flags: Flags related to this frame. RST_STREAM does not define any flags. This value must be 0.</p>
    1087       <p id="rfc.section.3.6.3.p.4">Length: An unsigned 24-bit value representing the number of bytes after the length field. For RST_STREAM control frames, this
    1088          value is always 8.
    1089       </p>
    1090       <p id="rfc.section.3.6.3.p.5">Stream-ID: The 31-bit identifier for this stream.</p>
    1091       <p id="rfc.section.3.6.3.p.6">Status code: (32 bits) An indicator for why the stream is being terminated.The following status codes are defined: </p>
    1092       <ul class="empty">
    1093          <li>1 - PROTOCOL_ERROR. This is a generic error, and should only be used if a more specific error is not available.</li>
    1094          <li>2 - INVALID_STREAM. This is returned when a frame is received for a stream which is not active.</li>
    1095          <li>3 - REFUSED_STREAM. Indicates that the stream was refused before any processing has been done on the stream.</li>
    1096          <li>4 - (UNUSED)</li>
    1097          <li>5 - CANCEL. Used by the creator of a stream to indicate that the stream is no longer needed.</li>
    1098          <li>6 - INTERNAL_ERROR. This is a generic error which can be used when the implementation has internally failed, not due to anything
    1099             in the protocol.
    1100          </li>
    1101          <li>7 - FLOW_CONTROL_ERROR. The endpoint detected that its peer violated the flow control protocol.</li>
    1102          <li>8 - STREAM_IN_USE. The endpoint received a SYN_REPLY for a stream already open.</li>
    1103          <li>9 - STREAM_ALREADY_CLOSED. The endpoint received a data or SYN_REPLY frame for a stream which is half closed.</li>
    1104          <li>10 - INVALID_CREDENTIALS. The server received a request for a resource whose origin does not have valid credentials in the
    1105             client certificate vector.
    1106          </li>
    1107          <li>11 - FRAME_TOO_LARGE. The endpoint received a frame which this implementation could not support. If FRAME_TOO_LARGE is sent
    1108             for a SYN_STREAM, HEADERS, or SYN_REPLY frame without fully processing the compressed portion of those frames, then the compression
    1109             state will be out-of-sync with the other endpoint. In this case, senders of FRAME_TOO_LARGE MUST close the session.
    1110          </li>
    1111          <li>Note: 0 is not a valid status code for a RST_STREAM.</li>
    1112       </ul>
    1113       <p id="rfc.section.3.6.3.p.7">After receiving a RST_STREAM on a stream, the recipient must not send additional frames for that stream, and the stream moves
    1114          into the closed state.
    1115       </p>
    1116       <h3 id="rfc.section.3.6.4"><a href="#rfc.section.3.6.4">3.6.4</a>&nbsp;<a id="SETTINGS" href="#SETTINGS">SETTINGS</a></h3>
    1117       <p id="rfc.section.3.6.4.p.1">A SETTINGS frame contains a set of id/value pairs for communicating configuration data about how the two endpoints may communicate.
    1118          SETTINGS frames can be sent at any time by either endpoint, are optionally sent, and are fully asynchronous. When the server
    1119          is the sender, the sender can request that configuration data be persisted by the client across HTTP/2.0 sessions and returned
    1120          to the server in future communications.
    1121       </p>
    1122       <p id="rfc.section.3.6.4.p.2">Persistence of SETTINGS ID/Value pairs is done on a per origin/IP pair (the "origin" is the set of scheme, host, and port
    1123          from the URI. See <a href="#RFC6454" id="rfc.xref.RFC6454.1"><cite title="The Web Origin Concept">[RFC6454]</cite></a>). That is, when a client connects to a server, and the server persists settings within the client, the client SHOULD return
    1124          the persisted settings on future connections to the same origin AND IP address and TCP port. Clients MUST NOT request servers
    1125          to use the persistence features of the SETTINGS frames, and servers MUST ignore persistence related flags sent by a client.
    1126       </p>
    1127       <div id="rfc.figure.u.9"></div> <pre>+----------------------------------+
    1128 |1|   unused     |         4       |
    1129 +----------------------------------+
    1130 | Flags (8)  |  Length (24 bits)   |
    1131 +----------------------------------+
    1132 |         Number of entries        |
    1133 +----------------------------------+
    1134 |          ID/Value Pairs          |
    1135 |             ...                  |
    1136             </pre> <p id="rfc.section.3.6.4.p.4">Control bit: The control bit is always 1 for this message.</p>
    1137       <p id="rfc.section.3.6.4.p.5">Unused</p>
    1138       <p id="rfc.section.3.6.4.p.6">Type: The message type for a SETTINGS message is 4.</p>
    1139       <p id="rfc.section.3.6.4.p.7">Flags: FLAG_SETTINGS_CLEAR_SETTINGS (0x1): When set, the client should clear any previously persisted SETTINGS ID/Value pairs.
    1140          If this frame contains ID/Value pairs with the FLAG_SETTINGS_PERSIST_VALUE set, then the client will first clear its existing,
    1141          persisted settings, and then persist the values with the flag set which are contained within this frame. Because persistence
    1142          is only implemented on the client, this flag can only be used when the sender is the server.
    1143       </p>
    1144       <p id="rfc.section.3.6.4.p.8">Length: An unsigned 24-bit value representing the number of bytes after the length field. The total size of a SETTINGS frame
    1145          is 8 bytes + length.
    1146       </p>
    1147       <p id="rfc.section.3.6.4.p.9">Number of entries: A 32-bit value representing the number of ID/value pairs in this message.</p>
    1148       <p id="rfc.section.3.6.4.p.10">ID: A 32-bit ID number, comprised of 8 bits of flags and 24 bits of unique ID. </p>
    1149       <ul class="empty">
    1150          <li>ID.flags:
    1151             <ul class="empty">
    1152                <li>FLAG_SETTINGS_PERSIST_VALUE (0x1): When set, the sender of this SETTINGS frame is requesting that the recipient persist the
    1153                   ID/Value and return it in future SETTINGS frames sent from the sender to this recipient. Because persistence is only implemented
    1154                   on the client, this flag is only sent by the server.
    1155                </li>
    1156                <li>FLAG_SETTINGS_PERSISTED (0x2): When set, the sender is notifying the recipient that this ID/Value pair was previously sent
    1157                   to the sender by the recipient with the FLAG_SETTINGS_PERSIST_VALUE, and the sender is returning it. Because persistence is
    1158                   only implemented on the client, this flag is only sent by the client.
    1159                </li>
    1160             </ul>
    1161          </li>
    1162          <li>Defined IDs:
    1163             <ul class="empty">
    1164                <li>1 - SETTINGS_UPLOAD_BANDWIDTH allows the sender to send its expected upload bandwidth on this channel. This number is an estimate.
    1165                   The value should be the integral number of kilobytes per second that the sender predicts as an expected maximum upload channel
    1166                   capacity.
    1167                </li>
    1168                <li>2 - SETTINGS_DOWNLOAD_BANDWIDTH allows the sender to send its expected download bandwidth on this channel. This number is
    1169                   an estimate. The value should be the integral number of kilobytes per second that the sender predicts as an expected maximum
    1170                   download channel capacity.
    1171                </li>
    1172                <li>3 - SETTINGS_ROUND_TRIP_TIME allows the sender to send its expected round-trip-time on this channel. The round trip time is
    1173                   defined as the minimum amount of time to send a control frame from this client to the remote and receive a response. The value
    1174                   is represented in milliseconds.
    1175                </li>
    1176                <li>4 - SETTINGS_MAX_CONCURRENT_STREAMS allows the sender to inform the remote endpoint the maximum number of concurrent streams
    1177                   which it will allow. By default there is no limit. For implementors it is recommended that this value be no smaller than 100.
    1178                </li>
    1179                <li>5 - SETTINGS_CURRENT_CWND allows the sender to inform the remote endpoint of the current TCP CWND value.</li>
    1180                <li>6 - SETTINGS_DOWNLOAD_RETRANS_RATE allows the sender to inform the remote endpoint the retransmission rate (bytes retransmitted
    1181                   / total bytes transmitted).
    1182                </li>
    1183                <li>7 - SETTINGS_INITIAL_WINDOW_SIZE allows the sender to inform the remote endpoint the initial window size (in bytes) for new
    1184                   streams.
    1185                </li>
    1186                <li>8 - SETTINGS_CLIENT_CERTIFICATE_VECTOR_SIZE allows the server to inform the client of the new size of the client certificate
    1187                   vector.
    1188                </li>
    1189             </ul>
    1190          </li>
    1191       </ul>
    1192       <p id="rfc.section.3.6.4.p.11">Value: A 32-bit value.</p>
    1193       <p id="rfc.section.3.6.4.p.12">The message is intentionally extensible for future information which may improve client-server communications. The sender
    1194          does not need to send every type of ID/value. It must only send those for which it has accurate values to convey. When multiple
    1195          ID/value pairs are sent, they should be sent in order of lowest id to highest id. A single SETTINGS frame MUST not contain
    1196          multiple values for the same ID. If the recipient of a SETTINGS frame discovers multiple values for the same ID, it MUST ignore
    1197          all values except the first one.
    1198       </p>
    1199       <p id="rfc.section.3.6.4.p.13">A server may send multiple SETTINGS frames containing different ID/Value pairs. When the same ID/Value is sent twice, the
    1200          most recent value overrides any previously sent values. If the server sends IDs 1, 2, and 3 with the FLAG_SETTINGS_PERSIST_VALUE
    1201          in a first SETTINGS frame, and then sends IDs 4 and 5 with the FLAG_SETTINGS_PERSIST_VALUE, when the client returns the persisted
    1202          state on its next SETTINGS frame, it SHOULD send all 5 settings (1, 2, 3, 4, and 5 in this example) to the server.
    1203       </p>
    1204       <h3 id="rfc.section.3.6.5"><a href="#rfc.section.3.6.5">3.6.5</a>&nbsp;<a id="PING" href="#PING">PING</a></h3>
    1205       <p id="rfc.section.3.6.5.p.1">The PING control frame is a mechanism for measuring a minimal round-trip time from the sender. It can be sent from the client
    1206          or the server. Recipients of a PING frame should send an identical frame to the sender as soon as possible (if there is other
    1207          pending data waiting to be sent, PING should take highest priority). Each ping sent by a sender should use a unique ID.
    1208       </p>
    1209       <div id="rfc.figure.u.10"></div> <pre>+----------------------------------+
    1210 |1|   unused     |         6       |
    1211 +----------------------------------+
    1212 | 0 (flags) |     4 (length)       |
    1213 +----------------------------------|
    1214 |            32-bit ID             |
    1215 +----------------------------------+
    1216             </pre> <p id="rfc.section.3.6.5.p.3">Control bit: The control bit is always 1 for this message.</p>
    1217       <p id="rfc.section.3.6.5.p.4">Unused</p>
    1218       <p id="rfc.section.3.6.5.p.5">Type: The message type for a PING message is 6.</p>
    1219       <p id="rfc.section.3.6.5.p.6">Length: This frame is always 4 bytes long.</p>
    1220       <p id="rfc.section.3.6.5.p.7">ID: A unique ID for this ping, represented as an unsigned 32 bit value. When the client initiates a ping, it must use an odd
    1221          numbered ID. When the server initiates a ping, it must use an even numbered ping. Use of odd/even IDs is required in order
    1222          to avoid accidental looping on PINGs (where each side initiates an identical PING at the same time).
    1223       </p>
    1224       <p id="rfc.section.3.6.5.p.8">Note: If a sender uses all possible PING ids (e.g. has sent all 2^31 possible IDs), it can wrap and start re-using IDs.</p>
    1225       <p id="rfc.section.3.6.5.p.9">If a server receives an even numbered PING which it did not initiate, it must ignore the PING. If a client receives an odd
    1226          numbered PING which it did not initiate, it must ignore the PING.
    1227       </p>
    1228       <h3 id="rfc.section.3.6.6"><a href="#rfc.section.3.6.6">3.6.6</a>&nbsp;<a id="GOAWAY" href="#GOAWAY">GOAWAY</a></h3>
    1229       <p id="rfc.section.3.6.6.p.1">The GOAWAY control frame is a mechanism to tell the remote side of the connection to stop creating streams on this session.
    1230          It can be sent from the client or the server. Once sent, the sender will not respond to any new SYN_STREAMs on this session.
    1231          Recipients of a GOAWAY frame must not send additional streams on this session, although a new session can be established for
    1232          new streams. The purpose of this message is to allow an endpoint to gracefully stop accepting new streams (perhaps for a reboot
    1233          or maintenance), while still finishing processing of previously established streams.
    1234       </p>
    1235       <p id="rfc.section.3.6.6.p.2">There is an inherent race condition between an endpoint sending SYN_STREAMs and the remote sending a GOAWAY message. To deal
    1236          with this case, the GOAWAY contains a last-stream-id indicating the stream-id of the last stream which was created on the
    1237          sending endpoint in this session. If the receiver of the GOAWAY sent new SYN_STREAMs for sessions after this last-stream-id,
    1238          they were not processed by the server and the receiver may treat the stream as though it had never been created at all (hence
    1239          the receiver may want to re-create the stream later on a new session).
    1240       </p>
    1241       <p id="rfc.section.3.6.6.p.3">Endpoints should always send a GOAWAY message before closing a connection so that the remote can know whether a stream has
    1242          been partially processed or not. (For example, if an HTTP client sends a POST at the same time that a server closes a connection,
    1243          the client cannot know if the server started to process that POST request if the server does not send a GOAWAY frame to indicate
    1244          where it stopped working).
    1245       </p>
    1246       <p id="rfc.section.3.6.6.p.4">After sending a GOAWAY message, the sender must ignore all SYN_STREAM frames for new streams.</p>
    1247       <div id="rfc.figure.u.11"></div> <pre>+----------------------------------+
    1248 |1|   unused     |         7       |
    1249 +----------------------------------+
    1250 | 0 (flags) |     8 (length)       |
    1251 +----------------------------------|
    1252 |X|  Last-good-stream-ID (31 bits) |
    1253 +----------------------------------+
    1254 |          Status code             |
    1255 +----------------------------------+
    1256             </pre> <p id="rfc.section.3.6.6.p.6">Control bit: The control bit is always 1 for this message.</p>
    1257       <p id="rfc.section.3.6.6.p.7">Unused</p>
    1258       <p id="rfc.section.3.6.6.p.8">Type: The message type for a GOAWAY message is 7.</p>
    1259       <p id="rfc.section.3.6.6.p.9">Length: This frame is always 8 bytes long.</p>
    1260       <p id="rfc.section.3.6.6.p.10">Last-good-stream-Id: The last stream id which was replied to (with either a SYN_REPLY or RST_STREAM) by the sender of the
    1261          GOAWAY message. If no streams were replied to, this value MUST be 0.
    1262       </p>
    1263       <p id="rfc.section.3.6.6.p.11">Status: The reason for closing the session. </p>
    1264       <ul class="empty">
    1265          <li>0 - OK. This is a normal session teardown.</li>
    1266          <li>1 - PROTOCOL_ERROR. This is a generic error, and should only be used if a more specific error is not available.</li>
    1267          <li>2 - INTERNAL_ERROR. This is a generic error which can be used when the implementation has internally failed, not due to anything
    1268             in the protocol.
    1269          </li>
    1270       </ul>
    1271       <h3 id="rfc.section.3.6.7"><a href="#rfc.section.3.6.7">3.6.7</a>&nbsp;<a id="HEADERS" href="#HEADERS">HEADERS</a></h3>
    1272       <p id="rfc.section.3.6.7.p.1">The HEADERS frame augments a stream with additional headers. It may be optionally sent on an existing stream at any time.
    1273          Specific application of the headers in this frame is application-dependent. The name/value header block within this frame
    1274          is compressed.
    1275       </p>
    1276       <div id="rfc.figure.u.12"></div> <pre>+------------------------------------+
    1277 |1|   unused      |          8       |
    1278 +------------------------------------+
    1279 | Flags (8)  |   Length (24 bits)    |
    1280 +------------------------------------+
    1281 |X|          Stream-ID (31bits)      |
    1282 +------------------------------------+
    1283 | Number of Name/Value pairs (int32) |   &lt;+
    1284 +------------------------------------+    |
    1285 |     Length of name (int32)         |    | This section is the
    1286 +------------------------------------+    | "Name/Value Header
    1287 |           Name (string)            |    | Block", and is
    1288 +------------------------------------+    | compressed.
    1289 |     Length of value  (int32)       |    |
    1290 +------------------------------------+    |
    1291 |          Value   (string)          |    |
    1292 +------------------------------------+    |
    1293 |           (repeats)                |   &lt;+
    1294             </pre> <p id="rfc.section.3.6.7.p.3">Flags: Flags related to this frame. Valid flags are: </p>
    1295       <ul class="empty">
    1296          <li>0x01 = FLAG_FIN - marks this frame as the last frame to be transmitted on this stream and puts the sender in the half-closed (<a href="#StreamHalfClose" title="Stream half-close">Section&nbsp;3.3.6</a>) state.
    1297          </li>
    1298       </ul>
    1299       <p id="rfc.section.3.6.7.p.4">Length: An unsigned 24 bit value representing the number of bytes after the length field. The minimum length of the length
    1300          field is 4 (when the number of name value pairs is 0).
    1301       </p>
    1302       <p id="rfc.section.3.6.7.p.5">Stream-ID: The stream this HEADERS block is associated with.</p>
    1303       <p id="rfc.section.3.6.7.p.6">Name/Value Header Block: A set of name/value pairs carried as part of the SYN_STREAM. see Name/Value Header Block (<a href="#HeaderBlock" title="Name/Value Header Block">Section&nbsp;3.6.10</a>).
    1304       </p>
    1305       <h3 id="rfc.section.3.6.8"><a href="#rfc.section.3.6.8">3.6.8</a>&nbsp;<a id="WINDOW_UPDATE" href="#WINDOW_UPDATE">WINDOW_UPDATE</a></h3>
    1306       <p id="rfc.section.3.6.8.p.1">The WINDOW_UPDATE control frame is used to implement per stream flow control in HTTP/2.0. Flow control in HTTP/2.0 is per
    1307          hop, that is, only between the two endpoints of a HTTP/2.0 connection. If there are one or more intermediaries between the
    1308          client and the origin server, flow control signals are not explicitly forwarded by the intermediaries. (However, throttling
    1309          of data transfer by any recipient may have the effect of indirectly propagating flow control information upstream back to
    1310          the original sender.) Flow control only applies to the data portion of data frames. Recipients must buffer all control frames.
    1311          If a recipient fails to buffer an entire control frame, it MUST issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;3.4.2</a>) with the status code FLOW_CONTROL_ERROR for the stream.
    1312       </p>
    1313       <p id="rfc.section.3.6.8.p.2">Flow control in HTTP/2.0 is implemented by a data transfer window kept by the sender of each stream. The data transfer window
    1314          is a simple uint32 that indicates how many bytes of data the sender can transmit. After a stream is created, but before any
    1315          data frames have been transmitted, the sender begins with the initial window size. This window size is a measure of the buffering
    1316          capability of the recipient. The sender must not send a data frame with data length greater than the transfer window size.
    1317          After sending each data frame, the sender decrements its transfer window size by the amount of data transmitted. When the
    1318          window size becomes less than or equal to 0, the sender must pause transmitting data frames. At the other end of the stream,
    1319          the recipient sends a WINDOW_UPDATE control back to notify the sender that it has consumed some data and freed up buffer space
    1320          to receive more data.
    1321       </p>
    1322       <div id="rfc.figure.u.13"></div> <pre>+----------------------------------+
    1323 |1|   unused     |         9       |
    1324 +----------------------------------+
    1325 | 0 (flags) |     8 (length)       |
    1326 +----------------------------------+
    1327 |X|     Stream-ID (31-bits)        |
    1328 +----------------------------------+
    1329 |X|  Delta-Window-Size (31-bits)   |
    1330 +----------------------------------+
    1331             </pre> <p id="rfc.section.3.6.8.p.4">Control bit: The control bit is always 1 for this message.</p>
    1332       <p id="rfc.section.3.6.8.p.5">Unused</p>
    1333       <p id="rfc.section.3.6.8.p.6">Type: The message type for a WINDOW_UPDATE message is 9.</p>
    1334       <p id="rfc.section.3.6.8.p.7">Length: The length field is always 8 for this frame (there are 8 bytes after the length field).</p>
    1335       <p id="rfc.section.3.6.8.p.8">Stream-ID: The stream ID that this WINDOW_UPDATE control frame is for.</p>
    1336       <p id="rfc.section.3.6.8.p.9">Delta-Window-Size: The additional number of bytes that the sender can transmit in addition to existing remaining window size.
    1337          The legal range for this field is 1 to 2^31 - 1 (0x7fffffff) bytes.
    1338       </p>
    1339       <p id="rfc.section.3.6.8.p.10">The window size as kept by the sender must never exceed 2^31 (although it can become negative in one special case). If a sender
    1340          receives a WINDOW_UPDATE that causes the its window size to exceed this limit, it must send RST_STREAM with status code FLOW_CONTROL_ERROR
    1341          to terminate the stream.
    1342       </p>
    1343       <p id="rfc.section.3.6.8.p.11">When a HTTP/2.0 connection is first established, the default initial window size for all streams is 64KB. An endpoint can
    1344          use the SETTINGS control frame to adjust the initial window size for the connection. That is, its peer can start out using
    1345          the 64KB default initial window size when sending data frames before receiving the SETTINGS. Because SETTINGS is asynchronous,
    1346          there may be a race condition if the recipient wants to decrease the initial window size, but its peer immediately sends 64KB
    1347          on the creation of a new connection, before waiting for the SETTINGS to arrive. This is one case where the window size kept
    1348          by the sender will become negative. Once the sender detects this condition, it must stop sending data frames and wait for
    1349          the recipient to catch up. The recipient has two choices:
    1350       </p>
    1351       <ul class="empty">
    1352          <li>immediately send RST_STREAM with FLOW_CONTROL_ERROR status code.</li>
    1353          <li>allow the head of line blocking (as there is only one stream for the session and the amount of data in flight is bounded by
    1354             the default initial window size), and send WINDOW_UPDATE as it consumes data.
    1355          </li>
    1356       </ul>
    1357       <p id="rfc.section.3.6.8.p.12">In the case of option 2, both sides must compute the window size based on the initial window size in the SETTINGS. For example,
    1358          if the recipient sets the initial window size to be 16KB, and the sender sends 64KB immediately on connection establishment,
    1359          the sender will discover its window size is -48KB on receipt of the SETTINGS. As the recipient consumes the first 16KB, it
    1360          must send a WINDOW_UPDATE of 16KB back to the sender. This interaction continues until the sender's window size becomes positive
    1361          again, and it can resume transmitting data frames.
    1362       </p>
    1363       <p id="rfc.section.3.6.8.p.13">After the recipient reads in a data frame with FLAG_FIN that marks the end of the data stream, it should not send WINDOW_UPDATE
    1364          frames as it consumes the last data frame. A sender should ignore all the WINDOW_UPDATE frames associated with the stream
    1365          after it send the last frame for the stream.
    1366       </p>
    1367       <p id="rfc.section.3.6.8.p.14">The data frames from the sender and the WINDOW_UPDATE frames from the recipient are completely asynchronous with respect to
    1368          each other. This property allows a recipient to aggressively update the window size kept by the sender to prevent the stream
    1369          from stalling.
    1370       </p>
    1371       <h3 id="rfc.section.3.6.9"><a href="#rfc.section.3.6.9">3.6.9</a>&nbsp;<a id="CREDENTIAL" href="#CREDENTIAL">CREDENTIAL</a></h3>
    1372       <p id="rfc.section.3.6.9.p.1">The CREDENTIAL control frame is used by the client to send additional client certificates to the server. A HTTP/2.0 client
    1373          may decide to send requests for resources from different origins on the same HTTP/2.0 session if it decides that that server
    1374          handles both origins. For example if the IP address associated with both hostnames matches and the SSL server certificate
    1375          presented in the initial handshake is valid for both hostnames. However, because the SSL connection can contain at most one
    1376          client certificate, the client needs a mechanism to send additional client certificates to the server.
    1377       </p>
    1378       <p id="rfc.section.3.6.9.p.2">The server is required to maintain a vector of client certificates associated with a HTTP/2.0 session. When the client needs
    1379          to send a client certificate to the server, it will send a CREDENTIAL frame that specifies the index of the slot in which
    1380          to store the certificate as well as proof that the client posesses the corresponding private key. The initial size of this
    1381          vector must be 8. If the client provides a client certificate during the first TLS handshake, the contents of this certificate
    1382          must be copied into the first slot (index 1) in the CREDENTIAL vector, though it may be overwritten by subsequent CREDENTIAL
    1383          frames. The server must exclusively use the CREDENTIAL vector when evaluating the client certificates associated with an origin.
    1384          The server may change the size of this vector by sending a SETTINGS frame with the setting SETTINGS_CLIENT_CERTIFICATE_VECTOR_SIZE
    1385          value specified. In the event that the new size is smaller than the current size, truncation occurs preserving lower-index
    1386          slots as possible.
    1387       </p>
    1388       <p id="rfc.section.3.6.9.p.3">TLS renegotiation with client authentication is incompatible with HTTP/2.0 given the multiplexed nature of HTTP/2.0. Specifically,
    1389          imagine that the client has 2 requests outstanding to the server for two different pages (in different tabs). When the renegotiation
    1390          + client certificate request comes in, the browser is unable to determine which resource triggered the client certificate
    1391          request, in order to prompt the user accordingly.
    1392       </p>
    1393       <div id="rfc.figure.u.14"></div> <pre>+----------------------------------+
    1394 |1|000000000000001|0000000000001011|
    1395 +----------------------------------+
    1396 | flags (8)  |  Length (24 bits)   |
    1397 +----------------------------------+
    1398 |  Slot (16 bits) |                |
    1399 +-----------------+                |
    1400 |      Proof Length (32 bits)      |
    1401 +----------------------------------+
    1402 |               Proof              |
    1403 +----------------------------------+ &lt;+
    1404 |   Certificate Length (32 bits)   |  |
    1405 +----------------------------------+  | Repeated until end of frame
    1406 |            Certificate           |  |
    1407 +----------------------------------+ &lt;+
    1408             </pre> <p id="rfc.section.3.6.9.p.5">Slot: The index in the server's client certificate vector where this certificate should be stored. If there is already a certificate
    1409          stored at this index, it will be overwritten. The index is one based, not zero based; zero is an invalid slot index.
    1410       </p>
    1411       <p id="rfc.section.3.6.9.p.6">Proof: Cryptographic proof that the client has possession of the private key associated with the certificate. The format is
    1412          a TLS digitally-signed element (<a href="#RFC5246" id="rfc.xref.RFC5246.1"><cite title="The Transport Layer Security (TLS) Protocol Version 1.2">[RFC5246]</cite></a>, <a href="http://tools.ietf.org/html/rfc5246#section-4.7">Section 4.7</a>). The signature algorithm must be the same as that used in the CertificateVerify message. However, since the MD5+SHA1 signature
    1413          type used in TLS 1.0 connections can not be correctly encoded in a digitally-signed element, SHA1 must be used when MD5+SHA1
    1414          was used in the SSL connection. The signature is calculated over a 32 byte TLS extractor value (http://tools.ietf.org/html/rfc5705)
    1415          with a label of "EXPORTER HTTP/2.0 certificate proof" using the empty string as context. ForRSA certificates the signature
    1416          would be a PKCS#1 v1.5 signature. For ECDSA, it would be an ECDSA-Sig-Value (http://tools.ietf.org/html/rfc5480#appendix-A).
    1417          For a 1024-bit RSA key, the CREDENTIAL message would be ~500 bytes.
    1418       </p>
    1419       <p id="rfc.section.3.6.9.p.7">Certificate: The certificate chain, starting with the leaf certificate. Each certificate must be encoded as a 32 bit length,
    1420          followed by a DER encoded certificate. The certificate must be of the same type (RSA, ECDSA, etc) as the client certificate
    1421          associated with the SSL connection.
    1422       </p>
    1423       <p id="rfc.section.3.6.9.p.8">If the server receives a request for a resource with unacceptable credential (either missing or invalid), it must reply with
    1424          a RST_STREAM frame with the status code INVALID_CREDENTIALS. Upon receipt of a RST_STREAM frame with INVALID_CREDENTIALS,
    1425          the client should initiate a new stream directly to the requested origin and resend the request. Note, HTTP/2.0 does not allow
    1426          the server to request different client authentication for different resources in the same origin.
    1427       </p>
    1428       <p id="rfc.section.3.6.9.p.9">If the server receives an invalid CREDENTIAL frame, it MUST respond with a GOAWAY frame and shutdown the session.</p>
    1429       <h3 id="rfc.section.3.6.10"><a href="#rfc.section.3.6.10">3.6.10</a>&nbsp;<a id="HeaderBlock" href="#HeaderBlock">Name/Value Header Block</a></h3>
    1430       <p id="rfc.section.3.6.10.p.1">The Name/Value Header Block is found in the SYN_STREAM, SYN_REPLY and HEADERS control frames, and shares a common format:</p>
    1431       <div id="rfc.figure.u.15"></div> <pre>+------------------------------------+
    1432 | Number of Name/Value pairs (int32) |
    1433 +------------------------------------+
    1434 |     Length of name (int32)         |
    1435 +------------------------------------+
    1436 |           Name (string)            |
    1437 +------------------------------------+
    1438 |     Length of value  (int32)       |
    1439 +------------------------------------+
    1440 |          Value   (string)          |
    1441 +------------------------------------+
    1442 |           (repeats)                |
    1443             </pre> <p id="rfc.section.3.6.10.p.3">Number of Name/Value pairs: The number of repeating name/value pairs following this field.</p>
    1444       <p id="rfc.section.3.6.10.p.4">List of Name/Value pairs: </p>
    1445       <ul class="empty">
    1446          <li>Length of Name: a 32-bit value containing the number of octets in the name field. Note that in practice, this length must
    1447             not exceed 2^24, as that is the maximum size of a HTTP/2.0 frame.
    1448          </li>
    1449          <li>Name: 0 or more octets, 8-bit sequences of data, excluding 0.</li>
    1450          <li>Length of Value: a 32-bit value containing the number of octets in the value field. Note that in practice, this length must
    1451             not exceed 2^24, as that is the maximum size of a HTTP/2.0 frame.
    1452          </li>
    1453          <li>Value: 0 or more octets, 8-bit sequences of data, excluding 0.</li>
    1454       </ul>
    1455       <p id="rfc.section.3.6.10.p.5">Each header name must have at least one value. Header names are encoded using the <a href="#ASCII">US-ASCII character set</a> <cite title="US-ASCII. Coded Character Set - 7-Bit American Standard Code for Information Interchange. Standard ANSI X3.4-1986, ANSI, 1986." id="rfc.xref.ASCII.1">[ASCII]</cite> and must be all lower case. The length of each name must be greater than zero. A recipient of a zero-length name MUST issue
    1456          a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;3.4.2</a>) with the status code PROTOCOL_ERROR for the stream-id.
    1457       </p>
    1458       <p id="rfc.section.3.6.10.p.6">Duplicate header names are not allowed. To send two identically named headers, send a header with two values, where the values
    1459          are separated by a single NUL (0) byte. A header value can either be empty (e.g. the length is zero) or it can contain multiple,
    1460          NUL-separated values, each with length greater than zero. The value never starts nor ends with a NUL character. Recipients
    1461          of illegal value fields MUST issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;3.4.2</a>) with the status code PROTOCOL_ERROR for the stream-id.
    1462       </p>
    1463       <h4 id="rfc.section.3.6.10.1"><a href="#rfc.section.3.6.10.1">3.6.10.1</a>&nbsp;<a id="Compression" href="#Compression">Compression</a></h4>
    1464       <p id="rfc.section.3.6.10.1.p.1">The Name/Value Header Block is a section of the SYN_STREAM, SYN_REPLY, and HEADERS frames used to carry header meta-data.
    1465          This block is always compressed using zlib compression. Within this specification, any reference to 'zlib' is referring to
    1466          the <a href="#RFC1950">ZLIB Compressed Data Format Specification Version 3.3 as part of RFC1950.</a> <cite title="ZLIB Compressed Data Format Specification version 3.3" id="rfc.xref.RFC1950.1">[RFC1950]</cite></p>
    1467       <p id="rfc.section.3.6.10.1.p.2">For each HEADERS compression instance, the initial state is initialized using the following <a href="#UDELCOMPRESSION">dictionary</a> <cite title="A Methodology to Derive SPDY's Initial Dictionary for Zlib Compression" id="rfc.xref.UDELCOMPRESSION.1">[UDELCOMPRESSION]</cite>:
    1468       </p>
    1469       <div id="rfc.figure.u.16"></div> <pre class="ccmarker cct"><span>&lt;CODE BEGINS&gt;</span></pre><pre class="text">const unsigned char http2_dictionary_txt[] = {
    1470   0x00, 0x00, 0x00, 0x07, 0x6f, 0x70, 0x74, 0x69,  \\ - - - - o p t i
    1471   0x6f, 0x6e, 0x73, 0x00, 0x00, 0x00, 0x04, 0x68,  \\ o n s - - - - h
    1472   0x65, 0x61, 0x64, 0x00, 0x00, 0x00, 0x04, 0x70,  \\ e a d - - - - p
    1473   0x6f, 0x73, 0x74, 0x00, 0x00, 0x00, 0x03, 0x70,  \\ o s t - - - - p
    1474   0x75, 0x74, 0x00, 0x00, 0x00, 0x06, 0x64, 0x65,  \\ u t - - - - d e
    1475   0x6c, 0x65, 0x74, 0x65, 0x00, 0x00, 0x00, 0x05,  \\ l e t e - - - -
    1476   0x74, 0x72, 0x61, 0x63, 0x65, 0x00, 0x00, 0x00,  \\ t r a c e - - -
    1477   0x06, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x00,  \\ - a c c e p t -
    1478   0x00, 0x00, 0x0e, 0x61, 0x63, 0x63, 0x65, 0x70,  \\ - - - a c c e p
    1479   0x74, 0x2d, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65,  \\ t - c h a r s e
    1480   0x74, 0x00, 0x00, 0x00, 0x0f, 0x61, 0x63, 0x63,  \\ t - - - - a c c
    1481   0x65, 0x70, 0x74, 0x2d, 0x65, 0x6e, 0x63, 0x6f,  \\ e p t - e n c o
    1482   0x64, 0x69, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x0f,  \\ d i n g - - - -
    1483   0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x6c,  \\ a c c e p t - l
    1484   0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x00,  \\ a n g u a g e -
    1485   0x00, 0x00, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x70,  \\ - - - a c c e p
    1486   0x74, 0x2d, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73,  \\ t - r a n g e s
    1487   0x00, 0x00, 0x00, 0x03, 0x61, 0x67, 0x65, 0x00,  \\ - - - - a g e -
    1488   0x00, 0x00, 0x05, 0x61, 0x6c, 0x6c, 0x6f, 0x77,  \\ - - - a l l o w
    1489   0x00, 0x00, 0x00, 0x0d, 0x61, 0x75, 0x74, 0x68,  \\ - - - - a u t h
    1490   0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,  \\ o r i z a t i o
    1491   0x6e, 0x00, 0x00, 0x00, 0x0d, 0x63, 0x61, 0x63,  \\ n - - - - c a c
    1492   0x68, 0x65, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72,  \\ h e - c o n t r
    1493   0x6f, 0x6c, 0x00, 0x00, 0x00, 0x0a, 0x63, 0x6f,  \\ o l - - - - c o
    1494   0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,  \\ n n e c t i o n
    1495   0x00, 0x00, 0x00, 0x0c, 0x63, 0x6f, 0x6e, 0x74,  \\ - - - - c o n t
    1496   0x65, 0x6e, 0x74, 0x2d, 0x62, 0x61, 0x73, 0x65,  \\ e n t - b a s e
    1497   0x00, 0x00, 0x00, 0x10, 0x63, 0x6f, 0x6e, 0x74,  \\ - - - - c o n t
    1498   0x65, 0x6e, 0x74, 0x2d, 0x65, 0x6e, 0x63, 0x6f,  \\ e n t - e n c o
    1499   0x64, 0x69, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x10,  \\ d i n g - - - -
    1500   0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d,  \\ c o n t e n t -
    1501   0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65,  \\ l a n g u a g e
    1502   0x00, 0x00, 0x00, 0x0e, 0x63, 0x6f, 0x6e, 0x74,  \\ - - - - c o n t
    1503   0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x65, 0x6e, 0x67,  \\ e n t - l e n g
    1504   0x74, 0x68, 0x00, 0x00, 0x00, 0x10, 0x63, 0x6f,  \\ t h - - - - c o
    1505   0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x6f,  \\ n t e n t - l o
    1506   0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00,  \\ c a t i o n - -
    1507   0x00, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,  \\ - - c o n t e n
    1508   0x74, 0x2d, 0x6d, 0x64, 0x35, 0x00, 0x00, 0x00,  \\ t - m d 5 - - -
    1509   0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,  \\ - c o n t e n t
    1510   0x2d, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x00, 0x00,  \\ - r a n g e - -
    1511   0x00, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,  \\ - - c o n t e n
    1512   0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x00, 0x00,  \\ t - t y p e - -
    1513   0x00, 0x04, 0x64, 0x61, 0x74, 0x65, 0x00, 0x00,  \\ - - d a t e - -
    1514   0x00, 0x04, 0x65, 0x74, 0x61, 0x67, 0x00, 0x00,  \\ - - e t a g - -
    1515   0x00, 0x06, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74,  \\ - - e x p e c t
    1516   0x00, 0x00, 0x00, 0x07, 0x65, 0x78, 0x70, 0x69,  \\ - - - - e x p i
    1517   0x72, 0x65, 0x73, 0x00, 0x00, 0x00, 0x04, 0x66,  \\ r e s - - - - f
    1518   0x72, 0x6f, 0x6d, 0x00, 0x00, 0x00, 0x04, 0x68,  \\ r o m - - - - h
    1519   0x6f, 0x73, 0x74, 0x00, 0x00, 0x00, 0x08, 0x69,  \\ o s t - - - - i
    1520   0x66, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x00,  \\ f - m a t c h -
    1521   0x00, 0x00, 0x11, 0x69, 0x66, 0x2d, 0x6d, 0x6f,  \\ - - - i f - m o
    1522   0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x2d, 0x73,  \\ d i f i e d - s
    1523   0x69, 0x6e, 0x63, 0x65, 0x00, 0x00, 0x00, 0x0d,  \\ i n c e - - - -
    1524   0x69, 0x66, 0x2d, 0x6e, 0x6f, 0x6e, 0x65, 0x2d,  \\ i f - n o n e -
    1525   0x6d, 0x61, 0x74, 0x63, 0x68, 0x00, 0x00, 0x00,  \\ m a t c h - - -
    1526   0x08, 0x69, 0x66, 0x2d, 0x72, 0x61, 0x6e, 0x67,  \\ - i f - r a n g
    1527   0x65, 0x00, 0x00, 0x00, 0x13, 0x69, 0x66, 0x2d,  \\ e - - - - i f -
    1528   0x75, 0x6e, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69,  \\ u n m o d i f i
    1529   0x65, 0x64, 0x2d, 0x73, 0x69, 0x6e, 0x63, 0x65,  \\ e d - s i n c e
    1530   0x00, 0x00, 0x00, 0x0d, 0x6c, 0x61, 0x73, 0x74,  \\ - - - - l a s t
    1531   0x2d, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,  \\ - m o d i f i e
    1532   0x64, 0x00, 0x00, 0x00, 0x08, 0x6c, 0x6f, 0x63,  \\ d - - - - l o c
    1533   0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00,  \\ a t i o n - - -
    1534   0x0c, 0x6d, 0x61, 0x78, 0x2d, 0x66, 0x6f, 0x72,  \\ - m a x - f o r
    1535   0x77, 0x61, 0x72, 0x64, 0x73, 0x00, 0x00, 0x00,  \\ w a r d s - - -
    1536   0x06, 0x70, 0x72, 0x61, 0x67, 0x6d, 0x61, 0x00,  \\ - p r a g m a -
    1537   0x00, 0x00, 0x12, 0x70, 0x72, 0x6f, 0x78, 0x79,  \\ - - - p r o x y
    1538   0x2d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74,  \\ - a u t h e n t
    1539   0x69, 0x63, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00,  \\ i c a t e - - -
    1540   0x13, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2d, 0x61,  \\ - p r o x y - a
    1541   0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61,  \\ u t h o r i z a
    1542   0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05,  \\ t i o n - - - -
    1543   0x72, 0x61, 0x6e, 0x67, 0x65, 0x00, 0x00, 0x00,  \\ r a n g e - - -
    1544   0x07, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72,  \\ - r e f e r e r
    1545   0x00, 0x00, 0x00, 0x0b, 0x72, 0x65, 0x74, 0x72,  \\ - - - - r e t r
    1546   0x79, 0x2d, 0x61, 0x66, 0x74, 0x65, 0x72, 0x00,  \\ y - a f t e r -
    1547   0x00, 0x00, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65,  \\ - - - s e r v e
    1548   0x72, 0x00, 0x00, 0x00, 0x02, 0x74, 0x65, 0x00,  \\ r - - - - t e -
    1549   0x00, 0x00, 0x07, 0x74, 0x72, 0x61, 0x69, 0x6c,  \\ - - - t r a i l
    1550   0x65, 0x72, 0x00, 0x00, 0x00, 0x11, 0x74, 0x72,  \\ e r - - - - t r
    1551   0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2d, 0x65,  \\ a n s f e r - e
    1552   0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x00,  \\ n c o d i n g -
    1553   0x00, 0x00, 0x07, 0x75, 0x70, 0x67, 0x72, 0x61,  \\ - - - u p g r a
    1554   0x64, 0x65, 0x00, 0x00, 0x00, 0x0a, 0x75, 0x73,  \\ d e - - - - u s
    1555   0x65, 0x72, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74,  \\ e r - a g e n t
    1556   0x00, 0x00, 0x00, 0x04, 0x76, 0x61, 0x72, 0x79,  \\ - - - - v a r y
    1557   0x00, 0x00, 0x00, 0x03, 0x76, 0x69, 0x61, 0x00,  \\ - - - - v i a -
    1558   0x00, 0x00, 0x07, 0x77, 0x61, 0x72, 0x6e, 0x69,  \\ - - - w a r n i
    1559   0x6e, 0x67, 0x00, 0x00, 0x00, 0x10, 0x77, 0x77,  \\ n g - - - - w w
    1560   0x77, 0x2d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e,  \\ w - a u t h e n
    1561   0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x00, 0x00,  \\ t i c a t e - -
    1562   0x00, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64,  \\ - - m e t h o d
    1563   0x00, 0x00, 0x00, 0x03, 0x67, 0x65, 0x74, 0x00,  \\ - - - - g e t -
    1564   0x00, 0x00, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,  \\ - - - s t a t u
    1565   0x73, 0x00, 0x00, 0x00, 0x06, 0x32, 0x30, 0x30,  \\ s - - - - 2 0 0
    1566   0x20, 0x4f, 0x4b, 0x00, 0x00, 0x00, 0x07, 0x76,  \\ - O K - - - - v
    1567   0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x00, 0x00,  \\ e r s i o n - -
    1568   0x00, 0x08, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31,  \\ - - H T T P - 1
    1569   0x2e, 0x31, 0x00, 0x00, 0x00, 0x03, 0x75, 0x72,  \\ - 1 - - - - u r
    1570   0x6c, 0x00, 0x00, 0x00, 0x06, 0x70, 0x75, 0x62,  \\ l - - - - p u b
    1571   0x6c, 0x69, 0x63, 0x00, 0x00, 0x00, 0x0a, 0x73,  \\ l i c - - - - s
    1572   0x65, 0x74, 0x2d, 0x63, 0x6f, 0x6f, 0x6b, 0x69,  \\ e t - c o o k i
    1573   0x65, 0x00, 0x00, 0x00, 0x0a, 0x6b, 0x65, 0x65,  \\ e - - - - k e e
    1574   0x70, 0x2d, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x00,  \\ p - a l i v e -
    1575   0x00, 0x00, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69,  \\ - - - o r i g i
    1576   0x6e, 0x31, 0x30, 0x30, 0x31, 0x30, 0x31, 0x32,  \\ n 1 0 0 1 0 1 2
    1577   0x30, 0x31, 0x32, 0x30, 0x32, 0x32, 0x30, 0x35,  \\ 0 1 2 0 2 2 0 5
    1578   0x32, 0x30, 0x36, 0x33, 0x30, 0x30, 0x33, 0x30,  \\ 2 0 6 3 0 0 3 0
    1579   0x32, 0x33, 0x30, 0x33, 0x33, 0x30, 0x34, 0x33,  \\ 2 3 0 3 3 0 4 3
    1580   0x30, 0x35, 0x33, 0x30, 0x36, 0x33, 0x30, 0x37,  \\ 0 5 3 0 6 3 0 7
    1581   0x34, 0x30, 0x32, 0x34, 0x30, 0x35, 0x34, 0x30,  \\ 4 0 2 4 0 5 4 0
    1582   0x36, 0x34, 0x30, 0x37, 0x34, 0x30, 0x38, 0x34,  \\ 6 4 0 7 4 0 8 4
    1583   0x30, 0x39, 0x34, 0x31, 0x30, 0x34, 0x31, 0x31,  \\ 0 9 4 1 0 4 1 1
    1584   0x34, 0x31, 0x32, 0x34, 0x31, 0x33, 0x34, 0x31,  \\ 4 1 2 4 1 3 4 1
    1585   0x34, 0x34, 0x31, 0x35, 0x34, 0x31, 0x36, 0x34,  \\ 4 4 1 5 4 1 6 4
    1586   0x31, 0x37, 0x35, 0x30, 0x32, 0x35, 0x30, 0x34,  \\ 1 7 5 0 2 5 0 4
    1587   0x35, 0x30, 0x35, 0x32, 0x30, 0x33, 0x20, 0x4e,  \\ 5 0 5 2 0 3 - N
    1588   0x6f, 0x6e, 0x2d, 0x41, 0x75, 0x74, 0x68, 0x6f,  \\ o n - A u t h o
    1589   0x72, 0x69, 0x74, 0x61, 0x74, 0x69, 0x76, 0x65,  \\ r i t a t i v e
    1590   0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61,  \\ - I n f o r m a
    1591   0x74, 0x69, 0x6f, 0x6e, 0x32, 0x30, 0x34, 0x20,  \\ t i o n 2 0 4 -
    1592   0x4e, 0x6f, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x65,  \\ N o - C o n t e
    1593   0x6e, 0x74, 0x33, 0x30, 0x31, 0x20, 0x4d, 0x6f,  \\ n t 3 0 1 - M o
    1594   0x76, 0x65, 0x64, 0x20, 0x50, 0x65, 0x72, 0x6d,  \\ v e d - P e r m
    1595   0x61, 0x6e, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x34,  \\ a n e n t l y 4
    1596   0x30, 0x30, 0x20, 0x42, 0x61, 0x64, 0x20, 0x52,  \\ 0 0 - B a d - R
    1597   0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x34, 0x30,  \\ e q u e s t 4 0
    1598   0x31, 0x20, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68,  \\ 1 - U n a u t h
    1599   0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x34, 0x30,  \\ o r i z e d 4 0
    1600   0x33, 0x20, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64,  \\ 3 - F o r b i d
    1601   0x64, 0x65, 0x6e, 0x34, 0x30, 0x34, 0x20, 0x4e,  \\ d e n 4 0 4 - N
    1602   0x6f, 0x74, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64,  \\ o t - F o u n d
    1603   0x35, 0x30, 0x30, 0x20, 0x49, 0x6e, 0x74, 0x65,  \\ 5 0 0 - I n t e
    1604   0x72, 0x6e, 0x61, 0x6c, 0x20, 0x53, 0x65, 0x72,  \\ r n a l - S e r
    1605   0x76, 0x65, 0x72, 0x20, 0x45, 0x72, 0x72, 0x6f,  \\ v e r - E r r o
    1606   0x72, 0x35, 0x30, 0x31, 0x20, 0x4e, 0x6f, 0x74,  \\ r 5 0 1 - N o t
    1607   0x20, 0x49, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65,  \\ - I m p l e m e
    1608   0x6e, 0x74, 0x65, 0x64, 0x35, 0x30, 0x33, 0x20,  \\ n t e d 5 0 3 -
    1609   0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20,  \\ S e r v i c e -
    1610   0x55, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61,  \\ U n a v a i l a
    1611   0x62, 0x6c, 0x65, 0x4a, 0x61, 0x6e, 0x20, 0x46,  \\ b l e J a n - F
    1612   0x65, 0x62, 0x20, 0x4d, 0x61, 0x72, 0x20, 0x41,  \\ e b - M a r - A
    1613   0x70, 0x72, 0x20, 0x4d, 0x61, 0x79, 0x20, 0x4a,  \\ p r - M a y - J
    1614   0x75, 0x6e, 0x20, 0x4a, 0x75, 0x6c, 0x20, 0x41,  \\ u n - J u l - A
    1615   0x75, 0x67, 0x20, 0x53, 0x65, 0x70, 0x74, 0x20,  \\ u g - S e p t -
    1616   0x4f, 0x63, 0x74, 0x20, 0x4e, 0x6f, 0x76, 0x20,  \\ O c t - N o v -
    1617   0x44, 0x65, 0x63, 0x20, 0x30, 0x30, 0x3a, 0x30,  \\ D e c - 0 0 - 0
    1618   0x30, 0x3a, 0x30, 0x30, 0x20, 0x4d, 0x6f, 0x6e,  \\ 0 - 0 0 - M o n
    1619   0x2c, 0x20, 0x54, 0x75, 0x65, 0x2c, 0x20, 0x57,  \\ - - T u e - - W
    1620   0x65, 0x64, 0x2c, 0x20, 0x54, 0x68, 0x75, 0x2c,  \\ e d - - T h u -
    1621   0x20, 0x46, 0x72, 0x69, 0x2c, 0x20, 0x53, 0x61,  \\ - F r i - - S a
    1622   0x74, 0x2c, 0x20, 0x53, 0x75, 0x6e, 0x2c, 0x20,  \\ t - - S u n - -
    1623   0x47, 0x4d, 0x54, 0x63, 0x68, 0x75, 0x6e, 0x6b,  \\ G M T c h u n k
    1624   0x65, 0x64, 0x2c, 0x74, 0x65, 0x78, 0x74, 0x2f,  \\ e d - t e x t -
    1625   0x68, 0x74, 0x6d, 0x6c, 0x2c, 0x69, 0x6d, 0x61,  \\ h t m l - i m a
    1626   0x67, 0x65, 0x2f, 0x70, 0x6e, 0x67, 0x2c, 0x69,  \\ g e - p n g - i
    1627   0x6d, 0x61, 0x67, 0x65, 0x2f, 0x6a, 0x70, 0x67,  \\ m a g e - j p g
    1628   0x2c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x67,  \\ - i m a g e - g
    1629   0x69, 0x66, 0x2c, 0x61, 0x70, 0x70, 0x6c, 0x69,  \\ i f - a p p l i
    1630   0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78,  \\ c a t i o n - x
    1631   0x6d, 0x6c, 0x2c, 0x61, 0x70, 0x70, 0x6c, 0x69,  \\ m l - a p p l i
    1632   0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78,  \\ c a t i o n - x
    1633   0x68, 0x74, 0x6d, 0x6c, 0x2b, 0x78, 0x6d, 0x6c,  \\ h t m l - x m l
    1634   0x2c, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x70, 0x6c,  \\ - t e x t - p l
    1635   0x61, 0x69, 0x6e, 0x2c, 0x74, 0x65, 0x78, 0x74,  \\ a i n - t e x t
    1636   0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72,  \\ - j a v a s c r
    1637   0x69, 0x70, 0x74, 0x2c, 0x70, 0x75, 0x62, 0x6c,  \\ i p t - p u b l
    1638   0x69, 0x63, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74,  \\ i c p r i v a t
    1639   0x65, 0x6d, 0x61, 0x78, 0x2d, 0x61, 0x67, 0x65,  \\ e m a x - a g e
    1640   0x3d, 0x67, 0x7a, 0x69, 0x70, 0x2c, 0x64, 0x65,  \\ - g z i p - d e
    1641   0x66, 0x6c, 0x61, 0x74, 0x65, 0x2c, 0x73, 0x64,  \\ f l a t e - s d
    1642   0x63, 0x68, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65,  \\ c h c h a r s e
    1643   0x74, 0x3d, 0x75, 0x74, 0x66, 0x2d, 0x38, 0x63,  \\ t - u t f - 8 c
    1644   0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x3d, 0x69,  \\ h a r s e t - i
    1645   0x73, 0x6f, 0x2d, 0x38, 0x38, 0x35, 0x39, 0x2d,  \\ s o - 8 8 5 9 -
    1646   0x31, 0x2c, 0x75, 0x74, 0x66, 0x2d, 0x2c, 0x2a,  \\ 1 - u t f - - -
    1647   0x2c, 0x65, 0x6e, 0x71, 0x3d, 0x30, 0x2e         \\ - e n q - 0 -
    1648 };
    1649 </pre><pre class="ccmarker ccb"><span>&lt;CODE ENDS&gt;</span></pre> <p id="rfc.section.3.6.10.1.p.4">The entire contents of the name/value header block is compressed using zlib. There is a single zlib stream for all name value
    1650          pairs in one direction on a connection. HTTP/2.0 uses a SYNC_FLUSH between each compressed frame.
    1651       </p>
    1652       <p id="rfc.section.3.6.10.1.p.5">Implementation notes: the compression engine can be tuned to favor speed or size. Optimizing for size increases memory use
    1653          and CPU consumption. Because header blocks are generally small, implementors may want to reduce the window-size of the compression
    1654          engine from the default 15bits (a 32KB window) to more like 11bits (a 2KB window). The exact setting is chosen by the compressor,
    1655          the decompressor will work with any setting.
    1656       </p>
    1657       <h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a>&nbsp;<a id="HTTPLayer" href="#HTTPLayer">HTTP Layering over HTTP/2.0</a></h1>
    1658       <p id="rfc.section.4.p.1">HTTP/2.0 is intended to be as compatible as possible with current web-based applications. This means that, from the perspective
    1659          of the server business logic or application API, the features of HTTP are unchanged. To achieve this, all of the application
    1660          request and response header semantics are preserved, although the syntax of conveying those semantics has changed. Thus, the
    1661          rules from the <a href="#RFC2616">HTTP/1.1 specification in RFC2616</a> <cite title="Hypertext Transfer Protocol -- HTTP/1.1" id="rfc.xref.RFC2616.1">[RFC2616]</cite> apply with the changes in the sections below.
    1662       </p>
    1663       <h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a>&nbsp;Connection Management
    1664       </h2>
    1665       <p id="rfc.section.4.1.p.1">Clients SHOULD NOT open more than one HTTP/2.0 session to a given <a href="#RFC6454">origin</a> <cite title="The Web Origin Concept" id="rfc.xref.RFC6454.2">[RFC6454]</cite> concurrently.
    1666       </p>
    1667       <p id="rfc.section.4.1.p.2">Note that it is possible for one HTTP/2.0 session to be finishing (e.g. a GOAWAY message has been sent, but not all streams
    1668          have finished), while another HTTP/2.0 session is starting.
    1669       </p>
    1670       <h3 id="rfc.section.4.1.1"><a href="#rfc.section.4.1.1">4.1.1</a>&nbsp;Use of GOAWAY
    1671       </h3>
    1672       <p id="rfc.section.4.1.1.p.1">HTTP/2.0 provides a GOAWAY message which can be used when closing a connection from either the client or server. Without a
    1673          server GOAWAY message, HTTP has a race condition where the client sends a request (a new SYN_STREAM) just as the server is
    1674          closing the connection, and the client cannot know if the server received the stream or not. By using the last-stream-id in
    1675          the GOAWAY, servers can indicate to the client if a request was processed or not.
    1676       </p>
    1677       <p id="rfc.section.4.1.1.p.2">Note that some servers will choose to send the GOAWAY and immediately terminate the connection without waiting for active
    1678          streams to finish. The client will be able to determine this because HTTP/2.0 streams are determinstically closed. This abrupt
    1679          termination will force the client to heuristically decide whether to retry the pending requests. Clients always need to be
    1680          capable of dealing with this case because they must deal with accidental connection termination cases, which are the same
    1681          as the server never having sent a GOAWAY.
    1682       </p>
    1683       <p id="rfc.section.4.1.1.p.3">More sophisticated servers will use GOAWAY to implement a graceful teardown. They will send the GOAWAY and provide some time
    1684          for the active streams to finish before terminating the connection.
    1685       </p>
    1686       <p id="rfc.section.4.1.1.p.4">If a HTTP/2.0 client closes the connection, it should also send a GOAWAY message. This allows the server to know if any server-push
    1687          streams were received by the client.
    1688       </p>
    1689       <p id="rfc.section.4.1.1.p.5">If the endpoint closing the connection has not received any SYN_STREAMs from the remote, the GOAWAY will contain a last-stream-id
    1690          of 0.
    1691       </p>
    1692       <h2 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2</a>&nbsp;HTTP Request/Response
    1693       </h2>
    1694       <h3 id="rfc.section.4.2.1"><a href="#rfc.section.4.2.1">4.2.1</a>&nbsp;Request
    1695       </h3>
    1696       <p id="rfc.section.4.2.1.p.1">The client initiates a request by sending a SYN_STREAM frame. For requests which do not contain a body, the SYN_STREAM frame
    1697          MUST set the FLAG_FIN, indicating that the client intends to send no further data on this stream. For requests which do contain
    1698          a body, the SYN_STREAM will not contain the FLAG_FIN, and the body will follow the SYN_STREAM in a series of DATA frames.
    1699          The last DATA frame will set the FLAG_FIN to indicate the end of the body.
    1700       </p>
    1701       <p id="rfc.section.4.2.1.p.2">The SYN_STREAM Name/Value section will contain all of the HTTP headers which are associated with an HTTP request. The header
    1702          block in HTTP/2.0 is mostly unchanged from today's HTTP header block, with the following differences:
    1703       </p>
    1704       <ul class="empty">
    1705          <li>The first line of the request is unfolded into name/value pairs like other HTTP headers and MUST be present:
    1706             <ul class="empty">
    1707                <li>":method" - the HTTP method for this request (e.g. "GET", "POST", "HEAD", etc)</li>
    1708                <li>":path" - the url-path for this url with "/" prefixed. (See <a href="#RFC1738">RFC1738</a> <cite title="Uniform Resource Locators (URL)" id="rfc.xref.RFC1738.1">[RFC1738]</cite>). For example, for "http://www.google.com/search?q=dogs" the path would be "/search?q=dogs".
    1709                </li>
    1710                <li>":version" - the HTTP version of this request (e.g. "HTTP/1.1")</li>
    1711             </ul>
    1712          </li>
    1713          <li>In addition, the following two name/value pairs must also be present in every request:
    1714             <ul class="empty">
    1715                <li>":host" - the hostport (See <a href="#RFC1738">RFC1738</a> <cite title="Uniform Resource Locators (URL)" id="rfc.xref.RFC1738.2">[RFC1738]</cite>) portion of the URL for this request (e.g. "www.google.com:1234"). This header is the same as the HTTP 'Host' header.
    1716                </li>
    1717                <li>":scheme" - the scheme portion of the URL for this request (e.g. "https"))</li>
    1718             </ul>
    1719          </li>
    1720          <li>Header names are all lowercase.</li>
    1721          <li>The Connection, Host, Keep-Alive, Proxy-Connection, and Transfer-Encoding headers are not valid and MUST not be sent.</li>
    1722          <li>User-agents MUST support gzip compression. Regardless of the Accept-Encoding sent by the user-agent, the server may always
    1723             send content encoded with gzip or deflate encoding.
    1724          </li>
    1725          <li>If a server receives a request where the sum of the data frame payload lengths does not equal the size of the Content-Length
    1726             header, the server MUST return a 400 (Bad Request) error.
    1727          </li>
    1728          <li>POST-specific changes:
    1729             <ul class="empty">
    1730                <li>Although POSTs are inherently chunked, POST requests SHOULD also be accompanied by a Content-Length header. There are two
    1731                   reasons for this: First, it assists with upload progress meters for an improved user experience. More importantly, failure
    1732                   to send a Content-Length header is incompatible with many existing HTTP server implementations. Existing user agents do not
    1733                   omit the Content-Length header, and server implementations have come to depend upon this.
    1734                </li>
    1735             </ul>
    1736          </li>
    1737       </ul>
    1738       <p id="rfc.section.4.2.1.p.3">The user-agent is free to prioritize requests as it sees fit. If the user-agent cannot make progress without receiving a resource,
    1739          it should attempt to raise the priority of that resource. Resources such as images, SHOULD generally use the lowest priority.
    1740       </p>
    1741       <p id="rfc.section.4.2.1.p.4">If a client sends a SYN_STREAM without all of the method, host, path, scheme, and version headers, the server MUST reply with
    1742          a HTTP 400 Bad Request reply.
    1743       </p>
    1744       <h3 id="rfc.section.4.2.2"><a href="#rfc.section.4.2.2">4.2.2</a>&nbsp;Response
    1745       </h3>
    1746       <p id="rfc.section.4.2.2.p.1">The server responds to a client request with a SYN_REPLY frame. Symmetric to the client's upload stream, server will send
    1747          data after the SYN_REPLY frame via a series of DATA frames, and the last data frame will contain the FLAG_FIN to indicate
    1748          successful end-of-stream. If a response (like a 202 or 204 response) contains no body, the SYN_REPLY frame may contain the
    1749          FLAG_FIN flag to indicate no further data will be sent on the stream.
    1750       </p>
    1751       <p id="rfc.section.4.2.2.p.2"> </p>
    1752       <ul class="empty">
    1753          <li>The response status line is unfolded into name/value pairs like other HTTP headers and must be present:
    1754             <ul class="empty">
    1755                <li>":status" - The HTTP response status code (e.g. "200" or "200 OK")</li>
    1756                <li>":version" - The HTTP response version (e.g. "HTTP/1.1")</li>
    1757             </ul>
    1758          </li>
    1759          <li>All header names must be lowercase.</li>
    1760          <li>The Connection, Keep-Alive, Proxy-Connection, and Transfer-Encoding headers are not valid and MUST not be sent.</li>
    1761          <li>Responses MAY be accompanied by a Content-Length header for advisory purposes. (e.g. for UI progress meters)</li>
    1762          <li>If a client receives a response where the sum of the data frame payload lengths does not equal the size of the Content-Length
    1763             header, the client MUST ignore the content length header.
    1764          </li>
    1765       </ul>
    1766       <p id="rfc.section.4.2.2.p.3">If a client receives a SYN_REPLY without a status or without a version header, the client must reply with a RST_STREAM frame
    1767          indicating a PROTOCOL ERROR.
    1768       </p>
    1769       <h3 id="rfc.section.4.2.3"><a href="#rfc.section.4.2.3">4.2.3</a>&nbsp;<a id="Authentication" href="#Authentication">Authentication</a></h3>
    1770       <p id="rfc.section.4.2.3.p.1">When a client sends a request to an origin server that requires authentication, the server can reply with a "401 Unauthorized"
    1771          response, and include a WWW-Authenticate challenge header that defines the authentication scheme to be used. The client then
    1772          retries the request with an Authorization header appropriate to the specified authentication scheme.
    1773       </p>
    1774       <p id="rfc.section.4.2.3.p.2">There are four options for proxy authentication, Basic, Digest, NTLM and Negotiate (SPNEGO). The first two options were defined
    1775          in <a href="#RFC2617">RFC2617</a> <cite title="HTTP Authentication: Basic and Digest Access Authentication" id="rfc.xref.RFC2617.1">[RFC2617]</cite>, and are stateless. The second two options were developed by Microsoft and specified in <a href="#RFC4559">RFC4559</a> <cite title="SPNEGO-based Kerberos and NTLM HTTP Authentication in Microsoft Windows" id="rfc.xref.RFC4559.1">[RFC4559]</cite>, and are stateful; otherwise known as multi-round authentication, or connection authentication.
    1776       </p>
    1777       <h4 id="rfc.section.4.2.3.1"><a href="#rfc.section.4.2.3.1">4.2.3.1</a>&nbsp;Stateless Authentication
    1778       </h4>
    1779       <p id="rfc.section.4.2.3.1.p.1">Stateless Authentication over HTTP/2.0 is identical to how it is performed over HTTP. If multiple HTTP/2.0 streams are concurrently
    1780          sent to a single server, each will authenticate independently, similar to how two HTTP connections would independently authenticate
    1781          to a proxy server.
    1782       </p>
    1783       <h4 id="rfc.section.4.2.3.2"><a href="#rfc.section.4.2.3.2">4.2.3.2</a>&nbsp;Stateful Authentication
    1784       </h4>
    1785       <p id="rfc.section.4.2.3.2.p.1">Unfortunately, the stateful authentication mechanisms were implemented and defined in a such a way that directly violates
    1786          RFC2617 - they do not include a "realm" as part of the request. This is problematic in HTTP/2.0 because it makes it impossible
    1787          for a client to disambiguate two concurrent server authentication challenges.
    1788       </p>
    1789       <p id="rfc.section.4.2.3.2.p.2">To deal with this case, HTTP/2.0 servers using Stateful Authentication MUST implement one of two changes: </p>
    1790       <ul class="empty">
    1791          <li>Servers can add a "realm=&lt;desired realm&gt;" header so that the two authentication requests can be disambiguated and run concurrently.
    1792             Unfortunately, given how these mechanisms work, this is probably not practical.
    1793          </li>
    1794          <li>Upon sending the first stateful challenge response, the server MUST buffer and defer all further frames which are not part
    1795             of completing the challenge until the challenge has completed. Completing the authentication challenge may take multiple round
    1796             trips. Once the client receives a "401 Authenticate" response for a stateful authentication type, it MUST stop sending new
    1797             requests to the server until the authentication has completed by receiving a non-401 response on at least one stream.
    1798          </li>
    1799       </ul>
    1800       <h2 id="rfc.section.4.3"><a href="#rfc.section.4.3">4.3</a>&nbsp;Server Push Transactions
    1801       </h2>
    1802       <p id="rfc.section.4.3.p.1">HTTP/2.0 enables a server to send multiple replies to a client for a single request. The rationale for this feature is that
    1803          sometimes a server knows that it will need to send multiple resources in response to a single request. Without server push
    1804          features, the client must first download the primary resource, then discover the secondary resource(s), and request them.
    1805          Pushing of resources avoids the round-trip delay, but also creates a potential race where a server can be pushing content
    1806          which a user-agent is in the process of requesting. The following mechanics attempt to prevent the race condition while enabling
    1807          the performance benefit.
    1808       </p>
    1809       <p id="rfc.section.4.3.p.2">Browsers receiving a pushed response MUST validate that the server is authorized to push the URL using the <a href="#RFC6454">browser same-origin</a> <cite title="The Web Origin Concept" id="rfc.xref.RFC6454.3">[RFC6454]</cite> policy. For example, a HTTP/2.0 connection to www.foo.com is generally not permitted to push a response for www.evil.com.
    1810       </p>
    1811       <p id="rfc.section.4.3.p.3">If the browser accepts a pushed response (e.g. it does not send a RST_STREAM), the browser MUST attempt to cache the pushed
    1812          response in same way that it would cache any other response. This means validating the response headers and inserting into
    1813          the disk cache.
    1814       </p>
    1815       <p id="rfc.section.4.3.p.4">Because pushed responses have no request, they have no request headers associated with them. At the framing layer, HTTP/2.0
    1816          pushed streams contain an "associated-stream-id" which indicates the requested stream for which the pushed stream is related.
    1817          The pushed stream inherits all of the headers from the associated-stream-id with the exception of ":host", ":scheme", and
    1818          ":path", which are provided as part of the pushed response stream headers. The browser MUST store these inherited and implied
    1819          request headers with the cached resource.
    1820       </p>
    1821       <p id="rfc.section.4.3.p.5">Implementation note: With server push, it is theoretically possible for servers to push unreasonable amounts of content or
    1822          resources to the user-agent. Browsers MUST implement throttles to protect against unreasonable push attacks.
    1823       </p>
    1824       <h3 id="rfc.section.4.3.1"><a href="#rfc.section.4.3.1">4.3.1</a>&nbsp;Server implementation
    1825       </h3>
    1826       <p id="rfc.section.4.3.1.p.1">When the server intends to push a resource to the user-agent, it opens a new stream by sending a unidirectional SYN_STREAM.
    1827          The SYN_STREAM MUST include an Associated-To-Stream-ID, and MUST set the FLAG_UNIDIRECTIONAL flag. The SYN_STREAM MUST include
    1828          headers for ":scheme", ":host", ":path", which represent the URL for the resource being pushed. Subsequent headers may follow
    1829          in HEADERS frames. The purpose of the association is so that the user-agent can differentiate which request induced the pushed
    1830          stream; without it, if the user-agent had two tabs open to the same page, each pushing unique content under a fixed URL, the
    1831          user-agent would not be able to differentiate the requests.
    1832       </p>
    1833       <p id="rfc.section.4.3.1.p.2">The Associated-To-Stream-ID must be the ID of an existing, open stream. The reason for this restriction is to have a clear
    1834          endpoint for pushed content. If the user-agent requested a resource on stream 11, the server replies on stream 11. It can
    1835          push any number of additional streams to the client before sending a FLAG_FIN on stream 11. However, once the originating
    1836          stream is closed no further push streams may be associated with it. The pushed streams do not need to be closed (FIN set)
    1837          before the originating stream is closed, they only need to be created before the originating stream closes.
    1838       </p>
    1839       <p id="rfc.section.4.3.1.p.3">It is illegal for a server to push a resource with the Associated-To-Stream-ID of 0.</p>
    1840       <p id="rfc.section.4.3.1.p.4">To minimize race conditions with the client, the SYN_STREAM for the pushed resources MUST be sent prior to sending any content
    1841          which could allow the client to discover the pushed resource and request it.
    1842       </p>
    1843       <p id="rfc.section.4.3.1.p.5">The server MUST only push resources which would have been returned from a GET request.</p>
    1844       <p id="rfc.section.4.3.1.p.6">Note: If the server does not have all of the Name/Value Response headers available at the time it issues the HEADERS frame
    1845          for the pushed resource, it may later use an additional HEADERS frame to augment the name/value pairs to be associated with
    1846          the pushed stream. The subsequent HEADERS frame(s) must not contain a header for ':host', ':scheme', or ':path' (e.g. the
    1847          server can't change the identity of the resource to be pushed). The HEADERS frame must not contain duplicate headers with
    1848          a previously sent HEADERS frame. The server must send a HEADERS frame including the scheme/host/port headers before sending
    1849          any data frames on the stream.
    1850       </p>
    1851       <h3 id="rfc.section.4.3.2"><a href="#rfc.section.4.3.2">4.3.2</a>&nbsp;Client implementation
    1852       </h3>
    1853       <p id="rfc.section.4.3.2.p.1">When fetching a resource the client has 3 possibilities: </p>
    1854       <ul class="empty">
    1855          <li>the resource is not being pushed</li>
    1856          <li>the resource is being pushed, but the data has not yet arrived</li>
    1857          <li>the resource is being pushed, and the data has started to arrive</li>
    1858       </ul>
    1859       <p id="rfc.section.4.3.2.p.2">When a SYN_STREAM and HEADERS frame which contains an Associated-To-Stream-ID is received, the client must not issue GET requests
    1860          for the resource in the pushed stream, and instead wait for the pushed stream to arrive.
    1861       </p>
    1862       <p id="rfc.section.4.3.2.p.3">If a client receives a server push stream with stream-id 0, it MUST issue a session error (<a href="#SessionErrorHandler" title="Session Error Handling">Section&nbsp;3.4.1</a>) with the status code PROTOCOL_ERROR.
    1863       </p>