|
|
@@ -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())
|
|
|
}
|
|
|
}
|
|
|
}
|