Getting TCP connection error

In my application ,I have to send gps data to server but i am trying to send some data initially to server(first step),I have tried as below ,but when sending data without giving end of pattern ,connection is closing immediately as below…how do i solve the problem .please help me anyone

AT+KCNXCFG=0,“GPRS”,“internet”,"","",“0.0.0.0”,“0.0.0.0”,“0.0.0.0”
OK
AT+KCNXTIMER=0,60,2,70
OK
AT+KCNXPROFILE=0
OK
AT+CGATT=1
OK
AT+KTCPCFG=0,0,“www.facebook.com”,80,1 //suppose consider facebook as server
+KTCPCFG: 1
OK
AT+KTCPACKINFO=1
+KTCPACKINFO: 1,2
OK
at+kpattern="#"
OK
AT+KTCPCNX=1
OK
AT+KTCPSND=1,20
CONNECT // After connect I am unable to send data (giving ok response after 1 or 2 seconds ) and not able to see the data which i am sending
OK
+KTCP_NOTIF: 1,6 //generic error
+KTCP_DATA: 1,1300
at+ktcprcv=1,400
CONNECT
HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=utf-8
Date: Sat, 22 Nov 2014 09:48:34 GMT
Connection: close
Content-Length: 3121

           <html lang="en" id="facebook">
                                           <head>
                                                     <title>Facebook | Error</title>
        <meta charset="utf-8">
                                  <meta http-equiv="cache-control" content="no-cache">
          <meta http-equiv="cache-control" content="no-store">
                                                                  <meta http-equiv=#

OK
+KTCP_DATA: 1,900
at+ktcpackinfo=1
+KTCPACKINFO: 1,2
OK
at+ktcpsnd=1,45
CONNECT
OK
+KTCP_NOTIF: 1,6 // generic error
+KTCP_ACK: 1,0 //data sent failure
at+ktcpstat=1
+KTCPSTAT: 3, -1, 0, 900
OK