String value = getString();
if(HEADER_CONTENT_TYPE.equalsIgnoreCase(name)) {
res.setContentType(value);
res.setEncodingAndType(value);
} else if(HEADER_SET_COOKIE.equalsIgnoreCase(name)) {
CookieManager cookies = getCookieManager();
if(cookies != null) {
cookies.addCookieFromHeader(value, res.getURL());
}
}
sb.append(name).append(COLON_SPACE).append(value).append(NEWLINE);
}
res.setResponseHeaders(sb.toString());