public long getDateHeader(String name) {
        String value = getHeader(name);
        if (value == null)
            return -1L;

        Date date = null;
        for (int i = 0; (date == null) && (i < formats.length); i++) {
            try {
                date = formats[i].parse(value);
            } catch (ParseException e) {
            }
        }
        if (date == null) {
            return -1L;
        }

        return date.getTime();
    }
Sets a header with the given name and value.
If the header had already been set, the new value overwrites the previous one.
container-core/src/main/java/com/yahoo/jdisc/http/filter/DiscFilterRequest.java