code:     protected boolean readMessage(AjpMessage message)
          throws IOException {
  
          byte[] buf = message.getBuffer();
          int headerLength = message.getHeaderLength();
  
          read(buf, 0, headerLength);
  
          int messageLength = message.processHeader(true);
          if (messageLength < 0) {
              // Invalid AJP header signature
              // TODO: Throw some exception and close the connection to frontend.
              return false;
          }
          else if (messageLength == 0) {
              // Zero length message.
              return true;
          }
          else {
              if (messageLength > buf.length) {
                  // Message too long for the buffer
                  // Need to trigger a 400 response
                  throw new IllegalArgumentException(sm.getString(
                          "ajpprocessor.header.tooLong",
                          Integer.valueOf(messageLength),
                          Integer.valueOf(buf.length)));
              }
              read(buf, headerLength, messageLength);
              return true;
          }
      }
  