aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/net/http2/hpack/hpack.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-07-06 23:56:49 +0200
committerDimitri Sokolyuk <demon@dim13.org>2018-07-06 23:56:49 +0200
commit54eb169e8fc9bc0357139e7c259e977b184f8fbb (patch)
treeb6296da21fd0cc8f0cfe2e3fc26c937dcca63e8d /vendor/golang.org/x/net/http2/hpack/hpack.go
parentf954c3c9a4c6080f4ee508c364519c5879eb0909 (diff)
update vendor
Diffstat (limited to 'vendor/golang.org/x/net/http2/hpack/hpack.go')
-rw-r--r--vendor/golang.org/x/net/http2/hpack/hpack.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/vendor/golang.org/x/net/http2/hpack/hpack.go b/vendor/golang.org/x/net/http2/hpack/hpack.go
index 176644a..166788c 100644
--- a/vendor/golang.org/x/net/http2/hpack/hpack.go
+++ b/vendor/golang.org/x/net/http2/hpack/hpack.go
@@ -389,6 +389,12 @@ func (d *Decoder) callEmit(hf HeaderField) error {
// (same invariants and behavior as parseHeaderFieldRepr)
func (d *Decoder) parseDynamicTableSizeUpdate() error {
+ // RFC 7541, sec 4.2: This dynamic table size update MUST occur at the
+ // beginning of the first header block following the change to the dynamic table size.
+ if d.dynTab.size > 0 {
+ return DecodingError{errors.New("dynamic table size update MUST occur at the beginning of a header block")}
+ }
+
buf := d.buf
size, buf, err := readVarInt(5, buf)
if err != nil {