MCPcopy Index your code
hub / github.com/apache/tomcat / handleIndex

Method handleIndex

java/org/apache/coyote/http2/HpackDecoder.java:275–290  ·  view source on GitHub ↗

Handle an indexed header representation @param index The index @throws HpackException If an error occurs processing the given index

(int index)

Source from the content-addressed store, hash-verified

273 * @throws HpackException If an error occurs processing the given index
274 */
275 private void handleIndex(int index) throws HpackException {
276 if (index <= Hpack.STATIC_TABLE_LENGTH) {
277 addStaticTableEntry(index);
278 } else {
279 // index is 1 based
280 int adjustedIndex = getRealIndex(index);
281 if (log.isTraceEnabled()) {
282 log.trace(sm.getString("hpackdecoder.useDynamic", Integer.valueOf(adjustedIndex)));
283 }
284 Hpack.HeaderField headerField = headerTable[adjustedIndex];
285 if (headerField == null) {
286 throw new HpackException(sm.getString("hpackdecoder.nullHeader", Integer.valueOf(index)));
287 }
288 emitHeader(headerField.name, headerField.value);
289 }
290 }
291
292 /**
293 * because we use a ring buffer type construct, and don't actually shuffle items in the array, we need to figure out

Callers 1

decodeMethod · 0.95

Calls 7

addStaticTableEntryMethod · 0.95
getRealIndexMethod · 0.95
emitHeaderMethod · 0.95
isTraceEnabledMethod · 0.65
traceMethod · 0.65
getStringMethod · 0.65
valueOfMethod · 0.45

Tested by

no test coverage detected