public void writeTo(HttpServletResponse response) throws IOException {
        response.setStatus(this.status);
        if(isNonTrivial(headersString)) {
            for (String hs : headersString.split("\r\n")) {
                String[] parts = hs.split(": ", 2);
                if(!"Date".equalsIgnoreCase(parts[0])) {
                    response.addHeader(parts[0], parts[1]);
                }
            }
        }
        else if(headers != null) {
            for (Map.Entry<String, List<String>> header : headers.entrySet()) {
                if(isNonTrivial(header.getKey())) {
                    for (String val : header.getValue()) {
                        if(isNonTrivial(val)) {
                            if(!"Date".equalsIgnoreCase(header.getKey())) {
                                response.addHeader(header.getKey(), val);
                            }
                        }
                    }
                }
            }
        }
        response.getOutputStream().write(this.body);

    }