title: See Fin Ack response to "HTTP/1.0 200 OK" packet
body: <p>I am trying to have my program (written using Embarcadero C++ builder and Indy protocol stack) to connect to a proprietary server.  I am supposed to send an HTTP command “GET /hyd/1.s16” at which point the server is supposed to send a bunch of data to me. For some reason my protocol stack send a Fin Ack in response to the "HTTP/1.0 200 OK packet.”</p>
  
  <p>When I run it with a server simulator everything works fine:</p>
  
  <ol>
  <li>Client sends Syn</li>
  <li>Server sends Syn Ack</li>
  <li>Client sends Ack</li>
  <li>Client sends Psh, Ack with Get command</li>
  <li>Server sends Ack</li>
  <li>Server sends Psh, Ack with "HTTP/1.0 200 OK packet"</li>
  <li>Server sends data in a reassembled PDU</li>
  <li>Client sends Ack</li>
  <li>Server sends data in a reassembled PDU</li>
  <li>Server sends data in a reassembled PDU</li>
  <li>Client sends Ack
  ...</li>
  </ol>
  
  <p><a href="http://s000.tinyupload.com/?file_id=02170458685899076753" rel="nofollow">Link to good Wireshark capture</a></p>
  
  <p>When the customer runs with the actual server, the protocol stack I am using does not like the “HTTP/1.0 200 OK packet” that the server sends and sends a “Fin Ack” response - Packet 7.</p>
  
  <ol>
  <li>Client sends Syn</li>
  <li>Server sends Syn Ack</li>
  <li>Client sends Ack</li>
  <li>Client sends Psh, Ack with Get command</li>
  <li>Server sends Ack</li>
  <li>Server sends Psh, Ack with "HTTP/1.0 200 OK packet"</li>
  <li>Client sends Fin, Ack **** Error ****</li>
  </ol>
  
  <p><a href="http://s000.tinyupload.com/?file_id=41713430074377684167" rel="nofollow">Link to bad Wireshark capture</a></p>
  
  <pre><code>TIdTCPClient *TCPClient;
  
  TCPClient-&gt;Port = M3R_PORT;
  TCPClient-&gt;Host =   IntToStr((int) ipAddPt1) + "." +
                                  IntToStr((int) ipAddPt2) + "." +
                                  IntToStr((int) ipAddPt3) + "." +
                                  IntToStr((int) ipAddPt4);
  TCPClient-&gt;Connect();
  TCPClient-&gt;IOHandler-&gt;Write(m3rData);//"GET /hyd/1.s16 HTTP/1.0\x0d\x0a\x0d\x0a");
  
  while (!done) {
      readLine[x] = TCPClient-&gt;IOHandler-&gt;ReadLn();   // extension-header = ChannelId
      if (readLine[x].Length() &lt;= 0) {
          done = true;
      }
  }
  </code></pre>