I try to HTTP GET from two websites using IcomSat Sim900 and
One website works nicely and the other returns response with missing characters. Do you have any idea why I get the response with the missing characters?
Website with missing characters response:
http://osv.dti.dk/log/aapi/temp001
gsm.begin(9600);
if (gsm.attach("internet", "", "")) {
if (gsm.connect("osv.dti.dk", 80)) {
gsm.println("GET /log/aapi/temp001 HTTP/1.0");
gsm.println("Host: osv.dti.dk");
gsm.println();
gsm.flush();
while (gsm.connected()) {
if (gsm.available()) {
Serial.write(gsm.read());
}
}
Serial.println("------");
gsm.stop();
}
}
Response:
HTTP/1.1 200 OK
Cache-Control: privatey-skillz: being AWESOME!
X-Powered-By: ASP.NET
Date: Fri, 22 Aug 2014 11:32:10 GMT
Connection: clos
Website with OK response:
http://musicope.com/test.txt
Code:
if (gsm.connect("musicope.com", 80)) {
gsm.println("GET /test.txt HTTP/1.0");
gsm.println("Host: musicope.com");
Response:
HTTP/1.1 200 OK
Date: Fri, 22 Aug 2014 g 2014 11:28:11 GMT
ETag: "d00d6a-4-5013621d99c11"
Accept-Ranges: by close
Content-Type: text/plain
test