title: Blank HTTP request to localhost server
body: <p>I was looking to learn more about web servers and so I followed <a href="http://www.codeguru.com/csharp/.net/net_general/article.php/c4603/Creating-your-own-web-server-using-C.htm" rel="nofollow noreferrer">this tutorial on codeguru</a> to build a sample one. However, whenever I run it and load the default page, I get the standard GET http request and then another socket connection is accepted and then a blank http request is shown. The console output is below:</p>
  
  <pre><code>Web Server now listening on port 7070, press ^C to stop...
  Socket Type: Stream
  
  Client Connected!
  =================
  Client IP: 127.0.0.1:56310
  
  Message received: "GET / HTTP/1.1
  Host: localhost:7070
  Connection: keep-alive
  Cache-Control: max-age=0
  Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
  User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36
  Accept-Encoding: gzip,deflate,sdch
  Accept-Language: en-US,en;q=0.8
  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    "
  Directory requested: /
  File Requested: C:\_WebServer\default.html
  No. of bytes sent: 103
  Total Bytes: 191
  No. of bytes sent: 191
  Socket Type: Stream
  
  Client Connected!
  =================
  Client IP: 127.0.0.1:56311
  
  Message received: "                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                "
  Only GET is supported :(
  </code></pre>
  
  <p>What is this blank http request and why is there a second socket connection even though I only made one request from my browser? Is this a sort of keep-alive thing?</p>
  
  <p>Edit: Could this maybe be a timeout thing? </p>
  
  <p>Edit2: </p>
  
  <p>I think a reason for this might be the following:</p>
  
  <p><a href="https://stackoverflow.com/questions/4761913/server-socket-receives-2-http-requests-when-i-send-from-chrome-and-receives-one?rq=1">server socket receives 2 http requests when I send from chrome and receives one when I send from firefox</a></p>
  
  <p>It seems like Chrome does a bit of a "placeholder" socket request to optimise later transfers. I get this behaviour in IE as well though, so maybe IE is now doing something similar.</p>