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

Method processHeader

java/org/apache/coyote/ajp/AjpMessage.java:345–361  ·  view source on GitHub ↗

Process the AJP message header, validating the message signature. @param toContainer true if the message is from the web server to the container, false if from the container to the web server @return The length of the payload, or -1 if the message signature

(boolean toContainer)

Source from the content-addressed store, hash-verified

343 * @return The length of the payload, or -1 if the message signature is invalid
344 */
345 public int processHeader(boolean toContainer) {
346 pos = 0;
347 int mark = getInt();
348 len = getInt();
349 // Verify message signature
350 if ((toContainer && mark != 0x1234) || (!toContainer && mark != 0x4142)) {
351 log.error(sm.getString("ajpmessage.invalid", "" + mark));
352 if (log.isTraceEnabled()) {
353 dump("In");
354 }
355 return -1;
356 }
357 if (log.isTraceEnabled()) {
358 log.trace("Received " + len + " " + buf[0]);
359 }
360 return len;
361 }
362
363
364 private void dump(String prefix) {

Callers 5

extractResponseBodyMethod · 0.80
validateResponseEndMethod · 0.80
readMessageMethod · 0.80
readMessageMethod · 0.80

Calls 6

getIntMethod · 0.95
dumpMethod · 0.95
errorMethod · 0.65
getStringMethod · 0.65
isTraceEnabledMethod · 0.65
traceMethod · 0.65

Tested by 4

extractResponseBodyMethod · 0.64
validateResponseEndMethod · 0.64
readMessageMethod · 0.64