/*
@see javax.servlet.http.equest#getHeaders(java.lang.String)
771503
@Override
    public Enumeration<String> getHeaders(String hdr) {
        List<String> rc = this.request.getHeaders(hdr);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "getHeaders: " + hdr + " " + rc.size());
        }
        return Collections.enumeration(rc);
    }
1124482
private List<String> getHeaderValues(String headerName) {
		if (additionalHttpHeaders.get(headerName) == null) {
			additionalHttpHeaders.put(headerName, new ArrayList<String>());
		}
		return additionalHttpHeaders.get(headerName);
	}
662457
@Nonnull
  public ICommonsList <String> getHeaders (@Nullable final String sName)
  {
    return new CommonsArrayList <> (m_aHeaders.get (_unifyHeaderName (sName)));
  }
1266368
public Headers getHttpHeaders()
    {
        Headers headers = new Headers();

        if ( byteRange != null ) {
            StringBuilder rangeBuilder = new StringBuilder( "bytes=" );

            long start;
            if ( byteRange.offset >= 0 ) {
                rangeBuilder.append( byteRange.offset );
                start = byteRange.offset;
            } else {
                start = 1;
            }
            rangeBuilder.append( "-" );
            if ( byteRange.length > 0 ) {
                rangeBuilder.append( start + byteRange.length - 1 );
            }

            Header rangeHeader = new BasicHeader( "Range", rangeBuilder.toString() );
            headers.addHeader( rangeHeader );
        }
        return headers;
    }
802998
protected Map<String, String> getHeaders(HttpResponse resp) {
    final Map<String, String> headersAndValues = new HashMap<String, String>();

    final Header[] httpHeaders = resp.getAllHeaders();
    for (Header header : httpHeaders) {
      headersAndValues.put(header.getName(), header.getValue());
    }
    return headersAndValues;
  }
349414
public List<String> getHeader() {
      if (header == null) {
         return Collections.emptyList();
      }
      return Collections.unmodifiableList(header);
   }
404747
public Enumeration getHeaders(String s)
    {
        Enumeration enm=_httpRequest.getFieldValues(s);
        if (enm==null)
            return __emptyEnum;
        return enm;
    }
1166007
public java.util.List<? extends com.google.privacy.dlp.v2.FieldIdOrBuilder>
      getHeadersOrBuilderList() {
    return headers_;
  }
9590
public static String getHeader(HttpServletRequest request, String header) {

		// noting to search in or nothing to be found
		if (request == null || StringUtils.isNullOrEmptyTrimmed(header)) {
			return null;
		}

		return request.getHeader(header);
	}
1320279
public RequestTemplate headers(Map<String, Collection<String>> headers) {
    if (headers != null && !headers.isEmpty()) {
      headers.forEach(this::header);
    } else {
      this.headers.clear();
    }
    return this;
  }
328613
@Override
    public List<String> getHeaders(String name) {
        List<HeaderField> hdrs = this.message.getHeaders(name);
        List<String> values = new ArrayList<String>(hdrs.size());
        for (HeaderField header : hdrs) {
            values.add(header.asString());
        }
        return values;
    }
169581
public List<String> getValuesList(HttpHeader header) {
        final List<String> list = new ArrayList<>();
        for (HttpField f : this)
            if (f.getHeader() == header)
                list.add(f.getValue());
        return list;
    }
1293796
public List<String> getHeader() {
		if (false == config.containsHeader) {
			throw new IllegalStateException("No header available - header parsing is disabled");
		}
		if (lineNo == 0) {
			throw new IllegalStateException("No header available - call nextRow() first");
		}
		return header.fields;
	}
540868
public Map<String, String> getPrintableHeaders() {
    final Map<String, String> headers = new HashMap<String, String>(
        request.headers().entries().size());
    for (final Entry<String, String> header : request.headers().entries()) {
      if (header.getKey().toLowerCase().equals("cookie")) {
        // null out the cookies
        headers.put(header.getKey(), "*******");
      } else {
        // http://tools.ietf.org/html/rfc2616#section-4.2
        if (headers.containsKey(header.getKey())) {
          headers.put(header.getKey(), 
              headers.get(header.getKey()) + "," + header.getValue());
        } else {
          headers.put(header.getKey(), header.getValue());
        }
      }
    }
    return headers;
  }
895150
public static String getHeader(Map<String, List<String>> responseHeaders, String header) {
        if (responseHeaders == null) {
            return null;
        }
        // Search the headers case insensitive (headers should be evaluated as
        // case insensitive, but, the Swagger implementation uses HashMap that
        // is case sensitive)
        for (Map.Entry<String, List<String>> entry : responseHeaders.entrySet()) {
            if (entry.getKey().equalsIgnoreCase(header)) {
                List<String> headersList = entry.getValue();
                if (headersList != null && !headersList.isEmpty()) { // Better
                                                                     // safe
                                                                     // than
                                                                     // sorry
                    return headersList.get(0);
                }
                break; // Header found, but, was null or empty
            }
        }
        return null;
    }
1165294
@Override
    public List<String> getTrailerNames() {
        HttpTrailers trailers = message.getTrailers();
        if (trailers != null)
            return trailers.getAllHeaderNames();
        else
            return null;

    }
662832
public Map<String, String> getResponseHeaders(){
        Collection<String> names  = RequestContext.getHttpResponse().getHeaderNames();
        Map<String, String> headers = new HashMap<>();
        for (String name : names) {
            headers.put(name, RequestContext.getHttpResponse().getHeader(name));
        }
        return headers;
    }