private void sendHeaders(HttpRequest request, PrintWriter remotePrintWriter) {
        Map<String, List<String>> clientHeaders = request.getHeaders();
        for (String header : clientHeaders.keySet()) {
            List<String> values = clientHeaders.get(header);
            for (String value : values) {
                remotePrintWriter.print(format("%s: %s\n", header, value));
            }
        }
        remotePrintWriter.print("\n");
        remotePrintWriter.flush();
    }