Wifly simple server problem

Hi everybody,

I´m trying a simple server example with arduino UNO r3 + Sparkfun Wifly Shield. I´m using the sparfun library GitHub - sparkfun/WiFly-Shield: WiFly Shield -- A shield for the Roving Networks RN-52 WiFly Module.

#include <SPI.h>
#include "WiFly.h" 

char msg[128];
int letterCount = 0; 

int redPin = 3; 
int greenPin = 5; 
int bluePin = 6; 

WiFlyServer server(1050);

void setup() 
{
  pinMode(redPin, OUTPUT);  
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);

  digitalWrite(redPin, LOW); 
  digitalWrite(greenPin, LOW);
  digitalWrite(bluePin, LOW);

   WiFly.begin();
  Serial.begin(9600);  
  Serial.print("IP: ");
  Serial.println(WiFly.ip());

  server.begin();
}

void loop() 
{
  WiFlyClient client = server.available();

  int dataFlag = 0;
  int msgIsolator = 0;

  if (client) {
    boolean current_line_is_blank = true;
    boolean endOfCode = true;
    char c;

    while (client.connected()) 
    {
      if (client.available()) 
      {
        c = client.read();
        delay(10);
        if (!client.available()) {
          endOfCode = true;
        } else if (c == '\n') {
          current_line_is_blank = true;
        } else if (c != '\r') {
          current_line_is_blank = false;
          endOfCode = false;
        }

        if (msgIsolator == 1) 
        {
          recordMessage(c);
          delay(100);
        }

        if ((c == '\n' && current_line_is_blank && !client.available()) || endOfCode) 
        {

          letterCount = 0;

          endOfCode = false;

          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println();
          client.println("<html>");
          client.println("<title>RGB LED Server</title>");
          client.println("<center>");
          client.println("<form name=\"input\" action=\"\" method=\"post\">");
          client.println("<input type=\"submit\" name=\"%\" value=\"Red\" style=\"height:50px; width:150px\" >");
          client.println("</form>");

          client.println("<form name=\"input\" action=\"\" method=\"post\">");
          client.println("<input type=\"submit\" name=\"%\" value=\"Green\" style=\"height:50px; width:150px\" >");
          client.println("</form>");

          client.println("<form name=\"input\" action=\"\" method=\"post\">");
          client.println("<input type=\"submit\" name=\"%\" value=\"Blue\" style=\"height:50px; width:150px\" >");
          client.println("</form>");

          client.println("</center>");
          client.println("</html>");
        
          delay(500);//delay is very important. It gives the browser time to process requests 
          letterCount = 0;
          checkAction();
          break;
        }

        Serial.print(c);

        if (c =='%')
        {
          dataFlag = 1;
        }
          if (dataFlag == 1)
          {
            if (c == '=')
            {
              msgIsolator = 1;
            }
          }
      }
    }

  delay(100);//delay is very important 
  client.flush();
  client.stop();
  }
}

char recordMessage (char incomingMsg)
{
  //letterCount = 0;
  msg[letterCount] = incomingMsg;
  letterCount++;
  delay(100);
}

void checkAction() 
{ 
  if (msg[0] == 'R' && msg[1] == 'e' && msg[2] == 'd')
  {
    digitalWrite(redPin, HIGH);
    digitalWrite(greenPin, LOW);
    digitalWrite(bluePin, LOW);
  }

  else if (msg[0] == 'G' && msg[1] == 'r' && msg[2] == 'e')
  {
    digitalWrite(redPin, LOW);
    digitalWrite(greenPin, HIGH);
    digitalWrite(bluePin, LOW);
  }

  else if (msg[0] == 'B' && msg[1] == 'l' && msg[2] == 'u')
  {
    digitalWrite(redPin, LOW);
    digitalWrite(greenPin, LOW);
    digitalWrite(bluePin, HIGH);
  }

}

And i get the following response

POST / HTTP/1.1
Host: 192.168.1.143:1050
Connection: keep-alive
Content-Length: 7
Cache-Control: max-age=0
Accept: text/html,application+imip.n/10gi(NOl5HeC.1/Cyi--ee/.5pnddpg,,

but nothing is happening. Please help me. THX