Whilst im thinking pylon, could there also be a problem with the GSM splitting the handshake request headers to the server? Does the server need to be ready for split data or shouldnt this matter so much?
Usually a server should be prepared for that, the lower levels of the TCP stack does the re-arrangement and the application receives a stream of bytes. Arduino is also receiving a stream of bytes but the library is checking only for at least one byte available and then assumes that the whole response is received. This assumption is wrong, at least in the case of the GSM router as it seems.
Have you tried your sketch with my modification of the library code?