Get user specified header and the footer.

@param header if true print the user provided header else print the
user provided footer.
3586
public Content getUserHeaderFooter(boolean header) {
        String content;
        if (header) {
            content = replaceDocRootDir(configuration.header);
        } else {
            if (configuration.footer.length() != 0) {
                content = replaceDocRootDir(configuration.footer);
            } else {
                content = replaceDocRootDir(configuration.header);
            }
        }
        Content rawContent = new RawHtml(content);
        return rawContent;
    }
153196
private void parseTrailerHeaders() throws IOException {
        try {
            this.footers = AbstractMessageParser.parseHeaders(in,
                    constraints.getMaxHeaderCount(),
                    constraints.getMaxLineLength(),
                    null);
        } catch (final HttpException ex) {
            final IOException ioe = new MalformedChunkCodingException("Invalid footer: "
                    + ex.getMessage());
            ioe.initCause(ex);
            throw ioe;
        }
    }
869028
public HttpRequest withoutHeader(String header) {
		if(headers.containsKey(header)) {
			headers.remove(header);
		}
		return this;
	}
1158583
private String getSimpleHeaderValue(String header, HttpResponse httpResponse) {
    return getSimpleHeaderValue(header, httpResponse, true);
  }
7972
function getHeader($header)
    {
        if (! $this->hasHeader($header)) {
            if (strtolower($header) === 'host'
                && ($this->uri && $this->uri->getHost())
            )
                return array($this->_getHostFromUri());

            return array();
        }

        $header = $this->_c_headerNormalized[strtolower($header)];
        $value  = $this->headers[$header];
        $value  = is_array($value) ? $value : array($value);
        return $value;
    }
1299503
public String getHeader(String name) {
		if(name == null) {
			throw new NullPointerException("header name is null");
		}
		try {
			return RFC2396UrlDecoder.decode(((javax.sip.address.SipURI) super.uri).getHeader(name));
		} catch (NullPointerException e) {
			return null;
		}
	}
1106575
public String getHeader(String name) {

		String nameToSearch = getCorrectHeaderName(name);
		String value = null;
		if (this.message.getHeader(nameToSearch) != null) {
			value = ((SIPHeader) this.message.getHeader(nameToSearch))
					.getValue();
		}
		if(logger.isDebugEnabled()) {
			logger.debug("getHeader "+ name+ ", value="+ value	);
		}
		return value;
	}
593866
def show_header(**header):
    ""

    print('%s: %s' % ('Now', header['now']))
    print('%s: %s' % ('Stop-Name', header['name']))
    print('%s: %s' % ('Stop-ID', header.get('id', None)))
    print('')
965276
public static String getResponseAsString(String uri, Header header) {
        HttpGet httpGet = new HttpGet(uri);
        httpGet.setHeader(header);
        request(httpGet);
        return request(httpGet);
    }
892610
public function getHeader($header)
    {
        $header = ucwords(strtolower($header));
        if (! is_string($header) || ! isset($this->headers[$header])) return null;

        return $this->headers[$header];
    }
142351
def get_publishing_user(custom_headers:nil)
      response = get_publishing_user_async(custom_headers:custom_headers).value!
      response.body unless response.nil?
    end
866053
protected UserAction getUserAction(User user, String path, Object content, Map<String,String> headers) {
        Action action = getAction(path, content, headers);
        Entity entity = getEntity(path, content, headers);
        Long entityId = getEntityId(path, content, headers);
        String descrip = getEntityDescription(path, content, headers);
        if (descrip.length() > 1000)
            descrip = descrip.substring(0, 999);
        UserAction userAction = new UserAction(user.getCuid(), action, entity, entityId, descrip);
        userAction.setSource(getSource());
        return userAction;
    }
236057
@Override
  public String header(String key)
  {
    CharSegment buf = getHeaderBuffer(key);
    
    if (buf != null)
      return buf.toString();
    else
      return null;
  }
188204
def header_footer_exists(filepath):
    """"""
    with open(filepath) as f:
        return re.search(Utils.exp, f.read())
1335005
def get_header(self, header_name):
        
        if header_name in self.headers:
            return self.headers[header_name]
        return self.add_header_name(header_name)
537210
public HeaderEntry getHeader(String name) {
        for (HeaderEntry headerField : getHeaderEntries()) {
            if (headerField.getName().equals(name)) {
                return headerField;
            }
        }
        return null;
    }
895150
public static String getHeader(Map<String, List<String>> responseHeaders, String header) {
        if (responseHeaders == null) {
            return null;
        }
        // Search the headers case insensitive (headers should be evaluated as
        // case insensitive, but, the Swagger implementation uses HashMap that
        // is case sensitive)
        for (Map.Entry<String, List<String>> entry : responseHeaders.entrySet()) {
            if (entry.getKey().equalsIgnoreCase(header)) {
                List<String> headersList = entry.getValue();
                if (headersList != null && !headersList.isEmpty()) { // Better
                                                                     // safe
                                                                     // than
                                                                     // sorry
                    return headersList.get(0);
                }
                break; // Header found, but, was null or empty
            }
        }
        return null;
    }