added some code to handle gcm request-response with HTTP/1.1 chunked encoding