code: public boolean containsHeaderOut(String name)
    {
      ArrayList<String> headerKeys = _headerKeysOut;
      int size = headerKeys.size();
      
      for (int i = 0; i < size; i++) {
        String oldKey = headerKeys.get(i);
  
        if (oldKey.equalsIgnoreCase(name)) {
          return true;
        }
      }
  
      if (name.equalsIgnoreCase("content-type")) {
        return _contentTypeOut != null;
      }
  
      if (name.equalsIgnoreCase("content-length")) {
        return _contentLengthOut >= 0;
      }
  
      return false;
    }
docs: Returns true if the response already contains the named header.
  
  @param name name of the header to test.