Commit 7b7efd80 authored by Tom Bergan's avatar Tom Bergan

http2/h2i: dump PUSH_PROMISE headers in h2i

Change-Id: Id891991e2b8371ad5744e7a0ec392d9d9bbeefdc
Reviewed-on: https://go-review.googlesource.com/50130Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 02ac38e2
......@@ -460,6 +460,15 @@ func (app *h2i) readFrames() error {
app.hdec = hpack.NewDecoder(tableSize, app.onNewHeaderField)
}
app.hdec.Write(f.HeaderBlockFragment())
case *http2.PushPromiseFrame:
if app.hdec == nil {
// TODO: if the user uses h2i to send a SETTINGS frame advertising
// something larger, we'll need to respect SETTINGS_HEADER_TABLE_SIZE
// and stuff here instead of using the 4k default. But for now:
tableSize := uint32(4 << 10)
app.hdec = hpack.NewDecoder(tableSize, app.onNewHeaderField)
}
app.hdec.Write(f.HeaderBlockFragment())
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment