Serial.println(client.read());
That line consumes the first character of the connection. Is that what your intention is?