| 1 |
<!DOCTYPE html> |
| 2 |
<html lang="en" class="RFC"> |
| 3 |
<head> |
| 4 |
<meta charset="utf-8"> |
| 5 |
<meta content="Common,Latin" name="scripts"> |
| 6 |
<meta content="initial-scale=1.0" name="viewport"> |
| 7 |
<title>RFC 9204: QPACK: Field Compression for HTTP/3</title> |
| 8 |
<meta content="Charles 'Buck' Krasic" name="author"> |
| 9 |
<meta content="Mike Bishop" name="author"> |
| 10 |
<meta content="Alan Frindell" name="author"> |
| 11 |
<meta content=" |
| 12 |
This specification defines QPACK: a compression format for efficiently |
| 13 |
representing HTTP fields that is to be used in HTTP/3. This is a variation of |
| 14 |
HPACK compression that seeks to reduce head-of-line blocking. |
| 15 |
" name="description"> |
| 16 |
<meta content="xml2rfc 3.12.10" name="generator"> |
| 17 |
<meta content="compression" name="keyword"> |
| 18 |
<meta content="HTTP/3" name="keyword"> |
| 19 |
<meta content="HPACK" name="keyword"> |
| 20 |
<meta content="header" name="keyword"> |
| 21 |
<meta content="field" name="keyword"> |
| 22 |
<meta content="trailer" name="keyword"> |
| 23 |
<meta content="9204" name="rfc.number"> |
| 24 |
<!-- Generator version information: |
| 25 |
xml2rfc 3.12.10 |
| 26 |
Python 3.6.15 |
| 27 |
appdirs 1.4.4 |
| 28 |
ConfigArgParse 1.4.1 |
| 29 |
google-i18n-address 2.4.0 |
| 30 |
html5lib 1.0.1 |
| 31 |
intervaltree 3.0.2 |
| 32 |
Jinja2 2.11.3 |
| 33 |
kitchen 1.2.6 |
| 34 |
lxml 4.7.1 |
| 35 |
MarkupSafe 2.0.1 |
| 36 |
pycairo 1.15.1 |
| 37 |
pycountry 19.8.18 |
| 38 |
pyflakes 2.1.1 |
| 39 |
PyYAML 5.4.1 |
| 40 |
requests 2.24.0 |
| 41 |
setuptools 40.5.0 |
| 42 |
six 1.14.0 |
| 43 |
WeasyPrint 52.5 |
| 44 |
--> |
| 45 |
<link href="rfc9204.xml" rel="alternate" type="application/rfc+xml"> |
| 46 |
<link href="#copyright" rel="license"> |
| 47 |
<style type="text/css">/* |
| 48 |
|
| 49 |
NOTE: Changes at the bottom of this file overrides some earlier settings. |
| 50 |
|
| 51 |
Once the style has stabilized and has been adopted as an official RFC style, |
| 52 |
this can be consolidated so that style settings occur only in one place, but |
| 53 |
for now the contents of this file consists first of the initial CSS work as |
| 54 |
provided to the RFC Formatter (xml2rfc) work, followed by itemized and |
| 55 |
commented changes found necssary during the development of the v3 |
| 56 |
formatters. |
| 57 |
|
| 58 |
*/ |
| 59 |
|
| 60 |
/* fonts */ |
| 61 |
@import url('https://fonts.googleapis.com/css?family=Noto+Sans'); /* Sans-serif */ |
| 62 |
@import url('https://fonts.googleapis.com/css?family=Noto+Serif'); /* Serif (print) */ |
| 63 |
@import url('https://fonts.googleapis.com/css?family=Roboto+Mono'); /* Monospace */ |
| 64 |
|
| 65 |
@viewport { |
| 66 |
zoom: 1.0; |
| 67 |
width: extend-to-zoom; |
| 68 |
} |
| 69 |
@-ms-viewport { |
| 70 |
width: extend-to-zoom; |
| 71 |
zoom: 1.0; |
| 72 |
} |
| 73 |
/* general and mobile first */ |
| 74 |
html { |
| 75 |
} |
| 76 |
body { |
| 77 |
max-width: 90%; |
| 78 |
margin: 1.5em auto; |
| 79 |
color: #222; |
| 80 |
background-color: #fff; |
| 81 |
font-size: 14px; |
| 82 |
font-family: 'Noto Sans', Arial, Helvetica, sans-serif; |
| 83 |
line-height: 1.6; |
| 84 |
scroll-behavior: smooth; |
| 85 |
} |
| 86 |
.ears { |
| 87 |
display: none; |
| 88 |
} |
| 89 |
|
| 90 |
/* headings */ |
| 91 |
#title, h1, h2, h3, h4, h5, h6 { |
| 92 |
margin: 1em 0 0.5em; |
| 93 |
font-weight: bold; |
| 94 |
line-height: 1.3; |
| 95 |
} |
| 96 |
#title { |
| 97 |
clear: both; |
| 98 |
border-bottom: 1px solid #ddd; |
| 99 |
margin: 0 0 0.5em 0; |
| 100 |
padding: 1em 0 0.5em; |
| 101 |
} |
| 102 |
.author { |
| 103 |
padding-bottom: 4px; |
| 104 |
} |
| 105 |
h1 { |
| 106 |
font-size: 26px; |
| 107 |
margin: 1em 0; |
| 108 |
} |
| 109 |
h2 { |
| 110 |
font-size: 22px; |
| 111 |
margin-top: -20px; /* provide offset for in-page anchors */ |
| 112 |
padding-top: 33px; |
| 113 |
} |
| 114 |
h3 { |
| 115 |
font-size: 18px; |
| 116 |
margin-top: -36px; /* provide offset for in-page anchors */ |
| 117 |
padding-top: 42px; |
| 118 |
} |
| 119 |
h4 { |
| 120 |
font-size: 16px; |
| 121 |
margin-top: -36px; /* provide offset for in-page anchors */ |
| 122 |
padding-top: 42px; |
| 123 |
} |
| 124 |
h5, h6 { |
| 125 |
font-size: 14px; |
| 126 |
} |
| 127 |
#n-copyright-notice { |
| 128 |
border-bottom: 1px solid #ddd; |
| 129 |
padding-bottom: 1em; |
| 130 |
margin-bottom: 1em; |
| 131 |
} |
| 132 |
/* general structure */ |
| 133 |
p { |
| 134 |
padding: 0; |
| 135 |
margin: 0 0 1em 0; |
| 136 |
text-align: left; |
| 137 |
} |
| 138 |
div, span { |
| 139 |
position: relative; |
| 140 |
} |
| 141 |
div { |
| 142 |
margin: 0; |
| 143 |
} |
| 144 |
.alignRight.art-text { |
| 145 |
background-color: #f9f9f9; |
| 146 |
border: 1px solid #eee; |
| 147 |
border-radius: 3px; |
| 148 |
padding: 1em 1em 0; |
| 149 |
margin-bottom: 1.5em; |
| 150 |
} |
| 151 |
.alignRight.art-text pre { |
| 152 |
padding: 0; |
| 153 |
} |
| 154 |
.alignRight { |
| 155 |
margin: 1em 0; |
| 156 |
} |
| 157 |
.alignRight > *:first-child { |
| 158 |
border: none; |
| 159 |
margin: 0; |
| 160 |
float: right; |
| 161 |
clear: both; |
| 162 |
} |
| 163 |
.alignRight > *:nth-child(2) { |
| 164 |
clear: both; |
| 165 |
display: block; |
| 166 |
border: none; |
| 167 |
} |
| 168 |
svg { |
| 169 |
display: block; |
| 170 |
} |
| 171 |
.alignCenter.art-text { |
| 172 |
background-color: #f9f9f9; |
| 173 |
border: 1px solid #eee; |
| 174 |
border-radius: 3px; |
| 175 |
padding: 1em 1em 0; |
| 176 |
margin-bottom: 1.5em; |
| 177 |
} |
| 178 |
.alignCenter.art-text pre { |
| 179 |
padding: 0; |
| 180 |
} |
| 181 |
.alignCenter { |
| 182 |
margin: 1em 0; |
| 183 |
} |
| 184 |
.alignCenter > *:first-child { |
| 185 |
border: none; |
| 186 |
margin: 0 auto; |
| 187 |
} |
| 188 |
|
| 189 |
/* lists */ |
| 190 |
ol, ul { |
| 191 |
padding: 0; |
| 192 |
margin: 0 0 1em 2em; |
| 193 |
} |
| 194 |
ol ol, ul ul, ol ul, ul ol { |
| 195 |
margin-left: 1em; |
| 196 |
} |
| 197 |
li { |
| 198 |
margin: 0 0 0.25em 0; |
| 199 |
} |
| 200 |
.ulCompact li { |
| 201 |
margin: 0; |
| 202 |
} |
| 203 |
ul.empty, .ulEmpty { |
| 204 |
list-style-type: none; |
| 205 |
} |
| 206 |
ul.empty li, .ulEmpty li { |
| 207 |
margin-top: 0.5em; |
| 208 |
} |
| 209 |
ul.ulBare, li.ulBare { |
| 210 |
margin-left: 0em !important; |
| 211 |
} |
| 212 |
ul.compact, .ulCompact, |
| 213 |
ol.compact, .olCompact { |
| 214 |
line-height: 100%; |
| 215 |
margin: 0 0 0 2em; |
| 216 |
} |
| 217 |
|
| 218 |
/* definition lists */ |
| 219 |
dl { |
| 220 |
} |
| 221 |
dl > dt { |
| 222 |
float: left; |
| 223 |
margin-right: 1em; |
| 224 |
} |
| 225 |
/* |
| 226 |
dl.nohang > dt { |
| 227 |
float: none; |
| 228 |
} |
| 229 |
*/ |
| 230 |
dl > dd { |
| 231 |
margin-bottom: .8em; |
| 232 |
min-height: 1.3em; |
| 233 |
} |
| 234 |
dl.compact > dd, .dlCompact > dd { |
| 235 |
margin-bottom: 0em; |
| 236 |
} |
| 237 |
dl > dd > dl { |
| 238 |
margin-top: 0.5em; |
| 239 |
margin-bottom: 0em; |
| 240 |
} |
| 241 |
|
| 242 |
/* links */ |
| 243 |
a { |
| 244 |
text-decoration: none; |
| 245 |
} |
| 246 |
a[href] { |
| 247 |
color: #22e; /* Arlen: WCAG 2019 */ |
| 248 |
} |
| 249 |
a[href]:hover { |
| 250 |
background-color: #f2f2f2; |
| 251 |
} |
| 252 |
figcaption a[href], |
| 253 |
a[href].selfRef { |
| 254 |
color: #222; |
| 255 |
} |
| 256 |
/* XXX probably not this: |
| 257 |
a.selfRef:hover { |
| 258 |
background-color: transparent; |
| 259 |
cursor: default; |
| 260 |
} */ |
| 261 |
|
| 262 |
/* Figures */ |
| 263 |
tt, code, pre, code { |
| 264 |
background-color: #f9f9f9; |
| 265 |
font-family: 'Roboto Mono', monospace; |
| 266 |
} |
| 267 |
pre { |
| 268 |
border: 1px solid #eee; |
| 269 |
margin: 0; |
| 270 |
padding: 1em; |
| 271 |
} |
| 272 |
img { |
| 273 |
max-width: 100%; |
| 274 |
} |
| 275 |
figure { |
| 276 |
margin: 0; |
| 277 |
} |
| 278 |
figure blockquote { |
| 279 |
margin: 0.8em 0.4em 0.4em; |
| 280 |
} |
| 281 |
figcaption { |
| 282 |
font-style: italic; |
| 283 |
margin: 0 0 1em 0; |
| 284 |
} |
| 285 |
@media screen { |
| 286 |
pre { |
| 287 |
overflow-x: auto; |
| 288 |
max-width: 100%; |
| 289 |
max-width: calc(100% - 22px); |
| 290 |
} |
| 291 |
} |
| 292 |
|
| 293 |
/* aside, blockquote */ |
| 294 |
aside, blockquote { |
| 295 |
margin-left: 0; |
| 296 |
padding: 1.2em 2em; |
| 297 |
} |
| 298 |
blockquote { |
| 299 |
background-color: #f9f9f9; |
| 300 |
color: #111; /* Arlen: WCAG 2019 */ |
| 301 |
border: 1px solid #ddd; |
| 302 |
border-radius: 3px; |
| 303 |
margin: 1em 0; |
| 304 |
} |
| 305 |
cite { |
| 306 |
display: block; |
| 307 |
text-align: right; |
| 308 |
font-style: italic; |
| 309 |
} |
| 310 |
|
| 311 |
/* tables */ |
| 312 |
table { |
| 313 |
width: 100%; |
| 314 |
margin: 0 0 1em; |
| 315 |
border-collapse: collapse; |
| 316 |
border: 1px solid #eee; |
| 317 |
} |
| 318 |
th, td { |
| 319 |
text-align: left; |
| 320 |
vertical-align: top; |
| 321 |
padding: 0.5em 0.75em; |
| 322 |
} |
| 323 |
th { |
| 324 |
text-align: left; |
| 325 |
background-color: #e9e9e9; |
| 326 |
} |
| 327 |
tr:nth-child(2n+1) > td { |
| 328 |
background-color: #f5f5f5; |
| 329 |
} |
| 330 |
table caption { |
| 331 |
font-style: italic; |
| 332 |
margin: 0; |
| 333 |
padding: 0; |
| 334 |
text-align: left; |
| 335 |
} |
| 336 |
table p { |
| 337 |
/* XXX to avoid bottom margin on table row signifiers. If paragraphs should |
| 338 |
be allowed within tables more generally, it would be far better to select on a class. */ |
| 339 |
margin: 0; |
| 340 |
} |
| 341 |
|
| 342 |
/* pilcrow */ |
| 343 |
a.pilcrow { |
| 344 |
color: #666; /* Arlen: AHDJ 2019 */ |
| 345 |
text-decoration: none; |
| 346 |
visibility: hidden; |
| 347 |
user-select: none; |
| 348 |
-ms-user-select: none; |
| 349 |
-o-user-select:none; |
| 350 |
-moz-user-select: none; |
| 351 |
-khtml-user-select: none; |
| 352 |
-webkit-user-select: none; |
| 353 |
-webkit-touch-callout: none; |
| 354 |
} |
| 355 |
@media screen { |
| 356 |
aside:hover > a.pilcrow, |
| 357 |
p:hover > a.pilcrow, |
| 358 |
blockquote:hover > a.pilcrow, |
| 359 |
div:hover > a.pilcrow, |
| 360 |
li:hover > a.pilcrow, |
| 361 |
pre:hover > a.pilcrow { |
| 362 |
visibility: visible; |
| 363 |
} |
| 364 |
a.pilcrow:hover { |
| 365 |
background-color: transparent; |
| 366 |
} |
| 367 |
} |
| 368 |
|
| 369 |
/* misc */ |
| 370 |
hr { |
| 371 |
border: 0; |
| 372 |
border-top: 1px solid #eee; |
| 373 |
} |
| 374 |
.bcp14 { |
| 375 |
font-variant: small-caps; |
| 376 |
} |
| 377 |
|
| 378 |
.role { |
| 379 |
font-variant: all-small-caps; |
| 380 |
} |
| 381 |
|
| 382 |
/* info block */ |
| 383 |
#identifiers { |
| 384 |
margin: 0; |
| 385 |
font-size: 0.9em; |
| 386 |
} |
| 387 |
#identifiers dt { |
| 388 |
width: 3em; |
| 389 |
clear: left; |
| 390 |
} |
| 391 |
#identifiers dd { |
| 392 |
float: left; |
| 393 |
margin-bottom: 0; |
| 394 |
} |
| 395 |
/* Fix PDF info block run off issue */ |
| 396 |
@media print { |
| 397 |
#identifiers dd { |
| 398 |
float: none; |
| 399 |
} |
| 400 |
} |
| 401 |
#identifiers .authors .author { |
| 402 |
display: inline-block; |
| 403 |
margin-right: 1.5em; |
| 404 |
} |
| 405 |
#identifiers .authors .org { |
| 406 |
font-style: italic; |
| 407 |
} |
| 408 |
|
| 409 |
/* The prepared/rendered info at the very bottom of the page */ |
| 410 |
.docInfo { |
| 411 |
color: #666; /* Arlen: WCAG 2019 */ |
| 412 |
font-size: 0.9em; |
| 413 |
font-style: italic; |
| 414 |
margin-top: 2em; |
| 415 |
} |
| 416 |
.docInfo .prepared { |
| 417 |
float: left; |
| 418 |
} |
| 419 |
.docInfo .prepared { |
| 420 |
float: right; |
| 421 |
} |
| 422 |
|
| 423 |
/* table of contents */ |
| 424 |
#toc { |
| 425 |
padding: 0.75em 0 2em 0; |
| 426 |
margin-bottom: 1em; |
| 427 |
} |
| 428 |
nav.toc ul { |
| 429 |
margin: 0 0.5em 0 0; |
| 430 |
padding: 0; |
| 431 |
list-style: none; |
| 432 |
} |
| 433 |
nav.toc li { |
| 434 |
line-height: 1.3em; |
| 435 |
margin: 0.75em 0; |
| 436 |
padding-left: 1.2em; |
| 437 |
text-indent: -1.2em; |
| 438 |
} |
| 439 |
/* references */ |
| 440 |
.references dt { |
| 441 |
text-align: right; |
| 442 |
font-weight: bold; |
| 443 |
min-width: 7em; |
| 444 |
} |
| 445 |
.references dd { |
| 446 |
margin-left: 8em; |
| 447 |
overflow: auto; |
| 448 |
} |
| 449 |
|
| 450 |
.refInstance { |
| 451 |
margin-bottom: 1.25em; |
| 452 |
} |
| 453 |
|
| 454 |
.references .ascii { |
| 455 |
margin-bottom: 0.25em; |
| 456 |
} |
| 457 |
|
| 458 |
/* index */ |
| 459 |
.index ul { |
| 460 |
margin: 0 0 0 1em; |
| 461 |
padding: 0; |
| 462 |
list-style: none; |
| 463 |
} |
| 464 |
.index ul ul { |
| 465 |
margin: 0; |
| 466 |
} |
| 467 |
.index li { |
| 468 |
margin: 0; |
| 469 |
text-indent: -2em; |
| 470 |
padding-left: 2em; |
| 471 |
padding-bottom: 5px; |
| 472 |
} |
| 473 |
.indexIndex { |
| 474 |
margin: 0.5em 0 1em; |
| 475 |
} |
| 476 |
.index a { |
| 477 |
font-weight: 700; |
| 478 |
} |
| 479 |
/* make the index two-column on all but the smallest screens */ |
| 480 |
@media (min-width: 600px) { |
| 481 |
.index ul { |
| 482 |
-moz-column-count: 2; |
| 483 |
-moz-column-gap: 20px; |
| 484 |
} |
| 485 |
.index ul ul { |
| 486 |
-moz-column-count: 1; |
| 487 |
-moz-column-gap: 0; |
| 488 |
} |
| 489 |
} |
| 490 |
|
| 491 |
/* authors */ |
| 492 |
address.vcard { |
| 493 |
font-style: normal; |
| 494 |
margin: 1em 0; |
| 495 |
} |
| 496 |
|
| 497 |
address.vcard .nameRole { |
| 498 |
font-weight: 700; |
| 499 |
margin-left: 0; |
| 500 |
} |
| 501 |
address.vcard .label { |
| 502 |
font-family: "Noto Sans",Arial,Helvetica,sans-serif; |
| 503 |
margin: 0.5em 0; |
| 504 |
} |
| 505 |
address.vcard .type { |
| 506 |
display: none; |
| 507 |
} |
| 508 |
.alternative-contact { |
| 509 |
margin: 1.5em 0 1em; |
| 510 |
} |
| 511 |
hr.addr { |
| 512 |
border-top: 1px dashed; |
| 513 |
margin: 0; |
| 514 |
color: #ddd; |
| 515 |
max-width: calc(100% - 16px); |
| 516 |
} |
| 517 |
|
| 518 |
/* temporary notes */ |
| 519 |
.rfcEditorRemove::before { |
| 520 |
position: absolute; |
| 521 |
top: 0.2em; |
| 522 |
right: 0.2em; |
| 523 |
padding: 0.2em; |
| 524 |
content: "The RFC Editor will remove this note"; |
| 525 |
color: #9e2a00; /* Arlen: WCAG 2019 */ |
| 526 |
background-color: #ffd; /* Arlen: WCAG 2019 */ |
| 527 |
} |
| 528 |
.rfcEditorRemove { |
| 529 |
position: relative; |
| 530 |
padding-top: 1.8em; |
| 531 |
background-color: #ffd; /* Arlen: WCAG 2019 */ |
| 532 |
border-radius: 3px; |
| 533 |
} |
| 534 |
.cref { |
| 535 |
background-color: #ffd; /* Arlen: WCAG 2019 */ |
| 536 |
padding: 2px 4px; |
| 537 |
} |
| 538 |
.crefSource { |
| 539 |
font-style: italic; |
| 540 |
} |
| 541 |
/* alternative layout for smaller screens */ |
| 542 |
@media screen and (max-width: 1023px) { |
| 543 |
body { |
| 544 |
padding-top: 2em; |
| 545 |
} |
| 546 |
#title { |
| 547 |
padding: 1em 0; |
| 548 |
} |
| 549 |
h1 { |
| 550 |
font-size: 24px; |
| 551 |
} |
| 552 |
h2 { |
| 553 |
font-size: 20px; |
| 554 |
margin-top: -18px; /* provide offset for in-page anchors */ |
| 555 |
padding-top: 38px; |
| 556 |
} |
| 557 |
#identifiers dd { |
| 558 |
max-width: 60%; |
| 559 |
} |
| 560 |
#toc { |
| 561 |
position: fixed; |
| 562 |
z-index: 2; |
| 563 |
top: 0; |
| 564 |
right: 0; |
| 565 |
padding: 0; |
| 566 |
margin: 0; |
| 567 |
background-color: inherit; |
| 568 |
border-bottom: 1px solid #ccc; |
| 569 |
} |
| 570 |
#toc h2 { |
| 571 |
margin: -1px 0 0 0; |
| 572 |
padding: 4px 0 4px 6px; |
| 573 |
padding-right: 1em; |
| 574 |
min-width: 190px; |
| 575 |
font-size: 1.1em; |
| 576 |
text-align: right; |
| 577 |
background-color: #444; |
| 578 |
color: white; |
| 579 |
cursor: pointer; |
| 580 |
} |
| 581 |
#toc h2::before { /* css hamburger */ |
| 582 |
float: right; |
| 583 |
position: relative; |
| 584 |
width: 1em; |
| 585 |
height: 1px; |
| 586 |
left: -164px; |
| 587 |
margin: 6px 0 0 0; |
| 588 |
background: white none repeat scroll 0 0; |
| 589 |
box-shadow: 0 4px 0 0 white, 0 8px 0 0 white; |
| 590 |
content: ""; |
| 591 |
} |
| 592 |
#toc nav { |
| 593 |
display: none; |
| 594 |
padding: 0.5em 1em 1em; |
| 595 |
overflow: auto; |
| 596 |
height: calc(100vh - 48px); |
| 597 |
border-left: 1px solid #ddd; |
| 598 |
} |
| 599 |
} |
| 600 |
|
| 601 |
/* alternative layout for wide screens */ |
| 602 |
@media screen and (min-width: 1024px) { |
| 603 |
body { |
| 604 |
max-width: 724px; |
| 605 |
margin: 42px auto; |
| 606 |
padding-left: 1.5em; |
| 607 |
padding-right: 29em; |
| 608 |
} |
| 609 |
#toc { |
| 610 |
position: fixed; |
| 611 |
top: 42px; |
| 612 |
right: 42px; |
| 613 |
width: 25%; |
| 614 |
margin: 0; |
| 615 |
padding: 0 1em; |
| 616 |
z-index: 1; |
| 617 |
} |
| 618 |
#toc h2 { |
| 619 |
border-top: none; |
| 620 |
border-bottom: 1px solid #ddd; |
| 621 |
font-size: 1em; |
| 622 |
font-weight: normal; |
| 623 |
margin: 0; |
| 624 |
padding: 0.25em 1em 1em 0; |
| 625 |
} |
| 626 |
#toc nav { |
| 627 |
display: block; |
| 628 |
height: calc(90vh - 84px); |
| 629 |
bottom: 0; |
| 630 |
padding: 0.5em 0 0; |
| 631 |
overflow: auto; |
| 632 |
} |
| 633 |
img { /* future proofing */ |
| 634 |
max-width: 100%; |
| 635 |
height: auto; |
| 636 |
} |
| 637 |
} |
| 638 |
|
| 639 |
/* pagination */ |
| 640 |
@media print { |
| 641 |
body { |
| 642 |
|
| 643 |
width: 100%; |
| 644 |
} |
| 645 |
p { |
| 646 |
orphans: 3; |
| 647 |
widows: 3; |
| 648 |
} |
| 649 |
#n-copyright-notice { |
| 650 |
border-bottom: none; |
| 651 |
} |
| 652 |
#toc, #n-introduction { |
| 653 |
page-break-before: always; |
| 654 |
} |
| 655 |
#toc { |
| 656 |
border-top: none; |
| 657 |
padding-top: 0; |
| 658 |
} |
| 659 |
figure, pre { |
| 660 |
page-break-inside: avoid; |
| 661 |
} |
| 662 |
figure { |
| 663 |
overflow: scroll; |
| 664 |
} |
| 665 |
pre.breakable { |
| 666 |
break-inside: auto; |
| 667 |
} |
| 668 |
h1, h2, h3, h4, h5, h6 { |
| 669 |
page-break-after: avoid; |
| 670 |
} |
| 671 |
h2+*, h3+*, h4+*, h5+*, h6+* { |
| 672 |
page-break-before: avoid; |
| 673 |
} |
| 674 |
pre { |
| 675 |
white-space: pre-wrap; |
| 676 |
word-wrap: break-word; |
| 677 |
font-size: 10pt; |
| 678 |
} |
| 679 |
table { |
| 680 |
border: 1px solid #ddd; |
| 681 |
} |
| 682 |
td { |
| 683 |
border-top: 1px solid #ddd; |
| 684 |
} |
| 685 |
} |
| 686 |
|
| 687 |
/* This is commented out here, as the string-set: doesn't |
| 688 |
pass W3C validation currently */ |
| 689 |
/* |
| 690 |
.ears thead .left { |
| 691 |
string-set: ears-top-left content(); |
| 692 |
} |
| 693 |
|
| 694 |
.ears thead .center { |
| 695 |
string-set: ears-top-center content(); |
| 696 |
} |
| 697 |
|
| 698 |
.ears thead .right { |
| 699 |
string-set: ears-top-right content(); |
| 700 |
} |
| 701 |
|
| 702 |
.ears tfoot .left { |
| 703 |
string-set: ears-bottom-left content(); |
| 704 |
} |
| 705 |
|
| 706 |
.ears tfoot .center { |
| 707 |
string-set: ears-bottom-center content(); |
| 708 |
} |
| 709 |
|
| 710 |
.ears tfoot .right { |
| 711 |
string-set: ears-bottom-right content(); |
| 712 |
} |
| 713 |
*/ |
| 714 |
|
| 715 |
@page :first { |
| 716 |
padding-top: 0; |
| 717 |
@top-left { |
| 718 |
content: normal; |
| 719 |
border: none; |
| 720 |
} |
| 721 |
@top-center { |
| 722 |
content: normal; |
| 723 |
border: none; |
| 724 |
} |
| 725 |
@top-right { |
| 726 |
content: normal; |
| 727 |
border: none; |
| 728 |
} |
| 729 |
} |
| 730 |
|
| 731 |
@page { |
| 732 |
size: A4; |
| 733 |
margin-bottom: 45mm; |
| 734 |
padding-top: 20px; |
| 735 |
/* The follwing is commented out here, but set appropriately by in code, as |
| 736 |
the content depends on the document */ |
| 737 |
/* |
| 738 |
@top-left { |
| 739 |
content: 'Internet-Draft'; |
| 740 |
vertical-align: bottom; |
| 741 |
border-bottom: solid 1px #ccc; |
| 742 |
} |
| 743 |
@top-left { |
| 744 |
content: string(ears-top-left); |
| 745 |
vertical-align: bottom; |
| 746 |
border-bottom: solid 1px #ccc; |
| 747 |
} |
| 748 |
@top-center { |
| 749 |
content: string(ears-top-center); |
| 750 |
vertical-align: bottom; |
| 751 |
border-bottom: solid 1px #ccc; |
| 752 |
} |
| 753 |
@top-right { |
| 754 |
content: string(ears-top-right); |
| 755 |
vertical-align: bottom; |
| 756 |
border-bottom: solid 1px #ccc; |
| 757 |
} |
| 758 |
@bottom-left { |
| 759 |
content: string(ears-bottom-left); |
| 760 |
vertical-align: top; |
| 761 |
border-top: solid 1px #ccc; |
| 762 |
} |
| 763 |
@bottom-center { |
| 764 |
content: string(ears-bottom-center); |
| 765 |
vertical-align: top; |
| 766 |
border-top: solid 1px #ccc; |
| 767 |
} |
| 768 |
@bottom-right { |
| 769 |
content: '[Page ' counter(page) ']'; |
| 770 |
vertical-align: top; |
| 771 |
border-top: solid 1px #ccc; |
| 772 |
} |
| 773 |
*/ |
| 774 |
|
| 775 |
} |
| 776 |
|
| 777 |
/* Changes introduced to fix issues found during implementation */ |
| 778 |
/* Make sure links are clickable even if overlapped by following H* */ |
| 779 |
a { |
| 780 |
z-index: 2; |
| 781 |
} |
| 782 |
/* Separate body from document info even without intervening H1 */ |
| 783 |
section { |
| 784 |
clear: both; |
| 785 |
} |
| 786 |
|
| 787 |
|
| 788 |
/* Top align author divs, to avoid names without organization dropping level with org names */ |
| 789 |
.author { |
| 790 |
vertical-align: top; |
| 791 |
} |
| 792 |
|
| 793 |
/* Leave room in document info to show Internet-Draft on one line */ |
| 794 |
#identifiers dt { |
| 795 |
width: 8em; |
| 796 |
} |
| 797 |
|
| 798 |
/* Don't waste quite as much whitespace between label and value in doc info */ |
| 799 |
#identifiers dd { |
| 800 |
margin-left: 1em; |
| 801 |
} |
| 802 |
|
| 803 |
/* Give floating toc a background color (needed when it's a div inside section */ |
| 804 |
#toc { |
| 805 |
background-color: white; |
| 806 |
} |
| 807 |
|
| 808 |
/* Make the collapsed ToC header render white on gray also when it's a link */ |
| 809 |
@media screen and (max-width: 1023px) { |
| 810 |
#toc h2 a, |
| 811 |
#toc h2 a:link, |
| 812 |
#toc h2 a:focus, |
| 813 |
#toc h2 a:hover, |
| 814 |
#toc a.toplink, |
| 815 |
#toc a.toplink:hover { |
| 816 |
color: white; |
| 817 |
background-color: #444; |
| 818 |
text-decoration: none; |
| 819 |
} |
| 820 |
} |
| 821 |
|
| 822 |
/* Give the bottom of the ToC some whitespace */ |
| 823 |
@media screen and (min-width: 1024px) { |
| 824 |
#toc { |
| 825 |
padding: 0 0 1em 1em; |
| 826 |
} |
| 827 |
} |
| 828 |
|
| 829 |
/* Style section numbers with more space between number and title */ |
| 830 |
.section-number { |
| 831 |
padding-right: 0.5em; |
| 832 |
} |
| 833 |
|
| 834 |
/* prevent monospace from becoming overly large */ |
| 835 |
tt, code, pre, code { |
| 836 |
font-size: 95%; |
| 837 |
} |
| 838 |
|
| 839 |
/* Fix the height/width aspect for ascii art*/ |
| 840 |
pre.sourcecode, |
| 841 |
.art-text pre { |
| 842 |
line-height: 1.12; |
| 843 |
} |
| 844 |
|
| 845 |
|
| 846 |
/* Add styling for a link in the ToC that points to the top of the document */ |
| 847 |
a.toplink { |
| 848 |
float: right; |
| 849 |
margin-right: 0.5em; |
| 850 |
} |
| 851 |
|
| 852 |
/* Fix the dl styling to match the RFC 7992 attributes */ |
| 853 |
dl > dt, |
| 854 |
dl.dlParallel > dt { |
| 855 |
float: left; |
| 856 |
margin-right: 1em; |
| 857 |
} |
| 858 |
dl.dlNewline > dt { |
| 859 |
float: none; |
| 860 |
} |
| 861 |
|
| 862 |
/* Provide styling for table cell text alignment */ |
| 863 |
table td.text-left, |
| 864 |
table th.text-left { |
| 865 |
text-align: left; |
| 866 |
} |
| 867 |
table td.text-center, |
| 868 |
table th.text-center { |
| 869 |
text-align: center; |
| 870 |
} |
| 871 |
table td.text-right, |
| 872 |
table th.text-right { |
| 873 |
text-align: right; |
| 874 |
} |
| 875 |
|
| 876 |
/* Make the alternative author contact informatio look less like just another |
| 877 |
author, and group it closer with the primary author contact information */ |
| 878 |
.alternative-contact { |
| 879 |
margin: 0.5em 0 0.25em 0; |
| 880 |
} |
| 881 |
address .non-ascii { |
| 882 |
margin: 0 0 0 2em; |
| 883 |
} |
| 884 |
|
| 885 |
/* With it being possible to set tables with alignment |
| 886 |
left, center, and right, { width: 100%; } does not make sense */ |
| 887 |
table { |
| 888 |
width: auto; |
| 889 |
} |
| 890 |
|
| 891 |
/* Avoid reference text that sits in a block with very wide left margin, |
| 892 |
because of a long floating dt label.*/ |
| 893 |
.references dd { |
| 894 |
overflow: visible; |
| 895 |
} |
| 896 |
|
| 897 |
/* Control caption placement */ |
| 898 |
caption { |
| 899 |
caption-side: bottom; |
| 900 |
} |
| 901 |
|
| 902 |
/* Limit the width of the author address vcard, so names in right-to-left |
| 903 |
script don't end up on the other side of the page. */ |
| 904 |
|
| 905 |
address.vcard { |
| 906 |
max-width: 30em; |
| 907 |
margin-right: auto; |
| 908 |
} |
| 909 |
|
| 910 |
/* For address alignment dependent on LTR or RTL scripts */ |
| 911 |
address div.left { |
| 912 |
text-align: left; |
| 913 |
} |
| 914 |
address div.right { |
| 915 |
text-align: right; |
| 916 |
} |
| 917 |
|
| 918 |
/* Provide table alignment support. We can't use the alignX classes above |
| 919 |
since they do unwanted things with caption and other styling. */ |
| 920 |
table.right { |
| 921 |
margin-left: auto; |
| 922 |
margin-right: 0; |
| 923 |
} |
| 924 |
table.center { |
| 925 |
margin-left: auto; |
| 926 |
margin-right: auto; |
| 927 |
} |
| 928 |
table.left { |
| 929 |
margin-left: 0; |
| 930 |
margin-right: auto; |
| 931 |
} |
| 932 |
|
| 933 |
/* Give the table caption label the same styling as the figcaption */ |
| 934 |
caption a[href] { |
| 935 |
color: #222; |
| 936 |
} |
| 937 |
|
| 938 |
@media print { |
| 939 |
.toplink { |
| 940 |
display: none; |
| 941 |
} |
| 942 |
|
| 943 |
/* avoid overwriting the top border line with the ToC header */ |
| 944 |
#toc { |
| 945 |
padding-top: 1px; |
| 946 |
} |
| 947 |
|
| 948 |
/* Avoid page breaks inside dl and author address entries */ |
| 949 |
.vcard { |
| 950 |
page-break-inside: avoid; |
| 951 |
} |
| 952 |
|
| 953 |
} |
| 954 |
/* Tweak the bcp14 keyword presentation */ |
| 955 |
.bcp14 { |
| 956 |
font-variant: small-caps; |
| 957 |
font-weight: bold; |
| 958 |
font-size: 0.9em; |
| 959 |
} |
| 960 |
/* Tweak the invisible space above H* in order not to overlay links in text above */ |
| 961 |
h2 { |
| 962 |
margin-top: -18px; /* provide offset for in-page anchors */ |
| 963 |
padding-top: 31px; |
| 964 |
} |
| 965 |
h3 { |
| 966 |
margin-top: -18px; /* provide offset for in-page anchors */ |
| 967 |
padding-top: 24px; |
| 968 |
} |
| 969 |
h4 { |
| 970 |
margin-top: -18px; /* provide offset for in-page anchors */ |
| 971 |
padding-top: 24px; |
| 972 |
} |
| 973 |
/* Float artwork pilcrow to the right */ |
| 974 |
@media screen { |
| 975 |
.artwork a.pilcrow { |
| 976 |
display: block; |
| 977 |
line-height: 0.7; |
| 978 |
margin-top: 0.15em; |
| 979 |
} |
| 980 |
} |
| 981 |
/* Make pilcrows on dd visible */ |
| 982 |
@media screen { |
| 983 |
dd:hover > a.pilcrow { |
| 984 |
visibility: visible; |
| 985 |
} |
| 986 |
} |
| 987 |
/* Make the placement of figcaption match that of a table's caption |
| 988 |
by removing the figure's added bottom margin */ |
| 989 |
.alignLeft.art-text, |
| 990 |
.alignCenter.art-text, |
| 991 |
.alignRight.art-text { |
| 992 |
margin-bottom: 0; |
| 993 |
} |
| 994 |
.alignLeft, |
| 995 |
.alignCenter, |
| 996 |
.alignRight { |
| 997 |
margin: 1em 0 0 0; |
| 998 |
} |
| 999 |
/* In print, the pilcrow won't show on hover, so prevent it from taking up space, |
| 1000 |
possibly even requiring a new line */ |
| 1001 |
@media print { |
| 1002 |
a.pilcrow { |
| 1003 |
display: none; |
| 1004 |
} |
| 1005 |
} |
| 1006 |
/* Styling for the external metadata */ |
| 1007 |
div#external-metadata { |
| 1008 |
background-color: #eee; |
| 1009 |
padding: 0.5em; |
| 1010 |
margin-bottom: 0.5em; |
| 1011 |
display: none; |
| 1012 |
} |
| 1013 |
div#internal-metadata { |
| 1014 |
padding: 0.5em; /* to match the external-metadata padding */ |
| 1015 |
} |
| 1016 |
/* Styling for title RFC Number */ |
| 1017 |
h1#rfcnum { |
| 1018 |
clear: both; |
| 1019 |
margin: 0 0 -1em; |
| 1020 |
padding: 1em 0 0 0; |
| 1021 |
} |
| 1022 |
/* Make .olPercent look the same as <ol><li> */ |
| 1023 |
dl.olPercent > dd { |
| 1024 |
margin-bottom: 0.25em; |
| 1025 |
min-height: initial; |
| 1026 |
} |
| 1027 |
/* Give aside some styling to set it apart */ |
| 1028 |
aside { |
| 1029 |
border-left: 1px solid #ddd; |
| 1030 |
margin: 1em 0 1em 2em; |
| 1031 |
padding: 0.2em 2em; |
| 1032 |
} |
| 1033 |
aside > dl, |
| 1034 |
aside > ol, |
| 1035 |
aside > ul, |
| 1036 |
aside > table, |
| 1037 |
aside > p { |
| 1038 |
margin-bottom: 0.5em; |
| 1039 |
} |
| 1040 |
/* Additional page break settings */ |
| 1041 |
@media print { |
| 1042 |
figcaption, table caption { |
| 1043 |
page-break-before: avoid; |
| 1044 |
} |
| 1045 |
} |
| 1046 |
/* Font size adjustments for print */ |
| 1047 |
@media print { |
| 1048 |
body { font-size: 10pt; line-height: normal; max-width: 96%; } |
| 1049 |
h1 { font-size: 1.72em; padding-top: 1.5em; } /* 1*1.2*1.2*1.2 */ |
| 1050 |
h2 { font-size: 1.44em; padding-top: 1.5em; } /* 1*1.2*1.2 */ |
| 1051 |
h3 { font-size: 1.2em; padding-top: 1.5em; } /* 1*1.2 */ |
| 1052 |
h4 { font-size: 1em; padding-top: 1.5em; } |
| 1053 |
h5, h6 { font-size: 1em; margin: initial; padding: 0.5em 0 0.3em; } |
| 1054 |
} |
| 1055 |
/* Sourcecode margin in print, when there's no pilcrow */ |
| 1056 |
@media print { |
| 1057 |
.artwork, |
| 1058 |
.sourcecode { |
| 1059 |
margin-bottom: 1em; |
| 1060 |
} |
| 1061 |
} |
| 1062 |
/* Avoid narrow tables forcing too narrow table captions, which may render badly */ |
| 1063 |
table { |
| 1064 |
min-width: 20em; |
| 1065 |
} |
| 1066 |
/* ol type a */ |
| 1067 |
ol.type-a { list-style-type: lower-alpha; } |
| 1068 |
ol.type-A { list-style-type: upper-alpha; } |
| 1069 |
ol.type-i { list-style-type: lower-roman; } |
| 1070 |
ol.type-I { list-style-type: lower-roman; } |
| 1071 |
/* Apply the print table and row borders in general, on request from the RPC, |
| 1072 |
and increase the contrast between border and odd row background sligthtly */ |
| 1073 |
table { |
| 1074 |
border: 1px solid #ddd; |
| 1075 |
} |
| 1076 |
td { |
| 1077 |
border-top: 1px solid #ddd; |
| 1078 |
} |
| 1079 |
tr:nth-child(2n+1) > td { |
| 1080 |
background-color: #f8f8f8; |
| 1081 |
} |
| 1082 |
/* Use style rules to govern display of the TOC. */ |
| 1083 |
@media screen and (max-width: 1023px) { |
| 1084 |
#toc nav { display: none; } |
| 1085 |
#toc.active nav { display: block; } |
| 1086 |
} |
| 1087 |
/* Add support for keepWithNext */ |
| 1088 |
.keepWithNext { |
| 1089 |
break-after: avoid-page; |
| 1090 |
break-after: avoid-page; |
| 1091 |
} |
| 1092 |
/* Add support for keepWithPrevious */ |
| 1093 |
.keepWithPrevious { |
| 1094 |
break-before: avoid-page; |
| 1095 |
} |
| 1096 |
/* Change the approach to avoiding breaks inside artwork etc. */ |
| 1097 |
figure, pre, table, .artwork, .sourcecode { |
| 1098 |
break-before: auto; |
| 1099 |
break-after: auto; |
| 1100 |
} |
| 1101 |
/* Avoid breaks between <dt> and <dd> */ |
| 1102 |
dl { |
| 1103 |
break-before: auto; |
| 1104 |
break-inside: auto; |
| 1105 |
} |
| 1106 |
dt { |
| 1107 |
break-before: auto; |
| 1108 |
break-after: avoid-page; |
| 1109 |
} |
| 1110 |
dd { |
| 1111 |
break-before: avoid-page; |
| 1112 |
break-after: auto; |
| 1113 |
orphans: 3; |
| 1114 |
widows: 3 |
| 1115 |
} |
| 1116 |
span.break, dd.break { |
| 1117 |
margin-bottom: 0; |
| 1118 |
min-height: 0; |
| 1119 |
break-before: auto; |
| 1120 |
break-inside: auto; |
| 1121 |
break-after: auto; |
| 1122 |
} |
| 1123 |
/* Undo break-before ToC */ |
| 1124 |
@media print { |
| 1125 |
#toc { |
| 1126 |
break-before: auto; |
| 1127 |
} |
| 1128 |
} |
| 1129 |
/* Text in compact lists should not get extra bottim margin space, |
| 1130 |
since that would makes the list not compact */ |
| 1131 |
ul.compact p, .ulCompact p, |
| 1132 |
ol.compact p, .olCompact p { |
| 1133 |
margin: 0; |
| 1134 |
} |
| 1135 |
/* But the list as a whole needs the extra space at the end */ |
| 1136 |
section ul.compact, |
| 1137 |
section .ulCompact, |
| 1138 |
section ol.compact, |
| 1139 |
section .olCompact { |
| 1140 |
margin-bottom: 1em; /* same as p not within ul.compact etc. */ |
| 1141 |
} |
| 1142 |
/* The tt and code background above interferes with for instance table cell |
| 1143 |
backgrounds. Changed to something a bit more selective. */ |
| 1144 |
tt, code { |
| 1145 |
background-color: transparent; |
| 1146 |
} |
| 1147 |
p tt, p code, li tt, li code { |
| 1148 |
background-color: #f8f8f8; |
| 1149 |
} |
| 1150 |
/* Tweak the pre margin -- 0px doesn't come out well */ |
| 1151 |
pre { |
| 1152 |
margin-top: 0.5px; |
| 1153 |
} |
| 1154 |
/* Tweak the comact list text */ |
| 1155 |
ul.compact, .ulCompact, |
| 1156 |
ol.compact, .olCompact, |
| 1157 |
dl.compact, .dlCompact { |
| 1158 |
line-height: normal; |
| 1159 |
} |
| 1160 |
/* Don't add top margin for nested lists */ |
| 1161 |
li > ul, li > ol, li > dl, |
| 1162 |
dd > ul, dd > ol, dd > dl, |
| 1163 |
dl > dd > dl { |
| 1164 |
margin-top: initial; |
| 1165 |
} |
| 1166 |
/* Elements that should not be rendered on the same line as a <dt> */ |
| 1167 |
/* This should match the element list in writer.text.TextWriter.render_dl() */ |
| 1168 |
dd > div.artwork:first-child, |
| 1169 |
dd > aside:first-child, |
| 1170 |
dd > figure:first-child, |
| 1171 |
dd > ol:first-child, |
| 1172 |
dd > div:first-child > pre.sourcecode, |
| 1173 |
dd > table:first-child, |
| 1174 |
dd > ul:first-child { |
| 1175 |
clear: left; |
| 1176 |
} |
| 1177 |
/* fix for weird browser behaviour when <dd/> is empty */ |
| 1178 |
dt+dd:empty::before{ |
| 1179 |
content: "\00a0"; |
| 1180 |
} |
| 1181 |
/* Make paragraph spacing inside <li> smaller than in body text, to fit better within the list */ |
| 1182 |
li > p { |
| 1183 |
margin-bottom: 0.5em |
| 1184 |
} |
| 1185 |
/* Don't let p margin spill out from inside list items */ |
| 1186 |
li > p:last-of-type { |
| 1187 |
margin-bottom: 0; |
| 1188 |
} |
| 1189 |
</style> |
| 1190 |
<link href="rfc-local.css" rel="stylesheet" type="text/css"> |
| 1191 |
<link href="https://dx.doi.org/10.17487/rfc9204" rel="alternate"> |
| 1192 |
<link href="urn:issn:2070-1721" rel="alternate"> |
| 1193 |
<link href="https://datatracker.ietf.org/doc/draft-ietf-quic-qpack-latest" rel="prev"> |
| 1194 |
</head> |
| 1195 |
<body> |
| 1196 |
<script src="https://www.rfc-editor.org/js/metadata.min.js"></script> |
| 1197 |
<table class="ears"> |
| 1198 |
<thead><tr> |
| 1199 |
<td class="left">RFC 9204</td> |
| 1200 |
<td class="center">QPACK</td> |
| 1201 |
<td class="right">June 2022</td> |
| 1202 |
</tr></thead> |
| 1203 |
<tfoot><tr> |
| 1204 |
<td class="left">Krasic, et al.</td> |
| 1205 |
<td class="center">Standards Track</td> |
| 1206 |
<td class="right">[Page]</td> |
| 1207 |
</tr></tfoot> |
| 1208 |
</table> |
| 1209 |
<div id="external-metadata" class="document-information"></div> |
| 1210 |
<div id="internal-metadata" class="document-information"> |
| 1211 |
<dl id="identifiers"> |
| 1212 |
<dt class="label-stream">Stream:</dt> |
| 1213 |
<dd class="stream">Internet Engineering Task Force (IETF)</dd> |
| 1214 |
<dt class="label-rfc">RFC:</dt> |
| 1215 |
<dd class="rfc"><a href="https://www.rfc-editor.org/rfc/rfc9204" class="eref">9204</a></dd> |
| 1216 |
<dt class="label-category">Category:</dt> |
| 1217 |
<dd class="category">Standards Track</dd> |
| 1218 |
<dt class="label-published">Published:</dt> |
| 1219 |
<dd class="published"> |
| 1220 |
<time datetime="2022-06" class="published">June 2022</time> |
| 1221 |
</dd> |
| 1222 |
<dt class="label-issn">ISSN:</dt> |
| 1223 |
<dd class="issn">2070-1721</dd> |
| 1224 |
<dt class="label-authors">Authors:</dt> |
| 1225 |
<dd class="authors"> |
| 1226 |
<div class="author"> |
| 1227 |
<div class="author-name">C. Krasic</div> |
| 1228 |
</div> |
| 1229 |
<div class="author"> |
| 1230 |
<div class="author-name">M. Bishop</div> |
| 1231 |
<div class="org">Akamai Technologies</div> |
| 1232 |
</div> |
| 1233 |
<div class="author"> |
| 1234 |
<div class="author-name">A. Frindell, <span class="editor">Ed.</span> |
| 1235 |
</div> |
| 1236 |
<div class="org">Facebook</div> |
| 1237 |
</div> |
| 1238 |
</dd> |
| 1239 |
</dl> |
| 1240 |
</div> |
| 1241 |
<h1 id="rfcnum">RFC 9204</h1> |
| 1242 |
<h1 id="title">QPACK: Field Compression for HTTP/3</h1> |
| 1243 |
<section id="section-abstract"> |
| 1244 |
<h2 id="abstract"><a href="#abstract" class="selfRef">Abstract</a></h2> |
| 1245 |
<p id="section-abstract-1">This specification defines QPACK: a compression format for efficiently |
| 1246 |
representing HTTP fields that is to be used in HTTP/3. This is a variation of |
| 1247 |
HPACK compression that seeks to reduce head-of-line blocking.<a href="#section-abstract-1" class="pilcrow">¶</a></p> |
| 1248 |
</section> |
| 1249 |
<div id="status-of-memo"> |
| 1250 |
<section id="section-boilerplate.1"> |
| 1251 |
<h2 id="name-status-of-this-memo"> |
| 1252 |
<a href="#name-status-of-this-memo" class="section-name selfRef">Status of This Memo</a> |
| 1253 |
</h2> |
| 1254 |
<p id="section-boilerplate.1-1"> |
| 1255 |
This is an Internet Standards Track document.<a href="#section-boilerplate.1-1" class="pilcrow">¶</a></p> |
| 1256 |
<p id="section-boilerplate.1-2"> |
| 1257 |
This document is a product of the Internet Engineering Task Force |
| 1258 |
(IETF). It represents the consensus of the IETF community. It has |
| 1259 |
received public review and has been approved for publication by |
| 1260 |
the Internet Engineering Steering Group (IESG). Further |
| 1261 |
information on Internet Standards is available in Section 2 of |
| 1262 |
RFC 7841.<a href="#section-boilerplate.1-2" class="pilcrow">¶</a></p> |
| 1263 |
<p id="section-boilerplate.1-3"> |
| 1264 |
Information about the current status of this document, any |
| 1265 |
errata, and how to provide feedback on it may be obtained at |
| 1266 |
<span><a href="https://www.rfc-editor.org/info/rfc9204">https://www.rfc-editor.org/info/rfc9204</a></span>.<a href="#section-boilerplate.1-3" class="pilcrow">¶</a></p> |
| 1267 |
</section> |
| 1268 |
</div> |
| 1269 |
<div id="copyright"> |
| 1270 |
<section id="section-boilerplate.2"> |
| 1271 |
<h2 id="name-copyright-notice"> |
| 1272 |
<a href="#name-copyright-notice" class="section-name selfRef">Copyright Notice</a> |
| 1273 |
</h2> |
| 1274 |
<p id="section-boilerplate.2-1"> |
| 1275 |
Copyright (c) 2022 IETF Trust and the persons identified as the |
| 1276 |
document authors. All rights reserved.<a href="#section-boilerplate.2-1" class="pilcrow">¶</a></p> |
| 1277 |
<p id="section-boilerplate.2-2"> |
| 1278 |
This document is subject to BCP 78 and the IETF Trust's Legal |
| 1279 |
Provisions Relating to IETF Documents |
| 1280 |
(<span><a href="https://trustee.ietf.org/license-info">https://trustee.ietf.org/license-info</a></span>) in effect on the date of |
| 1281 |
publication of this document. Please review these documents |
| 1282 |
carefully, as they describe your rights and restrictions with |
| 1283 |
respect to this document. Code Components extracted from this |
| 1284 |
document must include Revised BSD License text as described in |
| 1285 |
Section 4.e of the Trust Legal Provisions and are provided without |
| 1286 |
warranty as described in the Revised BSD License.<a href="#section-boilerplate.2-2" class="pilcrow">¶</a></p> |
| 1287 |
</section> |
| 1288 |
</div> |
| 1289 |
<div id="toc"> |
| 1290 |
<section id="section-toc.1"> |
| 1291 |
<a href="#" onclick="scroll(0,0)" class="toplink">▲</a><h2 id="name-table-of-contents"> |
| 1292 |
<a href="#name-table-of-contents" class="section-name selfRef">Table of Contents</a> |
| 1293 |
</h2> |
| 1294 |
<nav class="toc"><ul class="compact toc ulBare ulEmpty"> |
| 1295 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.1"> |
| 1296 |
<p id="section-toc.1-1.1.1" class="keepWithNext"><a href="#section-1" class="xref">1</a>. <a href="#name-introduction" class="xref">Introduction</a></p> |
| 1297 |
<ul class="compact toc ulBare ulEmpty"> |
| 1298 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.1.2.1"> |
| 1299 |
<p id="section-toc.1-1.1.2.1.1" class="keepWithNext"><a href="#section-1.1" class="xref">1.1</a>. <a href="#name-conventions-and-definitions" class="xref">Conventions and Definitions</a></p> |
| 1300 |
</li> |
| 1301 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.1.2.2"> |
| 1302 |
<p id="section-toc.1-1.1.2.2.1" class="keepWithNext"><a href="#section-1.2" class="xref">1.2</a>. <a href="#name-notational-conventions" class="xref">Notational Conventions</a></p> |
| 1303 |
</li> |
| 1304 |
</ul> |
| 1305 |
</li> |
| 1306 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2"> |
| 1307 |
<p id="section-toc.1-1.2.1"><a href="#section-2" class="xref">2</a>. <a href="#name-compression-process-overvie" class="xref">Compression Process Overview</a></p> |
| 1308 |
<ul class="compact toc ulBare ulEmpty"> |
| 1309 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.1"> |
| 1310 |
<p id="section-toc.1-1.2.2.1.1"><a href="#section-2.1" class="xref">2.1</a>. <a href="#name-encoder" class="xref">Encoder</a></p> |
| 1311 |
<ul class="compact toc ulBare ulEmpty"> |
| 1312 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.1.2.1"> |
| 1313 |
<p id="section-toc.1-1.2.2.1.2.1.1"><a href="#section-2.1.1" class="xref">2.1.1</a>. <a href="#name-limits-on-dynamic-table-ins" class="xref">Limits on Dynamic Table Insertions</a></p> |
| 1314 |
</li> |
| 1315 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.1.2.2"> |
| 1316 |
<p id="section-toc.1-1.2.2.1.2.2.1"><a href="#section-2.1.2" class="xref">2.1.2</a>. <a href="#name-blocked-streams" class="xref">Blocked Streams</a></p> |
| 1317 |
</li> |
| 1318 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.1.2.3"> |
| 1319 |
<p id="section-toc.1-1.2.2.1.2.3.1"><a href="#section-2.1.3" class="xref">2.1.3</a>. <a href="#name-avoiding-flow-control-deadl" class="xref">Avoiding Flow-Control Deadlocks</a></p> |
| 1320 |
</li> |
| 1321 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.1.2.4"> |
| 1322 |
<p id="section-toc.1-1.2.2.1.2.4.1"><a href="#section-2.1.4" class="xref">2.1.4</a>. <a href="#name-known-received-count" class="xref">Known Received Count</a></p> |
| 1323 |
</li> |
| 1324 |
</ul> |
| 1325 |
</li> |
| 1326 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.2"> |
| 1327 |
<p id="section-toc.1-1.2.2.2.1"><a href="#section-2.2" class="xref">2.2</a>. <a href="#name-decoder" class="xref">Decoder</a></p> |
| 1328 |
<ul class="compact toc ulBare ulEmpty"> |
| 1329 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.2.2.1"> |
| 1330 |
<p id="section-toc.1-1.2.2.2.2.1.1"><a href="#section-2.2.1" class="xref">2.2.1</a>. <a href="#name-blocked-decoding" class="xref">Blocked Decoding</a></p> |
| 1331 |
</li> |
| 1332 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.2.2.2"> |
| 1333 |
<p id="section-toc.1-1.2.2.2.2.2.1"><a href="#section-2.2.2" class="xref">2.2.2</a>. <a href="#name-state-synchronization" class="xref">State Synchronization</a></p> |
| 1334 |
</li> |
| 1335 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.2.2.3"> |
| 1336 |
<p id="section-toc.1-1.2.2.2.2.3.1"><a href="#section-2.2.3" class="xref">2.2.3</a>. <a href="#name-invalid-references" class="xref">Invalid References</a></p> |
| 1337 |
</li> |
| 1338 |
</ul> |
| 1339 |
</li> |
| 1340 |
</ul> |
| 1341 |
</li> |
| 1342 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3"> |
| 1343 |
<p id="section-toc.1-1.3.1"><a href="#section-3" class="xref">3</a>. <a href="#name-reference-tables" class="xref">Reference Tables</a></p> |
| 1344 |
<ul class="compact toc ulBare ulEmpty"> |
| 1345 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.1"> |
| 1346 |
<p id="section-toc.1-1.3.2.1.1"><a href="#section-3.1" class="xref">3.1</a>. <a href="#name-static-table" class="xref">Static Table</a></p> |
| 1347 |
</li> |
| 1348 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.2"> |
| 1349 |
<p id="section-toc.1-1.3.2.2.1"><a href="#section-3.2" class="xref">3.2</a>. <a href="#name-dynamic-table" class="xref">Dynamic Table</a></p> |
| 1350 |
<ul class="compact toc ulBare ulEmpty"> |
| 1351 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.2.2.1"> |
| 1352 |
<p id="section-toc.1-1.3.2.2.2.1.1"><a href="#section-3.2.1" class="xref">3.2.1</a>. <a href="#name-dynamic-table-size" class="xref">Dynamic Table Size</a></p> |
| 1353 |
</li> |
| 1354 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.2.2.2"> |
| 1355 |
<p id="section-toc.1-1.3.2.2.2.2.1"><a href="#section-3.2.2" class="xref">3.2.2</a>. <a href="#name-dynamic-table-capacity-and-" class="xref">Dynamic Table Capacity and Eviction</a></p> |
| 1356 |
</li> |
| 1357 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.2.2.3"> |
| 1358 |
<p id="section-toc.1-1.3.2.2.2.3.1"><a href="#section-3.2.3" class="xref">3.2.3</a>. <a href="#name-maximum-dynamic-table-capac" class="xref">Maximum Dynamic Table Capacity</a></p> |
| 1359 |
</li> |
| 1360 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.2.2.4"> |
| 1361 |
<p id="section-toc.1-1.3.2.2.2.4.1"><a href="#section-3.2.4" class="xref">3.2.4</a>. <a href="#name-absolute-indexing" class="xref">Absolute Indexing</a></p> |
| 1362 |
</li> |
| 1363 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.2.2.5"> |
| 1364 |
<p id="section-toc.1-1.3.2.2.2.5.1"><a href="#section-3.2.5" class="xref">3.2.5</a>. <a href="#name-relative-indexing" class="xref">Relative Indexing</a></p> |
| 1365 |
</li> |
| 1366 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.2.2.6"> |
| 1367 |
<p id="section-toc.1-1.3.2.2.2.6.1"><a href="#section-3.2.6" class="xref">3.2.6</a>. <a href="#name-post-base-indexing" class="xref">Post-Base Indexing</a></p> |
| 1368 |
</li> |
| 1369 |
</ul> |
| 1370 |
</li> |
| 1371 |
</ul> |
| 1372 |
</li> |
| 1373 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4"> |
| 1374 |
<p id="section-toc.1-1.4.1"><a href="#section-4" class="xref">4</a>. <a href="#name-wire-format" class="xref">Wire Format</a></p> |
| 1375 |
<ul class="compact toc ulBare ulEmpty"> |
| 1376 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.1"> |
| 1377 |
<p id="section-toc.1-1.4.2.1.1"><a href="#section-4.1" class="xref">4.1</a>. <a href="#name-primitives" class="xref">Primitives</a></p> |
| 1378 |
<ul class="compact toc ulBare ulEmpty"> |
| 1379 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.1.2.1"> |
| 1380 |
<p id="section-toc.1-1.4.2.1.2.1.1"><a href="#section-4.1.1" class="xref">4.1.1</a>. <a href="#name-prefixed-integers" class="xref">Prefixed Integers</a></p> |
| 1381 |
</li> |
| 1382 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.1.2.2"> |
| 1383 |
<p id="section-toc.1-1.4.2.1.2.2.1"><a href="#section-4.1.2" class="xref">4.1.2</a>. <a href="#name-string-literals" class="xref">String Literals</a></p> |
| 1384 |
</li> |
| 1385 |
</ul> |
| 1386 |
</li> |
| 1387 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.2"> |
| 1388 |
<p id="section-toc.1-1.4.2.2.1"><a href="#section-4.2" class="xref">4.2</a>. <a href="#name-encoder-and-decoder-streams" class="xref">Encoder and Decoder Streams</a></p> |
| 1389 |
</li> |
| 1390 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.3"> |
| 1391 |
<p id="section-toc.1-1.4.2.3.1"><a href="#section-4.3" class="xref">4.3</a>. <a href="#name-encoder-instructions" class="xref">Encoder Instructions</a></p> |
| 1392 |
<ul class="compact toc ulBare ulEmpty"> |
| 1393 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.3.2.1"> |
| 1394 |
<p id="section-toc.1-1.4.2.3.2.1.1"><a href="#section-4.3.1" class="xref">4.3.1</a>. <a href="#name-set-dynamic-table-capacity" class="xref">Set Dynamic Table Capacity</a></p> |
| 1395 |
</li> |
| 1396 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.3.2.2"> |
| 1397 |
<p id="section-toc.1-1.4.2.3.2.2.1"><a href="#section-4.3.2" class="xref">4.3.2</a>. <a href="#name-insert-with-name-reference" class="xref">Insert with Name Reference</a></p> |
| 1398 |
</li> |
| 1399 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.3.2.3"> |
| 1400 |
<p id="section-toc.1-1.4.2.3.2.3.1"><a href="#section-4.3.3" class="xref">4.3.3</a>. <a href="#name-insert-with-literal-name" class="xref">Insert with Literal Name</a></p> |
| 1401 |
</li> |
| 1402 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.3.2.4"> |
| 1403 |
<p id="section-toc.1-1.4.2.3.2.4.1"><a href="#section-4.3.4" class="xref">4.3.4</a>. <a href="#name-duplicate" class="xref">Duplicate</a></p> |
| 1404 |
</li> |
| 1405 |
</ul> |
| 1406 |
</li> |
| 1407 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.4"> |
| 1408 |
<p id="section-toc.1-1.4.2.4.1"><a href="#section-4.4" class="xref">4.4</a>. <a href="#name-decoder-instructions" class="xref">Decoder Instructions</a></p> |
| 1409 |
<ul class="compact toc ulBare ulEmpty"> |
| 1410 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.4.2.1"> |
| 1411 |
<p id="section-toc.1-1.4.2.4.2.1.1"><a href="#section-4.4.1" class="xref">4.4.1</a>. <a href="#name-section-acknowledgment" class="xref">Section Acknowledgment</a></p> |
| 1412 |
</li> |
| 1413 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.4.2.2"> |
| 1414 |
<p id="section-toc.1-1.4.2.4.2.2.1"><a href="#section-4.4.2" class="xref">4.4.2</a>. <a href="#name-stream-cancellation" class="xref">Stream Cancellation</a></p> |
| 1415 |
</li> |
| 1416 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.4.2.3"> |
| 1417 |
<p id="section-toc.1-1.4.2.4.2.3.1"><a href="#section-4.4.3" class="xref">4.4.3</a>. <a href="#name-insert-count-increment" class="xref">Insert Count Increment</a></p> |
| 1418 |
</li> |
| 1419 |
</ul> |
| 1420 |
</li> |
| 1421 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.5"> |
| 1422 |
<p id="section-toc.1-1.4.2.5.1"><a href="#section-4.5" class="xref">4.5</a>. <a href="#name-field-line-representations" class="xref">Field Line Representations</a></p> |
| 1423 |
<ul class="compact toc ulBare ulEmpty"> |
| 1424 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.5.2.1"> |
| 1425 |
<p id="section-toc.1-1.4.2.5.2.1.1"><a href="#section-4.5.1" class="xref">4.5.1</a>. <a href="#name-encoded-field-section-prefi" class="xref">Encoded Field Section Prefix</a></p> |
| 1426 |
</li> |
| 1427 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.5.2.2"> |
| 1428 |
<p id="section-toc.1-1.4.2.5.2.2.1"><a href="#section-4.5.2" class="xref">4.5.2</a>. <a href="#name-indexed-field-line" class="xref">Indexed Field Line</a></p> |
| 1429 |
</li> |
| 1430 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.5.2.3"> |
| 1431 |
<p id="section-toc.1-1.4.2.5.2.3.1"><a href="#section-4.5.3" class="xref">4.5.3</a>. <a href="#name-indexed-field-line-with-pos" class="xref">Indexed Field Line with Post-Base Index</a></p> |
| 1432 |
</li> |
| 1433 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.5.2.4"> |
| 1434 |
<p id="section-toc.1-1.4.2.5.2.4.1"><a href="#section-4.5.4" class="xref">4.5.4</a>. <a href="#name-literal-field-line-with-nam" class="xref">Literal Field Line with Name Reference</a></p> |
| 1435 |
</li> |
| 1436 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.5.2.5"> |
| 1437 |
<p id="section-toc.1-1.4.2.5.2.5.1"><a href="#section-4.5.5" class="xref">4.5.5</a>. <a href="#name-literal-field-line-with-pos" class="xref">Literal Field Line with Post-Base Name Reference</a></p> |
| 1438 |
</li> |
| 1439 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4.2.5.2.6"> |
| 1440 |
<p id="section-toc.1-1.4.2.5.2.6.1"><a href="#section-4.5.6" class="xref">4.5.6</a>. <a href="#name-literal-field-line-with-lit" class="xref">Literal Field Line with Literal Name</a></p> |
| 1441 |
</li> |
| 1442 |
</ul> |
| 1443 |
</li> |
| 1444 |
</ul> |
| 1445 |
</li> |
| 1446 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5"> |
| 1447 |
<p id="section-toc.1-1.5.1"><a href="#section-5" class="xref">5</a>. <a href="#name-configuration" class="xref">Configuration</a></p> |
| 1448 |
</li> |
| 1449 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.6"> |
| 1450 |
<p id="section-toc.1-1.6.1"><a href="#section-6" class="xref">6</a>. <a href="#name-error-handling" class="xref">Error Handling</a></p> |
| 1451 |
</li> |
| 1452 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7"> |
| 1453 |
<p id="section-toc.1-1.7.1"><a href="#section-7" class="xref">7</a>. <a href="#name-security-considerations" class="xref">Security Considerations</a></p> |
| 1454 |
<ul class="compact toc ulBare ulEmpty"> |
| 1455 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.1"> |
| 1456 |
<p id="section-toc.1-1.7.2.1.1"><a href="#section-7.1" class="xref">7.1</a>. <a href="#name-probing-dynamic-table-state" class="xref">Probing Dynamic Table State</a></p> |
| 1457 |
<ul class="compact toc ulBare ulEmpty"> |
| 1458 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.1.2.1"> |
| 1459 |
<p id="section-toc.1-1.7.2.1.2.1.1"><a href="#section-7.1.1" class="xref">7.1.1</a>. <a href="#name-applicability-to-qpack-and-" class="xref">Applicability to QPACK and HTTP</a></p> |
| 1460 |
</li> |
| 1461 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.1.2.2"> |
| 1462 |
<p id="section-toc.1-1.7.2.1.2.2.1"><a href="#section-7.1.2" class="xref">7.1.2</a>. <a href="#name-mitigation" class="xref">Mitigation</a></p> |
| 1463 |
</li> |
| 1464 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.1.2.3"> |
| 1465 |
<p id="section-toc.1-1.7.2.1.2.3.1"><a href="#section-7.1.3" class="xref">7.1.3</a>. <a href="#name-never-indexed-literals" class="xref">Never-Indexed Literals</a></p> |
| 1466 |
</li> |
| 1467 |
</ul> |
| 1468 |
</li> |
| 1469 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.2"> |
| 1470 |
<p id="section-toc.1-1.7.2.2.1"><a href="#section-7.2" class="xref">7.2</a>. <a href="#name-static-huffman-encoding" class="xref">Static Huffman Encoding</a></p> |
| 1471 |
</li> |
| 1472 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.3"> |
| 1473 |
<p id="section-toc.1-1.7.2.3.1"><a href="#section-7.3" class="xref">7.3</a>. <a href="#name-memory-consumption" class="xref">Memory Consumption</a></p> |
| 1474 |
</li> |
| 1475 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.4"> |
| 1476 |
<p id="section-toc.1-1.7.2.4.1"><a href="#section-7.4" class="xref">7.4</a>. <a href="#name-implementation-limits" class="xref">Implementation Limits</a></p> |
| 1477 |
</li> |
| 1478 |
</ul> |
| 1479 |
</li> |
| 1480 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8"> |
| 1481 |
<p id="section-toc.1-1.8.1"><a href="#section-8" class="xref">8</a>. <a href="#name-iana-considerations" class="xref">IANA Considerations</a></p> |
| 1482 |
<ul class="compact toc ulBare ulEmpty"> |
| 1483 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.1"> |
| 1484 |
<p id="section-toc.1-1.8.2.1.1"><a href="#section-8.1" class="xref">8.1</a>. <a href="#name-settings-registration" class="xref">Settings Registration</a></p> |
| 1485 |
</li> |
| 1486 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.2"> |
| 1487 |
<p id="section-toc.1-1.8.2.2.1"><a href="#section-8.2" class="xref">8.2</a>. <a href="#name-stream-type-registration" class="xref">Stream Type Registration</a></p> |
| 1488 |
</li> |
| 1489 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.3"> |
| 1490 |
<p id="section-toc.1-1.8.2.3.1"><a href="#section-8.3" class="xref">8.3</a>. <a href="#name-error-code-registration" class="xref">Error Code Registration</a></p> |
| 1491 |
</li> |
| 1492 |
</ul> |
| 1493 |
</li> |
| 1494 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.9"> |
| 1495 |
<p id="section-toc.1-1.9.1"><a href="#section-9" class="xref">9</a>. <a href="#name-references" class="xref">References</a></p> |
| 1496 |
<ul class="compact toc ulBare ulEmpty"> |
| 1497 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.9.2.1"> |
| 1498 |
<p id="section-toc.1-1.9.2.1.1"><a href="#section-9.1" class="xref">9.1</a>. <a href="#name-normative-references" class="xref">Normative References</a></p> |
| 1499 |
</li> |
| 1500 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.9.2.2"> |
| 1501 |
<p id="section-toc.1-1.9.2.2.1"><a href="#section-9.2" class="xref">9.2</a>. <a href="#name-informative-references" class="xref">Informative References</a></p> |
| 1502 |
</li> |
| 1503 |
</ul> |
| 1504 |
</li> |
| 1505 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.10"> |
| 1506 |
<p id="section-toc.1-1.10.1"><a href="#appendix-A" class="xref">Appendix A</a>. <a href="#name-static-table-2" class="xref">Static Table</a></p> |
| 1507 |
</li> |
| 1508 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.11"> |
| 1509 |
<p id="section-toc.1-1.11.1"><a href="#appendix-B" class="xref">Appendix B</a>. <a href="#name-encoding-and-decoding-examp" class="xref">Encoding and Decoding Examples</a></p> |
| 1510 |
<ul class="compact toc ulBare ulEmpty"> |
| 1511 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.11.2.1"> |
| 1512 |
<p id="section-toc.1-1.11.2.1.1"><a href="#appendix-B.1" class="xref">B.1</a>. <a href="#name-literal-field-line-with-name-" class="xref">Literal Field Line with Name Reference</a></p> |
| 1513 |
</li> |
| 1514 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.11.2.2"> |
| 1515 |
<p id="section-toc.1-1.11.2.2.1"><a href="#appendix-B.2" class="xref">B.2</a>. <a href="#name-dynamic-table-2" class="xref">Dynamic Table</a></p> |
| 1516 |
</li> |
| 1517 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.11.2.3"> |
| 1518 |
<p id="section-toc.1-1.11.2.3.1"><a href="#appendix-B.3" class="xref">B.3</a>. <a href="#name-speculative-insert" class="xref">Speculative Insert</a></p> |
| 1519 |
</li> |
| 1520 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.11.2.4"> |
| 1521 |
<p id="section-toc.1-1.11.2.4.1"><a href="#appendix-B.4" class="xref">B.4</a>. <a href="#name-duplicate-instruction-strea" class="xref">Duplicate Instruction, Stream Cancellation</a></p> |
| 1522 |
</li> |
| 1523 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.11.2.5"> |
| 1524 |
<p id="section-toc.1-1.11.2.5.1"><a href="#appendix-B.5" class="xref">B.5</a>. <a href="#name-dynamic-table-insert-evicti" class="xref">Dynamic Table Insert, Eviction</a></p> |
| 1525 |
</li> |
| 1526 |
</ul> |
| 1527 |
</li> |
| 1528 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.12"> |
| 1529 |
<p id="section-toc.1-1.12.1"><a href="#appendix-C" class="xref">Appendix C</a>. <a href="#name-sample-single-pass-encoding" class="xref">Sample Single-Pass Encoding Algorithm</a></p> |
| 1530 |
</li> |
| 1531 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.13"> |
| 1532 |
<p id="section-toc.1-1.13.1"><a href="#appendix-D" class="xref"></a><a href="#name-acknowledgments" class="xref">Acknowledgments</a></p> |
| 1533 |
</li> |
| 1534 |
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.14"> |
| 1535 |
<p id="section-toc.1-1.14.1"><a href="#appendix-E" class="xref"></a><a href="#name-authors-addresses" class="xref">Authors' Addresses</a></p> |
| 1536 |
</li> |
| 1537 |
</ul> |
| 1538 |
</nav> |
| 1539 |
</section> |
| 1540 |
</div> |
| 1541 |
<div id="introduction"> |
| 1542 |
<section id="section-1"> |
| 1543 |
<h2 id="name-introduction"> |
| 1544 |
<a href="#section-1" class="section-number selfRef">1. </a><a href="#name-introduction" class="section-name selfRef">Introduction</a> |
| 1545 |
</h2> |
| 1546 |
<p id="section-1-1">The QUIC transport protocol (<span>[<a href="#QUIC-TRANSPORT" class="xref">QUIC-TRANSPORT</a>]</span>) is designed to support |
| 1547 |
HTTP semantics, and its design subsumes many of the features of HTTP/2 |
| 1548 |
(<span>[<a href="#HTTP2" class="xref">HTTP/2</a>]</span>). HTTP/2 uses HPACK (<span>[<a href="#RFC7541" class="xref">RFC7541</a>]</span>) for compression of the header |
| 1549 |
and trailer sections. If HPACK were used for HTTP/3 (<span>[<a href="#HTTP3" class="xref">HTTP/3</a>]</span>), it would |
| 1550 |
induce head-of-line blocking for field sections due to built-in assumptions of a |
| 1551 |
total ordering across frames on all streams.<a href="#section-1-1" class="pilcrow">¶</a></p> |
| 1552 |
<p id="section-1-2">QPACK reuses core concepts from HPACK, but is redesigned to allow correctness in |
| 1553 |
the presence of out-of-order delivery, with flexibility for implementations to |
| 1554 |
balance between resilience against head-of-line blocking and optimal compression |
| 1555 |
ratio. The design goals are to closely approach the compression ratio of HPACK |
| 1556 |
with substantially less head-of-line blocking under the same loss conditions.<a href="#section-1-2" class="pilcrow">¶</a></p> |
| 1557 |
<div id="conventions-and-definitions"> |
| 1558 |
<section id="section-1.1"> |
| 1559 |
<h3 id="name-conventions-and-definitions"> |
| 1560 |
<a href="#section-1.1" class="section-number selfRef">1.1. </a><a href="#name-conventions-and-definitions" class="section-name selfRef">Conventions and Definitions</a> |
| 1561 |
</h3> |
| 1562 |
<p id="section-1.1-1">The key words "<span class="bcp14">MUST</span>", "<span class="bcp14">MUST NOT</span>", "<span class="bcp14">REQUIRED</span>", "<span class="bcp14">SHALL</span>", "<span class="bcp14">SHALL NOT</span>", "<span class="bcp14">SHOULD</span>", |
| 1563 |
"<span class="bcp14">SHOULD NOT</span>", "<span class="bcp14">RECOMMENDED</span>", "<span class="bcp14">NOT RECOMMENDED</span>", "<span class="bcp14">MAY</span>", and "<span class="bcp14">OPTIONAL</span>" in this |
| 1564 |
document are to be interpreted as described in BCP 14 <span>[<a href="#RFC2119" class="xref">RFC2119</a>]</span> <span>[<a href="#RFC8174" class="xref">RFC8174</a>]</span> |
| 1565 |
when, and only when, they appear in all capitals, as shown here.<a href="#section-1.1-1" class="pilcrow">¶</a></p> |
| 1566 |
<p id="section-1.1-2">The following terms are used in this document:<a href="#section-1.1-2" class="pilcrow">¶</a></p> |
| 1567 |
<span class="break"></span><dl class="dlParallel" id="section-1.1-3"> |
| 1568 |
<dt id="section-1.1-3.1">HTTP fields:</dt> |
| 1569 |
<dd style="margin-left: 1.5em" id="section-1.1-3.2"> |
| 1570 |
<p id="section-1.1-3.2.1">Metadata sent as part of an HTTP message. The term encompasses both header |
| 1571 |
and trailer fields. Colloquially, the term "headers" has often been used to |
| 1572 |
refer to HTTP header fields and trailer fields; this document uses "fields" |
| 1573 |
for generality.<a href="#section-1.1-3.2.1" class="pilcrow">¶</a></p> |
| 1574 |
</dd> |
| 1575 |
<dd class="break"></dd> |
| 1576 |
<dt id="section-1.1-3.3">HTTP field line:</dt> |
| 1577 |
<dd style="margin-left: 1.5em" id="section-1.1-3.4"> |
| 1578 |
<p id="section-1.1-3.4.1">A name-value pair sent as part of an HTTP field section. See Sections <a href="https://www.rfc-editor.org/rfc/rfc9110#section-6.3" class="relref">6.3</a> and <a href="https://www.rfc-editor.org/rfc/rfc9110#section-6.5" class="relref">6.5</a> of <span>[<a href="#HTTP" class="xref">HTTP</a>]</span>.<a href="#section-1.1-3.4.1" class="pilcrow">¶</a></p> |
| 1579 |
</dd> |
| 1580 |
<dd class="break"></dd> |
| 1581 |
<dt id="section-1.1-3.5">HTTP field value:</dt> |
| 1582 |
<dd style="margin-left: 1.5em" id="section-1.1-3.6"> |
| 1583 |
<p id="section-1.1-3.6.1">Data associated with a field name, composed from all field line values with |
| 1584 |
that field name in that section, concatenated together with |
| 1585 |
comma separators.<a href="#section-1.1-3.6.1" class="pilcrow">¶</a></p> |
| 1586 |
</dd> |
| 1587 |
<dd class="break"></dd> |
| 1588 |
<dt id="section-1.1-3.7">Field section:</dt> |
| 1589 |
<dd style="margin-left: 1.5em" id="section-1.1-3.8"> |
| 1590 |
<p id="section-1.1-3.8.1">An ordered collection of HTTP field lines associated with an HTTP message. A |
| 1591 |
field section can contain multiple field lines with the same name. It can |
| 1592 |
also contain duplicate field lines. An HTTP message can include both header |
| 1593 |
and trailer sections.<a href="#section-1.1-3.8.1" class="pilcrow">¶</a></p> |
| 1594 |
</dd> |
| 1595 |
<dd class="break"></dd> |
| 1596 |
<dt id="section-1.1-3.9">Representation:</dt> |
| 1597 |
<dd style="margin-left: 1.5em" id="section-1.1-3.10"> |
| 1598 |
<p id="section-1.1-3.10.1">An instruction that represents a field line, possibly by reference to the |
| 1599 |
dynamic and static tables.<a href="#section-1.1-3.10.1" class="pilcrow">¶</a></p> |
| 1600 |
</dd> |
| 1601 |
<dd class="break"></dd> |
| 1602 |
<dt id="section-1.1-3.11">Encoder:</dt> |
| 1603 |
<dd style="margin-left: 1.5em" id="section-1.1-3.12"> |
| 1604 |
<p id="section-1.1-3.12.1">An implementation that encodes field sections.<a href="#section-1.1-3.12.1" class="pilcrow">¶</a></p> |
| 1605 |
</dd> |
| 1606 |
<dd class="break"></dd> |
| 1607 |
<dt id="section-1.1-3.13">Decoder:</dt> |
| 1608 |
<dd style="margin-left: 1.5em" id="section-1.1-3.14"> |
| 1609 |
<p id="section-1.1-3.14.1">An implementation that decodes encoded field sections.<a href="#section-1.1-3.14.1" class="pilcrow">¶</a></p> |
| 1610 |
</dd> |
| 1611 |
<dd class="break"></dd> |
| 1612 |
<dt id="section-1.1-3.15">Absolute Index:</dt> |
| 1613 |
<dd style="margin-left: 1.5em" id="section-1.1-3.16"> |
| 1614 |
<p id="section-1.1-3.16.1">A unique index for each entry in the dynamic table.<a href="#section-1.1-3.16.1" class="pilcrow">¶</a></p> |
| 1615 |
</dd> |
| 1616 |
<dd class="break"></dd> |
| 1617 |
<dt id="section-1.1-3.17">Base:</dt> |
| 1618 |
<dd style="margin-left: 1.5em" id="section-1.1-3.18"> |
| 1619 |
<p id="section-1.1-3.18.1">A reference point for relative and post-Base indices. Representations that |
| 1620 |
reference dynamic table entries are relative to a Base.<a href="#section-1.1-3.18.1" class="pilcrow">¶</a></p> |
| 1621 |
</dd> |
| 1622 |
<dd class="break"></dd> |
| 1623 |
<dt id="section-1.1-3.19">Insert Count:</dt> |
| 1624 |
<dd style="margin-left: 1.5em" id="section-1.1-3.20"> |
| 1625 |
<p id="section-1.1-3.20.1">The total number of entries inserted in the dynamic table.<a href="#section-1.1-3.20.1" class="pilcrow">¶</a></p> |
| 1626 |
</dd> |
| 1627 |
<dd class="break"></dd> |
| 1628 |
</dl> |
| 1629 |
<p id="section-1.1-4">Note that QPACK is a name, not an abbreviation.<a href="#section-1.1-4" class="pilcrow">¶</a></p> |
| 1630 |
</section> |
| 1631 |
</div> |
| 1632 |
<div id="notational-conventions"> |
| 1633 |
<section id="section-1.2"> |
| 1634 |
<h3 id="name-notational-conventions"> |
| 1635 |
<a href="#section-1.2" class="section-number selfRef">1.2. </a><a href="#name-notational-conventions" class="section-name selfRef">Notational Conventions</a> |
| 1636 |
</h3> |
| 1637 |
<p id="section-1.2-1">Diagrams in this document use the format described in <span><a href="https://www.rfc-editor.org/rfc/rfc2360#section-3.1" class="relref">Section 3.1</a> of [<a href="#RFC2360" class="xref">RFC2360</a>]</span>, with the following additional conventions:<a href="#section-1.2-1" class="pilcrow">¶</a></p> |
| 1638 |
<span class="break"></span><dl class="dlParallel" id="section-1.2-2"> |
| 1639 |
<dt id="section-1.2-2.1">x (A)</dt> |
| 1640 |
<dd style="margin-left: 1.5em" id="section-1.2-2.2"> |
| 1641 |
<p id="section-1.2-2.2.1">Indicates that x is A bits long.<a href="#section-1.2-2.2.1" class="pilcrow">¶</a></p> |
| 1642 |
</dd> |
| 1643 |
<dd class="break"></dd> |
| 1644 |
<dt id="section-1.2-2.3">x (A+)</dt> |
| 1645 |
<dd style="margin-left: 1.5em" id="section-1.2-2.4"> |
| 1646 |
<p id="section-1.2-2.4.1">Indicates that x uses the prefixed integer encoding defined in |
| 1647 |
<a href="#prefixed-integers" class="xref">Section 4.1.1</a>, beginning with an A-bit prefix.<a href="#section-1.2-2.4.1" class="pilcrow">¶</a></p> |
| 1648 |
</dd> |
| 1649 |
<dd class="break"></dd> |
| 1650 |
<dt id="section-1.2-2.5">x ...</dt> |
| 1651 |
<dd style="margin-left: 1.5em" id="section-1.2-2.6"> |
| 1652 |
<p id="section-1.2-2.6.1">Indicates that x is variable length and extends to the end of the region.<a href="#section-1.2-2.6.1" class="pilcrow">¶</a></p> |
| 1653 |
</dd> |
| 1654 |
<dd class="break"></dd> |
| 1655 |
</dl> |
| 1656 |
</section> |
| 1657 |
</div> |
| 1658 |
</section> |
| 1659 |
</div> |
| 1660 |
<div id="compression-process-overview"> |
| 1661 |
<section id="section-2"> |
| 1662 |
<h2 id="name-compression-process-overvie"> |
| 1663 |
<a href="#section-2" class="section-number selfRef">2. </a><a href="#name-compression-process-overvie" class="section-name selfRef">Compression Process Overview</a> |
| 1664 |
</h2> |
| 1665 |
<p id="section-2-1">Like HPACK, QPACK uses two tables for associating field lines ("headers") to |
| 1666 |
indices. The static table (<a href="#header-table-static" class="xref">Section 3.1</a>) is predefined and contains |
| 1667 |
common header field lines (some of them with an empty value). The dynamic table |
| 1668 |
(<a href="#header-table-dynamic" class="xref">Section 3.2</a>) is built up over the course of the connection and can |
| 1669 |
be used by the encoder to index both header and trailer field lines in the |
| 1670 |
encoded field sections.<a href="#section-2-1" class="pilcrow">¶</a></p> |
| 1671 |
<p id="section-2-2">QPACK defines unidirectional streams for sending instructions from encoder to |
| 1672 |
decoder and vice versa.<a href="#section-2-2" class="pilcrow">¶</a></p> |
| 1673 |
<div id="encoder"> |
| 1674 |
<section id="section-2.1"> |
| 1675 |
<h3 id="name-encoder"> |
| 1676 |
<a href="#section-2.1" class="section-number selfRef">2.1. </a><a href="#name-encoder" class="section-name selfRef">Encoder</a> |
| 1677 |
</h3> |
| 1678 |
<p id="section-2.1-1">An encoder converts a header or trailer section into a series of representations |
| 1679 |
by emitting either an indexed or a literal representation for each field line in |
| 1680 |
the list; see <a href="#field-line-representations" class="xref">Section 4.5</a>. Indexed representations achieve |
| 1681 |
high compression by replacing the literal name and possibly the value with an |
| 1682 |
index to either the static or dynamic table. References to the static table and |
| 1683 |
literal representations do not require any dynamic state and never risk |
| 1684 |
head-of-line blocking. References to the dynamic table risk head-of-line |
| 1685 |
blocking if the encoder has not received an acknowledgment indicating the entry |
| 1686 |
is available at the decoder.<a href="#section-2.1-1" class="pilcrow">¶</a></p> |
| 1687 |
<p id="section-2.1-2">An encoder <span class="bcp14">MAY</span> insert any entry in the dynamic table it chooses; it is not |
| 1688 |
limited to field lines it is compressing.<a href="#section-2.1-2" class="pilcrow">¶</a></p> |
| 1689 |
<p id="section-2.1-3">QPACK preserves the ordering of field lines within each field section. An |
| 1690 |
encoder <span class="bcp14">MUST</span> emit field representations in the order they appear in the input |
| 1691 |
field section.<a href="#section-2.1-3" class="pilcrow">¶</a></p> |
| 1692 |
<p id="section-2.1-4">QPACK is designed to place the burden of optional state tracking on the encoder, |
| 1693 |
resulting in relatively simple decoders.<a href="#section-2.1-4" class="pilcrow">¶</a></p> |
| 1694 |
<div id="blocked-insertion"> |
| 1695 |
<section id="section-2.1.1"> |
| 1696 |
<h4 id="name-limits-on-dynamic-table-ins"> |
| 1697 |
<a href="#section-2.1.1" class="section-number selfRef">2.1.1. </a><a href="#name-limits-on-dynamic-table-ins" class="section-name selfRef">Limits on Dynamic Table Insertions</a> |
| 1698 |
</h4> |
| 1699 |
<p id="section-2.1.1-1">Inserting entries into the dynamic table might not be possible if the table |
| 1700 |
contains entries that cannot be evicted.<a href="#section-2.1.1-1" class="pilcrow">¶</a></p> |
| 1701 |
<p id="section-2.1.1-2">A dynamic table entry cannot be evicted immediately after insertion, even if it |
| 1702 |
has never been referenced. Once the insertion of a dynamic table entry has been |
| 1703 |
acknowledged and there are no outstanding references to the entry in |
| 1704 |
unacknowledged representations, the entry becomes evictable. Note that |
| 1705 |
references on the encoder stream never preclude the eviction of an entry, |
| 1706 |
because those references are guaranteed to be processed before the instruction |
| 1707 |
evicting the entry.<a href="#section-2.1.1-2" class="pilcrow">¶</a></p> |
| 1708 |
<p id="section-2.1.1-3">If the dynamic table does not contain enough room for a new entry without |
| 1709 |
evicting other entries, and the entries that would be evicted are not |
| 1710 |
evictable, the encoder <span class="bcp14">MUST NOT</span> insert that entry into the dynamic table |
| 1711 |
(including duplicates of existing entries). In order to avoid this, an encoder |
| 1712 |
that uses the dynamic table has to keep track of each dynamic table entry |
| 1713 |
referenced by each field section until those representations are acknowledged by |
| 1714 |
the decoder; see <a href="#header-acknowledgment" class="xref">Section 4.4.1</a>.<a href="#section-2.1.1-3" class="pilcrow">¶</a></p> |
| 1715 |
<div id="avoiding-prohibited-insertions"> |
| 1716 |
<section id="section-2.1.1.1"> |
| 1717 |
<h5 id="name-avoiding-prohibited-inserti"> |
| 1718 |
<a href="#section-2.1.1.1" class="section-number selfRef">2.1.1.1. </a><a href="#name-avoiding-prohibited-inserti" class="section-name selfRef">Avoiding Prohibited Insertions</a> |
| 1719 |
</h5> |
| 1720 |
<p id="section-2.1.1.1-1">To ensure that the encoder is not prevented from adding new entries, the encoder |
| 1721 |
can avoid referencing entries that are close to eviction. Rather than |
| 1722 |
reference such an entry, the encoder can emit a Duplicate instruction |
| 1723 |
(<a href="#duplicate" class="xref">Section 4.3.4</a>) and reference the duplicate instead.<a href="#section-2.1.1.1-1" class="pilcrow">¶</a></p> |
| 1724 |
<p id="section-2.1.1.1-2">Determining which entries are too close to eviction to reference is an encoder |
| 1725 |
preference. One heuristic is to target a fixed amount of available space in the |
| 1726 |
dynamic table: either unused space or space that can be reclaimed by evicting |
| 1727 |
non-blocking entries. To achieve this, the encoder can maintain a draining |
| 1728 |
index, which is the smallest absolute index (<a href="#indexing" class="xref">Section 3.2.4</a>) in the dynamic table |
| 1729 |
that it will emit a reference for. As new entries are inserted, the encoder |
| 1730 |
increases the draining index to maintain the section of the table that it will |
| 1731 |
not reference. If the encoder does not create new references to entries with an |
| 1732 |
absolute index lower than the draining index, the number of unacknowledged |
| 1733 |
references to those entries will eventually become zero, allowing them to be |
| 1734 |
evicted.<a href="#section-2.1.1.1-2" class="pilcrow">¶</a></p> |
| 1735 |
<span id="name-draining-dynamic-table-entr"></span><div id="fig-draining-index"> |
| 1736 |
<figure id="figure-1"> |
| 1737 |
<div class="alignLeft art-ascii-art art-text artwork" id="section-2.1.1.1-3.1"> |
| 1738 |
<pre> |
| 1739 |
<-- Newer Entries Older Entries --> |
| 1740 |
(Larger Indices) (Smaller Indices) |
| 1741 |
+--------+---------------------------------+----------+ |
| 1742 |
| Unused | Referenceable | Draining | |
| 1743 |
| Space | Entries | Entries | |
| 1744 |
+--------+---------------------------------+----------+ |
| 1745 |
^ ^ ^ |
| 1746 |
| | | |
| 1747 |
Insertion Point Draining Index Dropping |
| 1748 |
Point |
| 1749 |
</pre> |
| 1750 |
</div> |
| 1751 |
<figcaption><a href="#figure-1" class="selfRef">Figure 1</a>: |
| 1752 |
<a href="#name-draining-dynamic-table-entr" class="selfRef">Draining Dynamic Table Entries</a> |
| 1753 |
</figcaption></figure> |
| 1754 |
</div> |
| 1755 |
</section> |
| 1756 |
</div> |
| 1757 |
</section> |
| 1758 |
</div> |
| 1759 |
<div id="blocked-streams"> |
| 1760 |
<section id="section-2.1.2"> |
| 1761 |
<h4 id="name-blocked-streams"> |
| 1762 |
<a href="#section-2.1.2" class="section-number selfRef">2.1.2. </a><a href="#name-blocked-streams" class="section-name selfRef">Blocked Streams</a> |
| 1763 |
</h4> |
| 1764 |
<p id="section-2.1.2-1">Because QUIC does not guarantee order between data on different streams, a |
| 1765 |
decoder might encounter a representation that references a dynamic table entry |
| 1766 |
that it has not yet received.<a href="#section-2.1.2-1" class="pilcrow">¶</a></p> |
| 1767 |
<p id="section-2.1.2-2">Each encoded field section contains a Required Insert Count (<a href="#header-prefix" class="xref">Section 4.5.1</a>), |
| 1768 |
the lowest possible value for the Insert Count with which the field section can |
| 1769 |
be decoded. For a field section encoded using references to the dynamic table, |
| 1770 |
the Required Insert Count is one larger than the largest absolute index of all |
| 1771 |
referenced dynamic table entries. For a field section encoded with no references |
| 1772 |
to the dynamic table, the Required Insert Count is zero.<a href="#section-2.1.2-2" class="pilcrow">¶</a></p> |
| 1773 |
<p id="section-2.1.2-3">When the decoder receives an encoded field section with a Required Insert Count |
| 1774 |
greater than its own Insert Count, the stream cannot be processed immediately |
| 1775 |
and is considered "blocked"; see <a href="#blocked-decoding" class="xref">Section 2.2.1</a>.<a href="#section-2.1.2-3" class="pilcrow">¶</a></p> |
| 1776 |
<p id="section-2.1.2-4">The decoder specifies an upper bound on the number of streams that can be |
| 1777 |
blocked using the SETTINGS_QPACK_BLOCKED_STREAMS setting; see <a href="#configuration" class="xref">Section 5</a>. |
| 1778 |
An encoder <span class="bcp14">MUST</span> limit the number of streams that could become blocked to the |
| 1779 |
value of SETTINGS_QPACK_BLOCKED_STREAMS at all times. If a decoder encounters |
| 1780 |
more blocked streams than it promised to support, it <span class="bcp14">MUST</span> treat this as a |
| 1781 |
connection error of type QPACK_DECOMPRESSION_FAILED.<a href="#section-2.1.2-4" class="pilcrow">¶</a></p> |
| 1782 |
<p id="section-2.1.2-5">Note that the decoder might not become blocked on every stream that risks |
| 1783 |
becoming blocked.<a href="#section-2.1.2-5" class="pilcrow">¶</a></p> |
| 1784 |
<p id="section-2.1.2-6">An encoder can decide whether to risk having a stream become blocked. If |
| 1785 |
permitted by the value of SETTINGS_QPACK_BLOCKED_STREAMS, compression efficiency |
| 1786 |
can often be improved by referencing dynamic table entries that are still in |
| 1787 |
transit, but if there is loss or reordering, the stream can become blocked at |
| 1788 |
the decoder. An encoder can avoid the risk of blocking by only referencing |
| 1789 |
dynamic table entries that have been acknowledged, but this could mean using |
| 1790 |
literals. Since literals make the encoded field section larger, this can result |
| 1791 |
in the encoder becoming blocked on congestion or flow-control limits.<a href="#section-2.1.2-6" class="pilcrow">¶</a></p> |
| 1792 |
</section> |
| 1793 |
</div> |
| 1794 |
<div id="avoiding-flow-control-deadlocks"> |
| 1795 |
<section id="section-2.1.3"> |
| 1796 |
<h4 id="name-avoiding-flow-control-deadl"> |
| 1797 |
<a href="#section-2.1.3" class="section-number selfRef">2.1.3. </a><a href="#name-avoiding-flow-control-deadl" class="section-name selfRef">Avoiding Flow-Control Deadlocks</a> |
| 1798 |
</h4> |
| 1799 |
<p id="section-2.1.3-1">Writing instructions on streams that are limited by flow control can produce |
| 1800 |
deadlocks.<a href="#section-2.1.3-1" class="pilcrow">¶</a></p> |
| 1801 |
<p id="section-2.1.3-2">A decoder might stop issuing flow-control credit on the stream that carries an |
| 1802 |
encoded field section until the necessary updates are received on the encoder |
| 1803 |
stream. If the granting of flow-control credit on the encoder stream (or the |
| 1804 |
connection as a whole) depends on the consumption and release of data on the |
| 1805 |
stream carrying the encoded field section, a deadlock might result.<a href="#section-2.1.3-2" class="pilcrow">¶</a></p> |
| 1806 |
<p id="section-2.1.3-3">More generally, a stream containing a large instruction can become deadlocked if |
| 1807 |
the decoder withholds flow-control credit until the instruction is completely |
| 1808 |
received.<a href="#section-2.1.3-3" class="pilcrow">¶</a></p> |
| 1809 |
<p id="section-2.1.3-4">To avoid these deadlocks, an encoder <span class="bcp14">SHOULD NOT</span> write an instruction unless |
| 1810 |
sufficient stream and connection flow-control credit is available for the entire |
| 1811 |
instruction.<a href="#section-2.1.3-4" class="pilcrow">¶</a></p> |
| 1812 |
</section> |
| 1813 |
</div> |
| 1814 |
<div id="known-received-count"> |
| 1815 |
<section id="section-2.1.4"> |
| 1816 |
<h4 id="name-known-received-count"> |
| 1817 |
<a href="#section-2.1.4" class="section-number selfRef">2.1.4. </a><a href="#name-known-received-count" class="section-name selfRef">Known Received Count</a> |
| 1818 |
</h4> |
| 1819 |
<p id="section-2.1.4-1">The Known Received Count is the total number of dynamic table insertions and |
| 1820 |
duplications acknowledged by the decoder. The encoder tracks the Known Received |
| 1821 |
Count in order to identify which dynamic table entries can be referenced without |
| 1822 |
potentially blocking a stream. The decoder tracks the Known Received Count in |
| 1823 |
order to be able to send Insert Count Increment instructions.<a href="#section-2.1.4-1" class="pilcrow">¶</a></p> |
| 1824 |
<p id="section-2.1.4-2">A Section Acknowledgment instruction (<a href="#header-acknowledgment" class="xref">Section 4.4.1</a>) implies that |
| 1825 |
the decoder has received all dynamic table state necessary to decode the field |
| 1826 |
section. If the Required Insert Count of the acknowledged field section is |
| 1827 |
greater than the current Known Received Count, the Known Received Count is |
| 1828 |
updated to that Required Insert Count value.<a href="#section-2.1.4-2" class="pilcrow">¶</a></p> |
| 1829 |
<p id="section-2.1.4-3">An Insert Count Increment instruction (<a href="#insert-count-increment" class="xref">Section 4.4.3</a>) increases the |
| 1830 |
Known Received Count by its Increment parameter. See <a href="#new-table-entries" class="xref">Section 2.2.2.3</a> for |
| 1831 |
guidance.<a href="#section-2.1.4-3" class="pilcrow">¶</a></p> |
| 1832 |
</section> |
| 1833 |
</div> |
| 1834 |
</section> |
| 1835 |
</div> |
| 1836 |
<div id="decoder"> |
| 1837 |
<section id="section-2.2"> |
| 1838 |
<h3 id="name-decoder"> |
| 1839 |
<a href="#section-2.2" class="section-number selfRef">2.2. </a><a href="#name-decoder" class="section-name selfRef">Decoder</a> |
| 1840 |
</h3> |
| 1841 |
<p id="section-2.2-1">As in HPACK, the decoder processes a series of representations and emits the |
| 1842 |
corresponding field sections. It also processes instructions received on the |
| 1843 |
encoder stream that modify the dynamic table. Note that encoded field sections |
| 1844 |
and encoder stream instructions arrive on separate streams. This is unlike |
| 1845 |
HPACK, where encoded field sections (header blocks) can contain instructions |
| 1846 |
that modify the dynamic table, and there is no dedicated stream of HPACK |
| 1847 |
instructions.<a href="#section-2.2-1" class="pilcrow">¶</a></p> |
| 1848 |
<p id="section-2.2-2">The decoder <span class="bcp14">MUST</span> emit field lines in the order their representations appear in |
| 1849 |
the encoded field section.<a href="#section-2.2-2" class="pilcrow">¶</a></p> |
| 1850 |
<div id="blocked-decoding"> |
| 1851 |
<section id="section-2.2.1"> |
| 1852 |
<h4 id="name-blocked-decoding"> |
| 1853 |
<a href="#section-2.2.1" class="section-number selfRef">2.2.1. </a><a href="#name-blocked-decoding" class="section-name selfRef">Blocked Decoding</a> |
| 1854 |
</h4> |
| 1855 |
<p id="section-2.2.1-1">Upon receipt of an encoded field section, the decoder examines the Required |
| 1856 |
Insert Count. When the Required Insert Count is less than or equal to the |
| 1857 |
decoder's Insert Count, the field section can be processed immediately. |
| 1858 |
Otherwise, the stream on which the field section was received becomes blocked.<a href="#section-2.2.1-1" class="pilcrow">¶</a></p> |
| 1859 |
<p id="section-2.2.1-2">While blocked, encoded field section data <span class="bcp14">SHOULD</span> remain in the blocked stream's |
| 1860 |
flow-control window. This data is unusable until the stream becomes unblocked, |
| 1861 |
and releasing the flow control prematurely makes the decoder vulnerable to |
| 1862 |
memory exhaustion attacks. A stream becomes unblocked when the Insert Count |
| 1863 |
becomes greater than or equal to the Required Insert Count for all encoded |
| 1864 |
field sections the decoder has started reading from the stream.<a href="#section-2.2.1-2" class="pilcrow">¶</a></p> |
| 1865 |
<p id="section-2.2.1-3">When processing encoded field sections, the decoder expects the Required Insert |
| 1866 |
Count to equal the lowest possible value for the Insert Count with which the |
| 1867 |
field section can be decoded, as prescribed in <a href="#blocked-streams" class="xref">Section 2.1.2</a>. If it |
| 1868 |
encounters a Required Insert Count smaller than expected, it <span class="bcp14">MUST</span> treat this as |
| 1869 |
a connection error of type QPACK_DECOMPRESSION_FAILED; see |
| 1870 |
<a href="#invalid-references" class="xref">Section 2.2.3</a>. If it encounters a Required Insert Count larger than |
| 1871 |
expected, it <span class="bcp14">MAY</span> treat this as a connection error of type |
| 1872 |
QPACK_DECOMPRESSION_FAILED.<a href="#section-2.2.1-3" class="pilcrow">¶</a></p> |
| 1873 |
</section> |
| 1874 |
</div> |
| 1875 |
<div id="state-synchronization"> |
| 1876 |
<section id="section-2.2.2"> |
| 1877 |
<h4 id="name-state-synchronization"> |
| 1878 |
<a href="#section-2.2.2" class="section-number selfRef">2.2.2. </a><a href="#name-state-synchronization" class="section-name selfRef">State Synchronization</a> |
| 1879 |
</h4> |
| 1880 |
<p id="section-2.2.2-1">The decoder signals the following events by emitting decoder instructions |
| 1881 |
(<a href="#decoder-instructions" class="xref">Section 4.4</a>) on the decoder stream.<a href="#section-2.2.2-1" class="pilcrow">¶</a></p> |
| 1882 |
<div id="completed-processing-of-a-field-section"> |
| 1883 |
<section id="section-2.2.2.1"> |
| 1884 |
<h5 id="name-completed-processing-of-a-f"> |
| 1885 |
<a href="#section-2.2.2.1" class="section-number selfRef">2.2.2.1. </a><a href="#name-completed-processing-of-a-f" class="section-name selfRef">Completed Processing of a Field Section</a> |
| 1886 |
</h5> |
| 1887 |
<p id="section-2.2.2.1-1">After the decoder finishes decoding a field section encoded using |
| 1888 |
representations containing dynamic table references, it <span class="bcp14">MUST</span> emit a Section |
| 1889 |
Acknowledgment instruction (<a href="#header-acknowledgment" class="xref">Section 4.4.1</a>). A stream may carry |
| 1890 |
multiple field sections in the case of intermediate responses, trailers, and |
| 1891 |
pushed requests. The encoder interprets each Section Acknowledgment |
| 1892 |
instruction as acknowledging the earliest unacknowledged field section |
| 1893 |
containing dynamic table references sent on the given stream.<a href="#section-2.2.2.1-1" class="pilcrow">¶</a></p> |
| 1894 |
</section> |
| 1895 |
</div> |
| 1896 |
<div id="abandonment-of-a-stream"> |
| 1897 |
<section id="section-2.2.2.2"> |
| 1898 |
<h5 id="name-abandonment-of-a-stream"> |
| 1899 |
<a href="#section-2.2.2.2" class="section-number selfRef">2.2.2.2. </a><a href="#name-abandonment-of-a-stream" class="section-name selfRef">Abandonment of a Stream</a> |
| 1900 |
</h5> |
| 1901 |
<p id="section-2.2.2.2-1">When an endpoint receives a stream reset before the end of a stream or before |
| 1902 |
all encoded field sections are processed on that stream, or when it abandons |
| 1903 |
reading of a stream, it generates a Stream Cancellation instruction; see |
| 1904 |
<a href="#stream-cancellation" class="xref">Section 4.4.2</a>. This signals to the encoder that all references to the |
| 1905 |
dynamic table on that stream are no longer outstanding. A decoder with a |
| 1906 |
maximum dynamic table capacity (<a href="#maximum-dynamic-table-capacity" class="xref">Section 3.2.3</a>) equal to |
| 1907 |
zero <span class="bcp14">MAY</span> omit sending Stream Cancellations, because the encoder cannot have any |
| 1908 |
dynamic table references. An encoder cannot infer from this instruction that |
| 1909 |
any updates to the dynamic table have been received.<a href="#section-2.2.2.2-1" class="pilcrow">¶</a></p> |
| 1910 |
<p id="section-2.2.2.2-2">The Section Acknowledgment and Stream Cancellation instructions permit the |
| 1911 |
encoder to remove references to entries in the dynamic table. When an entry |
| 1912 |
with an absolute index lower than the Known Received Count has zero references, |
| 1913 |
then it is considered evictable; see <a href="#blocked-insertion" class="xref">Section 2.1.1</a>.<a href="#section-2.2.2.2-2" class="pilcrow">¶</a></p> |
| 1914 |
</section> |
| 1915 |
</div> |
| 1916 |
<div id="new-table-entries"> |
| 1917 |
<section id="section-2.2.2.3"> |
| 1918 |
<h5 id="name-new-table-entries"> |
| 1919 |
<a href="#section-2.2.2.3" class="section-number selfRef">2.2.2.3. </a><a href="#name-new-table-entries" class="section-name selfRef">New Table Entries</a> |
| 1920 |
</h5> |
| 1921 |
<p id="section-2.2.2.3-1">After receiving new table entries on the encoder stream, the decoder chooses |
| 1922 |
when to emit Insert Count Increment instructions; see |
| 1923 |
<a href="#insert-count-increment" class="xref">Section 4.4.3</a>. Emitting this instruction after adding each new |
| 1924 |
dynamic table entry will provide the timeliest feedback to the encoder, but |
| 1925 |
could be redundant with other decoder feedback. By delaying an Insert Count |
| 1926 |
Increment instruction, the decoder might be able to coalesce multiple Insert |
| 1927 |
Count Increment instructions or replace them entirely with Section |
| 1928 |
Acknowledgments; see <a href="#header-acknowledgment" class="xref">Section 4.4.1</a>. However, delaying too long |
| 1929 |
may lead to compression inefficiencies if the encoder waits for an entry to be |
| 1930 |
acknowledged before using it.<a href="#section-2.2.2.3-1" class="pilcrow">¶</a></p> |
| 1931 |
</section> |
| 1932 |
</div> |
| 1933 |
</section> |
| 1934 |
</div> |
| 1935 |
<div id="invalid-references"> |
| 1936 |
<section id="section-2.2.3"> |
| 1937 |
<h4 id="name-invalid-references"> |
| 1938 |
<a href="#section-2.2.3" class="section-number selfRef">2.2.3. </a><a href="#name-invalid-references" class="section-name selfRef">Invalid References</a> |
| 1939 |
</h4> |
| 1940 |
<p id="section-2.2.3-1">If the decoder encounters a reference in a field line representation to a |
| 1941 |
dynamic table entry that has already been evicted or that has an absolute |
| 1942 |
index greater than or equal to the declared Required Insert Count |
| 1943 |
(<a href="#header-prefix" class="xref">Section 4.5.1</a>), it <span class="bcp14">MUST</span> treat this as a connection error of type |
| 1944 |
QPACK_DECOMPRESSION_FAILED.<a href="#section-2.2.3-1" class="pilcrow">¶</a></p> |
| 1945 |
<p id="section-2.2.3-2">If the decoder encounters a reference in an encoder instruction to a dynamic |
| 1946 |
table entry that has already been evicted, it <span class="bcp14">MUST</span> treat this as a connection |
| 1947 |
error of type QPACK_ENCODER_STREAM_ERROR.<a href="#section-2.2.3-2" class="pilcrow">¶</a></p> |
| 1948 |
</section> |
| 1949 |
</div> |
| 1950 |
</section> |
| 1951 |
</div> |
| 1952 |
</section> |
| 1953 |
</div> |
| 1954 |
<div id="reference-tables"> |
| 1955 |
<section id="section-3"> |
| 1956 |
<h2 id="name-reference-tables"> |
| 1957 |
<a href="#section-3" class="section-number selfRef">3. </a><a href="#name-reference-tables" class="section-name selfRef">Reference Tables</a> |
| 1958 |
</h2> |
| 1959 |
<p id="section-3-1">Unlike in HPACK, entries in the QPACK static and dynamic tables are addressed |
| 1960 |
separately. The following sections describe how entries in each table are |
| 1961 |
addressed.<a href="#section-3-1" class="pilcrow">¶</a></p> |
| 1962 |
<div id="header-table-static"> |
| 1963 |
<section id="section-3.1"> |
| 1964 |
<h3 id="name-static-table"> |
| 1965 |
<a href="#section-3.1" class="section-number selfRef">3.1. </a><a href="#name-static-table" class="section-name selfRef">Static Table</a> |
| 1966 |
</h3> |
| 1967 |
<p id="section-3.1-1">The static table consists of a predefined list of field lines, each of which has |
| 1968 |
a fixed index over time. Its entries are defined in <a href="#static-table" class="xref">Appendix A</a>.<a href="#section-3.1-1" class="pilcrow">¶</a></p> |
| 1969 |
<p id="section-3.1-2">All entries in the static table have a name and a value. However, values can be |
| 1970 |
empty (that is, have a length of 0). Each entry is identified by a unique |
| 1971 |
index.<a href="#section-3.1-2" class="pilcrow">¶</a></p> |
| 1972 |
<p id="section-3.1-3">Note that the QPACK static table is indexed from 0, whereas the HPACK static |
| 1973 |
table is indexed from 1.<a href="#section-3.1-3" class="pilcrow">¶</a></p> |
| 1974 |
<p id="section-3.1-4">When the decoder encounters an invalid static table index in a field line |
| 1975 |
representation, it <span class="bcp14">MUST</span> treat this as a connection error of type |
| 1976 |
QPACK_DECOMPRESSION_FAILED. If this index is received on the encoder stream, |
| 1977 |
this <span class="bcp14">MUST</span> be treated as a connection error of type QPACK_ENCODER_STREAM_ERROR.<a href="#section-3.1-4" class="pilcrow">¶</a></p> |
| 1978 |
</section> |
| 1979 |
</div> |
| 1980 |
<div id="header-table-dynamic"> |
| 1981 |
<section id="section-3.2"> |
| 1982 |
<h3 id="name-dynamic-table"> |
| 1983 |
<a href="#section-3.2" class="section-number selfRef">3.2. </a><a href="#name-dynamic-table" class="section-name selfRef">Dynamic Table</a> |
| 1984 |
</h3> |
| 1985 |
<p id="section-3.2-1">The dynamic table consists of a list of field lines maintained in first-in, |
| 1986 |
first-out order. A QPACK encoder and decoder share a dynamic table that is |
| 1987 |
initially empty. The encoder adds entries to the dynamic table and sends them |
| 1988 |
to the decoder via instructions on the encoder stream; see |
| 1989 |
<a href="#encoder-instructions" class="xref">Section 4.3</a>.<a href="#section-3.2-1" class="pilcrow">¶</a></p> |
| 1990 |
<p id="section-3.2-2">The dynamic table can contain duplicate entries (i.e., entries with the same |
| 1991 |
name and same value). Therefore, duplicate entries <span class="bcp14">MUST NOT</span> be treated as an |
| 1992 |
error by the decoder.<a href="#section-3.2-2" class="pilcrow">¶</a></p> |
| 1993 |
<p id="section-3.2-3">Dynamic table entries can have empty values.<a href="#section-3.2-3" class="pilcrow">¶</a></p> |
| 1994 |
<div id="dynamic-table-size"> |
| 1995 |
<section id="section-3.2.1"> |
| 1996 |
<h4 id="name-dynamic-table-size"> |
| 1997 |
<a href="#section-3.2.1" class="section-number selfRef">3.2.1. </a><a href="#name-dynamic-table-size" class="section-name selfRef">Dynamic Table Size</a> |
| 1998 |
</h4> |
| 1999 |
<p id="section-3.2.1-1">The size of the dynamic table is the sum of the size of its entries.<a href="#section-3.2.1-1" class="pilcrow">¶</a></p> |
| 2000 |
<p id="section-3.2.1-2">The size of an entry is the sum of its name's length in bytes, its value's |
| 2001 |
length in bytes, and 32 additional bytes. The size of an entry is calculated |
| 2002 |
using the length of its name and value without Huffman encoding applied.<a href="#section-3.2.1-2" class="pilcrow">¶</a></p> |
| 2003 |
</section> |
| 2004 |
</div> |
| 2005 |
<div id="eviction"> |
| 2006 |
<section id="section-3.2.2"> |
| 2007 |
<h4 id="name-dynamic-table-capacity-and-"> |
| 2008 |
<a href="#section-3.2.2" class="section-number selfRef">3.2.2. </a><a href="#name-dynamic-table-capacity-and-" class="section-name selfRef">Dynamic Table Capacity and Eviction</a> |
| 2009 |
</h4> |
| 2010 |
<p id="section-3.2.2-1">The encoder sets the capacity of the dynamic table, which serves as the upper |
| 2011 |
limit on its size. The initial capacity of the dynamic table is zero. The |
| 2012 |
encoder sends a Set Dynamic Table Capacity instruction |
| 2013 |
(<a href="#set-dynamic-capacity" class="xref">Section 4.3.1</a>) with a non-zero capacity to begin using the dynamic |
| 2014 |
table.<a href="#section-3.2.2-1" class="pilcrow">¶</a></p> |
| 2015 |
<p id="section-3.2.2-2">Before a new entry is added to the dynamic table, entries are evicted from the |
| 2016 |
end of the dynamic table until the size of the dynamic table is less than or |
| 2017 |
equal to (table capacity - size of new entry). The encoder <span class="bcp14">MUST NOT</span> cause a |
| 2018 |
dynamic table entry to be evicted unless that entry is evictable; see |
| 2019 |
<a href="#blocked-insertion" class="xref">Section 2.1.1</a>. The new entry is then added to the table. It is an |
| 2020 |
error if the encoder attempts to add an entry that is larger than the dynamic |
| 2021 |
table capacity; the decoder <span class="bcp14">MUST</span> treat this as a connection error of type |
| 2022 |
QPACK_ENCODER_STREAM_ERROR.<a href="#section-3.2.2-2" class="pilcrow">¶</a></p> |
| 2023 |
<p id="section-3.2.2-3">A new entry can reference an entry in the dynamic table that will be evicted |
| 2024 |
when adding this new entry into the dynamic table. Implementations are |
| 2025 |
cautioned to avoid deleting the referenced name or value if the referenced entry |
| 2026 |
is evicted from the dynamic table prior to inserting the new entry.<a href="#section-3.2.2-3" class="pilcrow">¶</a></p> |
| 2027 |
<p id="section-3.2.2-4">Whenever the dynamic table capacity is reduced by the encoder |
| 2028 |
(<a href="#set-dynamic-capacity" class="xref">Section 4.3.1</a>), entries are evicted from the end of the dynamic |
| 2029 |
table until the size of the dynamic table is less than or equal to the new table |
| 2030 |
capacity. This mechanism can be used to completely clear entries from the |
| 2031 |
dynamic table by setting a capacity of 0, which can subsequently be restored.<a href="#section-3.2.2-4" class="pilcrow">¶</a></p> |
| 2032 |
</section> |
| 2033 |
</div> |
| 2034 |
<div id="maximum-dynamic-table-capacity"> |
| 2035 |
<section id="section-3.2.3"> |
| 2036 |
<h4 id="name-maximum-dynamic-table-capac"> |
| 2037 |
<a href="#section-3.2.3" class="section-number selfRef">3.2.3. </a><a href="#name-maximum-dynamic-table-capac" class="section-name selfRef">Maximum Dynamic Table Capacity</a> |
| 2038 |
</h4> |
| 2039 |
<p id="section-3.2.3-1">To bound the memory requirements of the decoder, the decoder limits the maximum |
| 2040 |
value the encoder is permitted to set for the dynamic table capacity. In |
| 2041 |
HTTP/3, this limit is determined by the value of |
| 2042 |
SETTINGS_QPACK_MAX_TABLE_CAPACITY sent by the decoder; see <a href="#configuration" class="xref">Section 5</a>. |
| 2043 |
The encoder <span class="bcp14">MUST NOT</span> set a dynamic table capacity that exceeds this maximum, but |
| 2044 |
it can choose to use a lower dynamic table capacity; see |
| 2045 |
<a href="#set-dynamic-capacity" class="xref">Section 4.3.1</a>.<a href="#section-3.2.3-1" class="pilcrow">¶</a></p> |
| 2046 |
<p id="section-3.2.3-2">For clients using 0-RTT data in HTTP/3, the server's maximum table capacity is |
| 2047 |
the remembered value of the setting or zero if the value was not previously |
| 2048 |
sent. When the client's 0-RTT value of the SETTING is zero, the server <span class="bcp14">MAY</span> set |
| 2049 |
it to a non-zero value in its SETTINGS frame. If the remembered value is |
| 2050 |
non-zero, the server <span class="bcp14">MUST</span> send the same non-zero value in its SETTINGS frame. If |
| 2051 |
it specifies any other value, or omits SETTINGS_QPACK_MAX_TABLE_CAPACITY from |
| 2052 |
SETTINGS, the encoder must treat this as a connection error of type |
| 2053 |
QPACK_DECODER_STREAM_ERROR.<a href="#section-3.2.3-2" class="pilcrow">¶</a></p> |
| 2054 |
<p id="section-3.2.3-3">For clients not using 0-RTT data (whether 0-RTT is not attempted or is rejected) |
| 2055 |
and for all HTTP/3 servers, the maximum table capacity is 0 until the encoder |
| 2056 |
processes a SETTINGS frame with a non-zero value of |
| 2057 |
SETTINGS_QPACK_MAX_TABLE_CAPACITY.<a href="#section-3.2.3-3" class="pilcrow">¶</a></p> |
| 2058 |
<p id="section-3.2.3-4">When the maximum table capacity is zero, the encoder <span class="bcp14">MUST NOT</span> insert entries |
| 2059 |
into the dynamic table and <span class="bcp14">MUST NOT</span> send any encoder instructions on the encoder |
| 2060 |
stream.<a href="#section-3.2.3-4" class="pilcrow">¶</a></p> |
| 2061 |
</section> |
| 2062 |
</div> |
| 2063 |
<div id="indexing"> |
| 2064 |
<section id="section-3.2.4"> |
| 2065 |
<h4 id="name-absolute-indexing"> |
| 2066 |
<a href="#section-3.2.4" class="section-number selfRef">3.2.4. </a><a href="#name-absolute-indexing" class="section-name selfRef">Absolute Indexing</a> |
| 2067 |
</h4> |
| 2068 |
<p id="section-3.2.4-1">Each entry possesses an absolute index that is fixed for the lifetime of that |
| 2069 |
entry. The first entry inserted has an absolute index of 0; indices increase |
| 2070 |
by one with each insertion.<a href="#section-3.2.4-1" class="pilcrow">¶</a></p> |
| 2071 |
</section> |
| 2072 |
</div> |
| 2073 |
<div id="relative-indexing"> |
| 2074 |
<section id="section-3.2.5"> |
| 2075 |
<h4 id="name-relative-indexing"> |
| 2076 |
<a href="#section-3.2.5" class="section-number selfRef">3.2.5. </a><a href="#name-relative-indexing" class="section-name selfRef">Relative Indexing</a> |
| 2077 |
</h4> |
| 2078 |
<p id="section-3.2.5-1">Relative indices begin at zero and increase in the opposite direction from the |
| 2079 |
absolute index. Determining which entry has a relative index of 0 depends on |
| 2080 |
the context of the reference.<a href="#section-3.2.5-1" class="pilcrow">¶</a></p> |
| 2081 |
<p id="section-3.2.5-2">In encoder instructions (<a href="#encoder-instructions" class="xref">Section 4.3</a>), a relative index of 0 |
| 2082 |
refers to the most recently inserted value in the dynamic table. Note that this |
| 2083 |
means the entry referenced by a given relative index will change while |
| 2084 |
interpreting instructions on the encoder stream.<a href="#section-3.2.5-2" class="pilcrow">¶</a></p> |
| 2085 |
<span id="name-example-dynamic-table-index"></span><figure id="figure-2"> |
| 2086 |
<div class="alignLeft art-ascii-art art-text artwork" id="section-3.2.5-3.1"> |
| 2087 |
<pre> |
| 2088 |
+-----+---------------+-------+ |
| 2089 |
| n-1 | ... | d | Absolute Index |
| 2090 |
+ - - +---------------+ - - - + |
| 2091 |
| 0 | ... | n-d-1 | Relative Index |
| 2092 |
+-----+---------------+-------+ |
| 2093 |
^ | |
| 2094 |
| V |
| 2095 |
Insertion Point Dropping Point |
| 2096 |
|
| 2097 |
n = count of entries inserted |
| 2098 |
d = count of entries dropped |
| 2099 |
</pre> |
| 2100 |
</div> |
| 2101 |
<figcaption><a href="#figure-2" class="selfRef">Figure 2</a>: |
| 2102 |
<a href="#name-example-dynamic-table-index" class="selfRef">Example Dynamic Table Indexing - Encoder Stream</a> |
| 2103 |
</figcaption></figure> |
| 2104 |
<p id="section-3.2.5-4">Unlike in encoder instructions, relative indices in field line representations |
| 2105 |
are relative to the Base at the beginning of the encoded field section; see |
| 2106 |
<a href="#header-prefix" class="xref">Section 4.5.1</a>. This ensures that references are stable even if encoded field |
| 2107 |
sections and dynamic table updates are processed out of order.<a href="#section-3.2.5-4" class="pilcrow">¶</a></p> |
| 2108 |
<p id="section-3.2.5-5">In a field line representation, a relative index of 0 refers to the entry with |
| 2109 |
absolute index equal to Base - 1.<a href="#section-3.2.5-5" class="pilcrow">¶</a></p> |
| 2110 |
<span id="name-example-dynamic-table-indexi"></span><figure id="figure-3"> |
| 2111 |
<div class="alignLeft art-ascii-art art-text artwork" id="section-3.2.5-6.1"> |
| 2112 |
<pre> |
| 2113 |
Base |
| 2114 |
| |
| 2115 |
V |
| 2116 |
+-----+-----+-----+-----+-------+ |
| 2117 |
| n-1 | n-2 | n-3 | ... | d | Absolute Index |
| 2118 |
+-----+-----+ - +-----+ - + |
| 2119 |
| 0 | ... | n-d-3 | Relative Index |
| 2120 |
+-----+-----+-------+ |
| 2121 |
|
| 2122 |
n = count of entries inserted |
| 2123 |
d = count of entries dropped |
| 2124 |
In this example, Base = n - 2 |
| 2125 |
</pre> |
| 2126 |
</div> |
| 2127 |
<figcaption><a href="#figure-3" class="selfRef">Figure 3</a>: |
| 2128 |
<a href="#name-example-dynamic-table-indexi" class="selfRef">Example Dynamic Table Indexing - Relative Index in Representation</a> |
| 2129 |
</figcaption></figure> |
| 2130 |
</section> |
| 2131 |
</div> |
| 2132 |
<div id="post-base"> |
| 2133 |
<section id="section-3.2.6"> |
| 2134 |
<h4 id="name-post-base-indexing"> |
| 2135 |
<a href="#section-3.2.6" class="section-number selfRef">3.2.6. </a><a href="#name-post-base-indexing" class="section-name selfRef">Post-Base Indexing</a> |
| 2136 |
</h4> |
| 2137 |
<p id="section-3.2.6-1">Post-Base indices are used in field line representations for entries with |
| 2138 |
absolute indices greater than or equal to Base, starting at 0 for the entry with |
| 2139 |
absolute index equal to Base and increasing in the same direction as the |
| 2140 |
absolute index.<a href="#section-3.2.6-1" class="pilcrow">¶</a></p> |
| 2141 |
<p id="section-3.2.6-2">Post-Base indices allow an encoder to process a field section in a single pass |
| 2142 |
and include references to entries added while processing this (or other) field |
| 2143 |
sections.<a href="#section-3.2.6-2" class="pilcrow">¶</a></p> |
| 2144 |
<span id="name-example-dynamic-table-indexin"></span><figure id="figure-4"> |
| 2145 |
<div class="alignLeft art-ascii-art art-text artwork" id="section-3.2.6-3.1"> |
| 2146 |
<pre> |
| 2147 |
Base |
| 2148 |
| |
| 2149 |
V |
| 2150 |
+-----+-----+-----+-----+-----+ |
| 2151 |
| n-1 | n-2 | n-3 | ... | d | Absolute Index |
| 2152 |
+-----+-----+-----+-----+-----+ |
| 2153 |
| 1 | 0 | Post-Base Index |
| 2154 |
+-----+-----+ |
| 2155 |
|
| 2156 |
n = count of entries inserted |
| 2157 |
d = count of entries dropped |
| 2158 |
In this example, Base = n - 2 |
| 2159 |
</pre> |
| 2160 |
</div> |
| 2161 |
<figcaption><a href="#figure-4" class="selfRef">Figure 4</a>: |
| 2162 |
<a href="#name-example-dynamic-table-indexin" class="selfRef">Example Dynamic Table Indexing - Post-Base Index in Representation</a> |
| 2163 |
</figcaption></figure> |
| 2164 |
</section> |
| 2165 |
</div> |
| 2166 |
</section> |
| 2167 |
</div> |
| 2168 |
</section> |
| 2169 |
</div> |
| 2170 |
<div id="wire-format"> |
| 2171 |
<section id="section-4"> |
| 2172 |
<h2 id="name-wire-format"> |
| 2173 |
<a href="#section-4" class="section-number selfRef">4. </a><a href="#name-wire-format" class="section-name selfRef">Wire Format</a> |
| 2174 |
</h2> |
| 2175 |
<div id="primitives"> |
| 2176 |
<section id="section-4.1"> |
| 2177 |
<h3 id="name-primitives"> |
| 2178 |
<a href="#section-4.1" class="section-number selfRef">4.1. </a><a href="#name-primitives" class="section-name selfRef">Primitives</a> |
| 2179 |
</h3> |
| 2180 |
<div id="prefixed-integers"> |
| 2181 |
<section id="section-4.1.1"> |
| 2182 |
<h4 id="name-prefixed-integers"> |
| 2183 |
<a href="#section-4.1.1" class="section-number selfRef">4.1.1. </a><a href="#name-prefixed-integers" class="section-name selfRef">Prefixed Integers</a> |
| 2184 |
</h4> |
| 2185 |
<p id="section-4.1.1-1">The prefixed integer from <span><a href="https://www.rfc-editor.org/rfc/rfc7541#section-5.1" class="relref">Section 5.1</a> of [<a href="#RFC7541" class="xref">RFC7541</a>]</span> is used heavily throughout |
| 2186 |
this document. The format from <span>[<a href="#RFC7541" class="xref">RFC7541</a>]</span> is used unmodified. Note, however, |
| 2187 |
that QPACK uses some prefix sizes not actually used in HPACK.<a href="#section-4.1.1-1" class="pilcrow">¶</a></p> |
| 2188 |
<p id="section-4.1.1-2">QPACK implementations <span class="bcp14">MUST</span> be able to decode integers up to and including 62 |
| 2189 |
bits long.<a href="#section-4.1.1-2" class="pilcrow">¶</a></p> |
| 2190 |
</section> |
| 2191 |
</div> |
| 2192 |
<div id="string-literals"> |
| 2193 |
<section id="section-4.1.2"> |
| 2194 |
<h4 id="name-string-literals"> |
| 2195 |
<a href="#section-4.1.2" class="section-number selfRef">4.1.2. </a><a href="#name-string-literals" class="section-name selfRef">String Literals</a> |
| 2196 |
</h4> |
| 2197 |
<p id="section-4.1.2-1">The string literal defined by <span><a href="https://www.rfc-editor.org/rfc/rfc7541#section-5.2" class="relref">Section 5.2</a> of [<a href="#RFC7541" class="xref">RFC7541</a>]</span> is also used |
| 2198 |
throughout. This string format includes optional Huffman encoding.<a href="#section-4.1.2-1" class="pilcrow">¶</a></p> |
| 2199 |
<p id="section-4.1.2-2">HPACK defines string literals to begin on a byte boundary. They begin with a |
| 2200 |
single bit flag, denoted as 'H' in this document (indicating whether the string |
| 2201 |
is Huffman encoded), followed by the string length encoded as a 7-bit prefix |
| 2202 |
integer, and finally the indicated number of bytes of data. When Huffman |
| 2203 |
encoding is enabled, the Huffman table from <span><a href="https://www.rfc-editor.org/rfc/rfc7541#appendix-B" class="relref">Appendix B</a> of [<a href="#RFC7541" class="xref">RFC7541</a>]</span> is used |
| 2204 |
without modification and the indicated length is the size of the string after |
| 2205 |
encoding.<a href="#section-4.1.2-2" class="pilcrow">¶</a></p> |
| 2206 |
<p id="section-4.1.2-3">This document expands the definition of string literals by permitting them to |
| 2207 |
begin other than on a byte boundary. An "N-bit prefix string literal" begins |
| 2208 |
mid-byte, with the first (8-N) bits allocated to a previous field. The string |
| 2209 |
uses one bit for the Huffman flag, followed by the length of the encoded string |
| 2210 |
as a (N-1)-bit prefix integer. The prefix size, N, can have a value between 2 |
| 2211 |
and 8, inclusive. The remainder of the string literal is unmodified.<a href="#section-4.1.2-3" class="pilcrow">¶</a></p> |
| 2212 |
<p id="section-4.1.2-4">A string literal without a prefix length noted is an 8-bit prefix string literal |
| 2213 |
and follows the definitions in <span>[<a href="#RFC7541" class="xref">RFC7541</a>]</span> without modification.<a href="#section-4.1.2-4" class="pilcrow">¶</a></p> |
| 2214 |
</section> |
| 2215 |
</div> |
| 2216 |
</section> |
| 2217 |
</div> |
| 2218 |
<div id="enc-dec-stream-def"> |
| 2219 |
<section id="section-4.2"> |
| 2220 |
<h3 id="name-encoder-and-decoder-streams"> |
| 2221 |
<a href="#section-4.2" class="section-number selfRef">4.2. </a><a href="#name-encoder-and-decoder-streams" class="section-name selfRef">Encoder and Decoder Streams</a> |
| 2222 |
</h3> |
| 2223 |
<p id="section-4.2-1">QPACK defines two unidirectional stream types:<a href="#section-4.2-1" class="pilcrow">¶</a></p> |
| 2224 |
<ul class="normal"> |
| 2225 |
<li class="normal" id="section-4.2-2.1">An encoder stream is a unidirectional stream of type 0x02. |
| 2226 |
It carries an unframed sequence of encoder instructions from encoder |
| 2227 |
to decoder.<a href="#section-4.2-2.1" class="pilcrow">¶</a> |
| 2228 |
</li> |
| 2229 |
<li class="normal" id="section-4.2-2.2">A decoder stream is a unidirectional stream of type 0x03. |
| 2230 |
It carries an unframed sequence of decoder instructions from decoder |
| 2231 |
to encoder.<a href="#section-4.2-2.2" class="pilcrow">¶</a> |
| 2232 |
</li> |
| 2233 |
</ul> |
| 2234 |
<p id="section-4.2-3">HTTP/3 endpoints contain a QPACK encoder and decoder. Each endpoint <span class="bcp14">MUST</span> |
| 2235 |
initiate, at most, one encoder stream and, at most, one decoder stream. Receipt |
| 2236 |
of a second instance of either stream type <span class="bcp14">MUST</span> be treated as a connection error |
| 2237 |
of type H3_STREAM_CREATION_ERROR.<a href="#section-4.2-3" class="pilcrow">¶</a></p> |
| 2238 |
<p id="section-4.2-4">The sender <span class="bcp14">MUST NOT</span> close either of these streams, and the receiver <span class="bcp14">MUST NOT</span> |
| 2239 |
request that the sender close either of these streams. Closure of either |
| 2240 |
unidirectional stream type <span class="bcp14">MUST</span> be treated as a connection error of type |
| 2241 |
H3_CLOSED_CRITICAL_STREAM.<a href="#section-4.2-4" class="pilcrow">¶</a></p> |
| 2242 |
<p id="section-4.2-5">An endpoint <span class="bcp14">MAY</span> avoid creating an encoder stream if it will not be used (for |
| 2243 |
example, if its encoder does not wish to use the dynamic table or if the maximum |
| 2244 |
size of the dynamic table permitted by the peer is zero).<a href="#section-4.2-5" class="pilcrow">¶</a></p> |
| 2245 |
<p id="section-4.2-6">An endpoint <span class="bcp14">MAY</span> avoid creating a decoder stream if its decoder sets the maximum |
| 2246 |
capacity of the dynamic table to zero.<a href="#section-4.2-6" class="pilcrow">¶</a></p> |
| 2247 |
<p id="section-4.2-7">An endpoint <span class="bcp14">MUST</span> allow its peer to create an encoder stream and a decoder stream |
| 2248 |
even if the connection's settings prevent their use.<a href="#section-4.2-7" class="pilcrow">¶</a></p> |
| 2249 |
</section> |
| 2250 |
</div> |
| 2251 |
<div id="encoder-instructions"> |
| 2252 |
<section id="section-4.3"> |
| 2253 |
<h3 id="name-encoder-instructions"> |
| 2254 |
<a href="#section-4.3" class="section-number selfRef">4.3. </a><a href="#name-encoder-instructions" class="section-name selfRef">Encoder Instructions</a> |
| 2255 |
</h3> |
| 2256 |
<p id="section-4.3-1">An encoder sends encoder instructions on the encoder stream to set the capacity |
| 2257 |
of the dynamic table and add dynamic table entries. Instructions adding table |
| 2258 |
entries can use existing entries to avoid transmitting redundant information. |
| 2259 |
The name can be transmitted as a reference to an existing entry in the static or |
| 2260 |
the dynamic table or as a string literal. For entries that already exist in |
| 2261 |
the dynamic table, the full entry can also be used by reference, creating a |
| 2262 |
duplicate entry.<a href="#section-4.3-1" class="pilcrow">¶</a></p> |
| 2263 |
<div id="set-dynamic-capacity"> |
| 2264 |
<section id="section-4.3.1"> |
| 2265 |
<h4 id="name-set-dynamic-table-capacity"> |
| 2266 |
<a href="#section-4.3.1" class="section-number selfRef">4.3.1. </a><a href="#name-set-dynamic-table-capacity" class="section-name selfRef">Set Dynamic Table Capacity</a> |
| 2267 |
</h4> |
| 2268 |
<p id="section-4.3.1-1">An encoder informs the decoder of a change to the dynamic table capacity using |
| 2269 |
an instruction that starts with the '001' 3-bit pattern. This is followed |
| 2270 |
by the new dynamic table capacity represented as an integer with a 5-bit prefix; |
| 2271 |
see <a href="#prefixed-integers" class="xref">Section 4.1.1</a>.<a href="#section-4.3.1-1" class="pilcrow">¶</a></p> |
| 2272 |
<span id="name-set-dynamic-table-capacity-2"></span><div id="fig-set-capacity"> |
| 2273 |
<figure id="figure-5"> |
| 2274 |
<div class="alignLeft art-ascii-art art-text artwork" id="section-4.3.1-2.1"> |
| 2275 |
<pre> |
| 2276 |
0 1 2 3 4 5 6 7 |
| 2277 |
+---+---+---+---+---+---+---+---+ |
| 2278 |
| 0 | 0 | 1 | Capacity (5+) | |
| 2279 |
+---+---+---+-------------------+ |
| 2280 |
</pre> |
| 2281 |
</div> |
| 2282 |
<figcaption><a href="#figure-5" class="selfRef">Figure 5</a>: |
| 2283 |
<a href="#name-set-dynamic-table-capacity-2" class="selfRef">Set Dynamic Table Capacity</a> |
| 2284 |
</figcaption></figure> |
| 2285 |
</div> |
| 2286 |
<p id="section-4.3.1-3">The new capacity <span class="bcp14">MUST</span> be lower than or equal to the limit described in |
| 2287 |
<a href="#maximum-dynamic-table-capacity" class="xref">Section 3.2.3</a>. In HTTP/3, this limit is the value of the |
| 2288 |
SETTINGS_QPACK_MAX_TABLE_CAPACITY parameter (<a href="#configuration" class="xref">Section 5</a>) received from |
| 2289 |
the decoder. The decoder <span class="bcp14">MUST</span> treat a new dynamic table capacity value that |
| 2290 |
exceeds this limit as a connection error of type QPACK_ENCODER_STREAM_ERROR.<a href="#section-4.3.1-3" class="pilcrow">¶</a></p> |
| 2291 |
<p id="section-4.3.1-4">Reducing the dynamic table capacity can cause entries to be evicted; see |
| 2292 |
<a href="#eviction" class="xref">Section 3.2.2</a>. This <span class="bcp14">MUST NOT</span> cause the eviction of entries that are not |
| 2293 |
evictable; see <a href="#blocked-insertion" class="xref">Section 2.1.1</a>. Changing the capacity of the dynamic |
| 2294 |
table is not acknowledged as this instruction does not insert an entry.<a href="#section-4.3.1-4" class="pilcrow">¶</a></p> |
| 2295 |
</section> |
| 2296 |
</div> |
| 2297 |
<div id="insert-with-name-reference"> |
| 2298 |
<section id="section-4.3.2"> |
| 2299 |
<h4 id="name-insert-with-name-reference"> |
| 2300 |
<a href="#section-4.3.2" class="section-number selfRef">4.3.2. </a><a href="#name-insert-with-name-reference" class="section-name selfRef">Insert with Name Reference</a> |
| 2301 |
</h4> |
| 2302 |
<p id="section-4.3.2-1">An encoder adds an entry to the dynamic table where the field name matches the |
| 2303 |
field name of an entry stored in the static or the dynamic table using an |
| 2304 |
instruction that starts with the '1' 1-bit pattern. The second ('T') bit |
| 2305 |
indicates whether the reference is to the static or dynamic table. The 6-bit |
| 2306 |
prefix integer (<a href="#prefixed-integers" class="xref">Section 4.1.1</a>) that follows is used to locate the table |
| 2307 |
entry for the field name. When T=1, the number represents the static table |
| 2308 |
index; when T=0, the number is the relative index of the entry in the dynamic |
| 2309 |
table.<a href="#section-4.3.2-1" class="pilcrow">¶</a></p> |
| 2310 |
<p id="section-4.3.2-2">The field name reference is followed by the field value represented as a string |
| 2311 |
literal; see <a href="#string-literals" class="xref">Section 4.1.2</a>.<a href="#section-4.3.2-2" class="pilcrow">¶</a></p> |
| 2312 |
<span id="name-insert-field-line-indexed-n"></span><figure id="figure-6"> |
| 2313 |
<div class="alignLeft art-ascii-art art-text artwork" id="section-4.3.2-3.1"> |
| 2314 |
<pre> |
| 2315 |
0 1 2 3 4 5 6 7 |
| 2316 |
+---+---+---+---+---+---+---+---+ |
| 2317 |
| 1 | T | Name Index (6+) | |
| 2318 |
+---+---+-----------------------+ |
| 2319 |
| H | Value Length (7+) | |
| 2320 |
+---+---------------------------+ |
| 2321 |
| Value String (Length bytes) | |
| 2322 |
+-------------------------------+ |
| 2323 |
</pre> |
| 2324 |
</div> |
| 2325 |
<figcaption><a href="#figure-6" class="selfRef">Figure 6</a>: |
| 2326 |
<a href="#name-insert-field-line-indexed-n" class="selfRef">Insert Field Line -- Indexed Name</a> |
| 2327 |
</figcaption></figure> |
| 2328 |
</section> |
| 2329 |
</div> |
| 2330 |
<div id="insert-with-literal-name"> |
| 2331 |
<section id="section-4.3.3"> |
| 2332 |
<h4 id="name-insert-with-literal-name"> |
| 2333 |
<a href="#section-4.3.3" class="section-number selfRef">4.3.3. </a><a href="#name-insert-with-literal-name" class="section-name selfRef">Insert with Literal Name</a> |
| 2334 |
</h4> |
| 2335 |
<p id="section-4.3.3-1">An encoder adds an entry to the dynamic table where both the field name and the |
| 2336 |
field value are represented as string literals using an instruction that starts |
| 2337 |
with the '01' 2-bit pattern.<a href="#section-4.3.3-1" class="pilcrow">¶</a></p> |
| 2338 |
<p id="section-4.3.3-2">This is followed by the name represented as a 6-bit prefix string literal and |
| 2339 |
the value represented as an 8-bit prefix string literal; see |
| 2340 |
<a href="#string-literals" class="xref">Section 4.1.2</a>.<a href="#section-4.3.3-2" class="pilcrow">¶</a></p> |
| 2341 |
<span id="name-insert-field-line-new-name"></span><figure id="figure-7"> |
| 2342 |
<div class="alignLeft art-ascii-art art-text artwork" id="section-4.3.3-3.1"> |
| 2343 |
<pre> |
| 2344 |
0 1 2 3 4 5 6 7 |
| 2345 |
+---+---+---+---+---+---+---+---+ |
| 2346 |
| 0 | 1 | H | Name Length (5+) | |
| 2347 |
+---+---+---+-------------------+ |
| 2348 |
| Name String (Length bytes) | |
| 2349 |
+---+---------------------------+ |
| 2350 |
| H | Value Length (7+) | |
| 2351 |
+---+---------------------------+ |
| 2352 |
| Value String (Length bytes) | |
| 2353 |
+-------------------------------+ |
| 2354 |
</pre> |
| 2355 |
</div> |
| 2356 |
<figcaption><a href="#figure-7" class="selfRef">Figure 7</a>: |
| 2357 |
<a href="#name-insert-field-line-new-name" class="selfRef">Insert Field Line -- New Name</a> |
| 2358 |
</figcaption></figure> |
| 2359 |
</section> |
| 2360 |
</div> |
| 2361 |
<div id="duplicate"> |
| 2362 |
<section id="section-4.3.4"> |
| 2363 |
<h4 id="name-duplicate"> |
| 2364 |
<a href="#section-4.3.4" class="section-number selfRef">4.3.4. </a><a href="#name-duplicate" class="section-name selfRef">Duplicate</a> |
| 2365 |
</h4> |
| 2366 |
<p id="section-4.3.4-1">An encoder duplicates an existing entry in the dynamic table using an |
| 2367 |
instruction that starts with the '000' 3-bit pattern. This is followed by |
| 2368 |
the relative index of the existing entry represented as an integer with a 5-bit |
| 2369 |
prefix; see <a href="#prefixed-integers" class="xref">Section 4.1.1</a>.<a href="#section-4.3.4-1" class="pilcrow">¶</a></p> |
| 2370 |
<span id="name-duplicate-2"></span><div id="fig-index-with-duplication"> |
| 2371 |
<figure id="figure-8"> |
| 2372 |
<div class="alignLeft art-ascii-art art-text artwork" id="section-4.3.4-2.1"> |
| 2373 |
<pre> |
| 2374 |
0 1 2 3 4 5 6 7 |
| 2375 |
+---+---+---+---+---+---+---+---+ |
| 2376 |
| 0 | 0 | 0 | Index (5+) | |
| 2377 |
+---+---+---+-------------------+ |
| 2378 |
</pre> |
| 2379 |
</div> |
| 2380 |
<figcaption><a href="#figure-8" class="selfRef">Figure 8</a>: |
| 2381 |
<a href="#name-duplicate-2" class="selfRef">Duplicate</a> |
| 2382 |
</figcaption></figure> |
| 2383 |
</div> |
| 2384 |
<p id="section-4.3.4-3">The existing entry is reinserted into the dynamic table without resending |
| 2385 |
either the name or the value. This is useful to avoid adding a reference to an |
| 2386 |
older entry, which might block inserting new entries.<a href="#section-4.3.4-3" class="pilcrow">¶</a></p> |
| 2387 |
</section> |
| 2388 |
</div> |
| 2389 |
</section> |
| 2390 |
</div> |
| 2391 |
<div id="decoder-instructions"> |
| 2392 |
<section id="section-4.4"> |
| 2393 |
<h3 id="name-decoder-instructions"> |
| 2394 |
<a href="#section-4.4" class="section-number selfRef">4.4. </a><a href="#name-decoder-instructions" class="section-name selfRef">Decoder Instructions</a> |
| 2395 |
</h3> |
| 2396 |
<p id="section-4.4-1">A decoder sends decoder instructions on the decoder stream to inform the encoder |
| 2397 |
about the processing of field sections and table updates to ensure consistency |
| 2398 |
of the dynamic table.<a href="#section-4.4-1" class="pilcrow">¶</a></p> |
| 2399 |
<div id="header-acknowledgment"> |
| 2400 |
<section id="section-4.4.1"> |
| 2401 |
<h4 id="name-section-acknowledgment"> |
| 2402 |
<a href="#section-4.4.1" class="section-number selfRef">4.4.1. </a><a href="#name-section-acknowledgment" class="section-name selfRef">Section Acknowledgment</a> |
| 2403 |
</h4> |
| 2404 |
<p id="section-4.4.1-1">After processing an encoded field section whose declared Required Insert Count |
| 2405 |
is not zero, the decoder emits a Section Acknowledgment instruction. The |
| 2406 |
instruction starts with the '1' 1-bit pattern, followed by the field |
| 2407 |
section's associated stream ID encoded as a 7-bit prefix integer; see |
| 2408 |
<a href="#prefixed-integers" class="xref">Section 4.1.1</a>.<a href="#section-4.4.1-1" class="pilcrow">¶</a></p> |
| 2409 |
<p id="section-4.4.1-2">This instruction is used as described in Sections <a href="#known-received-count" class="xref">2.1.4</a> and |
| 2410 |
<a href="#state-synchronization" class="xref">2.2.2</a>.<a href="#section-4.4.1-2" class="pilcrow">¶</a></p> |
| 2411 |
<span id="name-section-acknowledgment-2"></span><div id="fig-header-ack"> |
| 2412 |
<figure id="figure-9"> |
| 2413 |
<div class="alignLeft art-ascii-art art-text artwork" id="section-4.4.1-3.1"> |
| 2414 |
<pre> |
| 2415 |
0 1 2 3 4 5 6 7 |
| 2416 |
+---+---+---+---+---+---+---+---+ |
| 2417 |
| 1 | Stream ID (7+) | |
| 2418 |
+---+---------------------------+ |
| 2419 |
</pre> |
| 2420 |
</div> |
| 2421 |
<figcaption><a href="#figure-9" class="selfRef">Figure 9</a>: |
| 2422 |
<a href="#name-section-acknowledgment-2" class="selfRef">Section Acknowledgment</a> |
| 2423 |
</figcaption></figure> |
| 2424 |
</div> |
| 2425 |
<p id="section-4.4.1-4">If an encoder receives a Section Acknowledgment instruction referring to a |
| 2426 |
stream on which every encoded field section with a non-zero Required Insert |
| 2427 |
Count has already been acknowledged, this <span class="bcp14">MUST</span> be treated as a connection error |
| 2428 |
of type QPACK_DECODER_STREAM_ERROR.<a href="#section-4.4.1-4" class="pilcrow">¶</a></p> |
| 2429 |
<p id="section-4.4.1-5">The Section Acknowledgment instruction might increase the Known Received Count; |
| 2430 |
see <a href="#known-received-count" class="xref">Section 2.1.4</a>.<a href="#section-4.4.1-5" class="pilcrow">¶</a></p> |
| 2431 |
</section> |
| 2432 |
</div> |
| 2433 |
<div id="stream-cancellation"> |
| 2434 |
<section id="section-4.4.2"> |
| 2435 |
<h4 id="name-stream-cancellation"> |
| 2436 |
<a href="#section-4.4.2" class="section-number selfRef">4.4.2. </a><a href="#name-stream-cancellation" class="section-name selfRef">Stream Cancellation</a> |
| 2437 |
</h4> |
| 2438 |
<p id="section-4.4.2-1">When a stream is reset or reading is abandoned, the decoder emits a Stream |
| 2439 |
Cancellation instruction. The instruction starts with the '01' 2-bit |
| 2440 |
pattern, followed by the stream ID of the affected stream encoded as a |
| 2441 |
6-bit prefix integer.<a href="#section-4.4.2-1" class="pilcrow">¶</a></p> |
| 2442 |
<p id="section-4.4.2-2">This instruction is used as described in <a href="#state-synchronization" class="xref">Section 2.2.2</a>.<a href="#section-4.4.2-2" class="pilcrow">¶</a></p> |
| 2443 |
<span id="name-stream-cancellation-2"></span><div id="fig-stream-cancel"> |
| 2444 |
<figure id="figure-10"> |
| 2445 |
<div class="alignLeft art-ascii-art art-text artwork" id="section-4.4.2-3.1"> |
| 2446 |
<pre> |
| 2447 |
0 1 2 3 4 5 6 7 |
| 2448 |
+---+---+---+---+---+---+---+---+ |
| 2449 |
| 0 | 1 | Stream ID (6+) | |
| 2450 |
+---+---+-----------------------+ |
| 2451 |
</pre> |
| 2452 |
</div> |
| 2453 |
<figcaption><a href="#figure-10" class="selfRef">Figure 10</a>: |
| 2454 |
<a href="#name-stream-cancellation-2" class="selfRef">Stream Cancellation</a> |
| 2455 |
</figcaption></figure> |
| 2456 |
</div> |
| 2457 |
</section> |
| 2458 |
</div> |
| 2459 |
<div id="insert-count-increment"> |
| 2460 |
<section id="section-4.4.3"> |
| 2461 |
<h4 id="name-insert-count-increment"> |
| 2462 |
<a href="#section-4.4.3" class="section-number selfRef">4.4.3. </a><a href="#name-insert-count-increment" class="section-name selfRef">Insert Count Increment</a> |
| 2463 |
</h4> |
| 2464 |
<p id="section-4.4.3-1">The Insert Count Increment instruction starts with the '00' 2-bit pattern, |
| 2465 |
followed by the Increment encoded as a 6-bit prefix integer. This instruction |
| 2466 |
increases the Known Received Count (<a href="#known-received-count" class="xref">Section 2.1.4</a>) by the value of |
| 2467 |
the Increment parameter. The decoder should send an Increment value that |
| 2468 |
increases the Known Received Count to the total number of dynamic table |
| 2469 |
insertions and duplications processed so far.<a href="#section-4.4.3-1" class="pilcrow">¶</a></p> |
| 2470 |
<span id="name-insert-count-increment-2"></span><div id="fig-size-sync"> |
| 2471 |
<figure id="figure-11"> |
| 2472 |
<div class="alignLeft art-ascii-art art-text artwork" id="section-4.4.3-2.1"> |
| 2473 |
<pre> |
| 2474 |
0 1 2 3 4 5 6 7 |
| 2475 |
+---+---+---+---+---+---+---+---+ |
| 2476 |
| 0 | 0 | Increment (6+) | |
| 2477 |
+---+---+-----------------------+ |
| 2478 |
</pre> |
| 2479 |
</div> |
| 2480 |
<figcaption><a href="#figure-11" class="selfRef">Figure 11</a>: |
| 2481 |
<a href="#name-insert-count-increment-2" class="selfRef">Insert Count Increment</a> |
| 2482 |
</figcaption></figure> |
| 2483 |
</div> |
| 2484 |
<p id="section-4.4.3-3">An encoder that receives an Increment field equal to zero, or one that increases |
| 2485 |
the Known Received Count beyond what the encoder has sent, <span class="bcp14">MUST</span> treat this as a |
| 2486 |
connection error of type QPACK_DECODER_STREAM_ERROR.<a href="#section-4.4.3-3" class="pilcrow">¶</a></p> |
| 2487 |
</section> |
| 2488 |
</div> |
| 2489 |
</section> |
| 2490 |
</div> |
| 2491 |
<div id="field-line-representations"> |
| 2492 |
<section id="section-4.5"> |
| 2493 |
<h3 id="name-field-line-representations"> |
| 2494 |
<a href="#section-4.5" class="section-number selfRef">4.5. </a><a href="#name-field-line-representations" class="section-name selfRef">Field Line Representations</a> |
| 2495 |
</h3> |
| 2496 |
<p id="section-4.5-1">An encoded field section consists of a prefix and a possibly empty sequence of |
| 2497 |
representations defined in this section. Each representation corresponds to a |
| 2498 |
single field line. These representations reference the static table or the |
| 2499 |
dynamic table in a particular state, but they do not modify that state.<a href="#section-4.5-1" class="pilcrow">¶</a></p> |
| 2500 |
<p id="section-4.5-2">Encoded field sections are carried in frames on streams defined by the enclosing |
| 2501 |
protocol.<a href="#section-4.5-2" class="pilcrow">¶</a></p> |
| 2502 |
<div id="header-prefix"> |
| 2503 |
<section id="section-4.5.1"> |
| 2504 |
<h4 id="name-encoded-field-section-prefi"> |
| 2505 |
<a href="#section-4.5.1" class="section-number selfRef">4.5.1. </a><a href="#name-encoded-field-section-prefi" class="section-name selfRef">Encoded Field Section Prefix</a> |
| 2506 |
</h4> |
| 2507 |
<p id="section-4.5.1-1">Each encoded field section is prefixed with two integers. The Required Insert |
| 2508 |
Count is encoded as an integer with an 8-bit prefix using the encoding described |
| 2509 |
in <a href="#ric" class="xref">Section 4.5.1.1</a>. The Base is encoded as a Sign bit ('S') and a Delta Base value |
| 2510 |
with a 7-bit prefix; see <a href="#base" class="xref">Section 4.5.1.2</a>.<a href="#section-4.5.1-1" class="pilcrow">¶</a></p> |
| 2511 |
<span id="name-encoded-field-section"></span><div id="fig-base-index"> |
| 2512 |
<figure id="figure-12"> |
| 2513 |
<div class="alignLeft art-ascii-art art-text artwork" id="section-4.5.1-2.1"> |
| 2514 |
<pre> |
| 2515 |
0 1 2 3 4 5 6 7 |
| 2516 |
+---+---+---+---+---+---+---+---+ |
| 2517 |
| Required Insert Count (8+) | |
| 2518 |
+---+---------------------------+ |
| 2519 |
| S | Delta Base (7+) | |
| 2520 |
+---+---------------------------+ |
| 2521 |
| Encoded Field Lines ... |
| 2522 |
+-------------------------------+ |
| 2523 |
</pre> |
| 2524 |
</div> |
| 2525 |
<figcaption><a href="#figure-12" class="selfRef">Figure 12</a>: |
| 2526 |
<a href="#name-encoded-field-section" class="selfRef">Encoded Field Section</a> |
| 2527 |
</figcaption></figure> |
| 2528 |
</div> |
| 2529 |
<div id="ric"> |
| 2530 |
<section id="section-4.5.1.1"> |
| 2531 |
<h5 id="name-required-insert-count"> |
| 2532 |
<a href="#section-4.5.1.1" class="section-number selfRef">4.5.1.1. </a><a href="#name-required-insert-count" class="section-name selfRef">Required Insert Count</a> |
| 2533 |
</h5> |
| 2534 |
<p id="section-4.5.1.1-1">Required Insert Count identifies the state of the dynamic table needed to |
| 2535 |
process the encoded field section. Blocking decoders use the Required Insert |
| 2536 |
Count to determine when it is safe to process the rest of the field section.<a href="#section-4.5.1.1-1" class="pilcrow">¶</a></p> |
| 2537 |
<p id="section-4.5.1.1-2">The encoder transforms the Required Insert Count as follows before encoding:<a href="#section-4.5.1.1-2" class="pilcrow">¶</a></p> |
| 2538 |
<div id="section-4.5.1.1-3"> |
| 2539 |
<pre class="lang-pseudocode sourcecode"> |
| 2540 |
if ReqInsertCount == 0: |
| 2541 |
EncInsertCount = 0 |
| 2542 |
else: |
| 2543 |
EncInsertCount = (ReqInsertCount mod (2 * MaxEntries)) + 1 |
| 2544 |
</pre><a href="#section-4.5.1.1-3" class="pilcrow">¶</a> |
| 2545 |
</div> |
| 2546 |
<p id="section-4.5.1.1-4">Here <code>MaxEntries</code> is the maximum number of entries that the dynamic table can |
| 2547 |
have. The smallest entry has empty name and value strings and has the size of |
| 2548 |
32. Hence, <code>MaxEntries</code> is calculated as:<a href="#section-4.5.1.1-4" class="pilcrow">¶</a></p> |
| 2549 |
<div id="section-4.5.1.1-5"> |
| 2550 |
<pre class="lang-pseudocode sourcecode"> |
| 2551 |
MaxEntries = floor( MaxTableCapacity / 32 ) |
| 2552 |
</pre><a href="#section-4.5.1.1-5" class="pilcrow">¶</a> |
| 2553 |
</div> |
| 2554 |
<p id="section-4.5.1.1-6"><code>MaxTableCapacity</code> is the maximum capacity of the dynamic table as specified by |
| 2555 |
the decoder; see <a href="#maximum-dynamic-table-capacity" class="xref">Section 3.2.3</a>.<a href="#section-4.5.1.1-6" class="pilcrow">¶</a></p> |
| 2556 |
<p id="section-4.5.1.1-7">This encoding limits the length of the prefix on long-lived connections.<a href="#section-4.5.1.1-7" class="pilcrow">¶</a></p> |
| 2557 |
<p id="section-4.5.1.1-8">The decoder can reconstruct the Required Insert Count using an algorithm such as |
| 2558 |
the following. If the decoder encounters a value of EncodedInsertCount that |
| 2559 |
could not have been produced by a conformant encoder, it <span class="bcp14">MUST</span> treat this as a |
| 2560 |
connection error of type QPACK_DECOMPRESSION_FAILED.<a href="#section-4.5.1.1-8" class="pilcrow">¶</a></p> |
| 2561 |
<p id="section-4.5.1.1-9"><code>TotalNumberOfInserts</code> is the total number of inserts into the decoder's dynamic |
| 2562 |
table.<a href="#section-4.5.1.1-9" class="pilcrow">¶</a></p> |
| 2563 |
<div id="section-4.5.1.1-10"> |
| 2564 |
<pre class="lang-pseudocode sourcecode"> |
| 2565 |
FullRange = 2 * MaxEntries |
| 2566 |
if EncodedInsertCount == 0: |
| 2567 |
ReqInsertCount = 0 |
| 2568 |
else: |
| 2569 |
if EncodedInsertCount > FullRange: |
| 2570 |
Error |
| 2571 |
MaxValue = TotalNumberOfInserts + MaxEntries |
| 2572 |
|
| 2573 |
# MaxWrapped is the largest possible value of |
| 2574 |
# ReqInsertCount that is 0 mod 2 * MaxEntries |
| 2575 |
MaxWrapped = floor(MaxValue / FullRange) * FullRange |
| 2576 |
ReqInsertCount = MaxWrapped + EncodedInsertCount - 1 |
| 2577 |
|
| 2578 |
# If ReqInsertCount exceeds MaxValue, the Encoder's value |
| 2579 |
# must have wrapped one fewer time |
| 2580 |
if ReqInsertCount > MaxValue: |
| 2581 |
if ReqInsertCount <= FullRange: |
| 2582 |
Error |
| 2583 |
ReqInsertCount -= FullRange |
| 2584 |
|
| 2585 |
# Value of 0 must be encoded as 0. |
| 2586 |
if ReqInsertCount == 0: |
| 2587 |
Error |
| 2588 |
</pre><a href="#section-4.5.1.1-10" class="pilcrow">¶</a> |
| 2589 |
</div> |
| 2590 |
<p id="section-4.5.1.1-11">For example, if the dynamic table is 100 bytes, then the Required Insert Count |
| 2591 |
will be encoded modulo 6. If a decoder has received 10 inserts, then an encoded |
| 2592 |
value of 4 indicates that the Required Insert Count is 9 for the field section.<a href="#section-4.5.1.1-11" class="pilcrow">¶</a></p> |
| 2593 |
</section> |
| 2594 |
</div> |
| 2595 |
<div id="base"> |
| 2596 |
<section id="section-4.5.1.2"> |
| 2597 |
<h5 id="name-base"> |
| 2598 |
<a href="#section-4.5.1.2" class="section-number selfRef">4.5.1.2. </a><a href="#name-base" class="section-name selfRef">Base</a> |
| 2599 |
</h5> |
| 2600 |
<p id="section-4.5.1.2-1">The Base is used to resolve references in the dynamic table as described in |
| 2601 |
<a href="#relative-indexing" class="xref">Section 3.2.5</a>.<a href="#section-4.5.1.2-1" class="pilcrow">¶</a></p> |
| 2602 |
<p id="section-4.5.1.2-2">To save space, the Base is encoded relative to the Required Insert Count using a |
| 2603 |
one-bit Sign ('S' in <a href="#fig-base-index" class="xref">Figure 12</a>) and the Delta Base value. A Sign bit |
| 2604 |
of 0 indicates that the Base is greater than or equal to the value of the |
| 2605 |
Required Insert Count; the decoder adds the value of Delta Base to the Required |
| 2606 |
Insert Count to determine the value of the Base. A Sign bit of 1 indicates that |
| 2607 |
the Base is less than the Required Insert Count; the decoder subtracts the value |
| 2608 |
of Delta Base from the Required Insert Count and also subtracts one to determine |
| 2609 |
the value of the Base. That is:<a href="#section-4.5.1.2-2" class="pilcrow">¶</a></p> |
| 2610 |
<div id="section-4.5.1.2-3"> |
| 2611 |
<pre class="lang-pseudocode sourcecode"> |
| 2612 |
if Sign == 0: |
| 2613 |
Base = ReqInsertCount + DeltaBase |
| 2614 |
else: |
| 2615 |
Base = ReqInsertCount - DeltaBase - 1 |
| 2616 |
</pre><a href="#section-4.5.1.2-3" class="pilcrow">¶</a> |
| 2617 |
</div> |
| 2618 |
<p id="section-4.5.1.2-4">A single-pass encoder determines the Base before encoding a field section. If |
| 2619 |
the encoder inserted entries in the dynamic table while encoding the field |
| 2620 |
section and is referencing them, Required Insert Count will be greater than the |
| 2621 |
Base, so the encoded difference is negative and the Sign bit is set to 1. If |
| 2622 |
the field section was not encoded using representations that reference the most |
| 2623 |
recent entry in the table and did not insert any new entries, the Base will be |
| 2624 |
greater than the Required Insert Count, so the encoded difference will be |
| 2625 |
positive and the Sign bit is set to 0.<a href="#section-4.5.1.2-4" class="pilcrow">¶</a></p> |
| 2626 |
<p id="section-4.5.1.2-5">The value of Base <span class="bcp14">MUST NOT</span> be negative. Though the protocol might operate |
| 2627 |
correctly with a negative Base using post-Base indexing, it is unnecessary and |
| 2628 |
inefficient. An endpoint <span class="bcp14">MUST</span> treat a field block with a Sign bit of 1 as |
| 2629 |
invalid if the value of Required Insert Count is less than or equal to the value |
| 2630 |
of Delta Base.<a href="#section-4.5.1.2-5" class="pilcrow">¶</a></p> |
| 2631 |
<p id="section-4.5.1.2-6">An encoder that produces table updates before encoding a field section might set |
| 2632 |
Base to the value of Required Insert Count. In such a case, both the Sign bit |
| 2633 |
and the Delta Base will be set to zero.<a href="#section-4.5.1.2-6" class="pilcrow">¶</a></p> |
| 2634 |
<p id="section-4.5.1.2-7">A field section that was encoded without references to the dynamic table can use |
| 2635 |
any value for the Base; setting Delta Base to zero is one of the most efficient |
| 2636 |
encodings.<a href="#section-4.5.1.2-7" class="pilcrow">¶</a></p> |
| 2637 |
<p id="section-4.5.1.2-8">For example, with a Required Insert Count of 9, a decoder receives a Sign bit |
| 2638 |
of 1 and a Delta Base of 2. This sets the Base to 6 and enables post-Base |
| 2639 |
indexing for three entries. In this example, a relative index of 1 refers to |
| 2640 |
the fifth entry that was added to the table; a post-Base index of 1 refers to |
| 2641 |
the eighth entry.<a href="#section-4.5.1.2-8" class="pilcrow">¶</a></p> |
| 2642 |
</section> |
| 2643 |
</div> |
| 2644 |
</section> |
| 2645 |
</div> |
| 2646 |
<div id="indexed-field-line"> |
| 2647 |
<section id="section-4.5.2"> |
| 2648 |
<h4 id="name-indexed-field-line"> |
| 2649 |
<a href="#section-4.5.2" class="section-number selfRef">4.5.2. </a><a href="#name-indexed-field-line" class="section-name selfRef">Indexed Field Line</a> |
| 2650 |
</h4> |
| 2651 |
<p id="section-4.5.2-1">An indexed field line representation identifies an entry in the static table |
| 2652 |
or an entry in the dynamic table with an absolute index less than the value of |
| 2653 |
the Base.<a href="#section-4.5.2-1" class="pilcrow">¶</a></p> |
| 2654 |
<span id="name-indexed-field-line-2"></span><figure id="figure-13"> |
| 2655 |
<div class="alignLeft art-ascii-art art-text artwork" id="section-4.5.2-2.1"> |
| 2656 |
<pre> |
| 2657 |
0 1 2 3 4 5 6 7 |
| 2658 |
+---+---+---+---+---+---+---+---+ |
| 2659 |
| 1 | T | Index (6+) | |
| 2660 |
+---+---+-----------------------+ |
| 2661 |
</pre> |
| 2662 |
</div> |
| 2663 |
<figcaption><a href="#figure-13" class="selfRef">Figure 13</a>: |
| 2664 |
<a href="#name-indexed-field-line-2" class="selfRef">Indexed Field Line</a> |
| 2665 |
</figcaption></figure> |
| 2666 |
<p id="section-4.5.2-3">This representation starts with the '1' 1-bit pattern, followed by the 'T' bit, |
| 2667 |
indicating whether the reference is into the static or dynamic table. The 6-bit |
| 2668 |
prefix integer (<a href="#prefixed-integers" class="xref">Section 4.1.1</a>) that follows is used to locate the |
| 2669 |
table entry for the field line. When T=1, the number represents the static |
| 2670 |
table index; when T=0, the number is the relative index of the entry in the |
| 2671 |
dynamic table.<a href="#section-4.5.2-3" class="pilcrow">¶</a></p> |
| 2672 |
</section> |
| 2673 |
</div> |
| 2674 |
<div id="indexed-field-line-with-post-base-index"> |
| 2675 |
<section id="section-4.5.3"> |
| 2676 |
<h4 id="name-indexed-field-line-with-pos"> |
| 2677 |
<a href="#section-4.5.3" class="section-number selfRef">4.5.3. </a><a href="#name-indexed-field-line-with-pos" class="section-name selfRef">Indexed Field Line with Post-Base Index</a> |
| 2678 |
</h4> |
| 2679 |
<p id="section-4.5.3-1">An indexed field line with post-Base index representation identifies an entry |
| 2680 |
in the dynamic table with an absolute index greater than or equal to the value |
| 2681 |
of the Base.<a href="#section-4.5.3-1" class="pilcrow">¶</a></p> |
| 2682 |
<span id="name-indexed-field-line-with-post"></span><figure id="figure-14"> |
| 2683 |
<div class="alignLeft art-ascii-art art-text artwork" id="section-4.5.3-2.1"> |
| 2684 |
<pre> |
| 2685 |
0 1 2 3 4 5 6 7 |
| 2686 |
+---+---+---+---+---+---+---+---+ |
| 2687 |
| 0 | 0 | 0 | 1 | Index (4+) | |
| 2688 |
+---+---+---+---+---------------+ |
| 2689 |
</pre> |
| 2690 |
</div> |
| 2691 |
<figcaption><a href="#figure-14" class="selfRef">Figure 14</a>: |
| 2692 |
<a href="#name-indexed-field-line-with-post" class="selfRef">Indexed Field Line with Post-Base Index</a> |
| 2693 |
</figcaption></figure> |
| 2694 |
<p id="section-4.5.3-3">This representation starts with the '0001' 4-bit pattern. This is followed |
| 2695 |
by the post-Base index (<a href="#post-base" class="xref">Section 3.2.6</a>) of the matching field line, represented |
| 2696 |
as an integer with a 4-bit prefix; see <a href="#prefixed-integers" class="xref">Section 4.1.1</a>.<a href="#section-4.5.3-3" class="pilcrow">¶</a></p> |
| 2697 |
</section> |
| 2698 |
</div> |
| 2699 |
<div id="literal-name-reference"> |
| 2700 |
<section id="section-4.5.4"> |
| 2701 |
<h4 id="name-literal-field-line-with-nam"> |
| 2702 |
<a href="#section-4.5.4" class="section-number selfRef">4.5.4. </a><a href="#name-literal-field-line-with-nam" class="section-name selfRef">Literal Field Line with Name Reference</a> |
| 2703 |
</h4> |
| 2704 |
<p id="section-4.5.4-1">A literal field line with name reference representation encodes a field line |
| 2705 |
where the field name matches the field name of an entry in the static table or |
| 2706 |
the field name of an entry in the dynamic table with an absolute index less than |
| 2707 |
the value of the Base.<a href="#section-4.5.4-1" class="pilcrow">¶</a></p> |
| 2708 |
<span id="name-literal-field-line-with-name"></span><figure id="figure-15"> |
| 2709 |
<div class="alignLeft art-ascii-art art-text artwork" id="section-4.5.4-2.1"> |
| 2710 |
<pre> |
| 2711 |
0 1 2 3 4 5 6 7 |
| 2712 |
+---+---+---+---+---+---+---+---+ |
| 2713 |
| 0 | 1 | N | T |Name Index (4+)| |
| 2714 |
+---+---+---+---+---------------+ |
| 2715 |
| H | Value Length (7+) | |
| 2716 |
+---+---------------------------+ |
| 2717 |
| Value String (Length bytes) | |
| 2718 |
+-------------------------------+ |
| 2719 |
</pre> |
| 2720 |
</div> |
| 2721 |
<figcaption><a href="#figure-15" class="selfRef">Figure 15</a>: |
| 2722 |
<a href="#name-literal-field-line-with-name" class="selfRef">Literal Field Line with Name Reference</a> |
| 2723 |
</figcaption></figure> |
| 2724 |
<p id="section-4.5.4-3">This representation starts with the '01' 2-bit pattern. The following bit, |
| 2725 |
'N', indicates whether an intermediary is permitted to add this field line to |
| 2726 |
the dynamic table on subsequent hops. When the 'N' bit is set, the encoded field |
| 2727 |
line <span class="bcp14">MUST</span> always be encoded with a literal representation. In particular, when a |
| 2728 |
peer sends a field line that it received represented as a literal field line |
| 2729 |
with the 'N' bit set, it <span class="bcp14">MUST</span> use a literal representation to forward this field |
| 2730 |
line. This bit is intended for protecting field values that are not to be put |
| 2731 |
at risk by compressing them; see <a href="#probing-dynamic-table-state" class="xref">Section 7.1</a> for more |
| 2732 |
details.<a href="#section-4.5.4-3" class="pilcrow">¶</a></p> |
| 2733 |
<p id="section-4.5.4-4">The fourth ('T') bit indicates whether the reference is to the static or dynamic |
| 2734 |
table. The 4-bit prefix integer (<a href="#prefixed-integers" class="xref">Section 4.1.1</a>) that follows is used to |
| 2735 |
locate the table entry for the field name. When T=1, the number represents the |
| 2736 |
static table index; when T=0, the number is the relative index of the entry in |
| 2737 |
the dynamic table.<a href="#section-4.5.4-4" class="pilcrow">¶</a></p> |
| 2738 |
<p id="section-4.5.4-5">Only the field name is taken from the dynamic table entry; the field value is |
| 2739 |
encoded as an 8-bit prefix string literal; see <a href="#string-literals" class="xref">Section 4.1.2</a>.<a href="#section-4.5.4-5" class="pilcrow">¶</a></p> |
| 2740 |
</section> |
| 2741 |
</div> |
| 2742 |
<div id="literal-field-line-with-post-base-name-reference"> |
| 2743 |
<section id="section-4.5.5"> |
| 2744 |
<h4 id="name-literal-field-line-with-pos"> |
| 2745 |
<a href="#section-4.5.5" class="section-number selfRef">4.5.5. </a><a href="#name-literal-field-line-with-pos" class="section-name selfRef">Literal Field Line with Post-Base Name Reference</a> |
| 2746 |
</h4> |
| 2747 |
<p id="section-4.5.5-1">A literal field line with post-Base name reference representation encodes a |
| 2748 |
field line where the field name matches the field name of a dynamic table entry |
| 2749 |
with an absolute index greater than or equal to the value of the Base.<a href="#section-4.5.5-1" class="pilcrow">¶</a></p> |
| 2750 |
<span id="name-literal-field-line-with-post"></span><figure id="figure-16"> |
| 2751 |
<div class="alignLeft art-ascii-art art-text artwork" id="section-4.5.5-2.1"> |
| 2752 |
<pre> |
| 2753 |
0 1 2 3 4 5 6 7 |
| 2754 |
+---+---+---+---+---+---+---+---+ |
| 2755 |
| 0 | 0 | 0 | 0 | N |NameIdx(3+)| |
| 2756 |
+---+---+---+---+---+-----------+ |
| 2757 |
| H | Value Length (7+) | |
| 2758 |
+---+---------------------------+ |
| 2759 |
| Value String (Length bytes) | |
| 2760 |
+-------------------------------+ |
| 2761 |
</pre> |
| 2762 |
</div> |
| 2763 |
<figcaption><a href="#figure-16" class="selfRef">Figure 16</a>: |
| 2764 |
<a href="#name-literal-field-line-with-post" class="selfRef">Literal Field Line with Post-Base Name Reference</a> |
| 2765 |
</figcaption></figure> |
| 2766 |
<p id="section-4.5.5-3">This representation starts with the '0000' 4-bit pattern. The fifth bit is |
| 2767 |
the 'N' bit as described in <a href="#literal-name-reference" class="xref">Section 4.5.4</a>. This is followed by a |
| 2768 |
post-Base index of the dynamic table entry (<a href="#post-base" class="xref">Section 3.2.6</a>) encoded as an |
| 2769 |
integer with a 3-bit prefix; see <a href="#prefixed-integers" class="xref">Section 4.1.1</a>.<a href="#section-4.5.5-3" class="pilcrow">¶</a></p> |
| 2770 |
<p id="section-4.5.5-4">Only the field name is taken from the dynamic table entry; the field value is |
| 2771 |
encoded as an 8-bit prefix string literal; see <a href="#string-literals" class="xref">Section 4.1.2</a>.<a href="#section-4.5.5-4" class="pilcrow">¶</a></p> |
| 2772 |
</section> |
| 2773 |
</div> |
| 2774 |
<div id="literal-field-line-with-literal-name"> |
| 2775 |
<section id="section-4.5.6"> |
| 2776 |
<h4 id="name-literal-field-line-with-lit"> |
| 2777 |
<a href="#section-4.5.6" class="section-number selfRef">4.5.6. </a><a href="#name-literal-field-line-with-lit" class="section-name selfRef">Literal Field Line with Literal Name</a> |
| 2778 |
</h4> |
| 2779 |
<p id="section-4.5.6-1">The literal field line with literal name representation encodes a |
| 2780 |
field name and a field value as string literals.<a href="#section-4.5.6-1" class="pilcrow">¶</a></p> |
| 2781 |
<span id="name-literal-field-line-with-lite"></span><figure id="figure-17"> |
| 2782 |
<div class="alignLeft art-ascii-art art-text artwork" id="section-4.5.6-2.1"> |
| 2783 |
<pre> |
| 2784 |
0 1 2 3 4 5 6 7 |
| 2785 |
+---+---+---+---+---+---+---+---+ |
| 2786 |
| 0 | 0 | 1 | N | H |NameLen(3+)| |
| 2787 |
+---+---+---+---+---+-----------+ |
| 2788 |
| Name String (Length bytes) | |
| 2789 |
+---+---------------------------+ |
| 2790 |
| H | Value Length (7+) | |
| 2791 |
+---+---------------------------+ |
| 2792 |
| Value String (Length bytes) | |
| 2793 |
+-------------------------------+ |
| 2794 |
</pre> |
| 2795 |
</div> |
| 2796 |
<figcaption><a href="#figure-17" class="selfRef">Figure 17</a>: |
| 2797 |
<a href="#name-literal-field-line-with-lite" class="selfRef">Literal Field Line with Literal Name</a> |
| 2798 |
</figcaption></figure> |
| 2799 |
<p id="section-4.5.6-3">This representation starts with the '001' 3-bit pattern. The fourth bit is |
| 2800 |
the 'N' bit as described in <a href="#literal-name-reference" class="xref">Section 4.5.4</a>. The name follows, |
| 2801 |
represented as a 4-bit prefix string literal, then the value, represented as an |
| 2802 |
8-bit prefix string literal; see <a href="#string-literals" class="xref">Section 4.1.2</a>.<a href="#section-4.5.6-3" class="pilcrow">¶</a></p> |
| 2803 |
</section> |
| 2804 |
</div> |
| 2805 |
</section> |
| 2806 |
</div> |
| 2807 |
</section> |
| 2808 |
</div> |
| 2809 |
<div id="configuration"> |
| 2810 |
<section id="section-5"> |
| 2811 |
<h2 id="name-configuration"> |
| 2812 |
<a href="#section-5" class="section-number selfRef">5. </a><a href="#name-configuration" class="section-name selfRef">Configuration</a> |
| 2813 |
</h2> |
| 2814 |
<p id="section-5-1">QPACK defines two settings for the HTTP/3 SETTINGS frame:<a href="#section-5-1" class="pilcrow">¶</a></p> |
| 2815 |
<span class="break"></span><dl class="dlParallel" id="section-5-2"> |
| 2816 |
<dt id="section-5-2.1">SETTINGS_QPACK_MAX_TABLE_CAPACITY (0x01):</dt> |
| 2817 |
<dd style="margin-left: 1.5em" id="section-5-2.2"> |
| 2818 |
<p id="section-5-2.2.1">The default value is zero. See <a href="#header-table-dynamic" class="xref">Section 3.2</a> for usage. This is |
| 2819 |
the equivalent of the SETTINGS_HEADER_TABLE_SIZE from HTTP/2.<a href="#section-5-2.2.1" class="pilcrow">¶</a></p> |
| 2820 |
</dd> |
| 2821 |
<dd class="break"></dd> |
| 2822 |
<dt id="section-5-2.3">SETTINGS_QPACK_BLOCKED_STREAMS (0x07):</dt> |
| 2823 |
<dd style="margin-left: 1.5em" id="section-5-2.4"> |
| 2824 |
<p id="section-5-2.4.1">The default value is zero. See <a href="#blocked-streams" class="xref">Section 2.1.2</a>.<a href="#section-5-2.4.1" class="pilcrow">¶</a></p> |
| 2825 |
</dd> |
| 2826 |
<dd class="break"></dd> |
| 2827 |
</dl> |
| 2828 |
</section> |
| 2829 |
</div> |
| 2830 |
<div id="error-handling"> |
| 2831 |
<section id="section-6"> |
| 2832 |
<h2 id="name-error-handling"> |
| 2833 |
<a href="#section-6" class="section-number selfRef">6. </a><a href="#name-error-handling" class="section-name selfRef">Error Handling</a> |
| 2834 |
</h2> |
| 2835 |
<p id="section-6-1">The following error codes are defined for HTTP/3 to indicate failures of |
| 2836 |
QPACK that prevent the stream or connection from continuing:<a href="#section-6-1" class="pilcrow">¶</a></p> |
| 2837 |
<span class="break"></span><dl class="dlParallel" id="section-6-2"> |
| 2838 |
<dt id="section-6-2.1">QPACK_DECOMPRESSION_FAILED (0x0200):</dt> |
| 2839 |
<dd style="margin-left: 1.5em" id="section-6-2.2"> |
| 2840 |
<p id="section-6-2.2.1">The decoder failed to interpret an encoded field section and is not able to |
| 2841 |
continue decoding that field section.<a href="#section-6-2.2.1" class="pilcrow">¶</a></p> |
| 2842 |
</dd> |
| 2843 |
<dd class="break"></dd> |
| 2844 |
<dt id="section-6-2.3">QPACK_ENCODER_STREAM_ERROR (0x0201):</dt> |
| 2845 |
<dd style="margin-left: 1.5em" id="section-6-2.4"> |
| 2846 |
<p id="section-6-2.4.1">The decoder failed to interpret an encoder instruction received on the |
| 2847 |
encoder stream.<a href="#section-6-2.4.1" class="pilcrow">¶</a></p> |
| 2848 |
</dd> |
| 2849 |
<dd class="break"></dd> |
| 2850 |
<dt id="section-6-2.5">QPACK_DECODER_STREAM_ERROR (0x0202):</dt> |
| 2851 |
<dd style="margin-left: 1.5em" id="section-6-2.6"> |
| 2852 |
<p id="section-6-2.6.1">The encoder failed to interpret a decoder instruction received on the |
| 2853 |
decoder stream.<a href="#section-6-2.6.1" class="pilcrow">¶</a></p> |
| 2854 |
</dd> |
| 2855 |
<dd class="break"></dd> |
| 2856 |
</dl> |
| 2857 |
</section> |
| 2858 |
</div> |
| 2859 |
<div id="security-considerations"> |
| 2860 |
<section id="section-7"> |
| 2861 |
<h2 id="name-security-considerations"> |
| 2862 |
<a href="#section-7" class="section-number selfRef">7. </a><a href="#name-security-considerations" class="section-name selfRef">Security Considerations</a> |
| 2863 |
</h2> |
| 2864 |
<p id="section-7-1">This section describes potential areas of security concern with QPACK:<a href="#section-7-1" class="pilcrow">¶</a></p> |
| 2865 |
<ul class="normal"> |
| 2866 |
<li class="normal" id="section-7-2.1">Use of compression as a length-based oracle for verifying guesses about |
| 2867 |
secrets that are compressed into a shared compression context.<a href="#section-7-2.1" class="pilcrow">¶</a> |
| 2868 |
</li> |
| 2869 |
<li class="normal" id="section-7-2.2">Denial of service resulting from exhausting processing or memory capacity at |
| 2870 |
a decoder.<a href="#section-7-2.2" class="pilcrow">¶</a> |
| 2871 |
</li> |
| 2872 |
</ul> |
| 2873 |
<div id="probing-dynamic-table-state"> |
| 2874 |
<section id="section-7.1"> |
| 2875 |
<h3 id="name-probing-dynamic-table-state"> |
| 2876 |
<a href="#section-7.1" class="section-number selfRef">7.1. </a><a href="#name-probing-dynamic-table-state" class="section-name selfRef">Probing Dynamic Table State</a> |
| 2877 |
</h3> |
| 2878 |
<p id="section-7.1-1">QPACK reduces the encoded size of field sections by exploiting the redundancy |
| 2879 |
inherent in protocols like HTTP. The ultimate goal of this is to reduce the |
| 2880 |
amount of data that is required to send HTTP requests or responses.<a href="#section-7.1-1" class="pilcrow">¶</a></p> |
| 2881 |
<p id="section-7.1-2">The compression context used to encode header and trailer fields can be probed |
| 2882 |
by an attacker who can both define fields to be encoded and transmitted and |
| 2883 |
observe the length of those fields once they are encoded. When an attacker can |
| 2884 |
do both, they can adaptively modify requests in order to confirm guesses about |
| 2885 |
the dynamic table state. If a guess is compressed into a shorter length, the |
| 2886 |
attacker can observe the encoded length and infer that the guess was correct.<a href="#section-7.1-2" class="pilcrow">¶</a></p> |
| 2887 |
<p id="section-7.1-3">This is possible even over the Transport Layer Security Protocol |
| 2888 |
(<span>[<a href="#TLS" class="xref">TLS</a>]</span>) and the QUIC Transport Protocol (<span>[<a href="#QUIC-TRANSPORT" class="xref">QUIC-TRANSPORT</a>]</span>), because |
| 2889 |
while TLS and QUIC provide confidentiality protection for content, they only |
| 2890 |
provide a limited amount of protection for the length of that content.<a href="#section-7.1-3" class="pilcrow">¶</a></p> |
| 2891 |
<aside id="section-7.1-4"> |
| 2892 |
<p id="section-7.1-4.1">Note: Padding schemes only provide limited protection against an attacker with |
| 2893 |
these capabilities, potentially only forcing an increased number of guesses to |
| 2894 |
learn the length associated with a given guess. Padding schemes also work |
| 2895 |
directly against compression by increasing the number of bits that are |
| 2896 |
transmitted.<a href="#section-7.1-4.1" class="pilcrow">¶</a></p> |
| 2897 |
</aside> |
| 2898 |
<p id="section-7.1-5">Attacks like CRIME (<span>[<a href="#CRIME" class="xref">CRIME</a>]</span>) demonstrated the existence of these general |
| 2899 |
attacker capabilities. The specific attack exploited the fact that DEFLATE |
| 2900 |
(<span>[<a href="#RFC1951" class="xref">RFC1951</a>]</span>) removes redundancy based on prefix matching. This permitted the |
| 2901 |
attacker to confirm guesses a character at a time, reducing an exponential-time |
| 2902 |
attack into a linear-time attack.<a href="#section-7.1-5" class="pilcrow">¶</a></p> |
| 2903 |
<div id="applicability-to-qpack-and-http"> |
| 2904 |
<section id="section-7.1.1"> |
| 2905 |
<h4 id="name-applicability-to-qpack-and-"> |
| 2906 |
<a href="#section-7.1.1" class="section-number selfRef">7.1.1. </a><a href="#name-applicability-to-qpack-and-" class="section-name selfRef">Applicability to QPACK and HTTP</a> |
| 2907 |
</h4> |
| 2908 |
<p id="section-7.1.1-1">QPACK mitigates, but does not completely prevent, attacks modeled on CRIME |
| 2909 |
(<span>[<a href="#CRIME" class="xref">CRIME</a>]</span>) by forcing a guess to match an entire field line rather than |
| 2910 |
individual characters. An attacker can only learn whether a guess is correct or |
| 2911 |
not, so the attacker is reduced to a brute-force guess for the field values |
| 2912 |
associated with a given field name.<a href="#section-7.1.1-1" class="pilcrow">¶</a></p> |
| 2913 |
<p id="section-7.1.1-2">Therefore, the viability of recovering specific field values depends on the |
| 2914 |
entropy of values. As a result, values with high entropy are unlikely to be |
| 2915 |
recovered successfully. However, values with low entropy remain vulnerable.<a href="#section-7.1.1-2" class="pilcrow">¶</a></p> |
| 2916 |
<p id="section-7.1.1-3">Attacks of this nature are possible any time that two mutually distrustful |
| 2917 |
entities control requests or responses that are placed onto a single HTTP/3 |
| 2918 |
connection. If the shared QPACK compressor permits one entity to add entries to |
| 2919 |
the dynamic table, and the other to refer to those entries while encoding |
| 2920 |
chosen field lines, then the attacker (the second entity) can learn the state |
| 2921 |
of the table by observing the length of the encoded output.<a href="#section-7.1.1-3" class="pilcrow">¶</a></p> |
| 2922 |
<p id="section-7.1.1-4">For example, requests or responses from mutually distrustful entities can occur |
| 2923 |
when an intermediary either:<a href="#section-7.1.1-4" class="pilcrow">¶</a></p> |
| 2924 |
<ul class="normal"> |
| 2925 |
<li class="normal" id="section-7.1.1-5.1">sends requests from multiple clients on a single connection toward an origin |
| 2926 |
server, or<a href="#section-7.1.1-5.1" class="pilcrow">¶</a> |
| 2927 |
</li> |
| 2928 |
<li class="normal" id="section-7.1.1-5.2">takes responses from multiple origin servers and places them on a shared |
| 2929 |
connection toward a client.<a href="#section-7.1.1-5.2" class="pilcrow">¶</a> |
| 2930 |
</li> |
| 2931 |
</ul> |
| 2932 |
<p id="section-7.1.1-6">Web browsers also need to assume that requests made on the same connection by |
| 2933 |
different web origins (<span>[<a href="#RFC6454" class="xref">RFC6454</a>]</span>) are made by mutually distrustful entities. |
| 2934 |
Other scenarios involving mutually distrustful entities are also possible.<a href="#section-7.1.1-6" class="pilcrow">¶</a></p> |
| 2935 |
</section> |
| 2936 |
</div> |
| 2937 |
<div id="mitigation"> |
| 2938 |
<section id="section-7.1.2"> |
| 2939 |
<h4 id="name-mitigation"> |
| 2940 |
<a href="#section-7.1.2" class="section-number selfRef">7.1.2. </a><a href="#name-mitigation" class="section-name selfRef">Mitigation</a> |
| 2941 |
</h4> |
| 2942 |
<p id="section-7.1.2-1">Users of HTTP that require confidentiality for header or trailer fields can use |
| 2943 |
values with entropy sufficient to make guessing infeasible. However, this is |
| 2944 |
impractical as a general solution because it forces all users of HTTP to take |
| 2945 |
steps to mitigate attacks. It would impose new constraints on how HTTP is used.<a href="#section-7.1.2-1" class="pilcrow">¶</a></p> |
| 2946 |
<p id="section-7.1.2-2">Rather than impose constraints on users of HTTP, an implementation of QPACK can |
| 2947 |
instead constrain how compression is applied in order to limit the potential for |
| 2948 |
dynamic table probing.<a href="#section-7.1.2-2" class="pilcrow">¶</a></p> |
| 2949 |
<p id="section-7.1.2-3">An ideal solution segregates access to the dynamic table based on the entity |
| 2950 |
that is constructing the message. Field values that are added to the table are |
| 2951 |
attributed to an entity, and only the entity that created a particular value can |
| 2952 |
extract that value.<a href="#section-7.1.2-3" class="pilcrow">¶</a></p> |
| 2953 |
<p id="section-7.1.2-4">To improve compression performance of this option, certain entries might be |
| 2954 |
tagged as being public. For example, a web browser might make the values of the |
| 2955 |
Accept-Encoding header field available in all requests.<a href="#section-7.1.2-4" class="pilcrow">¶</a></p> |
| 2956 |
<p id="section-7.1.2-5">An encoder without good knowledge of the provenance of field values might |
| 2957 |
instead introduce a penalty for many field lines with the same field name and |
| 2958 |
different values. This penalty could cause a large number of attempts to guess |
| 2959 |
a field value to result in the field not being compared to the dynamic table |
| 2960 |
entries in future messages, effectively preventing further guesses.<a href="#section-7.1.2-5" class="pilcrow">¶</a></p> |
| 2961 |
<p id="section-7.1.2-6">This response might be made inversely proportional to the length of the |
| 2962 |
field value. Disabling access to the dynamic table for a given field name might |
| 2963 |
occur for shorter values more quickly or with higher probability than for longer |
| 2964 |
values.<a href="#section-7.1.2-6" class="pilcrow">¶</a></p> |
| 2965 |
<p id="section-7.1.2-7">This mitigation is most effective between two endpoints. If messages are |
| 2966 |
re-encoded by an intermediary without knowledge of which entity constructed a |
| 2967 |
given message, the intermediary could inadvertently merge compression contexts |
| 2968 |
that the original encoder had specifically kept separate.<a href="#section-7.1.2-7" class="pilcrow">¶</a></p> |
| 2969 |
<aside id="section-7.1.2-8"> |
| 2970 |
<p id="section-7.1.2-8.1">Note: Simply removing entries corresponding to the field from the dynamic table |
| 2971 |
can be ineffectual if the attacker has a reliable way of causing values to be |
| 2972 |
reinstalled. For example, a request to load an image in a web browser typically |
| 2973 |
includes the Cookie header field (a potentially highly valued target for this |
| 2974 |
sort of attack), and websites can easily force an image to be loaded, thereby |
| 2975 |
refreshing the entry in the dynamic table.<a href="#section-7.1.2-8.1" class="pilcrow">¶</a></p> |
| 2976 |
</aside> |
| 2977 |
</section> |
| 2978 |
</div> |
| 2979 |
<div id="never-indexed-literals"> |
| 2980 |
<section id="section-7.1.3"> |
| 2981 |
<h4 id="name-never-indexed-literals"> |
| 2982 |
<a href="#section-7.1.3" class="section-number selfRef">7.1.3. </a><a href="#name-never-indexed-literals" class="section-name selfRef">Never-Indexed Literals</a> |
| 2983 |
</h4> |
| 2984 |
<p id="section-7.1.3-1">Implementations can also choose to protect sensitive fields by not compressing |
| 2985 |
them and instead encoding their value as literals.<a href="#section-7.1.3-1" class="pilcrow">¶</a></p> |
| 2986 |
<p id="section-7.1.3-2">Refusing to insert a field line into the dynamic table is only effective if |
| 2987 |
doing so is avoided on all hops. The never-indexed literal bit (see |
| 2988 |
<a href="#literal-name-reference" class="xref">Section 4.5.4</a>) can be used to signal to intermediaries that a |
| 2989 |
particular value was intentionally sent as a literal.<a href="#section-7.1.3-2" class="pilcrow">¶</a></p> |
| 2990 |
<p id="section-7.1.3-3">An intermediary <span class="bcp14">MUST NOT</span> re-encode a value that uses a literal representation |
| 2991 |
with the 'N' bit set with another representation that would index it. If QPACK |
| 2992 |
is used for re-encoding, a literal representation with the 'N' bit set <span class="bcp14">MUST</span> be |
| 2993 |
used. If HPACK is used for re-encoding, the never-indexed literal |
| 2994 |
representation (see <span><a href="https://www.rfc-editor.org/rfc/rfc7541#section-6.2.3" class="relref">Section 6.2.3</a> of [<a href="#RFC7541" class="xref">RFC7541</a>]</span>) <span class="bcp14">MUST</span> be used.<a href="#section-7.1.3-3" class="pilcrow">¶</a></p> |
| 2995 |
<p id="section-7.1.3-4">The choice to mark that a field value should never be indexed depends on several |
| 2996 |
factors. Since QPACK does not protect against guessing an entire field value, |
| 2997 |
short or low-entropy values are more readily recovered by an adversary. |
| 2998 |
Therefore, an encoder might choose not to index values with low entropy.<a href="#section-7.1.3-4" class="pilcrow">¶</a></p> |
| 2999 |
<p id="section-7.1.3-5">An encoder might also choose not to index values for fields that are considered |
| 3000 |
to be highly valuable or sensitive to recovery, such as the Cookie or |
| 3001 |
Authorization header fields.<a href="#section-7.1.3-5" class="pilcrow">¶</a></p> |
| 3002 |
<p id="section-7.1.3-6">On the contrary, an encoder might prefer indexing values for fields that have |
| 3003 |
little or no value if they were exposed. For instance, a User-Agent header field |
| 3004 |
does not commonly vary between requests and is sent to any server. In that case, |
| 3005 |
confirmation that a particular User-Agent value has been used provides little |
| 3006 |
value.<a href="#section-7.1.3-6" class="pilcrow">¶</a></p> |
| 3007 |
<p id="section-7.1.3-7">Note that these criteria for deciding to use a never-indexed literal |
| 3008 |
representation will evolve over time as new attacks are discovered.<a href="#section-7.1.3-7" class="pilcrow">¶</a></p> |
| 3009 |
</section> |
| 3010 |
</div> |
| 3011 |
</section> |
| 3012 |
</div> |
| 3013 |
<div id="static-huffman-encoding"> |
| 3014 |
<section id="section-7.2"> |
| 3015 |
<h3 id="name-static-huffman-encoding"> |
| 3016 |
<a href="#section-7.2" class="section-number selfRef">7.2. </a><a href="#name-static-huffman-encoding" class="section-name selfRef">Static Huffman Encoding</a> |
| 3017 |
</h3> |
| 3018 |
<p id="section-7.2-1">There is no currently known attack against a static Huffman encoding. A study |
| 3019 |
has shown that using a static Huffman encoding table created an information |
| 3020 |
leakage; however, this same study concluded that an attacker could not take |
| 3021 |
advantage of this information leakage to recover any meaningful amount of |
| 3022 |
information (see <span>[<a href="#PETAL" class="xref">PETAL</a>]</span>).<a href="#section-7.2-1" class="pilcrow">¶</a></p> |
| 3023 |
</section> |
| 3024 |
</div> |
| 3025 |
<div id="memory-consumption"> |
| 3026 |
<section id="section-7.3"> |
| 3027 |
<h3 id="name-memory-consumption"> |
| 3028 |
<a href="#section-7.3" class="section-number selfRef">7.3. </a><a href="#name-memory-consumption" class="section-name selfRef">Memory Consumption</a> |
| 3029 |
</h3> |
| 3030 |
<p id="section-7.3-1">An attacker can try to cause an endpoint to exhaust its memory. QPACK is |
| 3031 |
designed to limit both the peak and stable amounts of memory allocated by an |
| 3032 |
endpoint.<a href="#section-7.3-1" class="pilcrow">¶</a></p> |
| 3033 |
<p id="section-7.3-2">QPACK uses the definition of the maximum size of the dynamic table and the |
| 3034 |
maximum number of blocking streams to limit the amount of memory the encoder can |
| 3035 |
cause the decoder to consume. In HTTP/3, these values are controlled by the |
| 3036 |
decoder through the settings parameters SETTINGS_QPACK_MAX_TABLE_CAPACITY and |
| 3037 |
SETTINGS_QPACK_BLOCKED_STREAMS, respectively (see |
| 3038 |
<a href="#maximum-dynamic-table-capacity" class="xref">Section 3.2.3</a> and <a href="#blocked-streams" class="xref">Section 2.1.2</a>). The limit on the |
| 3039 |
size of the dynamic table takes into account the size of the data stored in the |
| 3040 |
dynamic table, plus a small allowance for overhead. The limit on the number of |
| 3041 |
blocked streams is only a proxy for the maximum amount of memory required by the |
| 3042 |
decoder. The actual maximum amount of memory will depend on how much memory the |
| 3043 |
decoder uses to track each blocked stream.<a href="#section-7.3-2" class="pilcrow">¶</a></p> |
| 3044 |
<p id="section-7.3-3">A decoder can limit the amount of state memory used for the dynamic table by |
| 3045 |
setting an appropriate value for the maximum size of the dynamic table. In |
| 3046 |
HTTP/3, this is realized by setting an appropriate value for the |
| 3047 |
SETTINGS_QPACK_MAX_TABLE_CAPACITY parameter. An encoder can limit the amount of |
| 3048 |
state memory it uses by choosing a smaller dynamic table size than the decoder |
| 3049 |
allows and signaling this to the decoder (see <a href="#set-dynamic-capacity" class="xref">Section 4.3.1</a>).<a href="#section-7.3-3" class="pilcrow">¶</a></p> |
| 3050 |
<p id="section-7.3-4">A decoder can limit the amount of state memory used for blocked streams by |
| 3051 |
setting an appropriate value for the maximum number of blocked streams. In |
| 3052 |
HTTP/3, this is realized by setting an appropriate value for the |
| 3053 |
SETTINGS_QPACK_BLOCKED_STREAMS parameter. Streams that risk becoming blocked |
| 3054 |
consume no additional state memory on the encoder.<a href="#section-7.3-4" class="pilcrow">¶</a></p> |
| 3055 |
<p id="section-7.3-5">An encoder allocates memory to track all dynamic table references in |
| 3056 |
unacknowledged field sections. An implementation can directly limit the amount |
| 3057 |
of state memory by only using as many references to the dynamic table as it |
| 3058 |
wishes to track; no signaling to the decoder is required. However, limiting |
| 3059 |
references to the dynamic table will reduce compression effectiveness.<a href="#section-7.3-5" class="pilcrow">¶</a></p> |
| 3060 |
<p id="section-7.3-6">The amount of temporary memory consumed by an encoder or decoder can be limited |
| 3061 |
by processing field lines sequentially. A decoder implementation does not need |
| 3062 |
to retain a complete list of field lines while decoding a field section. An |
| 3063 |
encoder implementation does not need to retain a complete list of field lines |
| 3064 |
while encoding a field section if it is using a single-pass algorithm. Note |
| 3065 |
that it might be necessary for an application to retain a complete list of field |
| 3066 |
lines for other reasons; even if QPACK does not force this to occur, application |
| 3067 |
constraints might make this necessary.<a href="#section-7.3-6" class="pilcrow">¶</a></p> |
| 3068 |
<p id="section-7.3-7">While the negotiated limit on the dynamic table size accounts for much of the |
| 3069 |
memory that can be consumed by a QPACK implementation, data that cannot be |
| 3070 |
immediately sent due to flow control is not affected by this limit. |
| 3071 |
Implementations should limit the size of unsent data, especially on the decoder |
| 3072 |
stream where flexibility to choose what to send is limited. Possible responses |
| 3073 |
to an excess of unsent data might include limiting the ability of the peer to |
| 3074 |
open new streams, reading only from the encoder stream, or closing the |
| 3075 |
connection.<a href="#section-7.3-7" class="pilcrow">¶</a></p> |
| 3076 |
</section> |
| 3077 |
</div> |
| 3078 |
<div id="implementation-limits"> |
| 3079 |
<section id="section-7.4"> |
| 3080 |
<h3 id="name-implementation-limits"> |
| 3081 |
<a href="#section-7.4" class="section-number selfRef">7.4. </a><a href="#name-implementation-limits" class="section-name selfRef">Implementation Limits</a> |
| 3082 |
</h3> |
| 3083 |
<p id="section-7.4-1">An implementation of QPACK needs to ensure that large values for integers, long |
| 3084 |
encoding for integers, or long string literals do not create security |
| 3085 |
weaknesses.<a href="#section-7.4-1" class="pilcrow">¶</a></p> |
| 3086 |
<p id="section-7.4-2">An implementation has to set a limit for the values it accepts for integers, as |
| 3087 |
well as for the encoded length; see <a href="#prefixed-integers" class="xref">Section 4.1.1</a>. In the same way, it |
| 3088 |
has to set a limit to the length it accepts for string literals; see |
| 3089 |
<a href="#string-literals" class="xref">Section 4.1.2</a>. These limits <span class="bcp14">SHOULD</span> be large enough to process the |
| 3090 |
largest individual field the HTTP implementation can be configured to accept.<a href="#section-7.4-2" class="pilcrow">¶</a></p> |
| 3091 |
<p id="section-7.4-3">If an implementation encounters a value larger than it is able to decode, this |
| 3092 |
<span class="bcp14">MUST</span> be treated as a stream error of type QPACK_DECOMPRESSION_FAILED if on a |
| 3093 |
request stream or a connection error of the appropriate type if on the encoder |
| 3094 |
or decoder stream.<a href="#section-7.4-3" class="pilcrow">¶</a></p> |
| 3095 |
</section> |
| 3096 |
</div> |
| 3097 |
</section> |
| 3098 |
</div> |
| 3099 |
<div id="iana-considerations"> |
| 3100 |
<section id="section-8"> |
| 3101 |
<h2 id="name-iana-considerations"> |
| 3102 |
<a href="#section-8" class="section-number selfRef">8. </a><a href="#name-iana-considerations" class="section-name selfRef">IANA Considerations</a> |
| 3103 |
</h2> |
| 3104 |
<p id="section-8-1">This document makes multiple registrations in the registries defined by |
| 3105 |
<span>[<a href="#HTTP3" class="xref">HTTP/3</a>]</span>. The allocations created by this document are all assigned permanent |
| 3106 |
status and list a change controller of the IETF and a contact of the HTTP |
| 3107 |
working group ([email protected]).<a href="#section-8-1" class="pilcrow">¶</a></p> |
| 3108 |
<div id="settings-registration"> |
| 3109 |
<section id="section-8.1"> |
| 3110 |
<h3 id="name-settings-registration"> |
| 3111 |
<a href="#section-8.1" class="section-number selfRef">8.1. </a><a href="#name-settings-registration" class="section-name selfRef">Settings Registration</a> |
| 3112 |
</h3> |
| 3113 |
<p id="section-8.1-1">This document specifies two settings. The entries in the following table are |
| 3114 |
registered in the "HTTP/3 Settings" registry established in <span>[<a href="#HTTP3" class="xref">HTTP/3</a>]</span>.<a href="#section-8.1-1" class="pilcrow">¶</a></p> |
| 3115 |
<span id="name-additions-to-the-http-3-set"></span><table class="center" id="table-1"> |
| 3116 |
<caption> |
| 3117 |
<a href="#table-1" class="selfRef">Table 1</a>: |
| 3118 |
<a href="#name-additions-to-the-http-3-set" class="selfRef">Additions to the HTTP/3 Settings Registry</a> |
| 3119 |
</caption> |
| 3120 |
<thead> |
| 3121 |
<tr> |
| 3122 |
<th class="text-left" rowspan="1" colspan="1">Setting Name</th> |
| 3123 |
<th class="text-center" rowspan="1" colspan="1">Code</th> |
| 3124 |
<th class="text-left" rowspan="1" colspan="1">Specification</th> |
| 3125 |
<th class="text-left" rowspan="1" colspan="1">Default</th> |
| 3126 |
</tr> |
| 3127 |
</thead> |
| 3128 |
<tbody> |
| 3129 |
<tr> |
| 3130 |
<td class="text-left" rowspan="1" colspan="1">QPACK_MAX_TABLE_CAPACITY</td> |
| 3131 |
<td class="text-center" rowspan="1" colspan="1">0x01</td> |
| 3132 |
<td class="text-left" rowspan="1" colspan="1"> |
| 3133 |
<a href="#configuration" class="xref">Section 5</a> |
| 3134 |
</td> |
| 3135 |
<td class="text-left" rowspan="1" colspan="1">0</td> |
| 3136 |
</tr> |
| 3137 |
<tr> |
| 3138 |
<td class="text-left" rowspan="1" colspan="1">QPACK_BLOCKED_STREAMS</td> |
| 3139 |
<td class="text-center" rowspan="1" colspan="1">0x07</td> |
| 3140 |
<td class="text-left" rowspan="1" colspan="1"> |
| 3141 |
<a href="#configuration" class="xref">Section 5</a> |
| 3142 |
</td> |
| 3143 |
<td class="text-left" rowspan="1" colspan="1">0</td> |
| 3144 |
</tr> |
| 3145 |
</tbody> |
| 3146 |
</table> |
| 3147 |
<p id="section-8.1-3">For formatting reasons, the setting names here are abbreviated by removing the |
| 3148 |
'SETTINGS_' prefix.<a href="#section-8.1-3" class="pilcrow">¶</a></p> |
| 3149 |
</section> |
| 3150 |
</div> |
| 3151 |
<div id="stream-type-registration"> |
| 3152 |
<section id="section-8.2"> |
| 3153 |
<h3 id="name-stream-type-registration"> |
| 3154 |
<a href="#section-8.2" class="section-number selfRef">8.2. </a><a href="#name-stream-type-registration" class="section-name selfRef">Stream Type Registration</a> |
| 3155 |
</h3> |
| 3156 |
<p id="section-8.2-1">This document specifies two stream types. The entries in the following table are |
| 3157 |
registered in the "HTTP/3 Stream Types" registry established in <span>[<a href="#HTTP3" class="xref">HTTP/3</a>]</span>.<a href="#section-8.2-1" class="pilcrow">¶</a></p> |
| 3158 |
<span id="name-additions-to-the-http-3-str"></span><table class="center" id="table-2"> |
| 3159 |
<caption> |
| 3160 |
<a href="#table-2" class="selfRef">Table 2</a>: |
| 3161 |
<a href="#name-additions-to-the-http-3-str" class="selfRef">Additions to the HTTP/3 Stream Types Registry</a> |
| 3162 |
</caption> |
| 3163 |
<thead> |
| 3164 |
<tr> |
| 3165 |
<th class="text-left" rowspan="1" colspan="1">Stream Type</th> |
| 3166 |
<th class="text-center" rowspan="1" colspan="1">Code</th> |
| 3167 |
<th class="text-left" rowspan="1" colspan="1">Specification</th> |
| 3168 |
<th class="text-left" rowspan="1" colspan="1">Sender</th> |
| 3169 |
</tr> |
| 3170 |
</thead> |
| 3171 |
<tbody> |
| 3172 |
<tr> |
| 3173 |
<td class="text-left" rowspan="1" colspan="1">QPACK Encoder Stream</td> |
| 3174 |
<td class="text-center" rowspan="1" colspan="1">0x02</td> |
| 3175 |
<td class="text-left" rowspan="1" colspan="1"> |
| 3176 |
<a href="#enc-dec-stream-def" class="xref">Section 4.2</a> |
| 3177 |
</td> |
| 3178 |
<td class="text-left" rowspan="1" colspan="1">Both</td> |
| 3179 |
</tr> |
| 3180 |
<tr> |
| 3181 |
<td class="text-left" rowspan="1" colspan="1">QPACK Decoder Stream</td> |
| 3182 |
<td class="text-center" rowspan="1" colspan="1">0x03</td> |
| 3183 |
<td class="text-left" rowspan="1" colspan="1"> |
| 3184 |
<a href="#enc-dec-stream-def" class="xref">Section 4.2</a> |
| 3185 |
</td> |
| 3186 |
<td class="text-left" rowspan="1" colspan="1">Both</td> |
| 3187 |
</tr> |
| 3188 |
</tbody> |
| 3189 |
</table> |
| 3190 |
</section> |
| 3191 |
</div> |
| 3192 |
<div id="error-code-registration"> |
| 3193 |
<section id="section-8.3"> |
| 3194 |
<h3 id="name-error-code-registration"> |
| 3195 |
<a href="#section-8.3" class="section-number selfRef">8.3. </a><a href="#name-error-code-registration" class="section-name selfRef">Error Code Registration</a> |
| 3196 |
</h3> |
| 3197 |
<p id="section-8.3-1">This document specifies three error codes. The entries in the following table |
| 3198 |
are registered in the "HTTP/3 Error Codes" registry established in <span>[<a href="#HTTP3" class="xref">HTTP/3</a>]</span>.<a href="#section-8.3-1" class="pilcrow">¶</a></p> |
| 3199 |
<span id="name-additions-to-the-http-3-err"></span><table class="center" id="table-3"> |
| 3200 |
<caption> |
| 3201 |
<a href="#table-3" class="selfRef">Table 3</a>: |
| 3202 |
<a href="#name-additions-to-the-http-3-err" class="selfRef">Additions to the HTTP/3 Error Codes Registry</a> |
| 3203 |
</caption> |
| 3204 |
<thead> |
| 3205 |
<tr> |
| 3206 |
<th class="text-left" rowspan="1" colspan="1">Name</th> |
| 3207 |
<th class="text-left" rowspan="1" colspan="1">Code</th> |
| 3208 |
<th class="text-left" rowspan="1" colspan="1">Description</th> |
| 3209 |
<th class="text-left" rowspan="1" colspan="1">Specification</th> |
| 3210 |
</tr> |
| 3211 |
</thead> |
| 3212 |
<tbody> |
| 3213 |
<tr> |
| 3214 |
<td class="text-left" rowspan="1" colspan="1">QPACK_DECOMPRESSION_FAILED</td> |
| 3215 |
<td class="text-left" rowspan="1" colspan="1">0x0200</td> |
| 3216 |
<td class="text-left" rowspan="1" colspan="1">Decoding of a field section failed</td> |
| 3217 |
<td class="text-left" rowspan="1" colspan="1"> |
| 3218 |
<a href="#error-handling" class="xref">Section 6</a> |
| 3219 |
</td> |
| 3220 |
</tr> |
| 3221 |
<tr> |
| 3222 |
<td class="text-left" rowspan="1" colspan="1">QPACK_ENCODER_STREAM_ERROR</td> |
| 3223 |
<td class="text-left" rowspan="1" colspan="1">0x0201</td> |
| 3224 |
<td class="text-left" rowspan="1" colspan="1">Error on the encoder stream</td> |
| 3225 |
<td class="text-left" rowspan="1" colspan="1"> |
| 3226 |
<a href="#error-handling" class="xref">Section 6</a> |
| 3227 |
</td> |
| 3228 |
</tr> |
| 3229 |
<tr> |
| 3230 |
<td class="text-left" rowspan="1" colspan="1">QPACK_DECODER_STREAM_ERROR</td> |
| 3231 |
<td class="text-left" rowspan="1" colspan="1">0x0202</td> |
| 3232 |
<td class="text-left" rowspan="1" colspan="1">Error on the decoder stream</td> |
| 3233 |
<td class="text-left" rowspan="1" colspan="1"> |
| 3234 |
<a href="#error-handling" class="xref">Section 6</a> |
| 3235 |
</td> |
| 3236 |
</tr> |
| 3237 |
</tbody> |
| 3238 |
</table> |
| 3239 |
</section> |
| 3240 |
</div> |
| 3241 |
</section> |
| 3242 |
</div> |
| 3243 |
<section id="section-9"> |
| 3244 |
<h2 id="name-references"> |
| 3245 |
<a href="#section-9" class="section-number selfRef">9. </a><a href="#name-references" class="section-name selfRef">References</a> |
| 3246 |
</h2> |
| 3247 |
<section id="section-9.1"> |
| 3248 |
<h3 id="name-normative-references"> |
| 3249 |
<a href="#section-9.1" class="section-number selfRef">9.1. </a><a href="#name-normative-references" class="section-name selfRef">Normative References</a> |
| 3250 |
</h3> |
| 3251 |
<dl class="references"> |
| 3252 |
<dt id="HTTP">[HTTP]</dt> |
| 3253 |
<dd> |
| 3254 |
<span class="refAuthor">Fielding, R., Ed.</span>, <span class="refAuthor">Nottingham, M., Ed.</span>, and <span class="refAuthor">J. Reschke, Ed.</span>, <span class="refTitle">"HTTP Semantics"</span>, <span class="seriesInfo">STD 97</span>, <span class="seriesInfo">RFC 9110</span>, <span class="seriesInfo">DOI 10.17487/RFC9110</span>, <time datetime="2022-06" class="refDate">June 2022</time>, <span><<a href="https://www.rfc-editor.org/info/rfc9110">https://www.rfc-editor.org/info/rfc9110</a>></span>. </dd> |
| 3255 |
<dd class="break"></dd> |
| 3256 |
<dt id="HTTP3">[HTTP/3]</dt> |
| 3257 |
<dd> |
| 3258 |
<span class="refAuthor">Bishop, M., Ed.</span>, <span class="refTitle">"HTTP/3"</span>, <span class="seriesInfo">RFC 9114</span>, <span class="seriesInfo">DOI 10.17487/RFC9114</span>, <time datetime="2022-06" class="refDate">June 2022</time>, <span><<a href="https://www.rfc-editor.org/info/rfc9114">https://www.rfc-editor.org/info/rfc9114</a>></span>. </dd> |
| 3259 |
<dd class="break"></dd> |
| 3260 |
<dt id="QUIC-TRANSPORT">[QUIC-TRANSPORT]</dt> |
| 3261 |
<dd> |
| 3262 |
<span class="refAuthor">Iyengar, J., Ed.</span> and <span class="refAuthor">M. Thomson, Ed.</span>, <span class="refTitle">"QUIC: A UDP-Based Multiplexed and Secure Transport"</span>, <span class="seriesInfo">RFC 9000</span>, <span class="seriesInfo">DOI 10.17487/RFC9000</span>, <time datetime="2021-05" class="refDate">May 2021</time>, <span><<a href="https://www.rfc-editor.org/info/rfc9000">https://www.rfc-editor.org/info/rfc9000</a>></span>. </dd> |
| 3263 |
<dd class="break"></dd> |
| 3264 |
<dt id="RFC2119">[RFC2119]</dt> |
| 3265 |
<dd> |
| 3266 |
<span class="refAuthor">Bradner, S.</span>, <span class="refTitle">"Key words for use in RFCs to Indicate Requirement Levels"</span>, <span class="seriesInfo">BCP 14</span>, <span class="seriesInfo">RFC 2119</span>, <span class="seriesInfo">DOI 10.17487/RFC2119</span>, <time datetime="1997-03" class="refDate">March 1997</time>, <span><<a href="https://www.rfc-editor.org/info/rfc2119">https://www.rfc-editor.org/info/rfc2119</a>></span>. </dd> |
| 3267 |
<dd class="break"></dd> |
| 3268 |
<dt id="RFC2360">[RFC2360]</dt> |
| 3269 |
<dd> |
| 3270 |
<span class="refAuthor">Scott, G.</span>, <span class="refTitle">"Guide for Internet Standards Writers"</span>, <span class="seriesInfo">BCP 22</span>, <span class="seriesInfo">RFC 2360</span>, <span class="seriesInfo">DOI 10.17487/RFC2360</span>, <time datetime="1998-06" class="refDate">June 1998</time>, <span><<a href="https://www.rfc-editor.org/info/rfc2360">https://www.rfc-editor.org/info/rfc2360</a>></span>. </dd> |
| 3271 |
<dd class="break"></dd> |
| 3272 |
<dt id="RFC7541">[RFC7541]</dt> |
| 3273 |
<dd> |
| 3274 |
<span class="refAuthor">Peon, R.</span> and <span class="refAuthor">H. Ruellan</span>, <span class="refTitle">"HPACK: Header Compression for HTTP/2"</span>, <span class="seriesInfo">RFC 7541</span>, <span class="seriesInfo">DOI 10.17487/RFC7541</span>, <time datetime="2015-05" class="refDate">May 2015</time>, <span><<a href="https://www.rfc-editor.org/info/rfc7541">https://www.rfc-editor.org/info/rfc7541</a>></span>. </dd> |
| 3275 |
<dd class="break"></dd> |
| 3276 |
<dt id="RFC8174">[RFC8174]</dt> |
| 3277 |
<dd> |
| 3278 |
<span class="refAuthor">Leiba, B.</span>, <span class="refTitle">"Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words"</span>, <span class="seriesInfo">BCP 14</span>, <span class="seriesInfo">RFC 8174</span>, <span class="seriesInfo">DOI 10.17487/RFC8174</span>, <time datetime="2017-05" class="refDate">May 2017</time>, <span><<a href="https://www.rfc-editor.org/info/rfc8174">https://www.rfc-editor.org/info/rfc8174</a>></span>. </dd> |
| 3279 |
<dd class="break"></dd> |
| 3280 |
</dl> |
| 3281 |
</section> |
| 3282 |
<section id="section-9.2"> |
| 3283 |
<h3 id="name-informative-references"> |
| 3284 |
<a href="#section-9.2" class="section-number selfRef">9.2. </a><a href="#name-informative-references" class="section-name selfRef">Informative References</a> |
| 3285 |
</h3> |
| 3286 |
<dl class="references"> |
| 3287 |
<dt id="CRIME">[CRIME]</dt> |
| 3288 |
<dd> |
| 3289 |
<span class="refAuthor">Wikipedia</span>, <span class="refTitle">"CRIME"</span>, <time datetime="2015-05" class="refDate">May 2015</time>, <span><<a href="http://en.wikipedia.org/w/index.php?title=CRIME&oldid=660948120">http://en.wikipedia.org/w/index.php?title=CRIME&oldid=660948120</a>></span>. </dd> |
| 3290 |
<dd class="break"></dd> |
| 3291 |
<dt id="HTTP2">[HTTP/2]</dt> |
| 3292 |
<dd> |
| 3293 |
<span class="refAuthor">Thomson, M., Ed.</span> and <span class="refAuthor">C. Benfield, Ed.</span>, <span class="refTitle">"HTTP/2"</span>, <span class="seriesInfo">RFC 9113</span>, <span class="seriesInfo">DOI 10.17487/RFC9113</span>, <time datetime="2022-06" class="refDate">June 2022</time>, <span><<a href="https://www.rfc-editor.org/info/rfc9113">https://www.rfc-editor.org/info/rfc9113</a>></span>. </dd> |
| 3294 |
<dd class="break"></dd> |
| 3295 |
<dt id="PETAL">[PETAL]</dt> |
| 3296 |
<dd> |
| 3297 |
<span class="refAuthor">Tan, J.</span> and <span class="refAuthor">J. Nahata</span>, <span class="refTitle">"PETAL: Preset Encoding Table Information Leakage"</span>, <time datetime="2013-04" class="refDate">April 2013</time>, <span><<a href="http://www.pdl.cmu.edu/PDL-FTP/associated/CMU-PDL-13-106.pdf">http://www.pdl.cmu.edu/PDL-FTP/associated/CMU-PDL-13-106.pdf</a>></span>. </dd> |
| 3298 |
<dd class="break"></dd> |
| 3299 |
<dt id="RFC1951">[RFC1951]</dt> |
| 3300 |
<dd> |
| 3301 |
<span class="refAuthor">Deutsch, P.</span>, <span class="refTitle">"DEFLATE Compressed Data Format Specification version 1.3"</span>, <span class="seriesInfo">RFC 1951</span>, <span class="seriesInfo">DOI 10.17487/RFC1951</span>, <time datetime="1996-05" class="refDate">May 1996</time>, <span><<a href="https://www.rfc-editor.org/info/rfc1951">https://www.rfc-editor.org/info/rfc1951</a>></span>. </dd> |
| 3302 |
<dd class="break"></dd> |
| 3303 |
<dt id="RFC6454">[RFC6454]</dt> |
| 3304 |
<dd> |
| 3305 |
<span class="refAuthor">Barth, A.</span>, <span class="refTitle">"The Web Origin Concept"</span>, <span class="seriesInfo">RFC 6454</span>, <span class="seriesInfo">DOI 10.17487/RFC6454</span>, <time datetime="2011-12" class="refDate">December 2011</time>, <span><<a href="https://www.rfc-editor.org/info/rfc6454">https://www.rfc-editor.org/info/rfc6454</a>></span>. </dd> |
| 3306 |
<dd class="break"></dd> |
| 3307 |
<dt id="TLS">[TLS]</dt> |
| 3308 |
<dd> |
| 3309 |
<span class="refAuthor">Rescorla, E.</span>, <span class="refTitle">"The Transport Layer Security (TLS) Protocol Version 1.3"</span>, <span class="seriesInfo">RFC 8446</span>, <span class="seriesInfo">DOI 10.17487/RFC8446</span>, <time datetime="2018-08" class="refDate">August 2018</time>, <span><<a href="https://www.rfc-editor.org/info/rfc8446">https://www.rfc-editor.org/info/rfc8446</a>></span>. </dd> |
| 3310 |
<dd class="break"></dd> |
| 3311 |
</dl> |
| 3312 |
</section> |
| 3313 |
</section> |
| 3314 |
<div id="static-table"> |
| 3315 |
<section id="appendix-A"> |
| 3316 |
<h2 id="name-static-table-2"> |
| 3317 |
<a href="#appendix-A" class="section-number selfRef">Appendix A. </a><a href="#name-static-table-2" class="section-name selfRef">Static Table</a> |
| 3318 |
</h2> |
| 3319 |
<p id="appendix-A-1">This table was generated by analyzing actual Internet traffic in 2018 and |
| 3320 |
including the most common header fields, after filtering out some unsupported |
| 3321 |
and non-standard values. Due to this methodology, some of the entries may be |
| 3322 |
inconsistent or appear multiple times with similar but not identical values. The |
| 3323 |
order of the entries is optimized to encode the most common header fields with |
| 3324 |
the smallest number of bytes.<a href="#appendix-A-1" class="pilcrow">¶</a></p> |
| 3325 |
<span id="name-static-table-3"></span><table class="center" id="table-4"> |
| 3326 |
<caption> |
| 3327 |
<a href="#table-4" class="selfRef">Table 4</a>: |
| 3328 |
<a href="#name-static-table-3" class="selfRef">Static Table</a> |
| 3329 |
</caption> |
| 3330 |
<thead> |
| 3331 |
<tr> |
| 3332 |
<th class="text-left" rowspan="1" colspan="1">Index</th> |
| 3333 |
<th class="text-left" rowspan="1" colspan="1">Name</th> |
| 3334 |
<th class="text-left" rowspan="1" colspan="1">Value</th> |
| 3335 |
</tr> |
| 3336 |
</thead> |
| 3337 |
<tbody> |
| 3338 |
<tr> |
| 3339 |
<td class="text-left" rowspan="1" colspan="1">0</td> |
| 3340 |
<td class="text-left" rowspan="1" colspan="1">:authority</td> |
| 3341 |
<td class="text-left" rowspan="1" colspan="1"></td> |
| 3342 |
</tr> |
| 3343 |
<tr> |
| 3344 |
<td class="text-left" rowspan="1" colspan="1">1</td> |
| 3345 |
<td class="text-left" rowspan="1" colspan="1">:path</td> |
| 3346 |
<td class="text-left" rowspan="1" colspan="1">/</td> |
| 3347 |
</tr> |
| 3348 |
<tr> |
| 3349 |
<td class="text-left" rowspan="1" colspan="1">2</td> |
| 3350 |
<td class="text-left" rowspan="1" colspan="1">age</td> |
| 3351 |
<td class="text-left" rowspan="1" colspan="1">0</td> |
| 3352 |
</tr> |
| 3353 |
<tr> |
| 3354 |
<td class="text-left" rowspan="1" colspan="1">3</td> |
| 3355 |
<td class="text-left" rowspan="1" colspan="1">content-disposition</td> |
| 3356 |
<td class="text-left" rowspan="1" colspan="1"></td> |
| 3357 |
</tr> |
| 3358 |
<tr> |
| 3359 |
<td class="text-left" rowspan="1" colspan="1">4</td> |
| 3360 |
<td class="text-left" rowspan="1" colspan="1">content-length</td> |
| 3361 |
<td class="text-left" rowspan="1" colspan="1">0</td> |
| 3362 |
</tr> |
| 3363 |
<tr> |
| 3364 |
<td class="text-left" rowspan="1" colspan="1">5</td> |
| 3365 |
<td class="text-left" rowspan="1" colspan="1">cookie</td> |
| 3366 |
<td class="text-left" rowspan="1" colspan="1"></td> |
| 3367 |
</tr> |
| 3368 |
<tr> |
| 3369 |
<td class="text-left" rowspan="1" colspan="1">6</td> |
| 3370 |
<td class="text-left" rowspan="1" colspan="1">date</td> |
| 3371 |
<td class="text-left" rowspan="1" colspan="1"></td> |
| 3372 |
</tr> |
| 3373 |
<tr> |
| 3374 |
<td class="text-left" rowspan="1" colspan="1">7</td> |
| 3375 |
<td class="text-left" rowspan="1" colspan="1">etag</td> |
| 3376 |
<td class="text-left" rowspan="1" colspan="1"></td> |
| 3377 |
</tr> |
| 3378 |
<tr> |
| 3379 |
<td class="text-left" rowspan="1" colspan="1">8</td> |
| 3380 |
<td class="text-left" rowspan="1" colspan="1">if-modified-since</td> |
| 3381 |
<td class="text-left" rowspan="1" colspan="1"></td> |
| 3382 |
</tr> |
| 3383 |
<tr> |
| 3384 |
<td class="text-left" rowspan="1" colspan="1">9</td> |
| 3385 |
<td class="text-left" rowspan="1" colspan="1">if-none-match</td> |
| 3386 |
<td class="text-left" rowspan="1" colspan="1"></td> |
| 3387 |
</tr> |
| 3388 |
<tr> |
| 3389 |
<td class="text-left" rowspan="1" colspan="1">10</td> |
| 3390 |
<td class="text-left" rowspan="1" colspan="1">last-modified</td> |
| 3391 |
<td class="text-left" rowspan="1" colspan="1"></td> |
| 3392 |
</tr> |
| 3393 |
<tr> |
| 3394 |
<td class="text-left" rowspan="1" colspan="1">11</td> |
| 3395 |
<td class="text-left" rowspan="1" colspan="1">link</td> |
| 3396 |
<td class="text-left" rowspan="1" colspan="1"></td> |
| 3397 |
</tr> |
| 3398 |
<tr> |
| 3399 |
<td class="text-left" rowspan="1" colspan="1">12</td> |
| 3400 |
<td class="text-left" rowspan="1" colspan="1">location</td> |
| 3401 |
<td class="text-left" rowspan="1" colspan="1"></td> |
| 3402 |
</tr> |
| 3403 |
<tr> |
| 3404 |
<td class="text-left" rowspan="1" colspan="1">13</td> |
| 3405 |
<td class="text-left" rowspan="1" colspan="1">referer</td> |
| 3406 |
<td class="text-left" rowspan="1" colspan="1"></td> |
| 3407 |
</tr> |
| 3408 |
<tr> |
| 3409 |
<td class="text-left" rowspan="1" colspan="1">14</td> |
| 3410 |
<td class="text-left" rowspan="1" colspan="1">set-cookie</td> |
| 3411 |
<td class="text-left" rowspan="1" colspan="1"></td> |
| 3412 |
</tr> |
| 3413 |
<tr> |
| 3414 |
<td class="text-left" rowspan="1" colspan="1">15</td> |
| 3415 |
<td class="text-left" rowspan="1" colspan="1">:method</td> |
| 3416 |
<td class="text-left" rowspan="1" colspan="1">CONNECT</td> |
| 3417 |
</tr> |
| 3418 |
<tr> |
| 3419 |
<td class="text-left" rowspan="1" colspan="1">16</td> |
| 3420 |
<td class="text-left" rowspan="1" colspan="1">:method</td> |
| 3421 |
<td class="text-left" rowspan="1" colspan="1">DELETE</td> |
| 3422 |
</tr> |
| 3423 |
<tr> |
| 3424 |
<td class="text-left" rowspan="1" colspan="1">17</td> |
| 3425 |
<td class="text-left" rowspan="1" colspan="1">:method</td> |
| 3426 |
<td class="text-left" rowspan="1" colspan="1">GET</td> |
| 3427 |
</tr> |
| 3428 |
<tr> |
| 3429 |
<td class="text-left" rowspan="1" colspan="1">18</td> |
| 3430 |
<td class="text-left" rowspan="1" colspan="1">:method</td> |
| 3431 |
<td class="text-left" rowspan="1" colspan="1">HEAD</td> |
| 3432 |
</tr> |
| 3433 |
<tr> |
| 3434 |
<td class="text-left" rowspan="1" colspan="1">19</td> |
| 3435 |
<td class="text-left" rowspan="1" colspan="1">:method</td> |
| 3436 |
<td class="text-left" rowspan="1" colspan="1">OPTIONS</td> |
| 3437 |
</tr> |
| 3438 |
<tr> |
| 3439 |
<td class="text-left" rowspan="1" colspan="1">20</td> |
| 3440 |
<td class="text-left" rowspan="1" colspan="1">:method</td> |
| 3441 |
<td class="text-left" rowspan="1" colspan="1">POST</td> |
| 3442 |
</tr> |
| 3443 |
<tr> |
| 3444 |
<td class="text-left" rowspan="1" colspan="1">21</td> |
| 3445 |
<td class="text-left" rowspan="1" colspan="1">:method</td> |
| 3446 |
<td class="text-left" rowspan="1" colspan="1">PUT</td> |
| 3447 |
</tr> |
| 3448 |
<tr> |
| 3449 |
<td class="text-left" rowspan="1" colspan="1">22</td> |
| 3450 |
<td class="text-left" rowspan="1" colspan="1">:scheme</td> |
| 3451 |
<td class="text-left" rowspan="1" colspan="1">http</td> |
| 3452 |
</tr> |
| 3453 |
<tr> |
| 3454 |
<td class="text-left" rowspan="1" colspan="1">23</td> |
| 3455 |
<td class="text-left" rowspan="1" colspan="1">:scheme</td> |
| 3456 |
<td class="text-left" rowspan="1" colspan="1">https</td> |
| 3457 |
</tr> |
| 3458 |
<tr> |
| 3459 |
<td class="text-left" rowspan="1" colspan="1">24</td> |
| 3460 |
<td class="text-left" rowspan="1" colspan="1">:status</td> |
| 3461 |
<td class="text-left" rowspan="1" colspan="1">103</td> |
| 3462 |
</tr> |
| 3463 |
<tr> |
| 3464 |
<td class="text-left" rowspan="1" colspan="1">25</td> |
| 3465 |
<td class="text-left" rowspan="1" colspan="1">:status</td> |
| 3466 |
<td class="text-left" rowspan="1" colspan="1">200</td> |
| 3467 |
</tr> |
| 3468 |
<tr> |
| 3469 |
<td class="text-left" rowspan="1" colspan="1">26</td> |
| 3470 |
<td class="text-left" rowspan="1" colspan="1">:status</td> |
| 3471 |
<td class="text-left" rowspan="1" colspan="1">304</td> |
| 3472 |
</tr> |
| 3473 |
<tr> |
| 3474 |
<td class="text-left" rowspan="1" colspan="1">27</td> |
| 3475 |
<td class="text-left" rowspan="1" colspan="1">:status</td> |
| 3476 |
<td class="text-left" rowspan="1" colspan="1">404</td> |
| 3477 |
</tr> |
| 3478 |
<tr> |
| 3479 |
<td class="text-left" rowspan="1" colspan="1">28</td> |
| 3480 |
<td class="text-left" rowspan="1" colspan="1">:status</td> |
| 3481 |
<td class="text-left" rowspan="1" colspan="1">503</td> |
| 3482 |
</tr> |
| 3483 |
<tr> |
| 3484 |
<td class="text-left" rowspan="1" colspan="1">29</td> |
| 3485 |
<td class="text-left" rowspan="1" colspan="1">accept</td> |
| 3486 |
<td class="text-left" rowspan="1" colspan="1">*/*</td> |
| 3487 |
</tr> |
| 3488 |
<tr> |
| 3489 |
<td class="text-left" rowspan="1" colspan="1">30</td> |
| 3490 |
<td class="text-left" rowspan="1" colspan="1">accept</td> |
| 3491 |
<td class="text-left" rowspan="1" colspan="1">application/dns-message</td> |
| 3492 |
</tr> |
| 3493 |
<tr> |
| 3494 |
<td class="text-left" rowspan="1" colspan="1">31</td> |
| 3495 |
<td class="text-left" rowspan="1" colspan="1">accept-encoding</td> |
| 3496 |
<td class="text-left" rowspan="1" colspan="1">gzip, deflate, br</td> |
| 3497 |
</tr> |
| 3498 |
<tr> |
| 3499 |
<td class="text-left" rowspan="1" colspan="1">32</td> |
| 3500 |
<td class="text-left" rowspan="1" colspan="1">accept-ranges</td> |
| 3501 |
<td class="text-left" rowspan="1" colspan="1">bytes</td> |
| 3502 |
</tr> |
| 3503 |
<tr> |
| 3504 |
<td class="text-left" rowspan="1" colspan="1">33</td> |
| 3505 |
<td class="text-left" rowspan="1" colspan="1">access-control-allow-headers</td> |
| 3506 |
<td class="text-left" rowspan="1" colspan="1">cache-control</td> |
| 3507 |
</tr> |
| 3508 |
<tr> |
| 3509 |
<td class="text-left" rowspan="1" colspan="1">34</td> |
| 3510 |
<td class="text-left" rowspan="1" colspan="1">access-control-allow-headers</td> |
| 3511 |
<td class="text-left" rowspan="1" colspan="1">content-type</td> |
| 3512 |
</tr> |
| 3513 |
<tr> |
| 3514 |
<td class="text-left" rowspan="1" colspan="1">35</td> |
| 3515 |
<td class="text-left" rowspan="1" colspan="1">access-control-allow-origin</td> |
| 3516 |
<td class="text-left" rowspan="1" colspan="1">*</td> |
| 3517 |
</tr> |
| 3518 |
<tr> |
| 3519 |
<td class="text-left" rowspan="1" colspan="1">36</td> |
| 3520 |
<td class="text-left" rowspan="1" colspan="1">cache-control</td> |
| 3521 |
<td class="text-left" rowspan="1" colspan="1">max-age=0</td> |
| 3522 |
</tr> |
| 3523 |
<tr> |
| 3524 |
<td class="text-left" rowspan="1" colspan="1">37</td> |
| 3525 |
<td class="text-left" rowspan="1" colspan="1">cache-control</td> |
| 3526 |
<td class="text-left" rowspan="1" colspan="1">max-age=2592000</td> |
| 3527 |
</tr> |
| 3528 |
<tr> |
| 3529 |
<td class="text-left" rowspan="1" colspan="1">38</td> |
| 3530 |
<td class="text-left" rowspan="1" colspan="1">cache-control</td> |
| 3531 |
<td class="text-left" rowspan="1" colspan="1">max-age=604800</td> |
| 3532 |
</tr> |
| 3533 |
<tr> |
| 3534 |
<td class="text-left" rowspan="1" colspan="1">39</td> |
| 3535 |
<td class="text-left" rowspan="1" colspan="1">cache-control</td> |
| 3536 |
<td class="text-left" rowspan="1" colspan="1">no-cache</td> |
| 3537 |
</tr> |
| 3538 |
<tr> |
| 3539 |
<td class="text-left" rowspan="1" colspan="1">40</td> |
| 3540 |
<td class="text-left" rowspan="1" colspan="1">cache-control</td> |
| 3541 |
<td class="text-left" rowspan="1" colspan="1">no-store</td> |
| 3542 |
</tr> |
| 3543 |
<tr> |
| 3544 |
<td class="text-left" rowspan="1" colspan="1">41</td> |
| 3545 |
<td class="text-left" rowspan="1" colspan="1">cache-control</td> |
| 3546 |
<td class="text-left" rowspan="1" colspan="1">public, max-age=31536000</td> |
| 3547 |
</tr> |
| 3548 |
<tr> |
| 3549 |
<td class="text-left" rowspan="1" colspan="1">42</td> |
| 3550 |
<td class="text-left" rowspan="1" colspan="1">content-encoding</td> |
| 3551 |
<td class="text-left" rowspan="1" colspan="1">br</td> |
| 3552 |
</tr> |
| 3553 |
<tr> |
| 3554 |
<td class="text-left" rowspan="1" colspan="1">43</td> |
| 3555 |
<td class="text-left" rowspan="1" colspan="1">content-encoding</td> |
| 3556 |
<td class="text-left" rowspan="1" colspan="1">gzip</td> |
| 3557 |
</tr> |
| 3558 |
<tr> |
| 3559 |
<td class="text-left" rowspan="1" colspan="1">44</td> |
| 3560 |
<td class="text-left" rowspan="1" colspan="1">content-type</td> |
| 3561 |
<td class="text-left" rowspan="1" colspan="1">application/dns-message</td> |
| 3562 |
</tr> |
| 3563 |
<tr> |
| 3564 |
<td class="text-left" rowspan="1" colspan="1">45</td> |
| 3565 |
<td class="text-left" rowspan="1" colspan="1">content-type</td> |
| 3566 |
<td class="text-left" rowspan="1" colspan="1">application/javascript</td> |
| 3567 |
</tr> |
| 3568 |
<tr> |
| 3569 |
<td class="text-left" rowspan="1" colspan="1">46</td> |
| 3570 |
<td class="text-left" rowspan="1" colspan="1">content-type</td> |
| 3571 |
<td class="text-left" rowspan="1" colspan="1">application/json</td> |
| 3572 |
</tr> |
| 3573 |
<tr> |
| 3574 |
<td class="text-left" rowspan="1" colspan="1">47</td> |
| 3575 |
<td class="text-left" rowspan="1" colspan="1">content-type</td> |
| 3576 |
<td class="text-left" rowspan="1" colspan="1">application/x-www-form-urlencoded</td> |
| 3577 |
</tr> |
| 3578 |
<tr> |
| 3579 |
<td class="text-left" rowspan="1" colspan="1">48</td> |
| 3580 |
<td class="text-left" rowspan="1" colspan="1">content-type</td> |
| 3581 |
<td class="text-left" rowspan="1" colspan="1">image/gif</td> |
| 3582 |
</tr> |
| 3583 |
<tr> |
| 3584 |
<td class="text-left" rowspan="1" colspan="1">49</td> |
| 3585 |
<td class="text-left" rowspan="1" colspan="1">content-type</td> |
| 3586 |
<td class="text-left" rowspan="1" colspan="1">image/jpeg</td> |
| 3587 |
</tr> |
| 3588 |
<tr> |
| 3589 |
<td class="text-left" rowspan="1" colspan="1">50</td> |
| 3590 |
<td class="text-left" rowspan="1" colspan="1">content-type</td> |
| 3591 |
<td class="text-left" rowspan="1" colspan="1">image/png</td> |
| 3592 |
</tr> |
| 3593 |
<tr> |
| 3594 |
<td class="text-left" rowspan="1" colspan="1">51</td> |
| 3595 |
<td class="text-left" rowspan="1" colspan="1">content-type</td> |
| 3596 |
<td class="text-left" rowspan="1" colspan="1">text/css</td> |
| 3597 |
</tr> |
| 3598 |
<tr> |
| 3599 |
<td class="text-left" rowspan="1" colspan="1">52</td> |
| 3600 |
<td class="text-left" rowspan="1" colspan="1">content-type</td> |
| 3601 |
<td class="text-left" rowspan="1" colspan="1">text/html; charset=utf-8</td> |
| 3602 |
</tr> |
| 3603 |
<tr> |
| 3604 |
<td class="text-left" rowspan="1" colspan="1">53</td> |
| 3605 |
<td class="text-left" rowspan="1" colspan="1">content-type</td> |
| 3606 |
<td class="text-left" rowspan="1" colspan="1">text/plain</td> |
| 3607 |
</tr> |
| 3608 |
<tr> |
| 3609 |
<td class="text-left" rowspan="1" colspan="1">54</td> |
| 3610 |
<td class="text-left" rowspan="1" colspan="1">content-type</td> |
| 3611 |
<td class="text-left" rowspan="1" colspan="1">text/plain;charset=utf-8</td> |
| 3612 |
</tr> |
| 3613 |
<tr> |
| 3614 |
<td class="text-left" rowspan="1" colspan="1">55</td> |
| 3615 |
<td class="text-left" rowspan="1" colspan="1">range</td> |
| 3616 |
<td class="text-left" rowspan="1" colspan="1">bytes=0-</td> |
| 3617 |
</tr> |
| 3618 |
<tr> |
| 3619 |
<td class="text-left" rowspan="1" colspan="1">56</td> |
| 3620 |
<td class="text-left" rowspan="1" colspan="1">strict-transport-security</td> |
| 3621 |
<td class="text-left" rowspan="1" colspan="1">max-age=31536000</td> |
| 3622 |
</tr> |
| 3623 |
<tr> |
| 3624 |
<td class="text-left" rowspan="1" colspan="1">57</td> |
| 3625 |
<td class="text-left" rowspan="1" colspan="1">strict-transport-security</td> |
| 3626 |
<td class="text-left" rowspan="1" colspan="1">max-age=31536000; includesubdomains</td> |
| 3627 |
</tr> |
| 3628 |
<tr> |
| 3629 |
<td class="text-left" rowspan="1" colspan="1">58</td> |
| 3630 |
<td class="text-left" rowspan="1" colspan="1">strict-transport-security</td> |
| 3631 |
<td class="text-left" rowspan="1" colspan="1">max-age=31536000; includesubdomains; preload</td> |
| 3632 |
</tr> |
| 3633 |
<tr> |
| 3634 |
<td class="text-left" rowspan="1" colspan="1">59</td> |
| 3635 |
<td class="text-left" rowspan="1" colspan="1">vary</td> |
| 3636 |
<td class="text-left" rowspan="1" colspan="1">accept-encoding</td> |
| 3637 |
</tr> |
| 3638 |
<tr> |
| 3639 |
<td class="text-left" rowspan="1" colspan="1">60</td> |
| 3640 |
<td class="text-left" rowspan="1" colspan="1">vary</td> |
| 3641 |
<td class="text-left" rowspan="1" colspan="1">origin</td> |
| 3642 |
</tr> |
| 3643 |
<tr> |
| 3644 |
<td class="text-left" rowspan="1" colspan="1">61</td> |
| 3645 |
<td class="text-left" rowspan="1" colspan="1">x-content-type-options</td> |
| 3646 |
<td class="text-left" rowspan="1" colspan="1">nosniff</td> |
| 3647 |
</tr> |
| 3648 |
<tr> |
| 3649 |
<td class="text-left" rowspan="1" colspan="1">62</td> |
| 3650 |
<td class="text-left" rowspan="1" colspan="1">x-xss-protection</td> |
| 3651 |
<td class="text-left" rowspan="1" colspan="1">1; mode=block</td> |
| 3652 |
</tr> |
| 3653 |
<tr> |
| 3654 |
<td class="text-left" rowspan="1" colspan="1">63</td> |
| 3655 |
<td class="text-left" rowspan="1" colspan="1">:status</td> |
| 3656 |
<td class="text-left" rowspan="1" colspan="1">100</td> |
| 3657 |
</tr> |
| 3658 |
<tr> |
| 3659 |
<td class="text-left" rowspan="1" colspan="1">64</td> |
| 3660 |
<td class="text-left" rowspan="1" colspan="1">:status</td> |
| 3661 |
<td class="text-left" rowspan="1" colspan="1">204</td> |
| 3662 |
</tr> |
| 3663 |
<tr> |
| 3664 |
<td class="text-left" rowspan="1" colspan="1">65</td> |
| 3665 |
<td class="text-left" rowspan="1" colspan="1">:status</td> |
| 3666 |
<td class="text-left" rowspan="1" colspan="1">206</td> |
| 3667 |
</tr> |
| 3668 |
<tr> |
| 3669 |
<td class="text-left" rowspan="1" colspan="1">66</td> |
| 3670 |
<td class="text-left" rowspan="1" colspan="1">:status</td> |
| 3671 |
<td class="text-left" rowspan="1" colspan="1">302</td> |
| 3672 |
</tr> |
| 3673 |
<tr> |
| 3674 |
<td class="text-left" rowspan="1" colspan="1">67</td> |
| 3675 |
<td class="text-left" rowspan="1" colspan="1">:status</td> |
| 3676 |
<td class="text-left" rowspan="1" colspan="1">400</td> |
| 3677 |
</tr> |
| 3678 |
<tr> |
| 3679 |
<td class="text-left" rowspan="1" colspan="1">68</td> |
| 3680 |
<td class="text-left" rowspan="1" colspan="1">:status</td> |
| 3681 |
<td class="text-left" rowspan="1" colspan="1">403</td> |
| 3682 |
</tr> |
| 3683 |
<tr> |
| 3684 |
<td class="text-left" rowspan="1" colspan="1">69</td> |
| 3685 |
<td class="text-left" rowspan="1" colspan="1">:status</td> |
| 3686 |
<td class="text-left" rowspan="1" colspan="1">421</td> |
| 3687 |
</tr> |
| 3688 |
<tr> |
| 3689 |
<td class="text-left" rowspan="1" colspan="1">70</td> |
| 3690 |
<td class="text-left" rowspan="1" colspan="1">:status</td> |
| 3691 |
<td class="text-left" rowspan="1" colspan="1">425</td> |
| 3692 |
</tr> |
| 3693 |
<tr> |
| 3694 |
<td class="text-left" rowspan="1" colspan="1">71</td> |
| 3695 |
<td class="text-left" rowspan="1" colspan="1">:status</td> |
| 3696 |
<td class="text-left" rowspan="1" colspan="1">500</td> |
| 3697 |
</tr> |
| 3698 |
<tr> |
| 3699 |
<td class="text-left" rowspan="1" colspan="1">72</td> |
| 3700 |
<td class="text-left" rowspan="1" colspan="1">accept-language</td> |
| 3701 |
<td class="text-left" rowspan="1" colspan="1"></td> |
| 3702 |
</tr> |
| 3703 |
<tr> |
| 3704 |
<td class="text-left" rowspan="1" colspan="1">73</td> |
| 3705 |
<td class="text-left" rowspan="1" colspan="1">access-control-allow-credentials</td> |
| 3706 |
<td class="text-left" rowspan="1" colspan="1">FALSE</td> |
| 3707 |
</tr> |
| 3708 |
<tr> |
| 3709 |
<td class="text-left" rowspan="1" colspan="1">74</td> |
| 3710 |
<td class="text-left" rowspan="1" colspan="1">access-control-allow-credentials</td> |
| 3711 |
<td class="text-left" rowspan="1" colspan="1">TRUE</td> |
| 3712 |
</tr> |
| 3713 |
<tr> |
| 3714 |
<td class="text-left" rowspan="1" colspan="1">75</td> |
| 3715 |
<td class="text-left" rowspan="1" colspan="1">access-control-allow-headers</td> |
| 3716 |
<td class="text-left" rowspan="1" colspan="1">*</td> |
| 3717 |
</tr> |
| 3718 |
<tr> |
| 3719 |
<td class="text-left" rowspan="1" colspan="1">76</td> |
| 3720 |
<td class="text-left" rowspan="1" colspan="1">access-control-allow-methods</td> |
| 3721 |
<td class="text-left" rowspan="1" colspan="1">get</td> |
| 3722 |
</tr> |
| 3723 |
<tr> |
| 3724 |
<td class="text-left" rowspan="1" colspan="1">77</td> |
| 3725 |
<td class="text-left" rowspan="1" colspan="1">access-control-allow-methods</td> |
| 3726 |
<td class="text-left" rowspan="1" colspan="1">get, post, options</td> |
| 3727 |
</tr> |
| 3728 |
<tr> |
| 3729 |
<td class="text-left" rowspan="1" colspan="1">78</td> |
| 3730 |
<td class="text-left" rowspan="1" colspan="1">access-control-allow-methods</td> |
| 3731 |
<td class="text-left" rowspan="1" colspan="1">options</td> |
| 3732 |
</tr> |
| 3733 |
<tr> |
| 3734 |
<td class="text-left" rowspan="1" colspan="1">79</td> |
| 3735 |
<td class="text-left" rowspan="1" colspan="1">access-control-expose-headers</td> |
| 3736 |
<td class="text-left" rowspan="1" colspan="1">content-length</td> |
| 3737 |
</tr> |
| 3738 |
<tr> |
| 3739 |
<td class="text-left" rowspan="1" colspan="1">80</td> |
| 3740 |
<td class="text-left" rowspan="1" colspan="1">access-control-request-headers</td> |
| 3741 |
<td class="text-left" rowspan="1" colspan="1">content-type</td> |
| 3742 |
</tr> |
| 3743 |
<tr> |
| 3744 |
<td class="text-left" rowspan="1" colspan="1">81</td> |
| 3745 |
<td class="text-left" rowspan="1" colspan="1">access-control-request-method</td> |
| 3746 |
<td class="text-left" rowspan="1" colspan="1">get</td> |
| 3747 |
</tr> |
| 3748 |
<tr> |
| 3749 |
<td class="text-left" rowspan="1" colspan="1">82</td> |
| 3750 |
<td class="text-left" rowspan="1" colspan="1">access-control-request-method</td> |
| 3751 |
<td class="text-left" rowspan="1" colspan="1">post</td> |
| 3752 |
</tr> |
| 3753 |
<tr> |
| 3754 |
<td class="text-left" rowspan="1" colspan="1">83</td> |
| 3755 |
<td class="text-left" rowspan="1" colspan="1">alt-svc</td> |
| 3756 |
<td class="text-left" rowspan="1" colspan="1">clear</td> |
| 3757 |
</tr> |
| 3758 |
<tr> |
| 3759 |
<td class="text-left" rowspan="1" colspan="1">84</td> |
| 3760 |
<td class="text-left" rowspan="1" colspan="1">authorization</td> |
| 3761 |
<td class="text-left" rowspan="1" colspan="1"></td> |
| 3762 |
</tr> |
| 3763 |
<tr> |
| 3764 |
<td class="text-left" rowspan="1" colspan="1">85</td> |
| 3765 |
<td class="text-left" rowspan="1" colspan="1">content-security-policy</td> |
| 3766 |
<td class="text-left" rowspan="1" colspan="1">script-src 'none'; object-src 'none'; base-uri 'none'</td> |
| 3767 |
</tr> |
| 3768 |
<tr> |
| 3769 |
<td class="text-left" rowspan="1" colspan="1">86</td> |
| 3770 |
<td class="text-left" rowspan="1" colspan="1">early-data</td> |
| 3771 |
<td class="text-left" rowspan="1" colspan="1">1</td> |
| 3772 |
</tr> |
| 3773 |
<tr> |
| 3774 |
<td class="text-left" rowspan="1" colspan="1">87</td> |
| 3775 |
<td class="text-left" rowspan="1" colspan="1">expect-ct</td> |
| 3776 |
<td class="text-left" rowspan="1" colspan="1"></td> |
| 3777 |
</tr> |
| 3778 |
<tr> |
| 3779 |
<td class="text-left" rowspan="1" colspan="1">88</td> |
| 3780 |
<td class="text-left" rowspan="1" colspan="1">forwarded</td> |
| 3781 |
<td class="text-left" rowspan="1" colspan="1"></td> |
| 3782 |
</tr> |
| 3783 |
<tr> |
| 3784 |
<td class="text-left" rowspan="1" colspan="1">89</td> |
| 3785 |
<td class="text-left" rowspan="1" colspan="1">if-range</td> |
| 3786 |
<td class="text-left" rowspan="1" colspan="1"></td> |
| 3787 |
</tr> |
| 3788 |
<tr> |
| 3789 |
<td class="text-left" rowspan="1" colspan="1">90</td> |
| 3790 |
<td class="text-left" rowspan="1" colspan="1">origin</td> |
| 3791 |
<td class="text-left" rowspan="1" colspan="1"></td> |
| 3792 |
</tr> |
| 3793 |
<tr> |
| 3794 |
<td class="text-left" rowspan="1" colspan="1">91</td> |
| 3795 |
<td class="text-left" rowspan="1" colspan="1">purpose</td> |
| 3796 |
<td class="text-left" rowspan="1" colspan="1">prefetch</td> |
| 3797 |
</tr> |
| 3798 |
<tr> |
| 3799 |
<td class="text-left" rowspan="1" colspan="1">92</td> |
| 3800 |
<td class="text-left" rowspan="1" colspan="1">server</td> |
| 3801 |
<td class="text-left" rowspan="1" colspan="1"></td> |
| 3802 |
</tr> |
| 3803 |
<tr> |
| 3804 |
<td class="text-left" rowspan="1" colspan="1">93</td> |
| 3805 |
<td class="text-left" rowspan="1" colspan="1">timing-allow-origin</td> |
| 3806 |
<td class="text-left" rowspan="1" colspan="1">*</td> |
| 3807 |
</tr> |
| 3808 |
<tr> |
| 3809 |
<td class="text-left" rowspan="1" colspan="1">94</td> |
| 3810 |
<td class="text-left" rowspan="1" colspan="1">upgrade-insecure-requests</td> |
| 3811 |
<td class="text-left" rowspan="1" colspan="1">1</td> |
| 3812 |
</tr> |
| 3813 |
<tr> |
| 3814 |
<td class="text-left" rowspan="1" colspan="1">95</td> |
| 3815 |
<td class="text-left" rowspan="1" colspan="1">user-agent</td> |
| 3816 |
<td class="text-left" rowspan="1" colspan="1"></td> |
| 3817 |
</tr> |
| 3818 |
<tr> |
| 3819 |
<td class="text-left" rowspan="1" colspan="1">96</td> |
| 3820 |
<td class="text-left" rowspan="1" colspan="1">x-forwarded-for</td> |
| 3821 |
<td class="text-left" rowspan="1" colspan="1"></td> |
| 3822 |
</tr> |
| 3823 |
<tr> |
| 3824 |
<td class="text-left" rowspan="1" colspan="1">97</td> |
| 3825 |
<td class="text-left" rowspan="1" colspan="1">x-frame-options</td> |
| 3826 |
<td class="text-left" rowspan="1" colspan="1">deny</td> |
| 3827 |
</tr> |
| 3828 |
<tr> |
| 3829 |
<td class="text-left" rowspan="1" colspan="1">98</td> |
| 3830 |
<td class="text-left" rowspan="1" colspan="1">x-frame-options</td> |
| 3831 |
<td class="text-left" rowspan="1" colspan="1">sameorigin</td> |
| 3832 |
</tr> |
| 3833 |
</tbody> |
| 3834 |
</table> |
| 3835 |
<p id="appendix-A-3">Any line breaks that appear within field names or values are due to formatting.<a href="#appendix-A-3" class="pilcrow">¶</a></p> |
| 3836 |
</section> |
| 3837 |
</div> |
| 3838 |
<div id="encoding-and-decoding-examples"> |
| 3839 |
<section id="appendix-B"> |
| 3840 |
<h2 id="name-encoding-and-decoding-examp"> |
| 3841 |
<a href="#appendix-B" class="section-number selfRef">Appendix B. </a><a href="#name-encoding-and-decoding-examp" class="section-name selfRef">Encoding and Decoding Examples</a> |
| 3842 |
</h2> |
| 3843 |
<p id="appendix-B-1">The following examples represent a series of exchanges between an encoder and a |
| 3844 |
decoder. The exchanges are designed to exercise most QPACK instructions and |
| 3845 |
highlight potentially common patterns and their impact on dynamic table state. |
| 3846 |
The encoder sends three encoded field sections containing one field line each, |
| 3847 |
as well as two speculative inserts that are not referenced.<a href="#appendix-B-1" class="pilcrow">¶</a></p> |
| 3848 |
<p id="appendix-B-2">The state of the encoder's dynamic table is shown, along with its |
| 3849 |
current size. Each entry is shown with the Absolute Index of the entry (Abs), |
| 3850 |
the current number of outstanding encoded field sections with references to that |
| 3851 |
entry (Ref), along with the name and value. Entries above the 'acknowledged' |
| 3852 |
line have been acknowledged by the decoder.<a href="#appendix-B-2" class="pilcrow">¶</a></p> |
| 3853 |
<div id="literal-field-line-with-name-reference"> |
| 3854 |
<section id="appendix-B.1"> |
| 3855 |
<h3 id="name-literal-field-line-with-name-"> |
| 3856 |
<a href="#appendix-B.1" class="section-number selfRef">B.1. </a><a href="#name-literal-field-line-with-name-" class="section-name selfRef">Literal Field Line with Name Reference</a> |
| 3857 |
</h3> |
| 3858 |
<p id="appendix-B.1-1">The encoder sends an encoded field section containing a literal representation |
| 3859 |
of a field with a static name reference.<a href="#appendix-B.1-1" class="pilcrow">¶</a></p> |
| 3860 |
<div class="alignLeft art-text artwork" id="appendix-B.1-2"> |
| 3861 |
<pre> |
| 3862 |
Data | Interpretation |
| 3863 |
| Encoder's Dynamic Table |
| 3864 |
|
| 3865 |
Stream: 0 |
| 3866 |
0000 | Required Insert Count = 0, Base = 0 |
| 3867 |
510b 2f69 6e64 6578 | Literal Field Line with Name Reference |
| 3868 |
2e68 746d 6c | Static Table, Index=1 |
| 3869 |
| (:path=/index.html) |
| 3870 |
|
| 3871 |
Abs Ref Name Value |
| 3872 |
^-- acknowledged --^ |
| 3873 |
Size=0 |
| 3874 |
</pre><a href="#appendix-B.1-2" class="pilcrow">¶</a> |
| 3875 |
</div> |
| 3876 |
</section> |
| 3877 |
</div> |
| 3878 |
<div id="dynamic-table"> |
| 3879 |
<section id="appendix-B.2"> |
| 3880 |
<h3 id="name-dynamic-table-2"> |
| 3881 |
<a href="#appendix-B.2" class="section-number selfRef">B.2. </a><a href="#name-dynamic-table-2" class="section-name selfRef">Dynamic Table</a> |
| 3882 |
</h3> |
| 3883 |
<p id="appendix-B.2-1">The encoder sets the dynamic table capacity, inserts a header with a dynamic |
| 3884 |
name reference, then sends a potentially blocking, encoded field section |
| 3885 |
referencing this new entry. The decoder acknowledges processing the encoded |
| 3886 |
field section, which implicitly acknowledges all dynamic table insertions up to |
| 3887 |
the Required Insert Count.<a href="#appendix-B.2-1" class="pilcrow">¶</a></p> |
| 3888 |
<div class="alignLeft art-text artwork" id="appendix-B.2-2"> |
| 3889 |
<pre> |
| 3890 |
Stream: Encoder |
| 3891 |
3fbd01 | Set Dynamic Table Capacity=220 |
| 3892 |
c00f 7777 772e 6578 | Insert With Name Reference |
| 3893 |
616d 706c 652e 636f | Static Table, Index=0 |
| 3894 |
6d | (:authority=www.example.com) |
| 3895 |
c10c 2f73 616d 706c | Insert With Name Reference |
| 3896 |
652f 7061 7468 | Static Table, Index=1 |
| 3897 |
| (:path=/sample/path) |
| 3898 |
|
| 3899 |
Abs Ref Name Value |
| 3900 |
^-- acknowledged --^ |
| 3901 |
0 0 :authority www.example.com |
| 3902 |
1 0 :path /sample/path |
| 3903 |
Size=106 |
| 3904 |
|
| 3905 |
Stream: 4 |
| 3906 |
0381 | Required Insert Count = 2, Base = 0 |
| 3907 |
10 | Indexed Field Line With Post-Base Index |
| 3908 |
| Absolute Index = Base(0) + Index(0) = 0 |
| 3909 |
| (:authority=www.example.com) |
| 3910 |
11 | Indexed Field Line With Post-Base Index |
| 3911 |
| Absolute Index = Base(0) + Index(1) = 1 |
| 3912 |
| (:path=/sample/path) |
| 3913 |
|
| 3914 |
Abs Ref Name Value |
| 3915 |
^-- acknowledged --^ |
| 3916 |
0 1 :authority www.example.com |
| 3917 |
1 1 :path /sample/path |
| 3918 |
Size=106 |
| 3919 |
|
| 3920 |
Stream: Decoder |
| 3921 |
84 | Section Acknowledgment (stream=4) |
| 3922 |
|
| 3923 |
Abs Ref Name Value |
| 3924 |
0 0 :authority www.example.com |
| 3925 |
1 0 :path /sample/path |
| 3926 |
^-- acknowledged --^ |
| 3927 |
Size=106 |
| 3928 |
</pre><a href="#appendix-B.2-2" class="pilcrow">¶</a> |
| 3929 |
</div> |
| 3930 |
</section> |
| 3931 |
</div> |
| 3932 |
<div id="speculative-insert"> |
| 3933 |
<section id="appendix-B.3"> |
| 3934 |
<h3 id="name-speculative-insert"> |
| 3935 |
<a href="#appendix-B.3" class="section-number selfRef">B.3. </a><a href="#name-speculative-insert" class="section-name selfRef">Speculative Insert</a> |
| 3936 |
</h3> |
| 3937 |
<p id="appendix-B.3-1">The encoder inserts a header into the dynamic table with a literal name. |
| 3938 |
The decoder acknowledges receipt of the entry. The encoder does not send |
| 3939 |
any encoded field sections.<a href="#appendix-B.3-1" class="pilcrow">¶</a></p> |
| 3940 |
<div class="alignLeft art-text artwork" id="appendix-B.3-2"> |
| 3941 |
<pre> |
| 3942 |
Stream: Encoder |
| 3943 |
4a63 7573 746f 6d2d | Insert With Literal Name |
| 3944 |
6b65 790c 6375 7374 | (custom-key=custom-value) |
| 3945 |
6f6d 2d76 616c 7565 | |
| 3946 |
|
| 3947 |
Abs Ref Name Value |
| 3948 |
0 0 :authority www.example.com |
| 3949 |
1 0 :path /sample/path |
| 3950 |
^-- acknowledged --^ |
| 3951 |
2 0 custom-key custom-value |
| 3952 |
Size=160 |
| 3953 |
|
| 3954 |
Stream: Decoder |
| 3955 |
01 | Insert Count Increment (1) |
| 3956 |
|
| 3957 |
Abs Ref Name Value |
| 3958 |
0 0 :authority www.example.com |
| 3959 |
1 0 :path /sample/path |
| 3960 |
2 0 custom-key custom-value |
| 3961 |
^-- acknowledged --^ |
| 3962 |
Size=160 |
| 3963 |
|
| 3964 |
</pre><a href="#appendix-B.3-2" class="pilcrow">¶</a> |
| 3965 |
</div> |
| 3966 |
</section> |
| 3967 |
</div> |
| 3968 |
<div id="duplicate-instruction-stream-cancellation"> |
| 3969 |
<section id="appendix-B.4"> |
| 3970 |
<h3 id="name-duplicate-instruction-strea"> |
| 3971 |
<a href="#appendix-B.4" class="section-number selfRef">B.4. </a><a href="#name-duplicate-instruction-strea" class="section-name selfRef">Duplicate Instruction, Stream Cancellation</a> |
| 3972 |
</h3> |
| 3973 |
<p id="appendix-B.4-1">The encoder duplicates an existing entry in the dynamic table, then sends an |
| 3974 |
encoded field section referencing the dynamic table entries including the |
| 3975 |
duplicated entry. The packet containing the encoder stream data is delayed. |
| 3976 |
Before the packet arrives, the decoder cancels the stream and notifies the |
| 3977 |
encoder that the encoded field section was not processed.<a href="#appendix-B.4-1" class="pilcrow">¶</a></p> |
| 3978 |
<div class="alignLeft art-text artwork" id="appendix-B.4-2"> |
| 3979 |
<pre> |
| 3980 |
Stream: Encoder |
| 3981 |
02 | Duplicate (Relative Index = 2) |
| 3982 |
| Absolute Index = |
| 3983 |
| Insert Count(3) - Index(2) - 1 = 0 |
| 3984 |
|
| 3985 |
Abs Ref Name Value |
| 3986 |
0 0 :authority www.example.com |
| 3987 |
1 0 :path /sample/path |
| 3988 |
2 0 custom-key custom-value |
| 3989 |
^-- acknowledged --^ |
| 3990 |
3 0 :authority www.example.com |
| 3991 |
Size=217 |
| 3992 |
|
| 3993 |
Stream: 8 |
| 3994 |
0500 | Required Insert Count = 4, Base = 4 |
| 3995 |
80 | Indexed Field Line, Dynamic Table |
| 3996 |
| Absolute Index = Base(4) - Index(0) - 1 = 3 |
| 3997 |
| (:authority=www.example.com) |
| 3998 |
c1 | Indexed Field Line, Static Table Index = 1 |
| 3999 |
| (:path=/) |
| 4000 |
81 | Indexed Field Line, Dynamic Table |
| 4001 |
| Absolute Index = Base(4) - Index(1) - 1 = 2 |
| 4002 |
| (custom-key=custom-value) |
| 4003 |
|
| 4004 |
Abs Ref Name Value |
| 4005 |
0 0 :authority www.example.com |
| 4006 |
1 0 :path /sample/path |
| 4007 |
2 1 custom-key custom-value |
| 4008 |
^-- acknowledged --^ |
| 4009 |
3 1 :authority www.example.com |
| 4010 |
Size=217 |
| 4011 |
|
| 4012 |
Stream: Decoder |
| 4013 |
48 | Stream Cancellation (Stream=8) |
| 4014 |
|
| 4015 |
Abs Ref Name Value |
| 4016 |
0 0 :authority www.example.com |
| 4017 |
1 0 :path /sample/path |
| 4018 |
2 0 custom-key custom-value |
| 4019 |
^-- acknowledged --^ |
| 4020 |
3 0 :authority www.example.com |
| 4021 |
Size=217 |
| 4022 |
</pre><a href="#appendix-B.4-2" class="pilcrow">¶</a> |
| 4023 |
</div> |
| 4024 |
</section> |
| 4025 |
</div> |
| 4026 |
<div id="dynamic-table-insert-eviction"> |
| 4027 |
<section id="appendix-B.5"> |
| 4028 |
<h3 id="name-dynamic-table-insert-evicti"> |
| 4029 |
<a href="#appendix-B.5" class="section-number selfRef">B.5. </a><a href="#name-dynamic-table-insert-evicti" class="section-name selfRef">Dynamic Table Insert, Eviction</a> |
| 4030 |
</h3> |
| 4031 |
<p id="appendix-B.5-1">The encoder inserts another header into the dynamic table, which evicts the |
| 4032 |
oldest entry. The encoder does not send any encoded field sections.<a href="#appendix-B.5-1" class="pilcrow">¶</a></p> |
| 4033 |
<div class="alignLeft art-text artwork" id="appendix-B.5-2"> |
| 4034 |
<pre> |
| 4035 |
Stream: Encoder |
| 4036 |
810d 6375 7374 6f6d | Insert With Name Reference |
| 4037 |
2d76 616c 7565 32 | Dynamic Table, Relative Index = 1 |
| 4038 |
| Absolute Index = |
| 4039 |
| Insert Count(4) - Index(1) - 1 = 2 |
| 4040 |
| (custom-key=custom-value2) |
| 4041 |
|
| 4042 |
Abs Ref Name Value |
| 4043 |
1 0 :path /sample/path |
| 4044 |
2 0 custom-key custom-value |
| 4045 |
^-- acknowledged --^ |
| 4046 |
3 0 :authority www.example.com |
| 4047 |
4 0 custom-key custom-value2 |
| 4048 |
Size=215 |
| 4049 |
</pre><a href="#appendix-B.5-2" class="pilcrow">¶</a> |
| 4050 |
</div> |
| 4051 |
</section> |
| 4052 |
</div> |
| 4053 |
</section> |
| 4054 |
</div> |
| 4055 |
<div id="sample-single-pass-encoding-algorithm"> |
| 4056 |
<section id="appendix-C"> |
| 4057 |
<h2 id="name-sample-single-pass-encoding"> |
| 4058 |
<a href="#appendix-C" class="section-number selfRef">Appendix C. </a><a href="#name-sample-single-pass-encoding" class="section-name selfRef">Sample Single-Pass Encoding Algorithm</a> |
| 4059 |
</h2> |
| 4060 |
<p id="appendix-C-1">Pseudocode for single-pass encoding, excluding handling of duplicates, |
| 4061 |
non-blocking mode, available encoder stream flow control and reference tracking.<a href="#appendix-C-1" class="pilcrow">¶</a></p> |
| 4062 |
<div id="appendix-C-2"> |
| 4063 |
<pre class="breakable lang-pseudocode sourcecode"> |
| 4064 |
# Helper functions: |
| 4065 |
# ==== |
| 4066 |
# Encode an integer with the specified prefix and length |
| 4067 |
encodeInteger(buffer, prefix, value, prefixLength) |
| 4068 |
|
| 4069 |
# Encode a dynamic table insert instruction with optional static |
| 4070 |
# or dynamic name index (but not both) |
| 4071 |
encodeInsert(buffer, staticNameIndex, dynamicNameIndex, fieldLine) |
| 4072 |
|
| 4073 |
# Encode a static index reference |
| 4074 |
encodeStaticIndexReference(buffer, staticIndex) |
| 4075 |
|
| 4076 |
# Encode a dynamic index reference relative to Base |
| 4077 |
encodeDynamicIndexReference(buffer, dynamicIndex, base) |
| 4078 |
|
| 4079 |
# Encode a literal with an optional static name index |
| 4080 |
encodeLiteral(buffer, staticNameIndex, fieldLine) |
| 4081 |
|
| 4082 |
# Encode a literal with a dynamic name index relative to Base |
| 4083 |
encodeDynamicLiteral(buffer, dynamicNameIndex, base, fieldLine) |
| 4084 |
|
| 4085 |
# Encoding Algorithm |
| 4086 |
# ==== |
| 4087 |
base = dynamicTable.getInsertCount() |
| 4088 |
requiredInsertCount = 0 |
| 4089 |
for line in fieldLines: |
| 4090 |
staticIndex = staticTable.findIndex(line) |
| 4091 |
if staticIndex is not None: |
| 4092 |
encodeStaticIndexReference(streamBuffer, staticIndex) |
| 4093 |
continue |
| 4094 |
|
| 4095 |
dynamicIndex = dynamicTable.findIndex(line) |
| 4096 |
if dynamicIndex is None: |
| 4097 |
# No matching entry. Either insert+index or encode literal |
| 4098 |
staticNameIndex = staticTable.findName(line.name) |
| 4099 |
if staticNameIndex is None: |
| 4100 |
dynamicNameIndex = dynamicTable.findName(line.name) |
| 4101 |
|
| 4102 |
if shouldIndex(line) and dynamicTable.canIndex(line): |
| 4103 |
encodeInsert(encoderBuffer, staticNameIndex, |
| 4104 |
dynamicNameIndex, line) |
| 4105 |
dynamicIndex = dynamicTable.add(line) |
| 4106 |
|
| 4107 |
if dynamicIndex is None: |
| 4108 |
# Could not index it, literal |
| 4109 |
if dynamicNameIndex is not None: |
| 4110 |
# Encode literal with dynamic name, possibly above Base |
| 4111 |
encodeDynamicLiteral(streamBuffer, dynamicNameIndex, |
| 4112 |
base, line) |
| 4113 |
requiredInsertCount = max(requiredInsertCount, |
| 4114 |
dynamicNameIndex) |
| 4115 |
else: |
| 4116 |
# Encodes a literal with a static name or literal name |
| 4117 |
encodeLiteral(streamBuffer, staticNameIndex, line) |
| 4118 |
else: |
| 4119 |
# Dynamic index reference |
| 4120 |
assert(dynamicIndex is not None) |
| 4121 |
requiredInsertCount = max(requiredInsertCount, dynamicIndex) |
| 4122 |
# Encode dynamicIndex, possibly above Base |
| 4123 |
encodeDynamicIndexReference(streamBuffer, dynamicIndex, base) |
| 4124 |
|
| 4125 |
# encode the prefix |
| 4126 |
if requiredInsertCount == 0: |
| 4127 |
encodeInteger(prefixBuffer, 0x00, 0, 8) |
| 4128 |
encodeInteger(prefixBuffer, 0x00, 0, 7) |
| 4129 |
else: |
| 4130 |
wireRIC = ( |
| 4131 |
requiredInsertCount |
| 4132 |
% (2 * getMaxEntries(maxTableCapacity)) |
| 4133 |
) + 1; |
| 4134 |
encodeInteger(prefixBuffer, 0x00, wireRIC, 8) |
| 4135 |
if base >= requiredInsertCount: |
| 4136 |
encodeInteger(prefixBuffer, 0x00, |
| 4137 |
base - requiredInsertCount, 7) |
| 4138 |
else: |
| 4139 |
encodeInteger(prefixBuffer, 0x80, |
| 4140 |
requiredInsertCount - base - 1, 7) |
| 4141 |
|
| 4142 |
return encoderBuffer, prefixBuffer + streamBuffer |
| 4143 |
</pre><a href="#appendix-C-2" class="pilcrow">¶</a> |
| 4144 |
</div> |
| 4145 |
</section> |
| 4146 |
</div> |
| 4147 |
<div id="acknowledgments"> |
| 4148 |
<section id="appendix-D"> |
| 4149 |
<h2 id="name-acknowledgments"> |
| 4150 |
<a href="#name-acknowledgments" class="section-name selfRef">Acknowledgments</a> |
| 4151 |
</h2> |
| 4152 |
<p id="appendix-D-1">The IETF QUIC Working Group received an enormous amount of support from many |
| 4153 |
people.<a href="#appendix-D-1" class="pilcrow">¶</a></p> |
| 4154 |
<p id="appendix-D-2">The compression design team did substantial work exploring the problem space and |
| 4155 |
influencing the initial draft version of this document. The contributions of |
| 4156 |
design team members <span class="contact-name">Roberto Peon</span>, <span class="contact-name">Martin Thomson</span>, and |
| 4157 |
<span class="contact-name">Dmitri Tikhonov</span> are gratefully acknowledged.<a href="#appendix-D-2" class="pilcrow">¶</a></p> |
| 4158 |
<p id="appendix-D-3">The following people also provided substantial contributions to this document:<a href="#appendix-D-3" class="pilcrow">¶</a></p> |
| 4159 |
<ul class="compact"> |
| 4160 |
<li class="compact" id="appendix-D-4.1"> |
| 4161 |
<p id="appendix-D-4.1.1"><span class="contact-name">Bence Beky</span><a href="#appendix-D-4.1.1" class="pilcrow">¶</a></p> |
| 4162 |
</li> |
| 4163 |
<li class="compact" id="appendix-D-4.2"> |
| 4164 |
<p id="appendix-D-4.2.1"><span class="contact-name">Alessandro Ghedini</span><a href="#appendix-D-4.2.1" class="pilcrow">¶</a></p> |
| 4165 |
</li> |
| 4166 |
<li class="compact" id="appendix-D-4.3"> |
| 4167 |
<p id="appendix-D-4.3.1"><span class="contact-name">Ryan Hamilton</span><a href="#appendix-D-4.3.1" class="pilcrow">¶</a></p> |
| 4168 |
</li> |
| 4169 |
<li class="compact" id="appendix-D-4.4"> |
| 4170 |
<p id="appendix-D-4.4.1"><span class="contact-name">Robin Marx</span><a href="#appendix-D-4.4.1" class="pilcrow">¶</a></p> |
| 4171 |
</li> |
| 4172 |
<li class="compact" id="appendix-D-4.5"> |
| 4173 |
<p id="appendix-D-4.5.1"><span class="contact-name">Patrick McManus</span><a href="#appendix-D-4.5.1" class="pilcrow">¶</a></p> |
| 4174 |
</li> |
| 4175 |
<li class="compact" id="appendix-D-4.6"> |
| 4176 |
<p id="appendix-D-4.6.1"><span class="contact-name"><span class="non-ascii">奥 一穂</span> (<span class="ascii">Kazuho Oku</span>)</span><a href="#appendix-D-4.6.1" class="pilcrow">¶</a></p> |
| 4177 |
</li> |
| 4178 |
<li class="compact" id="appendix-D-4.7"> |
| 4179 |
<p id="appendix-D-4.7.1"><span class="contact-name">Lucas Pardue</span><a href="#appendix-D-4.7.1" class="pilcrow">¶</a></p> |
| 4180 |
</li> |
| 4181 |
<li class="compact" id="appendix-D-4.8"> |
| 4182 |
<p id="appendix-D-4.8.1"><span class="contact-name">Biren Roy</span><a href="#appendix-D-4.8.1" class="pilcrow">¶</a></p> |
| 4183 |
</li> |
| 4184 |
<li class="compact" id="appendix-D-4.9"> |
| 4185 |
<p id="appendix-D-4.9.1"><span class="contact-name">Ian Swett</span><a href="#appendix-D-4.9.1" class="pilcrow">¶</a></p> |
| 4186 |
</li> |
| 4187 |
</ul> |
| 4188 |
<p id="appendix-D-5">This document draws heavily on the text of <span>[<a href="#RFC7541" class="xref">RFC7541</a>]</span>. The indirect input of |
| 4189 |
those authors is also gratefully acknowledged.<a href="#appendix-D-5" class="pilcrow">¶</a></p> |
| 4190 |
<p id="appendix-D-6"><span class="contact-name">Buck Krasic</span>'s contribution was supported by Google during his employment |
| 4191 |
there.<a href="#appendix-D-6" class="pilcrow">¶</a></p> |
| 4192 |
<p id="appendix-D-7">A portion of <span class="contact-name">Mike Bishop</span>'s contribution was supported by Microsoft during |
| 4193 |
his employment there.<a href="#appendix-D-7" class="pilcrow">¶</a></p> |
| 4194 |
</section> |
| 4195 |
</div> |
| 4196 |
<div id="authors-addresses"> |
| 4197 |
<section id="appendix-E"> |
| 4198 |
<h2 id="name-authors-addresses"> |
| 4199 |
<a href="#name-authors-addresses" class="section-name selfRef">Authors' Addresses</a> |
| 4200 |
</h2> |
| 4201 |
<address class="vcard"> |
| 4202 |
<div dir="auto" class="left"><span class="fn nameRole">Charles 'Buck' Krasic</span></div> |
| 4203 |
<div class="email"> |
| 4204 |
<span>Email:</span> |
| 4205 |
<a href="mailto:[email protected]" class="email">[email protected]</a> |
| 4206 |
</div> |
| 4207 |
</address> |
| 4208 |
<address class="vcard"> |
| 4209 |
<div dir="auto" class="left"><span class="fn nameRole">Mike Bishop</span></div> |
| 4210 |
<div dir="auto" class="left"><span class="org">Akamai Technologies</span></div> |
| 4211 |
<div class="email"> |
| 4212 |
<span>Email:</span> |
| 4213 |
<a href="mailto:[email protected]" class="email">[email protected]</a> |
| 4214 |
</div> |
| 4215 |
</address> |
| 4216 |
<address class="vcard"> |
| 4217 |
<div dir="auto" class="left"><span class="fn nameRole">Alan Frindell (<span class="role">editor</span>)</span></div> |
| 4218 |
<div dir="auto" class="left"><span class="org">Facebook</span></div> |
| 4219 |
<div class="email"> |
| 4220 |
<span>Email:</span> |
| 4221 |
<a href="mailto:[email protected]" class="email">[email protected]</a> |
| 4222 |
</div> |
| 4223 |
</address> |
| 4224 |
</section> |
| 4225 |
</div> |
| 4226 |
<script>const toc = document.getElementById("toc"); |
| 4227 |
toc.querySelector("h2").addEventListener("click", e => { |
| 4228 |
toc.classList.toggle("active"); |
| 4229 |
}); |
| 4230 |
toc.querySelector("nav").addEventListener("click", e => { |
| 4231 |
toc.classList.remove("active"); |
| 4232 |
}); |
| 4233 |
</script> |
| 4234 |
</body> |
| 4235 |
</html> |