Search in sources :

Example 6 with HeaderField

use of io.undertow.protocols.http2.Hpack.HeaderField in project undertow by undertow-io.

the class HpackDecoder method handleIndex.

/**
     * Handle an indexed header representation
     *
     * @param index The index
     * @throws HpackException
     */
private void handleIndex(int index) throws HpackException {
    if (index <= Hpack.STATIC_TABLE_LENGTH) {
        addStaticTableEntry(index);
    } else {
        int adjustedIndex = getRealIndex(index - Hpack.STATIC_TABLE_LENGTH);
        HeaderField headerField = headerTable[adjustedIndex];
        headerEmitter.emitHeader(headerField.name, headerField.value, false);
    }
}
Also used : HeaderField(io.undertow.protocols.http2.Hpack.HeaderField)

Aggregations

HeaderField (io.undertow.protocols.http2.Hpack.HeaderField)6 HttpString (io.undertow.util.HttpString)1