/*
@see com.ibm.websphere.http.HttpResponse#setHeader(java.lang.String, java.lang.String)
358726
@Override
    public void setHeader(String name, String value) {
        this.message.setHeader(name, value);
    }
456376
@Deprecated
    public static void setHeader(HttpMessage message, String name, Object value) {
        message.headers().set(name, value);
    }
90742
@Override
  public void setHeader(String key, String value)
  {
    int tail;

    if (_headerSize > 0) {
      tail = (_headerValues[_headerSize - 1].offset()
              + _headerValues[_headerSize - 1].length());
    }
    else {
      tail = 0;
    }

    int keyLength = key.length();
    int valueLength = value.length();
    char []headerBuffer = _headerBuffer;
    
    for (int i = keyLength - 1; i >= 0; i--) {
      headerBuffer[tail + i] = key.charAt(i);
    }

    _headerKeys[_headerSize].init(headerBuffer, tail, keyLength);

    tail += keyLength;

    for (int i = valueLength - 1; i >= 0; i--) {
      headerBuffer[tail + i] = value.charAt(i);
    }

    _headerValues[_headerSize].init(headerBuffer, tail, valueLength);
    _headerSize++;
    // XXX: size
  }
1289756
@Override
    public void setHeader(String name, String value) {
        synchronized (portal) {
            super.setHeader(name, value);
        }
    }
727984
private void setHeaders(final HttpServletResponse response,
            final Root root) {
        response.setHeader("content-type", "application/octet-stream");
        response.setHeader("content-disposition",
                "attachment; filename=" + getSaveFilename(root));
    }
1155456
public void setRequestHeader(String header, String value) {
        LOG.entering(CLASS_NAME, "setRequestHeader", new Object[] {header, value});
        HttpRequestUtil.validateHeader(header);
        connection.addRequestProperty(header, value);
    }
1035048
public function setHeader($key, $value, $http_response_code = null)
    {
        header($key.': '.$value, null, $http_response_code);
    }
586339
@Override
    public void addResponseHeader(String key, String value) {
        this.response.addResponseHeader(key, value);
    }
1091371
private HttpServletResponse getHttpServletResponseUrlEncoder(
			final Response response) {

		return new HttpServletResponse() {

			public void setLocale(Locale loc) {

			}

			public void setContentType(String type) {

			}

			public void setContentLength(int len) {

			}

			public void setBufferSize(int size) {

			}

			public void resetBuffer() {

			}

			public void reset() {

			}

			public boolean isCommitted() {
				return false;
			}

			public PrintWriter getWriter() throws IOException {
				return new PrintWriter(new RedirectWriter(getResponse()));
			}

			public ServletOutputStream getOutputStream() throws IOException {
				return null;
			}

			public Locale getLocale() {
				return null;
			}

			public int getBufferSize() {
				return 0;
			}

			public void flushBuffer() throws IOException {

			}

			public void setStatus(int sc, String sm) {

			}

			public void setStatus(int sc) {

			}

			public void setIntHeader(String name, int value) {

			}

			public void setHeader(String name, String value) {

			}

			public void setDateHeader(String name, long date) {

			}

			public void sendRedirect(String location) throws IOException {

			}

			public void sendError(int sc, String msg) throws IOException {

			}

			public void sendError(int sc) throws IOException {

			}

			public String encodeUrl(String url) {
				return response.encodeURL(url).toString();
			}

			public String encodeURL(String url) {
				return response.encodeURL(url).toString();
			}

			public String encodeRedirectUrl(String url) {
				return null;
			}

			public String encodeRedirectURL(String url) {
				return null;
			}

			public boolean containsHeader(String name) {
				return false;
			}

			public void addIntHeader(String name, int value) {

			}

			public void addHeader(String name, String value) {

			}

			public void addDateHeader(String name, long date) {

			}

			public void addCookie(Cookie cookie) {

			}

			public String getContentType() {
				return null;
			}

			public void setCharacterEncoding(String charset) {

			}

			@Override
			public String getCharacterEncoding() {
				return "UTF-8";
			}
		};
	}
729342
@BuilderMethod
    public void setHttpHeaders(@NonNull Map<String, String> headers) {
        this.httpHeaders.clear();
        this.httpHeaders.putAll(headers);
    }
154818
@Nonnull
  public TypeaheadDataset setHeader (@Nullable final IHCNode aHeader)
  {
    return setHeader (aHeader != null ? HCRenderer.getAsHTMLStringWithoutNamespaces (aHeader) : (String) null);
  }
908920
func (ctx *Context) SetHeader(key, value string) {
	ctx.Response.Header().Set(key, value)
}
1012905
private void setHeaders(HttpMessage message, Map<String, String> headers) {
		message.setHeader(RequestHeaderKey.ACCEPT, RequestHeaderValue.Accept.ALL);
		message.setHeader(RequestHeaderKey.CONNECTION, RequestHeaderValue.Connection.KEEP_ALIVE);
		message.setHeader(RequestHeaderKey.USER_AGENT, this.config.getUserAgent());

		if (headers != null) {
			for (String headerKey : headers.keySet()) {
				message.setHeader(headerKey, headers.get(headerKey));
			}
		}
	}
697474
public void setHeader(HasJqmHeader header) {
        removeHeader();
        this.header = header;
        if (this.header == null) return;

        addLogical(header.getHeaderStage());

        if (panel == null) {
        	getElement().insertBefore(header.getJqmHeader().getElement(), getElement().getFirstChild());
        } else {
        	getElement().insertAfter(header.getJqmHeader().getElement(), panel.getElement());
        }
    }
295343
func (c *Context) SetHeader(key, value string) {
	c.response.Header().Set(key, value)
}
916819
@Override
	public void setHeader(final String name, final String value) {
		LOG.debug("Setting header, " + name + '=' + value);
		headers.put(name, value);
	}
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);
            }
        }
    }