set override header on response

@function setOverrideHeader
@param {Object} res - response to client
@param {String} name - header's name
@param {String} value - header's value
@return {Boolean}
760016
function setOverrideHeader(res, name, value) {

  if (res._headers && res._headers[name] !== undefined) {
    return true;
  }

  res.setHeader(name, value);
  return true;
}
901741
public void setHeader(String name, String value) {
//		int pos = 0;
//		int crlfpos = 0;
        Pattern pattern = null;

        if (getHeaders(name) == null && value != null) {
            // header value not found, append to end
            addHeader(name, value);
        } else {
            pattern = getHeaderRegex(name);
            Matcher matcher = pattern.matcher(mMsgHeader);
            if (value == null) {
                // delete header
                mMsgHeader = matcher.replaceAll("");
            } else {
                // replace header
                String newString = name + ": " + value + mLineDelimiter;
                mMsgHeader = matcher.replaceAll(Matcher.quoteReplacement(newString));
            }

            // set into hashtable
            replaceInternalHeaderFields(name, value);
        }
    }
815014
public HttpClientResponseBuilder withHeader(String name, String value) {
        Action lastAction = newRule.getLastAction();
        HeaderAction headerAction = new HeaderAction(lastAction, name, value);
        newRule.overrideLastAction(headerAction);
        return this;
    }
1364596
public final B setHeader(CharSequence name, Object value) {
        requireNonNull(name, "name");
        requireNonNull(value, "value");
        getOrCreateHeaders().setObject(HttpHeaderNames.of(name), value);
        return self();
    }
1006437
public RouteContext header(String name, String value) {
        this.response.header(name, value);
        return this;
    }
1280842
public void setIntHeader(String name, int value) 
    {
        try{_httpResponse.setIntField(name,value);}
        catch(IllegalStateException e){LogSupport.ignore(log,e);}
    }
219697
public Request setHeader(String name, String value) {
        this.headers.put(name, value);
        return this;
    }
899607
function setResponseHeaders(res) {
  if(res.setHeader) {
    var contentType = res.getHeader('content-type');
    if (!contentType) {
      res.setHeader('Content-Type', 'application/json');
    }
  }
}
106004
function header (request) {

    var headers = assign({}, Http.headers.common,
        !request.crossOrigin ? Http.headers.custom : {},
        Http.headers[toLower(request.method)]
    );

    each(headers, function (value, name) {
        if (!request.headers.has(name)) {
            request.headers.set(name, value);
        }
    });

}
1155456
public void setRequestHeader(String header, String value) {
        LOG.entering(CLASS_NAME, "setRequestHeader", new Object[] {header, value});
        HttpRequestUtil.validateHeader(header);
        connection.addRequestProperty(header, value);
    }
1213288
function(name, value) {
    var header = { raw: value };

    name = Utils.headerize(name);

    if(this.headers[name]) {
      this.headers[name].push(header);
    } else {
      this.headers[name] = [header];
    }
  }
417717
def set_header(self, name, value, append=False):
        '''  '''
        if append:
            self.add_header(name, value)
        else:
            self._headers[_hkey(name)] = [str(value)]
496018
function(name, value) {
    var regexp, idx;

    // Remove the header from extraHeaders if present.
    regexp = new RegExp('^\\s*'+ name +'\\s*:','i');
    for (idx=0; idx<this.extraHeaders.length; idx++) {
      if (regexp.test(this.extraHeaders[idx])) {
        this.extraHeaders.splice(idx, 1);
      }
    }

    this.headers[Utils.headerize(name)] = (Array.isArray(value)) ? value : [value];
  }
1374889
public void set(String name, String value) {
		HttpHeader header = get(name);
		if(header == null) {
			add(name,value);
		} else {
			header.setValue(value);
		}
	}
782504
public RestRequest<T> addHeader(String name, String value) {
        headers.put(name, value);
        return this;
    }
1366500
public T header(Header name, String value) {
		return header(name.toString(), value, true);
	}
964743
public GenericResponseBuilder<T> header(String name, Object value) {
    rawBuilder.header(name, value);
    return this;
  }