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

Method readHeaderName

java/org/apache/coyote/http2/HpackDecoder.java:199–209  ·  view source on GitHub ↗
(ByteBuffer buffer, int prefixLength)

Source from the content-addressed store, hash-verified

197 }
198
199 private String readHeaderName(ByteBuffer buffer, int prefixLength) throws HpackException {
200 buffer.position(buffer.position() - 1); // unget the byte
201 int index = Hpack.decodeInteger(buffer, prefixLength);
202 if (index == -1) {
203 return null;
204 } else if (index != 0) {
205 return handleIndexedHeaderName(index);
206 } else {
207 return readHpackString(buffer, true);
208 }
209 }
210
211 private String readHpackString(ByteBuffer buffer, boolean isFieldName) throws HpackException {
212 if (!buffer.hasRemaining()) {

Callers 1

decodeMethod · 0.95

Calls 4

decodeIntegerMethod · 0.95
readHpackStringMethod · 0.95
positionMethod · 0.80

Tested by

no test coverage detected