public boolean send() {
		try {
			String encoding = headers.get("Content-Encoding");
			boolean isGzipEncoding = (encoding != null) && encoding.equals("gzip");
			String contentType = headers.get("Content-Type");
			boolean isZipContentType = (contentType != null) && contentType.contains("/zip");
			if (isGzipEncoding && isZipContentType) {
				headers.remove("Content-Encoding");
				isGzipEncoding = false;
			}
			String preamble =
				"HTTP/1.1 " + responseCode + "\r\n" +
				getHeadersString() +
				(isGzipEncoding ? "" : "Content-Length: " + responseLength + "\r\n") +
				"\r\n";
			byte[] preambleBytes = preamble.getBytes("UTF-8");
			outputStream.write(preambleBytes);
			if (isGzipEncoding) outputStream = new GZIPOutputStream(outputStream, true); //syncFlush
			for (ResponseItem item : responseContent) item.write();
			if (isGzipEncoding) ((GZIPOutputStream)outputStream).finish();
			outputStream.flush();
			return true;
		}
		catch (Exception ex) {
			//logger.error("Unable to send the response.", ex);
			return false;
		}
	}