Xport fetch woes !!

Argh, I have been working on this for days and no one seems to be able to help. I need to fetch a small amount of data from a webservice. This fetch includes the headers and a small 7 character string. I am working on fetching the cookie out of the header right now but the damn device is acting erratic . I really need help on this, some one please take a look. Thank you.

*** Channel 1
Baudrate 9600, I/F Mode 4C, Flow 00
Port 10001
Connect Mode : C5
Send '+++' in Modem Mode enabled
Show IP addr after 'RING' enabled
Auto increment source port disabled
Remote IP Adr: 216.22.xxx.xxx, Port 00080
Disconn Mode : 00
Flush   Mode : 33
#include <NewSoftSerial.h>
#include <AF_XPort.h>
#include <stdio.h>
#include <avr/io.h>
#include <string.h>

#define cookieLength 256

#define GET_WITH_HEADERS ("GET /community.bizblog.ticketq.TicketQ/ticketQStatus HTTP/1.1\nHost: 172.16.100.200\n\n")      
#define  GET_WITHOUT_HEADERS ("GET /community.bizblog.ticketq.TicketQ/ticketQStatus HTTP/1.1\nHost: 172.16.100.200\nCookie: JSESSIONID=")                          

char linebuffer[256]; // large buffer for storing data

char cookie[cookieLength]; // the cookie
char stringReturn[7];

#define XPORT_RESETPIN 2  //reset xport
#define XPORT_TXPIN  3    //serial tx
#define XPORT_RXPIN  4    //serial rx
#define XPORT_DTRPIN 5    //internet connection ended signal from xport
#define XPORT_CTSPIN 6    //used by arduino to stop xport overwhelming it with data
#define XPORT_RTSPIN 7    //signal for more data available... not used

AF_XPort xport = AF_XPort(XPORT_RXPIN, XPORT_TXPIN, XPORT_RESETPIN, XPORT_DTRPIN, XPORT_RTSPIN, XPORT_CTSPIN);

void setup()  
{
  Serial.begin(9600);
  xport.begin(9600);
  xport.reset();
  delay(1000);
  Serial.println("QueueBot 5000"); 
  Serial.println("Finished Setup...");
}

char * getCookie()
{
  char *found=0, *start=0, *end=0;
  xport.flush(300);
  
  xport.print(GET_WITH_HEADERS);      

  int numCharsRead = 0;
  int StartChar = 0, endCard=0;

   do
    {
        numCharsRead = xport.readline_timeout( linebuffer, 255, 2000 );  
        found = strstr(linebuffer, "JSESSIONID=");
      if (((int)found) != 0)
      {
        start = strstr(found, "=");
        end = strstr(found, ";");
        if ((start != 0) && (end != 0))
        {
          Serial.println("\n******Found Cookie!*******");
          end[0] = '\0';
          strncpy(cookie, found, 37);
          cookie[cookieLength-1] = 0;
        }
      }   
  } while ( numCharsRead > 0 );
  
 linebuffer[numCharsRead] = '\0';
 return(cookie);
}


void loop()
{
char* cookie = getCookie();
Serial.println("   ** mainLoop ** ");
Serial.print("Cookie: ");
Serial.println(cookie);
}

And here are the results I am getting,

 JSESSIOQueueBot 5000
Finished Setup...

******Found Cookie!*******
   ** mainLoop ** 
Cookie: JSESSIONID=58306ebc055d9db2748e514065

******Found Cookie!*******
   ** mainLoop ** 
Cookie: JSESSIONID=583020a35c13beea758a6a1025

******Found Cookie!*******
   ** mainLoop ** 
Cookie: JSESSIONID=583041b03f5255d3b9c56774a1

******Found Cookie!*******
   ** mainLoop ** 
Cookie: JSESSIONID=583015dca19bbe36f15726541e

******Found Cookie!*******
   ** mainLoop ** 
Cookie: JSESSIONID=5830e0096d25a28228146e3037
   ** mainLoop ** 
Cookie: JSESSIONID=5830e0096d25a28228146e3037
   ** mainLoop ** 
Cookie: JSESSIONID=5830e0096d25a28228146e3037
   ** mainLoop ** 
Cookie: JSESSIONID=5830e0096d25a28228146e3037

******Found Cookie!*******
   ** mainLoop ** 
Cookie: JSESSIONID=5830bf9ccf15676c3c8a275b61
   ** mainLoop ** 
Cookie: JSESSIONID=5830bf9ccf15676c3c8a275b61

******Found Cookie!*******

You will see it works fine for three of four fetches and then it starts repeating values. Any help on this would be great, below is an example GET done via telnet of an ideal fetch which I will be parsing.

Connected to xxxxxxx.xxxxxx.net.
Escape character is '^]'.
GET /community.bizblog.ticketq.TicketQ/ticketQStatus HTTP/1.1
Host: 192.156.6.6 

HTTP/1.1 200 OK
Date: Wed, 17 Jun 2009 01:40:46 GMT
Server: Apache
Set-Cookie: JSESSIONID=58308377bb904cd147aa3d3d661968502279;path=/
Connection: close
Transfer-Encoding: chunked
Content-Type: text/plain; charset=UTF-8

6
RoYoGo    [b] <---- This is the string I will be parsing[/b]
0

Connection closed by foreign host.
dyer:~ dyer$

Thanks again for any help you guys can give me !!!

Regards,

John