Use {@link #getHttpHeadersMap()} instead.
177719
@java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getHttpHeaders() {
    return getHttpHeadersMap();
  }
441694
@Override
    public Map<String, List<String>> headers() {
        if (headers != null) {
            return headers;
        }
        headers = new HashMap<>();
        final MultiMap requestHeaders = request.headers();
        Set<String> names = requestHeaders.names();
        for (String name : names) {
            headers.put(name, requestHeaders.getAll(name));
        }
        return headers;
    }
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;
    }
763363
public Map<String, String> getRequestHeaders() {
        Map<String, String> hdrs = new HashMap<>();
        hdrs.put("Content-Type", "application/json");
        hdrs.put("environment", getSlackPrefix());
        return hdrs;
    }
229715
public static Map createHeadersMap(PageContext pContext)
    {
        final HttpServletRequest request =
                (HttpServletRequest) pContext.getRequest();

        return new EnumeratedMap()
        {
            public Enumeration enumerateKeys()
            {
                return request.getHeaderNames();
            }

            public Object getValue(Object pKey)
            {
                if (pKey instanceof String) {
                    // Drain the header enumeration
                    List l = new ArrayList();
                    Enumeration enum_ = request.getHeaders((String) pKey);
                    if (enum_ != null) {
                        while (enum_.hasMoreElements()) {
                            l.add(enum_.nextElement());
                        }
                    }
                    String[] ret = (String[]) l.toArray(new String[l.size()]);
                    return ret;
                } else {
                    return null;
                }
            }

            public boolean isMutable()
            {
                return false;
            }
        };
    }
672653
public Map<String, String> getHeadersToMap(Map<String, String> map) {
        if (map == null) map = new LinkedHashMap<>();
        final Map<String, String> map0 = map;
        header.forEach((k, v) -> map0.put(k, v));
        return map0;
    }
750516
protected String getCharsetFromHeaders(HttpHeaders headers) 
	throws IOException {
		if(headers == null) {
			return null;
		}
		for(HttpHeader header : headers) {
			if(header.getName().toUpperCase().trim().equals(
					HTTP_CONTENT_TYPE_HEADER)) {
				return contentTypeToCharset(header.getValue());
			}
		}
		return null;
	}
1227300
private static Map<String, String> getHeaderParams( final String header ) {
        if( header == null || header.length() == 0 )
            return Collections.emptyMap();

        final int headerLength = header.length();
        int start = header.indexOf(';') + 1;
        if( start == 0 || start == headerLength )
            return Collections.emptyMap();

        int end = header.indexOf(';', start);
        if( end == -1 )
            end = headerLength;

        Map<String, String> params = new LinkedHashMap<String, String>();
        while( start < end ) {
            int nameEnd = header.indexOf('=', start);
            if( nameEnd != -1 && nameEnd < end ) {
                String name = header.substring(start, nameEnd).trim();
                if( name.length() > 0 ) {
                    String value = header.substring(nameEnd + 1, end).trim();
                    int length = value.length();
                    if( length != 0 )
                        if( length > 2 && '"' == value.charAt(0) && '"' == value.charAt(length - 1) )
                            params.put(name, value.substring(1, length - 1));
                        else
                            params.put(name, value);
                }
            }

            start = end + 1;
            end = header.indexOf(';', start);
            if( end == -1 )
                end = headerLength;
        }

        return params;
    }
265733
@java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.Long> getHdfsMetrics() {
    return getHdfsMetricsMap();
  }
76746
@java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getParameters() {
    return getParametersMap();
  }
536511
public Map<String, List<String>> getHeaders() {
        if (headers == null) {
            return null;
        }
        return headers.toMultimap();
    }
605650
public Map<String, String> createHeadersFromString(String headersAndValues) {

    if (headersAndValues == null || headersAndValues.isEmpty()) return Collections.emptyMap();

    final StringTokenizer token = new StringTokenizer(headersAndValues, "@");

    final Map<String, String> theHeaders = new HashMap<String, String>(token.countTokens());

    while (token.hasMoreTokens()) {
      final String headerAndValue = token.nextToken();
      if (!headerAndValue.contains(":"))
        throw new IllegalArgumentException(
            "Request headers wrongly configured, missing separator :" + headersAndValues);

      final String header = headerAndValue.substring(0, headerAndValue.indexOf(":"));
      final String value =
          headerAndValue.substring(headerAndValue.indexOf(":") + 1, headerAndValue.length());
      theHeaders.put(header, value);
    }

    return theHeaders;

  }
263014
@InterfaceAudience.Public
    public void setHeaders(Map<String, Object> requestHeadersParam) {
        if (requestHeadersParam != null && !requestHeaders.equals(requestHeadersParam)) {
            requestHeaders = requestHeadersParam;
        }
    }
725761
@Deprecated
  public static Map<String, String> getEscapeMapping(String in,
      Map<String, String> headers) {
    return getEscapeMapping(in, headers, false, 0, 0);
  }
471933
@Override
    public Map<String, String> getHeaders() throws AuthFailureError {
        Map<String, String> headers = super.getHeaders();
        if (!mRequestHeaders.isEmpty()) {
            if (headers.isEmpty()) {
                return mRequestHeaders;
            } else {
                headers.putAll(mRequestHeaders);
            }
        }
        return headers;
    }
194090
public void setHeaders(Map<String, List<String>> headerMap) {
        headers = new Headers.Builder();

        for (Map.Entry<String, List<String>> e : headerMap.entrySet()) {
            for (String headerValue : e.getValue()) {
                addHeader(e.getKey(), headerValue);
            }
        }
    }
1225542
@Override
    public Map<String, List<String>> getHeaders() {
        final Map<String, List<String>> headerMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
        final HttpHeaders headers = ahcResponse.getHeaders();
        for (String name : headers.names()) {
            final List<String> values = headers.getAll(name);
            headerMap.put(name, values);
        }
        return headerMap;
    }