Method overload from the standard HttpServletRequest API.<p>

@see javax.servlet.http.HttpServletResponse#setHeader(java.lang.String, java.lang.String)
196655
@Override
    public void setHeader(String name, String value) {

        if (isSuspended()) {
            return;
        }

        if (CmsRequestUtil.HEADER_CONTENT_TYPE.equalsIgnoreCase(name)) {
            setContentType(value);
            return;
        }

        if (m_cachingRequired && !m_includeMode) {
            setHeaderList(m_bufferHeaders, name, value);
            if (LOG.isDebugEnabled()) {
                LOG.debug(
                    Messages.get().getBundle().key(
                        Messages.LOG_FLEXRESPONSE_SETTING_HEADER_IN_ELEMENT_BUFFER_2,
                        name,
                        value));
            }
        }

        if (m_writeOnlyToBuffer) {
            setHeaderList(m_headers, name, value);
            if (LOG.isDebugEnabled()) {
                LOG.debug(
                    Messages.get().getBundle().key(Messages.LOG_FLEXRESPONSE_SETTING_HEADER_IN_HEADERS_2, name, value));
            }
        } else {
            if (LOG.isDebugEnabled()) {
                LOG.debug(
                    Messages.get().getBundle().key(
                        Messages.LOG_FLEXRESPONSE_SETTING_HEADER_IN_PARENT_RESPONSE_2,
                        name,
                        value));
            }
            m_res.setHeader(name, value);
        }
    }
555519
public void setHeader(String name, String value) {
        httpRequest.headers().set(name, value);
    }
564395
public void setHeader(java.util.Collection<String> header) {
        if (header == null) {
            this.header = null;
            return;
        }

        this.header = new java.util.ArrayList<String>(header);
    }
782085
@Override
    public void addHeader(String hdr, String value) {
        this.response.addHeader(hdr, value);
    }
144926
function Request_hasHeader(key) {
        if (Type.isString(key)) {
            return this.headers.hasOwnProperty(key.toLowerCase());
        } else {
            throw new error.HttpError(500, {key: key}, "Request.hasHeader: Header key must be string type");
        }
    }
522052
void doMethod(HttpServletRequest request, HttpServletResponse response, HttpMethod httpMethod) {

        // Locate a request handler:
        String requestPath = mapRequestPath(request);
        Route route = api.get(requestPath);

        try {

            if (route != null && route.requestHandlers.containsKey(httpMethod)) {
                handleRequest(request, response, route, httpMethod);
            } else {
                handleNotFound(request, response);
            }

        } catch (Throwable t) {

            // Chances are the exception we've actually caught is the reflection
            // one from Method.invoke(...)
            Throwable caught = t;
            if (InvocationTargetException.class.isAssignableFrom(t.getClass())) {
                caught = t.getCause();
            }

            RequestHandler requestHandler = (route == null ? null : route.requestHandlers.get(httpMethod));
            handleError(request, response, requestHandler, caught);
        }

    }
626945
public void setHeader (File header)
    {
        try {
            _header = StreamUtil.toString(new FileReader(header));
        } catch (IOException ioe) {
            System.err.println("Unabled to load header '" + header + ": " +
                               ioe.getMessage());
        }
    }
102115
public Request accept(String headerValue){
        final String accept = RequestHeaderFields.ACCEPT.getName();
        String acceptValue = headers.get(accept);
        if (acceptValue == null){
            acceptValue = headerValue;
        } else {
            acceptValue = acceptValue + ", " + headerValue;
        }
        return this.setHeader(accept, acceptValue);
    }
1086413
public final void setHttpMethod(HttpMethod httpMethod) {
        if (overriddenURL != null && httpMethod != HttpMethod.GET) {
            throw new FacebookException("Can't change HTTP method on request with overridden URL.");
            }
        this.httpMethod = (httpMethod != null) ? httpMethod : HttpMethod.GET;
    }
130979
protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException
    {
        response.setContentType("text/html");
        response.setHeader("Pragma", "no-cache");

        PrintWriter out = response.getWriter();

        out.println("<html><head><title>OJB Distributed Locking Servlet Status Page</title>");
        out.println("</head><body><h1>OJB Distributed Locking Servlet</h1>");
        out.println("The servlet is running.<p>");

        if(lastError == null)
        {
            out.println("The LockServer is running.<p>");
            out.println("LockManager info: " + lockmanager.getLockInfo() + "<p>");
            out.println("Processed Lock Request: " + numRequests + "<p>");
        }
        else
        {
            out.println("<h2>The LockServer has a problem!</h2>");
            out.println("The error message is:<p>");
            out.println(lastError.getMessage() + "<p>");
            lastError.printStackTrace(out);
            lastError = null;
        }

        out.println("</body></html>");
    }
1079509
public static void addOrigHeader(HttpServletResponse response, String url) {
		response.setHeader(LINK, makeLink(url, ORIGINAL));
	}
1173202
void setHTTPResponse(HTTPResponse resp) {
        lock.lock();
        try {
            if (response != null) {
                throw(new IllegalStateException(
                        "HTTPResponse was already set"));
            }
            response = resp;
            ready.signalAll();
        } finally {
            lock.unlock();
        }
    }
96921
private void setHeaders(XMLHttpRequest xmlHttpRequest) throws RequestException {

        if ((headers != null) && (headers.size() > 0)) {
            for (Map.Entry<String, String> header : headers.entrySet()) {
                try {
                    xmlHttpRequest.setRequestHeader(header.getKey(), header.getValue());
                } catch (JavaScriptException e) {
                    throw new RequestException(e.getMessage());
                }
            }
        } else {
            xmlHttpRequest.setRequestHeader("Content-Type", "text/plain; charset=utf-8");
        }
    }
54383
public HttpMessage header(final String headerName, final Object headerValue) {
        return (HttpMessage) super.setHeader(headerName, headerValue);
    }
1061145
public static SetHeaderHandler header(final HttpHandler next, final String headerName, final ExchangeAttribute headerValue) {
        return new SetHeaderHandler(next, headerName, headerValue);
    }
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];
        }
    }
1150599
public void headerOut(String key, String value)
  {
    Objects.requireNonNull(value);
    
    if (isOutCommitted()) {
      return;
    }

    if (headerOutSpecial(key, value)) {
      return;
    }
    
    setHeaderOutImpl(key, value);
  }