title: How to set/format HTTP headers by simply writing Strings to a socket
body: <p>Just using the core Java API I am trying to send a response with correctly formatted HTTP headers. With my current code, I can see the client recieves my response, but I think I am not including all the information because when I a return a 404 error to a web browser client the web browser just displays a blank page. If I try with curl, I also do not see a curl letting me know about the error. Here is what I am currently doing with the response:</p>
  
  <p>outputStream.write("HTTP/1.1 404 Not Found".getBytes());</p>