Updates the response headers

@param headers headers with description
@return this
@since 2.5.0
328670
public ResponseMessageBuilder headersWithDescription(Map<String, Header> headers) {
    this.headers.putAll(nullToEmptyMap(headers));
    return this;
  }
1216085
public function header($headers) {
        // Record HTTP header
        if (is_array($headers)) {
            foreach ($headers as $header) {
                array_push($this->_headers, $header);
            }
        } else if (is_string($headers)) {
            array_push($this->_headers, $headers);
        }
        
        return $this;
    }
1017487
private void addKeepAliveHeaders(HttpHeaders headers) {
        if (protocol == H1 || protocol == H1C) {
            headers.set(HttpHeaderNames.CONNECTION, "keep-alive");
        } else {
            // Do not add the 'connection' header for HTTP/2 responses.
            // See https://tools.ietf.org/html/rfc7540#section-8.1.2.2
        }
    }
195853
public UploadMetadata withSignedHeaders(java.util.Map<String, String> signedHeaders) {
        setSignedHeaders(signedHeaders);
        return this;
    }
348152
public static void setNoClientCache(HttpHeaders headers) {
        // http://sockjs.github.com/sockjs-protocol/sockjs-protocol-0.3.html#section-11
        headers.remove(EXPIRES);
        headers.remove(LAST_MODIFIED);
        headers.set(CACHE_CONTROL, "no-store, no-cache, must-revalidate, max-age=0");
    }
1251614
public HttpHeaders generatePreflightResponseHeaders() {
        final HttpHeaders headers = new DefaultHttpHeaders();
        preflightResponseHeaders.forEach((key, value) -> {
            final Object val = getValue(value);
            if (val instanceof Iterable) {
                headers.addObject(key, (Iterable<?>) val);
            } else {
                headers.addObject(key, val);
            }
        });
        return headers.asImmutable();
    }
1176629
public static void setNonCachingHeaders(@NotNull HttpServletResponse response) {
    response.setHeader(HEADER_PRAGMA, "no-cache");
    response.setHeader(HEADER_CACHE_CONTROL, "no-cache");
    response.setHeader(HEADER_EXPIRES, "0");
    response.setHeader(HEADER_DISPATCHER, "no-cache");
  }
279718
public function update($service, $headers = null, $data)
	{
		return $this->put($service, $headers, $data);
	}
174288
def with_headers(self, headers):
        
        return self.replace(headers=_merge_maps(self.headers, headers))
695649
public function setHeaders(array $headers)
    {
        if ($headers) {
            $this->headers = array_merge($this->headers, $headers);
        }

        return $this;
    }
574726
public static Header[] resize(final Header[] headers) {
        int new_capacity=headers.length + RESIZE_INCR;
        Header[] new_hdrs=new Header[new_capacity];
        System.arraycopy(headers, 0, new_hdrs, 0, headers.length);
        return new_hdrs;
    }
436357
public Headers toHeaders() {
        Headers headers = new Headers();
        if (!getMatch().isEmpty()) {
            headers = headers.add(new Header(HeaderConstants.IF_MATCH, buildTagHeaderValue(getMatch())));
        }
        if (!getNoneMatch().isEmpty()) {
            headers = headers.add(new Header(HeaderConstants.IF_NONE_MATCH, buildTagHeaderValue(getNoneMatch())));
        }
        if (modifiedSince.isPresent()) {
            headers = headers.set(HeaderUtils.toHttpDate(HeaderConstants.IF_MODIFIED_SINCE, modifiedSince.get()));
        }
        if (unModifiedSince.isPresent()) {
            headers = headers.set(HeaderUtils.toHttpDate(HeaderConstants.IF_UNMODIFIED_SINCE, unModifiedSince.get()));
        }

        return headers;
    }
1218157
public void setHead(Object[] h) {

        headers = new Object[h.length];

        // System.arraycopy(h, 0, headers, 0, h.length);
        for (int i = 0; i < h.length; i++) {
            headers[i] = h[i];
        }
    }
377008
public void update(HttpResponse response) {
		long time = System.currentTimeMillis();
		long networkTime = time - contextTsCurrent.get();
		contextMsNetwork.set(contextMsNetwork.get() + networkTime);
		contextTsCurrent.set(time);
		
		StringBuilder cookiesDump = new StringBuilder();
		for (Header h : response.getAllHeaders()) {
			if ("Set-Cookie".equalsIgnoreCase(h.getName())) {
				try {
					Map<String, Cookie> cookiez = getServerCookiesFrom(h);
					requestCookies.get().putAll(cookiez);
					responseCookies.get().putAll(cookiez);
					cookiesDump.append(h.toString()).append(";");
				} catch (MalformedCookieException e) {
					log.error("discarding malformed cookie", e);
				}
			}
		}

		if (verbose) log.info("    Time " + String.valueOf(time - contextTsStart.get()) + " (+" + networkTime + "n) <<< [" + contextUrl.get() + "] <<< " + contextRequest.get() + ". Set-Cookie to thread local: " + cookiesDump.toString());
	}
964756
public function addHeaders(array $headers = [])
    {
        $this->headers = [];
        if($headers != []) {
            foreach ($headers as $header) {
                $this->headers[] = $header;
            }
        }
        return $this;
    }
164351
public static void addKeepAliveHeaders(Map<String, List<String>> headers) {
        StringUtilities.addValueToHeader(headers, "Keep-Alive",
                HttpProxyConstants.DEFAULT_KEEP_ALIVE_TIME, true);
        StringUtilities.addValueToHeader(headers, "Proxy-Connection",
                "keep-Alive", true);
    }
757934
function _setResponseHeaders(headers) {
    this.responseHeaders = {};

    for (var header in headers) {
      if (headers.hasOwnProperty(header)) {
          this.responseHeaders[header] = headers[header];
      }
    }

    if (this.forceMimeType) {
      this.responseHeaders['Content-Type'] = this.forceMimeType;
    }

    if (this.async) {
      this._readyStateChange(FakeXMLHttpRequest.HEADERS_RECEIVED);
    } else {
      this.readyState = FakeXMLHttpRequest.HEADERS_RECEIVED;
    }
  }