docs: private void checkHeaderValue(byte[] data, int offset, int length) {
          // if the last character is a CR or LF, then this fails
          int index = (offset + length) - 1;
          if (index < 0) {
              // empty data, quit now with success
              return;
          }
          String error = null;
          if (BNFHeaders.LF == data[index] || BNFHeaders.CR == data[index]) {
              error = "Illegal trailing EOL";
          }
  
          // scan through the data now for invalid CRLF presence. Note that CRLFs
          // may be followed by whitespace for valid multiline headers.
          for (int i = offset; null == error && i < index; i++) {
              if (BNFHeaders.CR == data[i]) {
                  // next char must be an LF
                  if (BNFHeaders.LF != data[i + 1]) {
                      error = "Invalid CR not followed by LF";
                  } else if (getCharacterValidation()) {
                      data[i] = BNFHeaders.SPACE;
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                          Tr.debug(tc, "Found a CR replacing it with a SP");
                      }
                  }
              } else if (BNFHeaders.LF == data[i]) {
                  // if it is not followed by whitespace then this value is bad
                  if (BNFHeaders.TAB != data[i + 1] && BNFHeaders.SPACE != data[i + 1]) {
                      error = "Invalid LF not followed by whitespace";
                  } else if (getCharacterValidation()) {
                      data[i] = BNFHeaders.SPACE;
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                          Tr.debug(tc, "Found a LF replacing it with a SP");
                      }
                  }
              }
          }
  
          // if we found an error, throw the exception now
          if (null != error) {
              IllegalArgumentException iae = new IllegalArgumentException(error);
              FFDCFilter.processException(iae, getClass().getName() + ".checkHeaderValue(byte[])", "1", this);
              throw iae;
          }
      }