Ethernet Client/Server Weirdness...

Does anyone have an idea why I'm not getting all the bytes from the Client response? See where I send out the post, that works and I get back:

HTTP/1.1 200 OK
CONTENT-LENGTH: 2816
...

But I don't get the full 2816 bytes but only about 800 total. Any ideas?

Here is the relevant code:

(Note: out() is a function that prints out to the serial - not included in this excerpt)

void getMetaData()
{
   
   Client client(deviceip, 1400); // used for connecting out to device
    
  if (client.connect()) {
    if (debug) {
      Serial.println("connected");
    }
    
    out("POST /TestRequest HTTP/1.1", client); 
    out("Connection: close", client);
    out("Host: 192.168.1.100:1400", client);
    out("Content-Length: 1");
    out("Content-Type: text/xml; charset=\"utf-8\"", client);
    out("");
    out("1");

    while (client.available()) {
      char inChar = client.read();
      Serial.print(inChar);
    }

    Serial.println("done!");
  
  } else {
    if (debug) {
      Serial.println("connection failed");
    }
  }
  client.stop();
}

Does what you do get back match what was sent by the server? The content length value may not accurately match the number of bytes sent, depending on encoding and other factors.

Found the issue! Needed to respond back with a 200... otherwise, the device terminated the connection.