MCPcopy Create free account
hub / github.com/apache/tomcat / findInTable

Method findInTable

java/org/apache/coyote/http2/HpackEncoder.java:309–330  ·  view source on GitHub ↗
(String headerName, String value)

Source from the content-addressed store, hash-verified

307 }
308
309 private TableEntry findInTable(String headerName, String value) {
310 TableEntry[] staticTable = ENCODING_STATIC_TABLE.get(headerName);
311 if (staticTable != null) {
312 for (TableEntry st : staticTable) {
313 if (st.value != null && st.value.equals(value)) { // todo: some form of lookup?
314 return st;
315 }
316 }
317 }
318 List<TableEntry> dynamic = dynamicTable.get(headerName);
319 if (dynamic != null) {
320 for (TableEntry st : dynamic) {
321 if (st.value.equals(value)) { // todo: some form of lookup?
322 return st;
323 }
324 }
325 }
326 if (staticTable != null) {
327 return staticTable[0];
328 }
329 return null;
330 }
331
332 public void setMaxTableSize(int newSize) {
333 this.newMaxHeaderSize = newSize;

Callers 1

encodeMethod · 0.95

Calls 2

getMethod · 0.65
equalsMethod · 0.65

Tested by

no test coverage detected