source: draft-ietf-httpbis-http2/latest/draft-ietf-httpbis-http2.html @ 1980

Last change on this file since 1980 was 1980, checked in by julian.reschke@…, 10 years ago

repace TABs by 2SP

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/html;charset=utf-8
File size: 144.3 KB
Line 
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>SPDY Protocol</title><script>
7var buttonsAdded = false;
8
9function 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
19function feedback() {
20  toggleButtonsToElementsByName("h1");
21  toggleButtonsToElementsByName("h2");
22  toggleButtonsToElementsByName("h3");
23  toggleButtonsToElementsByName("h4");
24 
25  buttonsAdded = !buttonsAdded;
26}
27
28function 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
35function 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)">
89a {
90  text-decoration: none;
91}
92a.smpl {
93  color: black;
94}
95a:hover {
96  text-decoration: underline;
97}
98a:active {
99  text-decoration: underline;
100}
101address {
102  margin-top: 1em;
103  margin-left: 2em;
104  font-style: normal;
105}
106body {
107  color: black;
108  font-family: verdana, helvetica, arial, sans-serif;
109  font-size: 10pt;
110  margin-right: 2em;
111}
112cite {
113  font-style: normal;
114}
115dl {
116  margin-left: 2em;
117}
118ul.empty {
119  list-style-type: none;
120}
121ul.empty li {
122  margin-top: .5em;
123}
124dl p {
125  margin-left: 0em;
126}
127dt {
128  margin-top: .5em;
129}
130h1 {
131  font-size: 14pt;
132  line-height: 21pt;
133  page-break-after: avoid;
134}
135h1.np {
136  page-break-before: always;
137}
138h1 a {
139  color: #333333;
140}
141h2 {
142  font-size: 12pt;
143  line-height: 15pt;
144  page-break-after: avoid;
145}
146h3, h4, h5, h6 {
147  font-size: 10pt;
148  page-break-after: avoid;
149}
150h2 a, h3 a, h4 a, h5 a, h6 a {
151  color: black;
152}
153img {
154  margin-left: 3em;
155}
156li {
157  margin-left: 2em;
158}
159ol {
160  margin-left: 2em;
161}
162ol.la {
163  list-style-type: lower-alpha;
164}
165ol.ua {
166  list-style-type: upper-alpha;
167}
168ol p {
169  margin-left: 0em;
170}
171p {
172  margin-left: 2em;
173}
174pre {
175  margin-left: 3em;
176  background-color: lightyellow;
177  padding: .25em;
178  page-break-inside: avoid;
179}
180pre.text2 {
181  border-style: dotted;
182  border-width: 1px;
183  background-color: #f0f0f0;
184  width: 69em;
185}
186pre.inline {
187  background-color: white;
188  padding: 0em;
189}
190pre.text {
191  border-style: dotted;
192  border-width: 1px;
193  background-color: #f8f8f8;
194  width: 69em;
195}
196pre.drawing {
197  border-style: solid;
198  border-width: 1px;
199  background-color: #f8f8f8;
200  padding: 2em;
201}
202table {
203  margin-left: 2em;
204}
205table.header {
206  border-spacing: 1px;
207  width: 95%;
208  font-size: 10pt;
209  color: white;
210}
211td.top {
212  vertical-align: top;
213}
214td.topnowrap {
215  vertical-align: top;
216  white-space: nowrap;
217}
218table.header td {
219  background-color: gray;
220  width: 50%;
221}
222td.reference {
223  vertical-align: top;
224  white-space: nowrap;
225  padding-right: 1em;
226}
227thead {
228  display:table-header-group;
229}
230ul.toc, ul.toc ul {
231  list-style: none;
232  margin-left: 1.5em;
233  padding-left: 0em;
234}
235ul.toc li {
236  line-height: 150%;
237  font-weight: bold;
238  font-size: 10pt;
239  margin-left: 0em;
240}
241ul.toc li li {
242  line-height: normal;
243  font-weight: normal;
244  font-size: 9pt;
245  margin-left: 0em;
246}
247li.excluded {
248  font-size: 0pt;
249}
250ul p {
251  margin-left: 0em;
252}
253ul.ind, ul.ind ul {
254  list-style: none;
255  margin-left: 1.5em;
256  padding-left: 0em;
257  page-break-before: avoid;
258}
259ul.ind li {
260  font-weight: bold;
261  line-height: 200%;
262  margin-left: 0em;
263}
264ul.ind li li {
265  font-weight: normal;
266  line-height: 150%;
267  margin-left: 0em;
268}
269.avoidbreak {
270  page-break-inside: avoid;
271}
272
273.comment {
274  background-color: yellow;
275}
276.center {
277  text-align: center;
278}
279.error {
280  color: red;
281  font-style: italic;
282  font-weight: bold;
283}
284.figure {
285  font-weight: bold;
286  text-align: center;
287  font-size: 9pt;
288}
289.filename {
290  color: #333333;
291  font-weight: bold;
292  font-size: 12pt;
293  line-height: 21pt;
294  text-align: center;
295}
296.fn {
297  font-weight: bold;
298}
299.hidden {
300  display: none;
301}
302.left {
303  text-align: left;
304}
305.right {
306  text-align: right;
307}
308.title {
309  color: #990000;
310  font-size: 18pt;
311  line-height: 18pt;
312  font-weight: bold;
313  text-align: center;
314  margin-top: 36pt;
315}
316.vcardline {
317  display: block;
318}
319.warning {
320  font-size: 14pt;
321  background-color: yellow;
322}
323.feedback {
324  position: fixed;
325  bottom: 1%;
326  right: 1%;
327  padding: 3px 5px;
328  color: white;
329  border-radius: 5px;
330  background: #a00000;
331  border: 1px solid silver;
332}
333.fbbutton {
334  margin-left: 1em;
335  color: #303030;
336  font-size: small;
337  font-weight: normal;
338  background: #d0d000;
339  padding: 1px 4px;
340  border: 1px solid silver;
341  border-radius: 5px;
342}
343
344@media print {
345  .noprint {
346    display: none;
347  }
348 
349  a {
350    color: black;
351    text-decoration: none;
352  }
353
354  table.header {
355    width: 90%;
356  }
357
358  td.header {
359    width: 50%;
360    color: black;
361    background-color: white;
362    vertical-align: top;
363    font-size: 12pt;
364  }
365
366  ul.toc a:nth-child(2)::after {
367    content: leader('.') target-counter(attr(href), page);
368  }
369 
370  ul.ind li li a {
371    content: target-counter(attr(href), page);
372  }
373 
374  .print2col {
375    column-count: 2;
376    -moz-column-count: 2;
377    column-fill: auto;
378  }
379}
380
381@page {
382  @top-left {
383       content: "Internet-Draft";
384  }
385  @top-right {
386       content: "November 2012";
387  }
388  @top-center {
389       content: "SPDY";
390  }
391  @bottom-left {
392       content: "Belshe, et al.";
393  }
394  @bottom-center {
395       content: "Expires May 10, 2013";
396  }
397  @bottom-right {
398       content: "[Page " counter(page) "]";
399  }
400}
401
402@page:first {
403    @top-left {
404      content: normal;
405    }
406    @top-right {
407      content: normal;
408    }
409    @top-center {
410      content: normal;
411    }
412}
413</style><link rel="Contents" href="#rfc.toc">
414      <link rel="Author" href="#rfc.authors">
415      <link rel="Copyright" href="#rfc.copyrightnotice">
416      <link rel="Index" href="#rfc.index">
417      <link rel="Chapter" title="1 Overview" href="#rfc.section.1">
418      <link rel="Chapter" title="2 SPDY Framing Layer" href="#rfc.section.2">
419      <link rel="Chapter" title="3 HTTP Layering over SPDY" href="#rfc.section.3">
420      <link rel="Chapter" title="4 Design Rationale and Notes" href="#rfc.section.4">
421      <link rel="Chapter" title="5 Security Considerations" href="#rfc.section.5">
422      <link rel="Chapter" title="6 Privacy Considerations" href="#rfc.section.6">
423      <link rel="Chapter" title="7 Incompatibilities with SPDY draft #2" href="#rfc.section.7">
424      <link rel="Chapter" title="8 Requirements Notation" href="#rfc.section.8">
425      <link rel="Chapter" title="9 Acknowledgements" href="#rfc.section.9">
426      <link rel="Chapter" href="#rfc.section.10" title="10 Normative References">
427      <link rel="Appendix" title="A Change Log (to be removed by RFC Editor before publication)" href="#rfc.section.A">
428      <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/">
429      <meta name="keywords" content="HTTP">
430      <link rel="schema.dct" href="http://purl.org/dc/terms/">
431      <meta name="dct.creator" content="Belshe, M.">
432      <meta name="dct.creator" content="Peon, R.">
433      <meta name="dct.creator" content="Thomson, M.">
434      <meta name="dct.identifier" content="urn:ietf:id:draft-ietf-httpbis-http2-latest">
435      <meta name="dct.issued" scheme="ISO8601" content="2012-11-06">
436      <meta name="dct.abstract" 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.">
437      <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.">
438   </head>
439   <body onload="init();">
440      <table class="header">
441         <tbody>
442            <tr>
443               <td class="left">HTTPbis Working Group</td>
444               <td class="right">M. Belshe</td>
445            </tr>
446            <tr>
447               <td class="left">Internet-Draft</td>
448               <td class="right">Twist</td>
449            </tr>
450            <tr>
451               <td class="left">Intended status: Informational</td>
452               <td class="right">R. Peon</td>
453            </tr>
454            <tr>
455               <td class="left">Expires: May 10, 2013</td>
456               <td class="right">Google, Inc</td>
457            </tr>
458            <tr>
459               <td class="left"></td>
460               <td class="right">M. Thomson, Editor</td>
461            </tr>
462            <tr>
463               <td class="left"></td>
464               <td class="right">Microsoft</td>
465            </tr>
466            <tr>
467               <td class="left"></td>
468               <td class="right">November 6, 2012</td>
469            </tr>
470         </tbody>
471      </table>
472      <p class="title">SPDY Protocol<br><span class="filename">draft-ietf-httpbis-http2-latest</span></p>
473      <h1 id="rfc.abstract"><a href="#rfc.abstract">Abstract</a></h1>
474      <p>This document describes SPDY, a protocol designed for low-latency transport of content over the World Wide Web. SPDY introduces
475         two layers of protocol. The lower layer is a general purpose framing layer which can be used atop a reliable transport (likely
476         TCP) for multiplexed, prioritized, and compressed data communication of many concurrent streams. The upper layer of the protocol
477         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.
478      </p>
479      <h1 id="rfc.note.1"><a href="#rfc.note.1">Editorial Note (To be removed by RFC Editor)</a></h1>
480      <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;.
481      </p> 
482      <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;.
483      </p> 
484      <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>.
485      </p>
486      <h1><a id="rfc.status" href="#rfc.status">Status of This Memo</a></h1>
487      <p>This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.</p>
488      <p>Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute
489         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>.
490      </p>
491      <p>Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other
492         documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as “work
493         in progress”.
494      </p>
495      <p>This Internet-Draft will expire on May 10, 2013.</p>
496      <h1><a id="rfc.copyrightnotice" href="#rfc.copyrightnotice">Copyright Notice</a></h1>
497      <p>Copyright © 2012 IETF Trust and the persons identified as the document authors. All rights reserved.</p>
498      <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
499         and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License
500         text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified
501         BSD License.
502      </p>
503      <hr class="noprint">
504      <h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1>
505      <ul class="toc">
506         <li><a href="#rfc.section.1">1.</a>&nbsp;&nbsp;&nbsp;<a href="#intro">Overview</a><ul>
507               <li><a href="#rfc.section.1.1">1.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.1.1">Document Organization</a></li>
508               <li><a href="#rfc.section.1.2">1.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.1.2">Definitions</a></li>
509            </ul>
510         </li>
511         <li><a href="#rfc.section.2">2.</a>&nbsp;&nbsp;&nbsp;<a href="#FramingLayer">SPDY Framing Layer</a><ul>
512               <li><a href="#rfc.section.2.1">2.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.2.1">Session (Connections)</a></li>
513               <li><a href="#rfc.section.2.2">2.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.2.2">Framing</a><ul>
514                     <li><a href="#rfc.section.2.2.1">2.2.1</a>&nbsp;&nbsp;&nbsp;<a href="#ControlFrames">Control frames</a></li>
515                     <li><a href="#rfc.section.2.2.2">2.2.2</a>&nbsp;&nbsp;&nbsp;<a href="#DataFrames">Data frames</a></li>
516                  </ul>
517               </li>
518               <li><a href="#rfc.section.2.3">2.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.2.3">Streams</a><ul>
519                     <li><a href="#rfc.section.2.3.1">2.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#StreamFrames">Stream frames</a></li>
520                     <li><a href="#rfc.section.2.3.2">2.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#StreamCreation">Stream creation</a><ul>
521                           <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>
522                           <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>
523                        </ul>
524                     </li>
525                     <li><a href="#rfc.section.2.3.3">2.3.3</a>&nbsp;&nbsp;&nbsp;<a href="#StreamPriority">Stream priority</a></li>
526                     <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>
527                     <li><a href="#rfc.section.2.3.5">2.3.5</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.2.3.5">Stream data exchange</a></li>
528                     <li><a href="#rfc.section.2.3.6">2.3.6</a>&nbsp;&nbsp;&nbsp;<a href="#StreamHalfClose">Stream half-close</a></li>
529                     <li><a href="#rfc.section.2.3.7">2.3.7</a>&nbsp;&nbsp;&nbsp;<a href="#StreamClose">Stream close</a></li>
530                  </ul>
531               </li>
532               <li><a href="#rfc.section.2.4">2.4</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.2.4">Error Handling</a><ul>
533                     <li><a href="#rfc.section.2.4.1">2.4.1</a>&nbsp;&nbsp;&nbsp;<a href="#SessionErrorHandler">Session Error Handling</a></li>
534                     <li><a href="#rfc.section.2.4.2">2.4.2</a>&nbsp;&nbsp;&nbsp;<a href="#StreamErrorHandler">Stream Error Handling</a></li>
535                  </ul>
536               </li>
537               <li><a href="#rfc.section.2.5">2.5</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.2.5">Data flow</a></li>
538               <li><a href="#rfc.section.2.6">2.6</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.2.6">Control frame types</a><ul>
539                     <li><a href="#rfc.section.2.6.1">2.6.1</a>&nbsp;&nbsp;&nbsp;<a href="#SYN_STREAM">SYN_STREAM</a></li>
540                     <li><a href="#rfc.section.2.6.2">2.6.2</a>&nbsp;&nbsp;&nbsp;<a href="#SYN_REPLY">SYN_REPLY</a></li>
541                     <li><a href="#rfc.section.2.6.3">2.6.3</a>&nbsp;&nbsp;&nbsp;<a href="#RST_STREAM">RST_STREAM</a></li>
542                     <li><a href="#rfc.section.2.6.4">2.6.4</a>&nbsp;&nbsp;&nbsp;<a href="#SETTINGS">SETTINGS</a></li>
543                     <li><a href="#rfc.section.2.6.5">2.6.5</a>&nbsp;&nbsp;&nbsp;<a href="#PING">PING</a></li>
544                     <li><a href="#rfc.section.2.6.6">2.6.6</a>&nbsp;&nbsp;&nbsp;<a href="#GOAWAY">GOAWAY</a></li>
545                     <li><a href="#rfc.section.2.6.7">2.6.7</a>&nbsp;&nbsp;&nbsp;<a href="#HEADERS">HEADERS</a></li>
546                     <li><a href="#rfc.section.2.6.8">2.6.8</a>&nbsp;&nbsp;&nbsp;<a href="#WINDOW_UPDATE">WINDOW_UPDATE</a></li>
547                     <li><a href="#rfc.section.2.6.9">2.6.9</a>&nbsp;&nbsp;&nbsp;<a href="#CREDENTIAL">CREDENTIAL</a></li>
548                     <li><a href="#rfc.section.2.6.10">2.6.10</a>&nbsp;&nbsp;&nbsp;<a href="#HeaderBlock">Name/Value Header Block</a><ul>
549                           <li><a href="#rfc.section.2.6.10.1">2.6.10.1</a>&nbsp;&nbsp;&nbsp;<a href="#Compression">Compression</a></li>
550                        </ul>
551                     </li>
552                  </ul>
553               </li>
554            </ul>
555         </li>
556         <li><a href="#rfc.section.3">3.</a>&nbsp;&nbsp;&nbsp;<a href="#HTTPLayer">HTTP Layering over SPDY</a><ul>
557               <li><a href="#rfc.section.3.1">3.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.1">Connection Management</a><ul>
558                     <li><a href="#rfc.section.3.1.1">3.1.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.1.1">Use of GOAWAY</a></li>
559                  </ul>
560               </li>
561               <li><a href="#rfc.section.3.2">3.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.2">HTTP Request/Response</a><ul>
562                     <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>
563                     <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>
564                     <li><a href="#rfc.section.3.2.3">3.2.3</a>&nbsp;&nbsp;&nbsp;<a href="#Authentication">Authentication</a><ul>
565                           <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>
566                           <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>
567                        </ul>
568                     </li>
569                  </ul>
570               </li>
571               <li><a href="#rfc.section.3.3">3.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.3">Server Push Transactions</a><ul>
572                     <li><a href="#rfc.section.3.3.1">3.3.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.3.1">Server implementation</a></li>
573                     <li><a href="#rfc.section.3.3.2">3.3.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.3.3.2">Client implementation</a></li>
574                  </ul>
575               </li>
576            </ul>
577         </li>
578         <li><a href="#rfc.section.4">4.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4">Design Rationale and Notes</a><ul>
579               <li><a href="#rfc.section.4.1">4.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.1">Separation of Framing Layer and Application Layer</a></li>
580               <li><a href="#rfc.section.4.2">4.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.2">Error handling - Framing Layer</a></li>
581               <li><a href="#rfc.section.4.3">4.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.3">One Connection Per Domain</a></li>
582               <li><a href="#rfc.section.4.4">4.4</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.4">Fixed vs Variable Length Fields</a></li>
583               <li><a href="#rfc.section.4.5">4.5</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.5">Compression Context(s)</a></li>
584               <li><a href="#rfc.section.4.6">4.6</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.6">Unidirectional streams</a></li>
585               <li><a href="#rfc.section.4.7">4.7</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.7">Data Compression</a></li>
586               <li><a href="#rfc.section.4.8">4.8</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.4.8">Server Push</a></li>
587            </ul>
588         </li>
589         <li><a href="#rfc.section.5">5.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5">Security Considerations</a><ul>
590               <li><a href="#rfc.section.5.1">5.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5.1">Use of Same-origin constraints</a></li>
591               <li><a href="#rfc.section.5.2">5.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5.2">HTTP Headers and SPDY Headers</a></li>
592               <li><a href="#rfc.section.5.3">5.3</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5.3">Cross-Protocol Attacks</a></li>
593               <li><a href="#rfc.section.5.4">5.4</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.5.4">Server Push Implicit Headers</a></li>
594            </ul>
595         </li>
596         <li><a href="#rfc.section.6">6.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.6">Privacy Considerations</a><ul>
597               <li><a href="#rfc.section.6.1">6.1</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.6.1">Long Lived Connections</a></li>
598               <li><a href="#rfc.section.6.2">6.2</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.6.2">SETTINGS frame</a></li>
599            </ul>
600         </li>
601         <li><a href="#rfc.section.7">7.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.7">Incompatibilities with SPDY draft #2</a></li>
602         <li><a href="#rfc.section.8">8.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.8">Requirements Notation</a></li>
603         <li><a href="#rfc.section.9">9.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.section.9">Acknowledgements</a></li>
604         <li><a href="#rfc.section.10">10.</a>&nbsp;&nbsp;&nbsp;<a href="#rfc.references">Normative References</a></li>
605         <li><a href="#rfc.authors">Authors' Addresses</a></li>
606         <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>
607               <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>
608            </ul>
609         </li>
610         <li><a href="#rfc.index">Index</a></li>
611      </ul>
612      <h1 id="rfc.section.1" class="np"><a href="#rfc.section.1">1.</a>&nbsp;<a id="intro" href="#intro">Overview</a></h1>
613      <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
614         problems, including additional round trips for connection setup, slow-start delays, and connection rationing by the client,
615         where it tries to avoid opening too many connections to any single server. HTTP pipelining helps some, but only achieves partial
616         multiplexing. In addition, pipelining has proven non-deployable in existing browsers due to intermediary interference.
617      </p>
618      <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
619         stream). The framing layer is optimized for HTTP-like request-response streams, such that applications which run over HTTP
620         today can work over SPDY with little or no change on behalf of the web application writer.
621      </p>
622      <p id="rfc.section.1.p.3">The SPDY session offers four improvements over HTTP: </p>
623      <ul class="empty">
624         <li>Multiplexed requests: There is no limit to the number of requests that can be issued concurrently over a single SPDY connection.</li>
625         <li>Prioritized requests: Clients can request certain resources to be delivered first. This avoids the problem of congesting the
626            network channel with non-critical resources when a high-priority request is pending.
627         </li>
628         <li>Compressed headers: Clients today send a significant amount of redundant data in the form of HTTP headers. Because a single
629            web page may require 50 or 100 subrequests, this data is significant.
630         </li>
631         <li>Server pushed streams: Server Push enables content to be pushed from servers to clients without a request.</li>
632      </ul>
633      <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
634         negotiations, etc work as they do with HTTP; SPDY only replaces the way the data is written to the network.
635      </p>
636      <h2 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1</a>&nbsp;Document Organization
637      </h2>
638      <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
639         framing layer concepts are isolated from the HTTP layer, building a generic framing layer has not been a goal. The framing
640         layer is tailored to the needs of the HTTP protocol and server push.
641      </p>
642      <h2 id="rfc.section.1.2"><a href="#rfc.section.1.2">1.2</a>&nbsp;Definitions
643      </h2>
644      <p id="rfc.section.1.2.p.1"> </p>
645      <ul class="empty">
646         <li>client: The endpoint initiating the SPDY session.</li>
647         <li>connection: A transport-level connection between two endpoints.</li>
648         <li>endpoint: Either the client or server of a connection.</li>
649         <li>frame: A header-prefixed sequence of bytes sent over a SPDY session.</li>
650         <li>server: The endpoint which did not initiate the SPDY session.</li>
651         <li>session: A synonym for a connection.</li>
652         <li>session error: An error on the SPDY session.</li>
653         <li>stream: A bi-directional flow of bytes across a virtual channel within a SPDY session.</li>
654         <li>stream error: An error on an individual SPDY stream.</li>
655      </ul>
656      <h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a>&nbsp;<a id="FramingLayer" href="#FramingLayer">SPDY Framing Layer</a></h1>
657      <h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a>&nbsp;Session (Connections)
658      </h2>
659      <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.
660      </p>
661      <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
662         pages referencing a connection, or until the server closes the connection. Servers are encouraged to leave connections open
663         for as long as possible, but can terminate idle connections if necessary. When either endpoint closes the transport-level
664         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.
665      </p>
666      <h2 id="rfc.section.2.2"><a href="#rfc.section.2.2">2.2</a>&nbsp;Framing
667      </h2>
668      <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.
669      </p>
670      <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
671         number, a frame type, flags, and a length. Data frames contain the stream ID, flags, and the length for the payload carried
672         after the common header. The simple header is designed to make reading and writing of frames easy.
673      </p>
674      <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
675         in dynamically sized frames.
676      </p>
677      <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>
678      <div id="rfc.figure.u.1"></div> <pre>+----------------------------------+
679|C| Version(15bits) | Type(16bits) |
680+----------------------------------+
681| Flags (8)  |  Length (24 bits)   |
682+----------------------------------+
683|               Data               |
684+----------------------------------+
685  </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
686         1.
687      </p>
688      <p id="rfc.section.2.2.1.p.3">Version: The version number of the SPDY protocol. This document describes SPDY version 3.</p>
689      <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>
690      <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>
691      <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>
692      <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>
693      <p id="rfc.section.2.2.1.p.8">Control frame processing requirements: </p>
694      <ul class="empty">
695         <li>Note that full length control frames (16MB) can be large for implementations running on resource-limited hardware. In such
696            cases, implementations MAY limit the maximum length frame supported. However, all implementations MUST be able to receive
697            control frames of at least 8192 octets in length.
698         </li>
699      </ul>
700      <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>
701      <div id="rfc.figure.u.2"></div> <pre>+----------------------------------+
702|C|       Stream-ID (31bits)       |
703+----------------------------------+
704| Flags (8)  |  Length (24 bits)   |
705+----------------------------------+
706|               Data               |
707+----------------------------------+
708  </pre> <p id="rfc.section.2.2.2.p.2">Control bit: For data frames this value is always 0.</p>
709      <p id="rfc.section.2.2.2.p.3">Stream-ID: A 31-bit value identifying the stream.</p>
710      <p id="rfc.section.2.2.2.p.4">Flags: Flags related to this frame. Valid flags are: </p>
711      <ul class="empty">
712         <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.
713         </li>
714         <li>0x02 = FLAG_COMPRESS - indicates that the data in this frame has been compressed.</li>
715      </ul>
716      <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
717         8 bytes + length. It is valid to have a zero-length data frame.
718      </p>
719      <p id="rfc.section.2.2.2.p.6">Data: The variable-length data payload; the length was defined in the length field.</p>
720      <p id="rfc.section.2.2.2.p.7">Data frame processing requirements: </p>
721      <ul class="empty">
722         <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.
723         </li>
724         <li>If the endpoint which created the stream receives a data frame before receiving a SYN_REPLY on that stream, it is a protocol
725            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.
726         </li>
727         <li>Implementors note: If an endpoint receives multiple data frames for invalid stream-ids, it MAY close the session.</li>
728         <li>All SPDY endpoints MUST accept compressed data frames. Compression of data frames is always done using zlib compression. Each
729            stream initializes and uses its own compression context dedicated to use within that stream. Endpoints are encouraged to use
730            application level compression rather than SPDY stream level compression.
731         </li>
732         <li>Each SPDY stream sending compressed frames creates its own zlib context for that stream, and these compression contexts MUST
733            be distinct from the compression contexts used with SYN_STREAM/SYN_REPLY/HEADER compression. (Thus, if both endpoints of a
734            stream are compressing data on the stream, there will be two zlib contexts, one for sending and one for receiving).
735         </li>
736      </ul>
737      <h2 id="rfc.section.2.3"><a href="#rfc.section.2.3">2.3</a>&nbsp;Streams
738      </h2>
739      <p id="rfc.section.2.3.p.1">Streams are independent sequences of bi-directional data divided into frames with several properties: </p>
740      <ul class="empty">
741         <li>Streams may be created by either the client or server.</li>
742         <li>Streams optionally carry a set of name/value header pairs.</li>
743         <li>Streams can concurrently send data interleaved with other streams.</li>
744         <li>Streams may be cancelled.</li>
745      </ul>
746      <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>
747      <p id="rfc.section.2.3.1.p.1">SPDY defines 3 control frames to manage the lifecycle of a stream: </p>
748      <ul class="empty">
749         <li>SYN_STREAM - Open a new stream</li>
750         <li>SYN_REPLY - Remote acknowledgement of a new, open stream</li>
751         <li>RST_STREAM - Close a stream</li>
752      </ul>
753      <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>
754      <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
755         must be odd. 0 is not a valid Stream-ID. Stream-IDs from each side of the connection must increase monotonically as new streams
756         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
757         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.
758      </p>
759      <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
760         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.
761      </p>
762      <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
763         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.
764      </p>
765      <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
766         that stream which cannot be immediately stopped.
767      </p>
768      <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
769         for the recipient to acknowledge.
770      </p>
771      <h4 id="rfc.section.2.3.2.1"><a href="#rfc.section.2.3.2.1">2.3.2.1</a>&nbsp;Unidirectional streams
772      </h4>
773      <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
774         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.
775      </p>
776      <h4 id="rfc.section.2.3.2.2"><a href="#rfc.section.2.3.2.2">2.3.2.2</a>&nbsp;Bidirectional streams
777      </h4>
778      <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
779         a bi-directional stream.
780      </p>
781      <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>
782      <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
783         the highest priority and 7 represents the lowest priority.
784      </p>
785      <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>
786      <h3 id="rfc.section.2.3.4"><a href="#rfc.section.2.3.4">2.3.4</a>&nbsp;Stream headers
787      </h3>
788      <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,
789         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
790         HEADERS frames may be interleaved with data frames.
791      </p>
792      <h3 id="rfc.section.2.3.5"><a href="#rfc.section.2.3.5">2.3.5</a>&nbsp;Stream data exchange
793      </h3>
794      <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
795         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.
796      </p>
797      <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>
798      <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
799         of the FLAG_FIN MUST NOT send further frames on that stream. When both sides have half-closed, the stream is closed.
800      </p>
801      <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
802         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.
803      </p>
804      <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>
805      <p id="rfc.section.2.3.7.p.1">There are 3 ways that streams can be terminated: </p>
806      <ul class="empty">
807         <li>Normal termination: Normal stream termination occurs when both sender and recipient have half-closed the stream by sending
808            a FLAG_FIN.
809         </li>
810         <li>Abrupt termination: Either the client or server can send a RST_STREAM control frame at any time. A RST_STREAM contains an
811            error code to indicate the reason for failure. When a RST_STREAM is sent from the stream originator, it indicates a failure
812            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,
813            the sender, upon receipt, should stop sending any data on the stream. The stream recipient should be aware that there is a
814            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>)
815         </li>
816         <li>TCP connection teardown: If the TCP connection is torn down while un-closed streams exist, then the endpoint must assume that
817            the stream was abnormally interrupted and may be incomplete.
818         </li>
819      </ul>
820      <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>
821      <h2 id="rfc.section.2.4"><a href="#rfc.section.2.4">2.4</a>&nbsp;Error Handling
822      </h2>
823      <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
824         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>.
825      </p>
826      <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>
827      <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
828         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
829         is terminating. After sending the GOAWAY frame, the endpoint MUST close the TCP connection.
830      </p>
831      <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
832         partially processes a frame containing compressed data without updating compression state properly, future control frames
833         which use compression will be always be errored. Implementations SHOULD always try to process compressed data so that errors
834         which could be handled as stream errors do not become session errors.
835      </p>
836      <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
837         by the receiving endpoint. It is a best-effort attempt to communicate with the remote about why the session is going down.
838      </p>
839      <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>
840      <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
841         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
842         sending the RST_STREAM, the stream is closed to the sending endpoint. After sending the RST_STREAM, if the sender receives
843         any frames other than a RST_STREAM for that stream id, it will result in sending additional RST_STREAM frames. An endpoint
844         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
845         does not cause the SPDY session to be closed.
846      </p>
847      <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
848         coalesce them into a single RST_STREAM frame. (This can happen if a stream is closed, but the remote sends multiple data frames.
849         There is no reason to send a RST_STREAM for each frame in succession).
850      </p>
851      <h2 id="rfc.section.2.5"><a href="#rfc.section.2.5">2.5</a>&nbsp;Data flow
852      </h2>
853      <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
854         intelligently interleave data messages for concurrent sessions.
855      </p>
856      <h2 id="rfc.section.2.6"><a href="#rfc.section.2.6">2.6</a>&nbsp;Control frame types
857      </h2>
858      <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>
859      <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>)
860      </p>
861      <div id="rfc.figure.u.3"></div> <pre>+------------------------------------+
862|1|    version    |         1        |
863+------------------------------------+
864|  Flags (8)  |  Length (24 bits)    |
865+------------------------------------+
866|X|           Stream-ID (31bits)     |
867+------------------------------------+
868|X| Associated-To-Stream-ID (31bits) |
869+------------------------------------+
870| Pri|Unused | Slot |                |
871+-------------------+                |
872| Number of Name/Value pairs (int32) |   &lt;+
873+------------------------------------+    |
874|     Length of name (int32)         |    | This section is the "Name/Value
875+------------------------------------+    | Header Block", and is compressed.
876|           Name (string)            |    |
877+------------------------------------+    |
878|     Length of value  (int32)       |    |
879+------------------------------------+    |
880|          Value   (string)          |    |
881+------------------------------------+    |
882|           (repeats)                |   &lt;+
883            </pre> <p id="rfc.section.2.6.1.p.3">Flags: Flags related to this frame. Valid flags are: </p>
884      <ul class="empty">
885         <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.
886         </li>
887         <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.
888         </li>
889      </ul>
890      <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
891         plus the length of the compressed Name/Value block.
892      </p>
893      <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>
894      <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
895         of all other streams, it should be 0.
896      </p>
897      <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.
898      </p>
899      <p id="rfc.section.2.6.1.p.8">Unused: 5 bits of unused space, reserved for future use.</p>
900      <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
901         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.
902      </p>
903      <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>).
904      </p>
905      <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
906         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>).
907      </p>
908      <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>
909      <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>
910      <div id="rfc.figure.u.4"></div> <pre>+------------------------------------+
911|1|    version    |         2        |
912+------------------------------------+
913|  Flags (8)  |  Length (24 bits)    |
914+------------------------------------+
915|X|           Stream-ID (31bits)     |
916+------------------------------------+
917| Number of Name/Value pairs (int32) |   &lt;+
918+------------------------------------+    |
919|     Length of name (int32)         |    | This section is the "Name/Value
920+------------------------------------+    | Header Block", and is compressed.
921|           Name (string)            |    |
922+------------------------------------+    |
923|     Length of value  (int32)       |    |
924+------------------------------------+    |
925|          Value   (string)          |    |
926+------------------------------------+    |
927|           (repeats)                |   &lt;+
928            </pre> <p id="rfc.section.2.6.2.p.3">Flags: Flags related to this frame. Valid flags are: </p>
929      <ul class="empty">
930         <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.
931         </li>
932      </ul>
933      <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
934         plus the length of the compressed Name/Value block.
935      </p>
936      <p id="rfc.section.2.6.2.p.5">Stream-ID: The 31-bit identifier for this stream.</p>
937      <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.
938      </p>
939      <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>).
940      </p>
941      <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
942         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>).
943      </p>
944      <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>
945      <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
946         wishes to cancel the stream. When sent by the recipient of a stream, it indicates an error or that the recipient did not want
947         to accept the stream, so the stream should be closed.
948      </p>
949      <div id="rfc.figure.u.5"></div> <pre>+----------------------------------+
950|1|   version    |         3       |
951+----------------------------------+
952| Flags (8)  |         8           |
953+----------------------------------+
954|X|          Stream-ID (31bits)    |
955+----------------------------------+
956|          Status code             |
957+----------------------------------+
958            </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>
959      <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
960         value is always 8.
961      </p>
962      <p id="rfc.section.2.6.3.p.5">Stream-ID: The 31-bit identifier for this stream.</p>
963      <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>
964      <ul class="empty">
965         <li>1 - PROTOCOL_ERROR. This is a generic error, and should only be used if a more specific error is not available.</li>
966         <li>2 - INVALID_STREAM. This is returned when a frame is received for a stream which is not active.</li>
967         <li>3 - REFUSED_STREAM. Indicates that the stream was refused before any processing has been done on the stream.</li>
968         <li>4 - UNSUPPORTED_VERSION. Indicates that the recipient of a stream does not support the SPDY version requested.</li>
969         <li>5 - CANCEL. Used by the creator of a stream to indicate that the stream is no longer needed.</li>
970         <li>6 - INTERNAL_ERROR. This is a generic error which can be used when the implementation has internally failed, not due to anything
971            in the protocol.
972         </li>
973         <li>7 - FLOW_CONTROL_ERROR. The endpoint detected that its peer violated the flow control protocol.</li>
974         <li>8 - STREAM_IN_USE. The endpoint received a SYN_REPLY for a stream already open.</li>
975         <li>9 - STREAM_ALREADY_CLOSED. The endpoint received a data or SYN_REPLY frame for a stream which is half closed.</li>
976         <li>10 - INVALID_CREDENTIALS. The server received a request for a resource whose origin does not have valid credentials in the
977            client certificate vector.
978         </li>
979         <li>11 - FRAME_TOO_LARGE. The endpoint received a frame which this implementation could not support. If FRAME_TOO_LARGE is sent
980            for a SYN_STREAM, HEADERS, or SYN_REPLY frame without fully processing the compressed portion of those frames, then the compression
981            state will be out-of-sync with the other endpoint. In this case, senders of FRAME_TOO_LARGE MUST close the session.
982         </li>
983         <li>Note: 0 is not a valid status code for a RST_STREAM.</li>
984      </ul>
985      <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
986         into the closed state.
987      </p>
988      <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>
989      <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.
990         SETTINGS frames can be sent at any time by either endpoint, are optionally sent, and are fully asynchronous. When the server
991         is the sender, the sender can request that configuration data be persisted by the client across SPDY sessions and returned
992         to the server in future communications.
993      </p>
994      <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
995         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
996         the persisted settings on future connections to the same origin AND IP address and TCP port. Clients MUST NOT request servers
997         to use the persistence features of the SETTINGS frames, and servers MUST ignore persistence related flags sent by a client.
998      </p>
999      <div id="rfc.figure.u.6"></div> <pre>+----------------------------------+
1000|1|   version    |         4       |
1001+----------------------------------+
1002| Flags (8)  |  Length (24 bits)   |
1003+----------------------------------+
1004|         Number of entries        |
1005+----------------------------------+
1006|          ID/Value Pairs          |
1007|             ...                  |
1008            </pre> <p id="rfc.section.2.6.4.p.4">Control bit: The control bit is always 1 for this message.</p>
1009      <p id="rfc.section.2.6.4.p.5">Version: The SPDY version number.</p>
1010      <p id="rfc.section.2.6.4.p.6">Type: The message type for a SETTINGS message is 4.</p>
1011      <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.
1012         If this frame contains ID/Value pairs with the FLAG_SETTINGS_PERSIST_VALUE set, then the client will first clear its existing,
1013         persisted settings, and then persist the values with the flag set which are contained within this frame. Because persistence
1014         is only implemented on the client, this flag can only be used when the sender is the server.
1015      </p>
1016      <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
1017         is 8 bytes + length.
1018      </p>
1019      <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>
1020      <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>
1021      <ul class="empty">
1022         <li>ID.flags:
1023            <ul class="empty">
1024               <li>FLAG_SETTINGS_PERSIST_VALUE (0x1): When set, the sender of this SETTINGS frame is requesting that the recipient persist the
1025                  ID/Value and return it in future SETTINGS frames sent from the sender to this recipient. Because persistence is only implemented
1026                  on the client, this flag is only sent by the server.
1027               </li>
1028               <li>FLAG_SETTINGS_PERSISTED (0x2): When set, the sender is notifying the recipient that this ID/Value pair was previously sent
1029                  to the sender by the recipient with the FLAG_SETTINGS_PERSIST_VALUE, and the sender is returning it. Because persistence is
1030                  only implemented on the client, this flag is only sent by the client.
1031               </li>
1032            </ul>
1033         </li>
1034         <li>Defined IDs:
1035            <ul class="empty">
1036               <li>1 - SETTINGS_UPLOAD_BANDWIDTH allows the sender to send its expected upload bandwidth on this channel. This number is an estimate.
1037                  The value should be the integral number of kilobytes per second that the sender predicts as an expected maximum upload channel
1038                  capacity.
1039               </li>
1040               <li>2 - SETTINGS_DOWNLOAD_BANDWIDTH allows the sender to send its expected download bandwidth on this channel. This number is
1041                  an estimate. The value should be the integral number of kilobytes per second that the sender predicts as an expected maximum
1042                  download channel capacity.
1043               </li>
1044               <li>3 - SETTINGS_ROUND_TRIP_TIME allows the sender to send its expected round-trip-time on this channel. The round trip time is
1045                  defined as the minimum amount of time to send a control frame from this client to the remote and receive a response. The value
1046                  is represented in milliseconds.
1047               </li>
1048               <li>4 - SETTINGS_MAX_CONCURRENT_STREAMS allows the sender to inform the remote endpoint the maximum number of concurrent streams
1049                  which it will allow. By default there is no limit. For implementors it is recommended that this value be no smaller than 100.
1050               </li>
1051               <li>5 - SETTINGS_CURRENT_CWND allows the sender to inform the remote endpoint of the current TCP CWND value.</li>
1052               <li>6 - SETTINGS_DOWNLOAD_RETRANS_RATE allows the sender to inform the remote endpoint the retransmission rate (bytes retransmitted
1053                  / total bytes transmitted).
1054               </li>
1055               <li>7 - SETTINGS_INITIAL_WINDOW_SIZE allows the sender to inform the remote endpoint the initial window size (in bytes) for new
1056                  streams.
1057               </li>
1058               <li>8 - SETTINGS_CLIENT_CERTIFICATE_VECTOR_SIZE allows the server to inform the client if the new size of the client certificate
1059                  vector.
1060               </li>
1061            </ul>
1062         </li>
1063      </ul>
1064      <p id="rfc.section.2.6.4.p.11">Value: A 32-bit value.</p>
1065      <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
1066         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
1067         ID/value pairs are sent, they should be sent in order of lowest id to highest id. A single SETTINGS frame MUST not contain
1068         multiple values for the same ID. If the recipient of a SETTINGS frame discovers multiple values for the same ID, it MUST ignore
1069         all values except the first one.
1070      </p>
1071      <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
1072         most recent value overrides any previously sent values. If the server sends IDs 1, 2, and 3 with the FLAG_SETTINGS_PERSIST_VALUE
1073         in a first SETTINGS frame, and then sends IDs 4 and 5 with the FLAG_SETTINGS_PERSIST_VALUE, when the client returns the persisted
1074         state on its next SETTINGS frame, it SHOULD send all 5 settings (1, 2, 3, 4, and 5 in this example) to the server.
1075      </p>
1076      <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>
1077      <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
1078         or the server. Recipients of a PING frame should send an identical frame to the sender as soon as possible (if there is other
1079         pending data waiting to be sent, PING should take highest priority). Each ping sent by a sender should use a unique ID.
1080      </p>
1081      <div id="rfc.figure.u.7"></div> <pre>+----------------------------------+
1082|1|   version    |         6       |
1083+----------------------------------+
1084| 0 (flags) |     4 (length)       |
1085+----------------------------------|
1086|            32-bit ID             |
1087+----------------------------------+
1088            </pre> <p id="rfc.section.2.6.5.p.3">Control bit: The control bit is always 1 for this message.</p>
1089      <p id="rfc.section.2.6.5.p.4">Version: The SPDY version number.</p>
1090      <p id="rfc.section.2.6.5.p.5">Type: The message type for a PING message is 6.</p>
1091      <p id="rfc.section.2.6.5.p.6">Length: This frame is always 4 bytes long.</p>
1092      <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
1093         numbered ID. When the server initiates a ping, it must use an even numbered ping. Use of odd/even IDs is required in order
1094         to avoid accidental looping on PINGs (where each side initiates an identical PING at the same time).
1095      </p>
1096      <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>
1097      <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
1098         numbered PING which it did not initiate, it must ignore the PING.
1099      </p>
1100      <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>
1101      <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.
1102         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.
1103         Recipients of a GOAWAY frame must not send additional streams on this session, although a new session can be established for
1104         new streams. The purpose of this message is to allow an endpoint to gracefully stop accepting new streams (perhaps for a reboot
1105         or maintenance), while still finishing processing of previously established streams.
1106      </p>
1107      <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
1108         with this case, the GOAWAY contains a last-stream-id indicating the stream-id of the last stream which was created on the
1109         sending endpoint in this session. If the receiver of the GOAWAY sent new SYN_STREAMs for sessions after this last-stream-id,
1110         they were not processed by the server and the receiver may treat the stream as though it had never been created at all (hence
1111         the receiver may want to re-create the stream later on a new session).
1112      </p>
1113      <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
1114         been partially processed or not. (For example, if an HTTP client sends a POST at the same time that a server closes a connection,
1115         the client cannot know if the server started to process that POST request if the server does not send a GOAWAY frame to indicate
1116         where it stopped working).
1117      </p>
1118      <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>
1119      <div id="rfc.figure.u.8"></div> <pre>+----------------------------------+
1120|1|   version    |         7       |
1121+----------------------------------+
1122| 0 (flags) |     8 (length)       |
1123+----------------------------------|
1124|X|  Last-good-stream-ID (31 bits) |
1125+----------------------------------+
1126|          Status code             |
1127+----------------------------------+
1128            </pre> <p id="rfc.section.2.6.6.p.6">Control bit: The control bit is always 1 for this message.</p>
1129      <p id="rfc.section.2.6.6.p.7">Version: The SPDY version number.</p>
1130      <p id="rfc.section.2.6.6.p.8">Type: The message type for a GOAWAY message is 7.</p>
1131      <p id="rfc.section.2.6.6.p.9">Length: This frame is always 8 bytes long.</p>
1132      <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
1133         GOAWAY message. If no streams were replied to, this value MUST be 0.
1134      </p>
1135      <p id="rfc.section.2.6.6.p.11">Status: The reason for closing the session. </p>
1136      <ul class="empty">
1137         <li>0 - OK. This is a normal session teardown.</li>
1138         <li>1 - PROTOCOL_ERROR. This is a generic error, and should only be used if a more specific error is not available.</li>
1139         <li>11 - INTERNAL_ERROR. This is a generic error which can be used when the implementation has internally failed, not due to anything
1140            in the protocol.
1141         </li>
1142      </ul>
1143      <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>
1144      <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.
1145         Specific application of the headers in this frame is application-dependent. The name/value header block within this frame
1146         is compressed.
1147      </p>
1148      <div id="rfc.figure.u.9"></div> <pre>+------------------------------------+
1149|1|   version     |          8       |
1150+------------------------------------+
1151| Flags (8)  |   Length (24 bits)    |
1152+------------------------------------+
1153|X|          Stream-ID (31bits)      |
1154+------------------------------------+
1155| Number of Name/Value pairs (int32) |   &lt;+
1156+------------------------------------+    |
1157|     Length of name (int32)         |    | This section is the "Name/Value
1158+------------------------------------+    | Header Block", and is compressed.
1159|           Name (string)            |    |
1160+------------------------------------+    |
1161|     Length of value  (int32)       |    |
1162+------------------------------------+    |
1163|          Value   (string)          |    |
1164+------------------------------------+    |
1165|           (repeats)                |   &lt;+
1166            </pre> <p id="rfc.section.2.6.7.p.3">Flags: Flags related to this frame. Valid flags are: </p>
1167      <ul class="empty">
1168         <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.
1169         </li>
1170      </ul>
1171      <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
1172         field is 4 (when the number of name value pairs is 0).
1173      </p>
1174      <p id="rfc.section.2.6.7.p.5">Stream-ID: The stream this HEADERS block is associated with.</p>
1175      <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>).
1176      </p>
1177      <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>
1178      <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
1179         is, only between the two endpoints of a SPDY connection. If there are one or more intermediaries between the client and the
1180         origin server, flow control signals are not explicitly forwarded by the intermediaries. (However, throttling of data transfer
1181         by any recipient may have the effect of indirectly propagating flow control information upstream back to the original sender.)
1182         Flow control only applies to the data portion of data frames. Recipients must buffer all control frames. If a recipient fails
1183         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.
1184      </p>
1185      <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
1186         is a simple uint32 that indicates how many bytes of data the sender can transmit. After a stream is created, but before any
1187         data frames have been transmitted, the sender begins with the initial window size. This window size is a measure of the buffering
1188         capability of the recipient. The sender must not send a data frame with data length greater than the transfer window size.
1189         After sending each data frame, the sender decrements its transfer window size by the amount of data transmitted. When the
1190         window size becomes less than or equal to 0, the sender must pause transmitting data frames. At the other end of the stream,
1191         the recipient sends a WINDOW_UPDATE control back to notify the sender that it has consumed some data and freed up buffer space
1192         to receive more data.
1193      </p>
1194      <div id="rfc.figure.u.10"></div> <pre>+----------------------------------+
1195|1|   version    |         9       |
1196+----------------------------------+
1197| 0 (flags) |     8 (length)       |
1198+----------------------------------+
1199|X|     Stream-ID (31-bits)        |
1200+----------------------------------+
1201|X|  Delta-Window-Size (31-bits)   |
1202+----------------------------------+
1203            </pre> <p id="rfc.section.2.6.8.p.4">Control bit: The control bit is always 1 for this message.</p>
1204      <p id="rfc.section.2.6.8.p.5">Version: The SPDY version number.</p>
1205      <p id="rfc.section.2.6.8.p.6">Type: The message type for a WINDOW_UPDATE message is 9.</p>
1206      <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>
1207      <p id="rfc.section.2.6.8.p.8">Stream-ID: The stream ID that this WINDOW_UPDATE control frame is for.</p>
1208      <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.
1209         The legal range for this field is 1 to 2^31 - 1 (0x7fffffff) bytes.
1210      </p>
1211      <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
1212         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
1213         to terminate the stream.
1214      </p>
1215      <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
1216         the SETTINGS control frame to adjust the initial window size for the connection. That is, its peer can start out using the
1217         64KB default initial window size when sending data frames before receiving the SETTINGS. Because SETTINGS is asynchronous,
1218         there may be a race condition if the recipient wants to decrease the initial window size, but its peer immediately sends 64KB
1219         on the creation of a new connection, before waiting for the SETTINGS to arrive. This is one case where the window size kept
1220         by the sender will become negative. Once the sender detects this condition, it must stop sending data frames and wait for
1221         the recipient to catch up. The recipient has two choices:
1222      </p>
1223      <ul class="empty">
1224         <li>immediately send RST_STREAM with FLOW_CONTROL_ERROR status code.</li>
1225         <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
1226            the default initial window size), and send WINDOW_UPDATE as it consumes data.
1227         </li>
1228      </ul>
1229      <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,
1230         if the recipient sets the initial window size to be 16KB, and the sender sends 64KB immediately on connection establishment,
1231         the sender will discover its window size is -48KB on receipt of the SETTINGS. As the recipient consumes the first 16KB, it
1232         must send a WINDOW_UPDATE of 16KB back to the sender. This interaction continues until the sender's window size becomes positive
1233         again, and it can resume transmitting data frames.
1234      </p>
1235      <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
1236         frames as it consumes the last data frame. A sender should ignore all the WINDOW_UPDATE frames associated with the stream
1237         after it send the last frame for the stream.
1238      </p>
1239      <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
1240         each other. This property allows a recipient to aggressively update the window size kept by the sender to prevent the stream
1241         from stalling.
1242      </p>
1243      <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>
1244      <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
1245         decide to send requests for resources from different origins on the same SPDY session if it decides that that server handles
1246         both origins. For example if the IP address associated with both hostnames matches and the SSL server certificate presented
1247         in the initial handshake is valid for both hostnames. However, because the SSL connection can contain at most one client certificate,
1248         the client needs a mechanism to send additional client certificates to the server.
1249      </p>
1250      <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
1251         send a client certificate to the server, it will send a CREDENTIAL frame that specifies the index of the slot in which to
1252         store the certificate as well as proof that the client posesses the corresponding private key. The initial size of this vector
1253         must be 8. If the client provides a client certificate during the first TLS handshake, the contents of this certificate must
1254         be copied into the first slot (index 1) in the CREDENTIAL vector, though it may be overwritten by subsequent CREDENTIAL frames.
1255         The server must exclusively use the CREDNETIAL vector when evaluating the client certificates associated with an origin. The
1256         server may change the size of this vector by sending a SETTINGS frame with the setting SETTINGS_CLIENT_CERTIFICATE_VECTOR_SIZE
1257         value specified. In the event that the new size is smaller than the current size, truncation occurs preserving lower-index
1258         slots as possible.
1259      </p>
1260      <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,
1261         imagine that the client has 2 requests outstanding to the server for two different pages (in different tabs). When the renegotiation
1262         + client certificate request comes in, the browser is unable to determine which resource triggered the client certificate
1263         request, in order to prompt the user accordingly.
1264      </p>
1265      <div id="rfc.figure.u.11"></div> <pre>+----------------------------------+
1266|1|000000000000001|0000000000001011|
1267+----------------------------------+
1268| flags (8)  |  Length (24 bits)   |
1269+----------------------------------+
1270|  Slot (16 bits) |                |
1271+-----------------+                |
1272|      Proof Length (32 bits)      |
1273+----------------------------------+
1274|               Proof              |
1275+----------------------------------+ &lt;+
1276|   Certificate Length (32 bits)   |  |
1277+----------------------------------+  | Repeated until end of frame
1278|            Certificate           |  |
1279+----------------------------------+ &lt;+
1280            </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
1281         stored at this index, it will be overwritten. The index is one based, not zero based; zero is an invalid slot index.
1282      </p>
1283      <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
1284         a TLS digitally-signed element (http://tools.ietf.org/html/rfc5246#section-4.7). The signature algorithm must be the same
1285         as that used in the CertificateVerify message. However, since the MD5+SHA1 signature type used in TLS 1.0 connections can
1286         not be correctly encoded in a digitally-signed element, SHA1 must be used when MD5+SHA1 was used in the SSL connection. The
1287         signature is calculated over a 32 byte TLS extractor value (http://tools.ietf.org/html/rfc5705) with a label of "EXPORTER
1288         SPDY certificate proof" using the empty string as context. ForRSA certificates the signature would be a PKCS#1 v1.5 signature.
1289         For ECDSA, it would be an ECDSA-Sig-Value (http://tools.ietf.org/html/rfc5480#appendix-A). For a 1024-bit RSA key, the CREDENTIAL
1290         message would be ~500 bytes.
1291      </p>
1292      <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,
1293         followed by a DER encoded certificate. The certificate must be of the same type (RSA, ECDSA, etc) as the client certificate
1294         associated with the SSL connection.
1295      </p>
1296      <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
1297         a RST_STREAM frame with the status code INVALID_CREDENTIALS. Upon receipt of a RST_STREAM frame with INVALID_CREDENTIALS,
1298         the client should initiate a new stream directly to the requested origin and resend the request. Note, SPDY does not allow
1299         the server to request different client authentication for different resources in the same origin.
1300      </p>
1301      <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>
1302      <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>
1303      <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>
1304      <div id="rfc.figure.u.12"></div> <pre>+------------------------------------+
1305| Number of Name/Value pairs (int32) |
1306+------------------------------------+
1307|     Length of name (int32)         |
1308+------------------------------------+
1309|           Name (string)            |
1310+------------------------------------+
1311|     Length of value  (int32)       |
1312+------------------------------------+
1313|          Value   (string)          |
1314+------------------------------------+
1315|           (repeats)                |
1316            </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>
1317      <p id="rfc.section.2.6.10.p.4">List of Name/Value pairs: </p>
1318      <ul class="empty">
1319         <li>Length of Name: a 32-bit value containing the number of octets in the name field. Note that in practice, this length must
1320            not exceed 2^24, as that is the maximum size of a SPDY frame.
1321         </li>
1322         <li>Name: 0 or more octets, 8-bit sequences of data, excluding 0.</li>
1323         <li>Length of Value: a 32-bit value containing the number of octets in the value field. Note that in practice, this length must
1324            not exceed 2^24, as that is the maximum size of a SPDY frame.
1325         </li>
1326         <li>Value: 0 or more octets, 8-bit sequences of data, excluding 0.</li>
1327      </ul>
1328      <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
1329         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.
1330      </p>
1331      <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
1332         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,
1333         NUL-separated values, each with length greater than zero. The value never starts nor ends with a NUL character. Recipients
1334         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.
1335      </p>
1336      <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>
1337      <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.
1338         This block is always compressed using zlib compression. Within this specification, any reference to 'zlib' is referring to
1339         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>
1340      <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>:
1341      </p>
1342      <div id="rfc.figure.u.13"></div> <pre>const unsigned char SPDY_dictionary_txt[] = {
1343  0x00, 0x00, 0x00, 0x07, 0x6f, 0x70, 0x74, 0x69,   \\ - - - - o p t i
1344  0x6f, 0x6e, 0x73, 0x00, 0x00, 0x00, 0x04, 0x68,   \\ o n s - - - - h
1345  0x65, 0x61, 0x64, 0x00, 0x00, 0x00, 0x04, 0x70,   \\ e a d - - - - p
1346  0x6f, 0x73, 0x74, 0x00, 0x00, 0x00, 0x03, 0x70,   \\ o s t - - - - p
1347  0x75, 0x74, 0x00, 0x00, 0x00, 0x06, 0x64, 0x65,   \\ u t - - - - d e
1348  0x6c, 0x65, 0x74, 0x65, 0x00, 0x00, 0x00, 0x05,   \\ l e t e - - - -
1349  0x74, 0x72, 0x61, 0x63, 0x65, 0x00, 0x00, 0x00,   \\ t r a c e - - -
1350  0x06, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x00,   \\ - a c c e p t -
1351  0x00, 0x00, 0x0e, 0x61, 0x63, 0x63, 0x65, 0x70,   \\ - - - a c c e p
1352  0x74, 0x2d, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65,   \\ t - c h a r s e
1353  0x74, 0x00, 0x00, 0x00, 0x0f, 0x61, 0x63, 0x63,   \\ t - - - - a c c
1354  0x65, 0x70, 0x74, 0x2d, 0x65, 0x6e, 0x63, 0x6f,   \\ e p t - e n c o
1355  0x64, 0x69, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x0f,   \\ d i n g - - - -
1356  0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x6c,   \\ a c c e p t - l
1357  0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x00,   \\ a n g u a g e -
1358  0x00, 0x00, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x70,   \\ - - - a c c e p
1359  0x74, 0x2d, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73,   \\ t - r a n g e s
1360  0x00, 0x00, 0x00, 0x03, 0x61, 0x67, 0x65, 0x00,   \\ - - - - a g e -
1361  0x00, 0x00, 0x05, 0x61, 0x6c, 0x6c, 0x6f, 0x77,   \\ - - - a l l o w
1362  0x00, 0x00, 0x00, 0x0d, 0x61, 0x75, 0x74, 0x68,   \\ - - - - a u t h
1363  0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,   \\ o r i z a t i o
1364  0x6e, 0x00, 0x00, 0x00, 0x0d, 0x63, 0x61, 0x63,   \\ n - - - - c a c
1365  0x68, 0x65, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72,   \\ h e - c o n t r
1366  0x6f, 0x6c, 0x00, 0x00, 0x00, 0x0a, 0x63, 0x6f,   \\ o l - - - - c o
1367  0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,   \\ n n e c t i o n
1368  0x00, 0x00, 0x00, 0x0c, 0x63, 0x6f, 0x6e, 0x74,   \\ - - - - c o n t
1369  0x65, 0x6e, 0x74, 0x2d, 0x62, 0x61, 0x73, 0x65,   \\ e n t - b a s e
1370  0x00, 0x00, 0x00, 0x10, 0x63, 0x6f, 0x6e, 0x74,   \\ - - - - c o n t
1371  0x65, 0x6e, 0x74, 0x2d, 0x65, 0x6e, 0x63, 0x6f,   \\ e n t - e n c o
1372  0x64, 0x69, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x10,   \\ d i n g - - - -
1373  0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d,   \\ c o n t e n t -
1374  0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65,   \\ l a n g u a g e
1375  0x00, 0x00, 0x00, 0x0e, 0x63, 0x6f, 0x6e, 0x74,   \\ - - - - c o n t
1376  0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x65, 0x6e, 0x67,   \\ e n t - l e n g
1377  0x74, 0x68, 0x00, 0x00, 0x00, 0x10, 0x63, 0x6f,   \\ t h - - - - c o
1378  0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x6f,   \\ n t e n t - l o
1379  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00,   \\ c a t i o n - -
1380  0x00, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,   \\ - - c o n t e n
1381  0x74, 0x2d, 0x6d, 0x64, 0x35, 0x00, 0x00, 0x00,   \\ t - m d 5 - - -
1382  0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,   \\ - c o n t e n t
1383  0x2d, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x00, 0x00,   \\ - r a n g e - -
1384  0x00, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,   \\ - - c o n t e n
1385  0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x00, 0x00,   \\ t - t y p e - -
1386  0x00, 0x04, 0x64, 0x61, 0x74, 0x65, 0x00, 0x00,   \\ - - d a t e - -
1387  0x00, 0x04, 0x65, 0x74, 0x61, 0x67, 0x00, 0x00,   \\ - - e t a g - -
1388  0x00, 0x06, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74,   \\ - - e x p e c t
1389  0x00, 0x00, 0x00, 0x07, 0x65, 0x78, 0x70, 0x69,   \\ - - - - e x p i
1390  0x72, 0x65, 0x73, 0x00, 0x00, 0x00, 0x04, 0x66,   \\ r e s - - - - f
1391  0x72, 0x6f, 0x6d, 0x00, 0x00, 0x00, 0x04, 0x68,   \\ r o m - - - - h
1392  0x6f, 0x73, 0x74, 0x00, 0x00, 0x00, 0x08, 0x69,   \\ o s t - - - - i
1393  0x66, 0x2d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x00,   \\ f - m a t c h -
1394  0x00, 0x00, 0x11, 0x69, 0x66, 0x2d, 0x6d, 0x6f,   \\ - - - i f - m o
1395  0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x2d, 0x73,   \\ d i f i e d - s
1396  0x69, 0x6e, 0x63, 0x65, 0x00, 0x00, 0x00, 0x0d,   \\ i n c e - - - -
1397  0x69, 0x66, 0x2d, 0x6e, 0x6f, 0x6e, 0x65, 0x2d,   \\ i f - n o n e -
1398  0x6d, 0x61, 0x74, 0x63, 0x68, 0x00, 0x00, 0x00,   \\ m a t c h - - -
1399  0x08, 0x69, 0x66, 0x2d, 0x72, 0x61, 0x6e, 0x67,   \\ - i f - r a n g
1400  0x65, 0x00, 0x00, 0x00, 0x13, 0x69, 0x66, 0x2d,   \\ e - - - - i f -
1401  0x75, 0x6e, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69,   \\ u n m o d i f i
1402  0x65, 0x64, 0x2d, 0x73, 0x69, 0x6e, 0x63, 0x65,   \\ e d - s i n c e
1403  0x00, 0x00, 0x00, 0x0d, 0x6c, 0x61, 0x73, 0x74,   \\ - - - - l a s t
1404  0x2d, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65,   \\ - m o d i f i e
1405  0x64, 0x00, 0x00, 0x00, 0x08, 0x6c, 0x6f, 0x63,   \\ d - - - - l o c
1406  0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00,   \\ a t i o n - - -
1407  0x0c, 0x6d, 0x61, 0x78, 0x2d, 0x66, 0x6f, 0x72,   \\ - m a x - f o r
1408  0x77, 0x61, 0x72, 0x64, 0x73, 0x00, 0x00, 0x00,   \\ w a r d s - - -
1409  0x06, 0x70, 0x72, 0x61, 0x67, 0x6d, 0x61, 0x00,   \\ - p r a g m a -
1410  0x00, 0x00, 0x12, 0x70, 0x72, 0x6f, 0x78, 0x79,   \\ - - - p r o x y
1411  0x2d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74,   \\ - a u t h e n t
1412  0x69, 0x63, 0x61, 0x74, 0x65, 0x00, 0x00, 0x00,   \\ i c a t e - - -
1413  0x13, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2d, 0x61,   \\ - p r o x y - a
1414  0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61,   \\ u t h o r i z a
1415  0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 0x05,   \\ t i o n - - - -
1416  0x72, 0x61, 0x6e, 0x67, 0x65, 0x00, 0x00, 0x00,   \\ r a n g e - - -
1417  0x07, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72,   \\ - r e f e r e r
1418  0x00, 0x00, 0x00, 0x0b, 0x72, 0x65, 0x74, 0x72,   \\ - - - - r e t r
1419  0x79, 0x2d, 0x61, 0x66, 0x74, 0x65, 0x72, 0x00,   \\ y - a f t e r -
1420  0x00, 0x00, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65,   \\ - - - s e r v e
1421  0x72, 0x00, 0x00, 0x00, 0x02, 0x74, 0x65, 0x00,   \\ r - - - - t e -
1422  0x00, 0x00, 0x07, 0x74, 0x72, 0x61, 0x69, 0x6c,   \\ - - - t r a i l
1423  0x65, 0x72, 0x00, 0x00, 0x00, 0x11, 0x74, 0x72,   \\ e r - - - - t r
1424  0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x2d, 0x65,   \\ a n s f e r - e
1425  0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x00,   \\ n c o d i n g -
1426  0x00, 0x00, 0x07, 0x75, 0x70, 0x67, 0x72, 0x61,   \\ - - - u p g r a
1427  0x64, 0x65, 0x00, 0x00, 0x00, 0x0a, 0x75, 0x73,   \\ d e - - - - u s
1428  0x65, 0x72, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74,   \\ e r - a g e n t
1429  0x00, 0x00, 0x00, 0x04, 0x76, 0x61, 0x72, 0x79,   \\ - - - - v a r y
1430  0x00, 0x00, 0x00, 0x03, 0x76, 0x69, 0x61, 0x00,   \\ - - - - v i a -
1431  0x00, 0x00, 0x07, 0x77, 0x61, 0x72, 0x6e, 0x69,   \\ - - - w a r n i
1432  0x6e, 0x67, 0x00, 0x00, 0x00, 0x10, 0x77, 0x77,   \\ n g - - - - w w
1433  0x77, 0x2d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e,   \\ w - a u t h e n
1434  0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x00, 0x00,   \\ t i c a t e - -
1435  0x00, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64,   \\ - - m e t h o d
1436  0x00, 0x00, 0x00, 0x03, 0x67, 0x65, 0x74, 0x00,   \\ - - - - g e t -
1437  0x00, 0x00, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,   \\ - - - s t a t u
1438  0x73, 0x00, 0x00, 0x00, 0x06, 0x32, 0x30, 0x30,   \\ s - - - - 2 0 0
1439  0x20, 0x4f, 0x4b, 0x00, 0x00, 0x00, 0x07, 0x76,   \\ - O K - - - - v
1440  0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x00, 0x00,   \\ e r s i o n - -
1441  0x00, 0x08, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31,   \\ - - H T T P - 1
1442  0x2e, 0x31, 0x00, 0x00, 0x00, 0x03, 0x75, 0x72,   \\ - 1 - - - - u r
1443  0x6c, 0x00, 0x00, 0x00, 0x06, 0x70, 0x75, 0x62,   \\ l - - - - p u b
1444  0x6c, 0x69, 0x63, 0x00, 0x00, 0x00, 0x0a, 0x73,   \\ l i c - - - - s
1445  0x65, 0x74, 0x2d, 0x63, 0x6f, 0x6f, 0x6b, 0x69,   \\ e t - c o o k i
1446  0x65, 0x00, 0x00, 0x00, 0x0a, 0x6b, 0x65, 0x65,   \\ e - - - - k e e
1447  0x70, 0x2d, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x00,   \\ p - a l i v e -
1448  0x00, 0x00, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69,   \\ - - - o r i g i
1449  0x6e, 0x31, 0x30, 0x30, 0x31, 0x30, 0x31, 0x32,   \\ n 1 0 0 1 0 1 2
1450  0x30, 0x31, 0x32, 0x30, 0x32, 0x32, 0x30, 0x35,   \\ 0 1 2 0 2 2 0 5
1451  0x32, 0x30, 0x36, 0x33, 0x30, 0x30, 0x33, 0x30,   \\ 2 0 6 3 0 0 3 0
1452  0x32, 0x33, 0x30, 0x33, 0x33, 0x30, 0x34, 0x33,   \\ 2 3 0 3 3 0 4 3
1453  0x30, 0x35, 0x33, 0x30, 0x36, 0x33, 0x30, 0x37,   \\ 0 5 3 0 6 3 0 7
1454  0x34, 0x30, 0x32, 0x34, 0x30, 0x35, 0x34, 0x30,   \\ 4 0 2 4 0 5 4 0
1455  0x36, 0x34, 0x30, 0x37, 0x34, 0x30, 0x38, 0x34,   \\ 6 4 0 7 4 0 8 4
1456  0x30, 0x39, 0x34, 0x31, 0x30, 0x34, 0x31, 0x31,   \\ 0 9 4 1 0 4 1 1
1457  0x34, 0x31, 0x32, 0x34, 0x31, 0x33, 0x34, 0x31,   \\ 4 1 2 4 1 3 4 1
1458  0x34, 0x34, 0x31, 0x35, 0x34, 0x31, 0x36, 0x34,   \\ 4 4 1 5 4 1 6 4
1459  0x31, 0x37, 0x35, 0x30, 0x32, 0x35, 0x30, 0x34,   \\ 1 7 5 0 2 5 0 4
1460  0x35, 0x30, 0x35, 0x32, 0x30, 0x33, 0x20, 0x4e,   \\ 5 0 5 2 0 3 - N
1461  0x6f, 0x6e, 0x2d, 0x41, 0x75, 0x74, 0x68, 0x6f,   \\ o n - A u t h o
1462  0x72, 0x69, 0x74, 0x61, 0x74, 0x69, 0x76, 0x65,   \\ r i t a t i v e
1463  0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61,   \\ - I n f o r m a
1464  0x74, 0x69, 0x6f, 0x6e, 0x32, 0x30, 0x34, 0x20,   \\ t i o n 2 0 4 -
1465  0x4e, 0x6f, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x65,   \\ N o - C o n t e
1466  0x6e, 0x74, 0x33, 0x30, 0x31, 0x20, 0x4d, 0x6f,   \\ n t 3 0 1 - M o
1467  0x76, 0x65, 0x64, 0x20, 0x50, 0x65, 0x72, 0x6d,   \\ v e d - P e r m
1468  0x61, 0x6e, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x34,   \\ a n e n t l y 4
1469  0x30, 0x30, 0x20, 0x42, 0x61, 0x64, 0x20, 0x52,   \\ 0 0 - B a d - R
1470  0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x34, 0x30,   \\ e q u e s t 4 0
1471  0x31, 0x20, 0x55, 0x6e, 0x61, 0x75, 0x74, 0x68,   \\ 1 - U n a u t h
1472  0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x34, 0x30,   \\ o r i z e d 4 0
1473  0x33, 0x20, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64,   \\ 3 - F o r b i d
1474  0x64, 0x65, 0x6e, 0x34, 0x30, 0x34, 0x20, 0x4e,   \\ d e n 4 0 4 - N
1475  0x6f, 0x74, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64,   \\ o t - F o u n d
1476  0x35, 0x30, 0x30, 0x20, 0x49, 0x6e, 0x74, 0x65,   \\ 5 0 0 - I n t e
1477  0x72, 0x6e, 0x61, 0x6c, 0x20, 0x53, 0x65, 0x72,   \\ r n a l - S e r
1478  0x76, 0x65, 0x72, 0x20, 0x45, 0x72, 0x72, 0x6f,   \\ v e r - E r r o
1479  0x72, 0x35, 0x30, 0x31, 0x20, 0x4e, 0x6f, 0x74,   \\ r 5 0 1 - N o t
1480  0x20, 0x49, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65,   \\ - I m p l e m e
1481  0x6e, 0x74, 0x65, 0x64, 0x35, 0x30, 0x33, 0x20,   \\ n t e d 5 0 3 -
1482  0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20,   \\ S e r v i c e -
1483  0x55, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61,   \\ U n a v a i l a
1484  0x62, 0x6c, 0x65, 0x4a, 0x61, 0x6e, 0x20, 0x46,   \\ b l e J a n - F
1485  0x65, 0x62, 0x20, 0x4d, 0x61, 0x72, 0x20, 0x41,   \\ e b - M a r - A
1486  0x70, 0x72, 0x20, 0x4d, 0x61, 0x79, 0x20, 0x4a,   \\ p r - M a y - J
1487  0x75, 0x6e, 0x20, 0x4a, 0x75, 0x6c, 0x20, 0x41,   \\ u n - J u l - A
1488  0x75, 0x67, 0x20, 0x53, 0x65, 0x70, 0x74, 0x20,   \\ u g - S e p t -
1489  0x4f, 0x63, 0x74, 0x20, 0x4e, 0x6f, 0x76, 0x20,   \\ O c t - N o v -
1490  0x44, 0x65, 0x63, 0x20, 0x30, 0x30, 0x3a, 0x30,   \\ D e c - 0 0 - 0
1491  0x30, 0x3a, 0x30, 0x30, 0x20, 0x4d, 0x6f, 0x6e,   \\ 0 - 0 0 - M o n
1492  0x2c, 0x20, 0x54, 0x75, 0x65, 0x2c, 0x20, 0x57,   \\ - - T u e - - W
1493  0x65, 0x64, 0x2c, 0x20, 0x54, 0x68, 0x75, 0x2c,   \\ e d - - T h u -
1494  0x20, 0x46, 0x72, 0x69, 0x2c, 0x20, 0x53, 0x61,   \\ - F r i - - S a
1495  0x74, 0x2c, 0x20, 0x53, 0x75, 0x6e, 0x2c, 0x20,   \\ t - - S u n - -
1496  0x47, 0x4d, 0x54, 0x63, 0x68, 0x75, 0x6e, 0x6b,   \\ G M T c h u n k
1497  0x65, 0x64, 0x2c, 0x74, 0x65, 0x78, 0x74, 0x2f,   \\ e d - t e x t -
1498  0x68, 0x74, 0x6d, 0x6c, 0x2c, 0x69, 0x6d, 0x61,   \\ h t m l - i m a
1499  0x67, 0x65, 0x2f, 0x70, 0x6e, 0x67, 0x2c, 0x69,   \\ g e - p n g - i
1500  0x6d, 0x61, 0x67, 0x65, 0x2f, 0x6a, 0x70, 0x67,   \\ m a g e - j p g
1501  0x2c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x67,   \\ - i m a g e - g
1502  0x69, 0x66, 0x2c, 0x61, 0x70, 0x70, 0x6c, 0x69,   \\ i f - a p p l i
1503  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78,   \\ c a t i o n - x
1504  0x6d, 0x6c, 0x2c, 0x61, 0x70, 0x70, 0x6c, 0x69,   \\ m l - a p p l i
1505  0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x78,   \\ c a t i o n - x
1506  0x68, 0x74, 0x6d, 0x6c, 0x2b, 0x78, 0x6d, 0x6c,   \\ h t m l - x m l
1507  0x2c, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x70, 0x6c,   \\ - t e x t - p l
1508  0x61, 0x69, 0x6e, 0x2c, 0x74, 0x65, 0x78, 0x74,   \\ a i n - t e x t
1509  0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72,   \\ - j a v a s c r
1510  0x69, 0x70, 0x74, 0x2c, 0x70, 0x75, 0x62, 0x6c,   \\ i p t - p u b l
1511  0x69, 0x63, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74,   \\ i c p r i v a t
1512  0x65, 0x6d, 0x61, 0x78, 0x2d, 0x61, 0x67, 0x65,   \\ e m a x - a g e
1513  0x3d, 0x67, 0x7a, 0x69, 0x70, 0x2c, 0x64, 0x65,   \\ - g z i p - d e
1514  0x66, 0x6c, 0x61, 0x74, 0x65, 0x2c, 0x73, 0x64,   \\ f l a t e - s d
1515  0x63, 0x68, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65,   \\ c h c h a r s e
1516  0x74, 0x3d, 0x75, 0x74, 0x66, 0x2d, 0x38, 0x63,   \\ t - u t f - 8 c
1517  0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x3d, 0x69,   \\ h a r s e t - i
1518  0x73, 0x6f, 0x2d, 0x38, 0x38, 0x35, 0x39, 0x2d,   \\ s o - 8 8 5 9 -
1519  0x31, 0x2c, 0x75, 0x74, 0x66, 0x2d, 0x2c, 0x2a,   \\ 1 - u t f - - -
1520  0x2c, 0x65, 0x6e, 0x71, 0x3d, 0x30, 0x2e          \\ - e n q - 0 -
1521};
1522</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
1523         pairs in one direction on a connection. SPDY uses a SYNC_FLUSH between each compressed frame.
1524      </p>
1525      <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
1526         and CPU consumption. Because header blocks are generally small, implementors may want to reduce the window-size of the compression
1527         engine from the default 15bits (a 32KB window) to more like 11bits (a 2KB window). The exact setting is chosen by the compressor,
1528         the decompressor will work with any setting.
1529      </p>
1530      <h1 id="rfc.section.3"><a href="#rfc.section.3">3.</a>&nbsp;<a id="HTTPLayer" href="#HTTPLayer">HTTP Layering over SPDY</a></h1>
1531      <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
1532         of the server business logic or application API, the features of HTTP are unchanged. To achieve this, all of the application
1533         request and response header semantics are preserved, although the syntax of conveying those semantics has changed. Thus, the
1534         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.
1535      </p>
1536      <h2 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1</a>&nbsp;Connection Management
1537      </h2>
1538      <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.
1539      </p>
1540      <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
1541         finished), while another SPDY session is starting.
1542      </p>
1543      <h3 id="rfc.section.3.1.1"><a href="#rfc.section.3.1.1">3.1.1</a>&nbsp;Use of GOAWAY
1544      </h3>
1545      <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
1546         GOAWAY message, HTTP has a race condition where the client sends a request (a new SYN_STREAM) just as the server is closing
1547         the connection, and the client cannot know if the server received the stream or not. By using the last-stream-id in the GOAWAY,
1548         servers can indicate to the client if a request was processed or not.
1549      </p>
1550      <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
1551         streams to finish. The client will be able to determine this because SPDY streams are determinstically closed. This abrupt
1552         termination will force the client to heuristically decide whether to retry the pending requests. Clients always need to be
1553         capable of dealing with this case because they must deal with accidental connection termination cases, which are the same
1554         as the server never having sent a GOAWAY.
1555      </p>
1556      <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
1557         for the active streams to finish before terminating the connection.
1558      </p>
1559      <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
1560         streams were received by the client.
1561      </p>
1562      <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
1563         of 0.
1564      </p>
1565      <h2 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2</a>&nbsp;HTTP Request/Response
1566      </h2>
1567      <h3 id="rfc.section.3.2.1"><a href="#rfc.section.3.2.1">3.2.1</a>&nbsp;Request
1568      </h3>
1569      <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
1570         MUST set the FLAG_FIN, indicating that the client intends to send no further data on this stream. For requests which do contain
1571         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.
1572         The last DATA frame will set the FLAG_FIN to indicate the end of the body.
1573      </p>
1574      <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
1575         block in SPDY is mostly unchanged from today's HTTP header block, with the following differences:
1576      </p>
1577      <ul class="empty">
1578         <li>The first line of the request is unfolded into name/value pairs like other HTTP headers and MUST be present:
1579            <ul class="empty">
1580               <li>":method" - the HTTP method for this request (e.g. "GET", "POST", "HEAD", etc)</li>
1581               <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".
1582               </li>
1583               <li>":version" - the HTTP version of this request (e.g. "HTTP/1.1")</li>
1584            </ul>
1585         </li>
1586         <li>In addition, the following two name/value pairs must also be present in every request:
1587            <ul class="empty">
1588               <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.
1589               </li>
1590               <li>":scheme" - the scheme portion of the URL for this request (e.g. "https"))</li>
1591            </ul>
1592         </li>
1593         <li>Header names are all lowercase.</li>
1594         <li>The Connection, Host, Keep-Alive, Proxy-Connection, and Transfer-Encoding headers are not valid and MUST not be sent.</li>
1595         <li>User-agents MUST support gzip compression. Regardless of the Accept-Encoding sent by the user-agent, the server may always
1596            send content encoded with gzip or deflate encoding.
1597         </li>
1598         <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
1599            header, the server MUST return a 400 (Bad Request) error.
1600         </li>
1601         <li>POST-specific changes:
1602            <ul class="empty">
1603               <li>Although POSTs are inherently chunked, POST requests SHOULD also be accompanied by a Content-Length header. There are two
1604                  reasons for this: First, it assists with upload progress meters for an improved user experience. But second, we know from
1605                  early versions of SPDY that failure to send a content length header is incompatible with many existing HTTP server implementations.
1606                  Existing user-agents do not omit the Content-Length header, and server implementations have come to depend upon this.
1607               </li>
1608            </ul>
1609         </li>
1610      </ul>
1611      <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,
1612         it should attempt to raise the priority of that resource. Resources such as images, SHOULD generally use the lowest priority.
1613      </p>
1614      <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
1615         a HTTP 400 Bad Request reply.
1616      </p>
1617      <h3 id="rfc.section.3.2.2"><a href="#rfc.section.3.2.2">3.2.2</a>&nbsp;Response
1618      </h3>
1619      <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
1620         data after the SYN_REPLY frame via a series of DATA frames, and the last data frame will contain the FLAG_FIN to indicate
1621         successful end-of-stream. If a response (like a 202 or 204 response) contains no body, the SYN_REPLY frame may contain the
1622         FLAG_FIN flag to indicate no further data will be sent on the stream.
1623      </p>
1624      <p id="rfc.section.3.2.2.p.2"> </p>
1625      <ul class="empty">
1626         <li>The response status line is unfolded into name/value pairs like other HTTP headers and must be present:
1627            <ul class="empty">
1628               <li>":status" - The HTTP response status code (e.g. "200" or "200 OK")</li>
1629               <li>":version" - The HTTP response version (e.g. "HTTP/1.1")</li>
1630            </ul>
1631         </li>
1632         <li>All header names must be lowercase.</li>
1633         <li>The Connection, Keep-Alive, Proxy-Connection, and Transfer-Encoding headers are not valid and MUST not be sent.</li>
1634         <li>Responses MAY be accompanied by a Content-Length header for advisory purposes. (e.g. for UI progress meters)</li>
1635         <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
1636            header, the client MUST ignore the content length header.
1637         </li>
1638      </ul>
1639      <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
1640         indicating a PROTOCOL ERROR.
1641      </p>
1642      <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>
1643      <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"
1644         response, and include a WWW-Authenticate challenge header that defines the authentication scheme to be used. The client then
1645         retries the request with an Authorization header appropriate to the specified authentication scheme.
1646      </p>
1647      <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
1648         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.
1649      </p>
1650      <h4 id="rfc.section.3.2.3.1"><a href="#rfc.section.3.2.3.1">3.2.3.1</a>&nbsp;Stateless Authentication
1651      </h4>
1652      <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
1653         sent to a single server, each will authenticate independently, similar to how two HTTP connections would independently authenticate
1654         to a proxy server.
1655      </p>
1656      <h4 id="rfc.section.3.2.3.2"><a href="#rfc.section.3.2.3.2">3.2.3.2</a>&nbsp;Stateful Authentication
1657      </h4>
1658      <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
1659         RFC2617 - they do not include a "realm" as part of the request. This is problematic in SPDY because it makes it impossible
1660         for a client to disambiguate two concurrent server authentication challenges.
1661      </p>
1662      <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>
1663      <ul class="empty">
1664         <li>Servers can add a "realm=&lt;desired realm&gt;" header so that the two authentication requests can be disambiguated and run concurrently.
1665            Unfortunately, given how these mechanisms work, this is probably not practical.
1666         </li>
1667         <li>Upon sending the first stateful challenge response, the server MUST buffer and defer all further frames which are not part
1668            of completing the challenge until the challenge has completed. Completing the authentication challenge may take multiple round
1669            trips. Once the client receives a "401 Authenticate" response for a stateful authentication type, it MUST stop sending new
1670            requests to the server until the authentication has completed by receiving a non-401 response on at least one stream.
1671         </li>
1672      </ul>
1673      <h2 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3</a>&nbsp;Server Push Transactions
1674      </h2>
1675      <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
1676         a server knows that it will need to send multiple resources in response to a single request. Without server push features,
1677         the client must first download the primary resource, then discover the secondary resource(s), and request them. Pushing of
1678         resources avoids the round-trip delay, but also creates a potential race where a server can be pushing content which a user-agent
1679         is in the process of requesting. The following mechanics attempt to prevent the race condition while enabling the performance
1680         benefit.
1681      </p>
1682      <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.
1683      </p>
1684      <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
1685         response in same way that it would cache any other response. This means validating the response headers and inserting into
1686         the disk cache.
1687      </p>
1688      <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
1689         streams contain an "associated-stream-id" which indicates the requested stream for which the pushed stream is related. The
1690         pushed stream inherits all of the headers from the associated-stream-id with the exception of ":host", ":scheme", and ":path",
1691         which are provided as part of the pushed response stream headers. The browser MUST store these inherited and implied request
1692         headers with the cached resource.
1693      </p>
1694      <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
1695         resources to the user-agent. Browsers MUST implement throttles to protect against unreasonable push attacks.
1696      </p>
1697      <h3 id="rfc.section.3.3.1"><a href="#rfc.section.3.3.1">3.3.1</a>&nbsp;Server implementation
1698      </h3>
1699      <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.
1700         The SYN_STREAM MUST include an Associated-To-Stream-ID, and MUST set the FLAG_UNIDIRECTIONAL flag. The SYN_STREAM MUST include
1701         headers for ":scheme", ":host", ":path", which represent the URL for the resource being pushed. Subsequent headers may follow
1702         in HEADERS frames. The purpose of the association is so that the user-agent can differentiate which request induced the pushed
1703         stream; without it, if the user-agent had two tabs open to the same page, each pushing unique content under a fixed URL, the
1704         user-agent would not be able to differentiate the requests.
1705      </p>
1706      <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
1707         endpoint for pushed content. If the user-agent requested a resource on stream 11, the server replies on stream 11. It can
1708         push any number of additional streams to the client before sending a FLAG_FIN on stream 11. However, once the originating
1709         stream is closed no further push streams may be associated with it. The pushed streams do not need to be closed (FIN set)
1710         before the originating stream is closed, they only need to be created before the originating stream closes.
1711      </p>
1712      <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>
1713      <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
1714         which could allow the client to discover the pushed resource and request it.
1715      </p>
1716      <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>
1717      <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
1718         for the pushed resource, it may later use an additional HEADERS frame to augment the name/value pairs to be associated with
1719         the pushed stream. The subsequent HEADERS frame(s) must not contain a header for ':host', ':scheme', or ':path' (e.g. the
1720         server can't change the identity of the resource to be pushed). The HEADERS frame must not contain duplicate headers with
1721         a previously sent HEADERS frame. The server must send a HEADERS frame including the scheme/host/port headers before sending
1722         any data frames on the stream.
1723      </p>
1724      <h3 id="rfc.section.3.3.2"><a href="#rfc.section.3.3.2">3.3.2</a>&nbsp;Client implementation
1725      </h3>
1726      <p id="rfc.section.3.3.2.p.1">When fetching a resource the client has 3 possibilities: </p>
1727      <ul class="empty">
1728         <li>the resource is not being pushed</li>
1729         <li>the resource is being pushed, but the data has not yet arrived</li>
1730         <li>the resource is being pushed, and the data has started to arrive</li>
1731      </ul>
1732      <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
1733         for the resource in the pushed stream, and instead wait for the pushed stream to arrive.
1734      </p>
1735      <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.
1736      </p>
1737      <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
1738         section, it MUST reply with a RST_STREAM with error code HTTP_PROTOCOL_ERROR.
1739      </p>
1740      <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).
1741      </p>
1742      <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
1743         for any streams with in-association-to for the original stream.
1744      </p>
1745      <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
1746         must issue a stream error (<a href="#StreamErrorHandler" title="Stream Error Handling">Section&nbsp;2.4.2</a>) with error code PROTOCOL ERROR.
1747      </p>
1748      <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.
1749         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).
1750      </p>
1751      <h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a>&nbsp;Design Rationale and Notes
1752      </h1>
1753      <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
1754         of these notes should be considered authoritative about how the protocol works. However, these notes may prove useful in future
1755         debates about how to resolve protocol ambiguities or how to evolve the protocol going forward. They may be removed before
1756         the final draft.
1757      </p>
1758      <h2 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1</a>&nbsp;Separation of Framing Layer and Application Layer
1759      </h2>
1760      <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
1761         which are very similar to HTTP, and other areas as well.
1762      </p>
1763      <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
1764         the two layers is convenient for description of the protocol and how it relates to existing HTTP implementations. However,
1765         the ability to reuse the SPDY framing layer is a non goal.
1766      </p>
1767      <h2 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2</a>&nbsp;Error handling - Framing Layer
1768      </h2>
1769      <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
1770         do not.
1771      </p>
1772      <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
1773         to invalidate the stream but move forward without aborting the connection altogether.
1774      </p>
1775      <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
1776         detecting the error should initiate a connection close.
1777      </p>
1778      <h2 id="rfc.section.4.3"><a href="#rfc.section.4.3">4.3</a>&nbsp;One Connection Per Domain
1779      </h2>
1780      <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
1781         it is very difficult to provide a consistent level of service (e.g. TCP slow-start), prioritization, or optimal compression
1782         when the client is connecting to the server through multiple channels.
1783      </p>
1784      <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
1785         number of packets sent by SPDY can be as much as 40% less than HTTP. Handling large numbers of concurrent connections on the
1786         server also does become a scalability problem, and SPDY reduces this load.
1787      </p>
1788      <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
1789         a single stream, it creates a potential for head-of-line blocking problems at the transport level. In tests so far, the negative
1790         effects of head-of-line blocking (especially in the presence of packet loss) is outweighed by the benefits of compression
1791         and prioritization.
1792      </p>
1793      <h2 id="rfc.section.4.4"><a href="#rfc.section.4.4">4.4</a>&nbsp;Fixed vs Variable Length Fields
1794      </h2>
1795      <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,
1796         this seems like a tragic waste of bandwidth. SPDY choses the simple encoding for speed and simplicity.
1797      </p>
1798      <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
1799         is only an 8 byte overhead for a 1452 byte payload (~0.6%). At the time of this writing, bandwidth is already plentiful, and
1800         there is a strong trend indicating that bandwidth will continue to increase. With an average worldwide bandwidth of 1Mbps,
1801         and assuming that a variable length encoding could reduce the overhead by 50%, the latency saved by using a variable length
1802         encoding would be less than 100 nanoseconds. More interesting are the effects when the larger encodings force a packet boundary,
1803         in which case a round-trip could be induced. However, by addressing other aspects of SPDY and TCP interactions, we believe
1804         this is completely mitigated.
1805      </p>
1806      <h2 id="rfc.section.4.5"><a href="#rfc.section.4.5">4.5</a>&nbsp;Compression Context(s)
1807      </h2>
1808      <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
1809         have maintained a map (or list) of compression contexts usable for each origin. The basic case is easy - each HEADERS frame
1810         would need to identify the context to use for that frame. However, compression contexts are not cheap, so the lifecycle of
1811         each context would need to be bounded. For proxy servers, where we could churn through many contexts, this would be a concern.
1812         We considered using a static set of contexts, say 16 of them, which would bound the memory use. We also considered dynamic
1813         contexts, which could be created on the fly, and would need to be subsequently destroyed. All of these are complicated, and
1814         ultimately we decided that such a mechanism creates too many problems to solve.
1815      </p>
1816      <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.
1817         For the common case (no proxy), this fine because most requests are to the same origin and we never need to reset the context.
1818         For cases where we are using two different origins over a single SPDY session, we simply reset the compression state between
1819         each transition.
1820      </p>
1821      <h2 id="rfc.section.4.6"><a href="#rfc.section.4.6">4.6</a>&nbsp;Unidirectional streams
1822      </h2>
1823      <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
1824         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
1825         is, therefore, not necessary.
1826      </p>
1827      <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
1828         needing to send a set of empty frames (e.g. the SYN_STREAM w/ FLAG_FIN) which otherwise serve no purpose.
1829      </p>
1830      <h2 id="rfc.section.4.7"><a href="#rfc.section.4.7">4.7</a>&nbsp;Data Compression
1831      </h2>
1832      <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
1833         of the stream is redundant. There is no value in compressing a stream which is already compressed. Because of this, SPDY does
1834         allow data compression to be optional. We included it because study of existing websites shows that many sites are not using
1835         compression as they should, and users suffer because of it. We wanted a mechanism where, at the SPDY layer, site administrators
1836         could simply force compression - it is better to compress twice than to not compress.
1837      </p>
1838      <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
1839         likely remove it from the specification.
1840      </p>
1841      <h2 id="rfc.section.4.8"><a href="#rfc.section.4.8">4.8</a>&nbsp;Server Push
1842      </h2>
1843      <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
1844         for this is so that proxies have a lifetime for which they can discard information about previous streams. If a pushed stream
1845         could associate itself with an already-closed stream, then endpoints would not have a specific lifecycle for when they could
1846         disavow knowledge of the streams which went before.
1847      </p>
1848      <h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a>&nbsp;Security Considerations
1849      </h1>
1850      <h2 id="rfc.section.5.1"><a href="#rfc.section.5.1">5.1</a>&nbsp;Use of Same-origin constraints
1851      </h2>
1852      <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.
1853      </p>
1854      <h2 id="rfc.section.5.2"><a href="#rfc.section.5.2">5.2</a>&nbsp;HTTP Headers and SPDY Headers
1855      </h2>
1856      <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
1857         headers, there is a possibility that some HTTP applications already use a particular header name. To avoid any conflicts,
1858         all headers introduced for layering HTTP over SPDY are prefixed with ":". ":" is not a valid sequence in HTTP header naming,
1859         preventing any possible conflict.
1860      </p>
1861      <h2 id="rfc.section.5.3"><a href="#rfc.section.5.3">5.3</a>&nbsp;Cross-Protocol Attacks
1862      </h2>
1863      <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
1864         (except the handshake itself), making it difficult for attackers to control the data which could be used in a cross-protocol
1865         attack.
1866      </p>
1867      <h2 id="rfc.section.5.4"><a href="#rfc.section.5.4">5.4</a>&nbsp;Server Push Implicit Headers
1868      </h2>
1869      <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
1870         header) to work, however, all cached resources must have a set of request headers. For this reason, browsers MUST be careful
1871         to inherit request headers from the associated stream for the push. This includes the 'Cookie' header.
1872      </p>
1873      <h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a>&nbsp;Privacy Considerations
1874      </h1>
1875      <h2 id="rfc.section.6.1"><a href="#rfc.section.6.1">6.1</a>&nbsp;Long Lived Connections
1876      </h2>
1877      <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.
1878         The maintenance of these connections over time could be used to expose private information. For example, a user using a browser
1879         hours after the previous user stopped using that browser may be able to learn about what the previous user was doing. This
1880         is a problem with HTTP in its current form as well, however the short lived connections make it less of a risk.
1881      </p>
1882      <h2 id="rfc.section.6.2"><a href="#rfc.section.6.2">6.2</a>&nbsp;SETTINGS frame
1883      </h2>
1884      <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
1885         and server on the client. Although this is intended only to be used to reduce latency, renegade servers could use it as a
1886         mechanism to store identifying information about the client in future requests.
1887      </p>
1888      <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
1889         storage.
1890      </p>
1891      <p id="rfc.section.6.2.p.3">Clients MUST clear persisted SETTINGS information when clearing the cookies.</p>
1892      <p id="rfc.section.6.2.p.4">TODO: Put range maximums on each type of setting to limit inappropriate uses.</p>
1893      <h1 id="rfc.section.7"><a href="#rfc.section.7">7.</a>&nbsp;Incompatibilities with SPDY draft #2
1894      </h1>
1895      <p id="rfc.section.7.p.1">Here is a list of the major changes between this draft and draft #2. </p>
1896      <ul class="empty">
1897         <li>Addition of flow control</li>
1898         <li>Increased 16 bit length fields in SYN_STREAM and SYN_REPLY to 32 bits.</li>
1899         <li>Changed definition of compression for DATA frames</li>
1900         <li>Updated compression dictionary</li>
1901         <li>Fixed off-by-one on the compression dictionary for headers</li>
1902         <li>Increased priority field from 2bits to 3bits.</li>
1903         <li>Removed NOOP frame</li>
1904         <li>Split the request "url" into "scheme", "host", and "path"</li>
1905         <li>Added the requirement that POSTs contain content-length.</li>
1906         <li>Removed wasted 16bits of unused space from the end of the SYN_REPLY and HEADERS frames.</li>
1907         <li>Fixed bug: Priorities were described backward (0 was lowest instead of highest).</li>
1908         <li>Fixed bug: Name/Value header counts were duplicated in both the Name Value header block and also the containing frame.</li>
1909      </ul>
1910      <h1 id="rfc.section.8"><a href="#rfc.section.8">8.</a>&nbsp;Requirements Notation
1911      </h1>
1912      <p id="rfc.section.8.p.1">The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL"
1913         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>.
1914      </p>
1915      <h1 id="rfc.section.9"><a href="#rfc.section.9">9.</a>&nbsp;Acknowledgements
1916      </h1>
1917      <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,
1918         Alyssa Wilk, Costin Manolache, William Chan, Vitaliy Lvin, Joe Chan, Adam Barth, Ryan Hamilton, Gavin Peters, Kent Alstad,
1919         Kevin Lindsay, Paul Amer, Fan Yang, Jonathan Leighton.
1920      </p>
1921      <h1 id="rfc.references"><a href="#rfc.section.10" id="rfc.section.10">10.</a> Normative References
1922      </h1>
1923      <table>                           
1924         <tr>
1925            <td class="reference"><b id="ASCII">[ASCII]</b></td>
1926            <td class="top">“US-ASCII. Coded Character Set - 7-Bit American Standard Code for Information Interchange. Standard ANSI X3.4-1986, ANSI, 1986.”.</td>
1927         </tr>
1928         <tr>
1929            <td class="reference"><b id="RFC0793">[RFC0793]</b></td>
1930            <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.
1931            </td>
1932         </tr>
1933         <tr>
1934            <td class="reference"><b id="RFC1738">[RFC1738]</b></td>
1935            <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.
1936            </td>
1937         </tr>
1938         <tr>
1939            <td class="reference"><b id="RFC1950">[RFC1950]</b></td>
1940            <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.
1941            </td>
1942         </tr>
1943         <tr>
1944            <td class="reference"><b id="RFC2119">[RFC2119]</b></td>
1945            <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.
1946            </td>
1947         </tr>
1948         <tr>
1949            <td class="reference"><b id="RFC2285">[RFC2285]</b></td>
1950            <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.
1951            </td>
1952         </tr>
1953         <tr>
1954            <td class="reference"><b id="RFC2616">[RFC2616]</b></td>
1955            <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.
1956            </td>
1957         </tr>
1958         <tr>
1959            <td class="reference"><b id="RFC2617">[RFC2617]</b></td>
1960            <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.
1961            </td>
1962         </tr>
1963         <tr>
1964            <td class="reference"><b id="RFC4366">[RFC4366]</b></td>
1965            <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.
1966            </td>
1967         </tr>
1968         <tr>
1969            <td class="reference"><b id="RFC4559">[RFC4559]</b></td>
1970            <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.
1971            </td>
1972         </tr>
1973         <tr>
1974            <td class="reference"><b id="RFC5246">[RFC5246]</b></td>
1975            <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.
1976            </td>
1977         </tr>
1978         <tr>
1979            <td class="reference"><b id="RFC6454">[RFC6454]</b></td>
1980            <td class="top">Barth, A., “<a href="http://tools.ietf.org/html/rfc6454">The Web Origin Concept</a>”, RFC&nbsp;6454, December&nbsp;2011.
1981            </td>
1982         </tr>
1983         <tr>
1984            <td class="reference"><b id="TLSNPN">[TLSNPN]</b></td>
1985            <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.
1986            </td>
1987         </tr>
1988         <tr>
1989            <td class="reference"><b id="UDELCOMPRESSION">[UDELCOMPRESSION]</b></td>
1990            <td class="top">Yang, F., Amer, P., and J. Leighton, “<a href="http://www.eecis.udel.edu/~amer/PEL/poc/pdf/SPDY-Fan.pdf">A Methodology to Derive SPDY's Initial Dictionary for Zlib Compression</a>”, &lt;<a href="http://www.eecis.udel.edu/~amer/PEL/poc/pdf/SPDY-Fan.pdf">http://www.eecis.udel.edu/~amer/PEL/poc/pdf/SPDY-Fan.pdf</a>&gt;.
1991            </td>
1992         </tr>
1993      </table>
1994      <div class="avoidbreak">
1995         <h1 id="rfc.authors"><a href="#rfc.authors">Authors' Addresses</a></h1>
1996         <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>
1997         <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>
1998         <address class="vcard"><span class="vcardline"><span class="fn">Martin Thomson</span>
1999               (editor)
2000               <span class="n hidden"><span class="family-name">Thomson</span><span class="given-name">Martin</span></span></span><span class="org vcardline">Microsoft</span></address>
2001      </div>
2002      <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>
2003      <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>
2004      <p id="rfc.section.A.1.p.1">Adopted as base for draft-ietf-httpbis-http2.</p>
2005      <p id="rfc.section.A.1.p.2">Updated authors list.</p>
2006      <h1 id="rfc.index"><a href="#rfc.index">Index</a></h1>
2007      <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>
2008      </p>
2009      <div class="print2col">
2010         <ul class="ind">
2011            <li><a id="rfc.index.A" href="#rfc.index.A"><b>A</b></a><ul>
2012                  <li><em>ASCII</em>&nbsp;&nbsp;<a href="#rfc.xref.ASCII.1">2.6.10</a>, <a href="#ASCII"><b>10</b></a></li>
2013               </ul>
2014            </li>
2015            <li><a id="rfc.index.R" href="#rfc.index.R"><b>R</b></a><ul>
2016                  <li><em>RFC0793</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC0793.1">2.1</a>, <a href="#RFC0793"><b>10</b></a></li>
2017                  <li><em>RFC1738</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC1738.1">3.2.1</a>, <a href="#rfc.xref.RFC1738.2">3.2.1</a>, <a href="#RFC1738"><b>10</b></a></li>
2018                  <li><em>RFC1950</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC1950.1">2.6.10.1</a>, <a href="#RFC1950"><b>10</b></a></li>
2019                  <li><em>RFC2119</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2119.1">8</a>, <a href="#RFC2119"><b>10</b></a></li>
2020                  <li><em>RFC2285</em>&nbsp;&nbsp;<a href="#RFC2285"><b>10</b></a></li>
2021                  <li><em>RFC2616</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2616.1">§</a>, <a href="#rfc.xref.RFC2616.2">3</a>, <a href="#RFC2616"><b>10</b></a></li>
2022                  <li><em>RFC2617</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC2617.1">3.2.3</a>, <a href="#RFC2617"><b>10</b></a></li>
2023                  <li><em>RFC4366</em>&nbsp;&nbsp;<a href="#RFC4366"><b>10</b></a></li>
2024                  <li><em>RFC4559</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC4559.1">3.2.3</a>, <a href="#RFC4559"><b>10</b></a></li>
2025                  <li><em>RFC5246</em>&nbsp;&nbsp;<a href="#RFC5246"><b>10</b></a></li>
2026                  <li><em>RFC6454</em>&nbsp;&nbsp;<a href="#rfc.xref.RFC6454.1">2.6.4</a>, <a href="#rfc.xref.RFC6454.2">3.1</a>, <a href="#rfc.xref.RFC6454.3">3.3</a>, <a href="#rfc.xref.RFC6454.4">5.1</a>, <a href="#RFC6454"><b>10</b></a></li>
2027               </ul>
2028            </li>
2029            <li><a id="rfc.index.T" href="#rfc.index.T"><b>T</b></a><ul>
2030                  <li><em>TLSNPN</em>&nbsp;&nbsp;<a href="#TLSNPN"><b>10</b></a></li>
2031               </ul>
2032            </li>
2033            <li><a id="rfc.index.U" href="#rfc.index.U"><b>U</b></a><ul>
2034                  <li><em>UDELCOMPRESSION</em>&nbsp;&nbsp;<a href="#rfc.xref.UDELCOMPRESSION.1">2.6.10.1</a>, <a href="#UDELCOMPRESSION"><b>10</b></a></li>
2035               </ul>
2036            </li>
2037         </ul>
2038      </div>
2039   </body>
2040</html>
Note: See TracBrowser for help on using the repository browser.