EtherTen and Webserver

So take a look at the following shortened code from loop()

void loop() {
  Events.loop();
  EthernetClient client = server.available();
//  boolean currentLine = true;
  while (client.connected()) {
    if (client.available()) {
      char c = client.read();
      Serial.write(c);
      if (c == '\n' /* && currentLine */) {
        // send data
      }
/*      if (c == '\n') {
        // you're starting a new line
        currentLine = true;
      } 
      else if (c != '\r') {
        // you've gotten a character on the current line
        currentLine = false;
      } */
    }
  }
  // give the web browser time to receive the data
  delay(1000);
  // close the connection:
  client.stop();
  Serial.println("client disconnected");
}

I have no idea about the purpose of currentLine, but the behaviour you described fits the code. Just modify your code by commenting out all functionality of currentLine and see if it works like you want. At the moment data is send whenever a '\n' is received ignoring all other received data.

In the end you still have to write some code to evaluate received commands.