1

I am trying to establish a connection with server using SIM 900 modem.

at+cgdcont=1,"IP","airtelgprs.com" OK
at+cstt="airtelgprs.com","","" OK
at+ciicr OK
at+cifsr 100.67.249.40
at+cipstatus OK
STATE: IP STATUS
at+ciphead=1 OK
at+cipstart="tcp","mydomain.com","80"OK
CONNECT OK
at+cipsend
> GET http://mydomain.com/test=vts
Host:www.mydomain.com
Accept:*/*
Accept-Language:en-us
Connection:Keep-Alive

SEND OK

These are the commands that I have used with the responses. Everything is working fine. But all i am getting from the server is a 403 Bad Request response. I have tried to connect with some other domains also. All of them are giving the same Bad Request response.

Is there any problem with the HTTP Header request I am using?

vishnub1626
  • 2,063
  • 2
  • 14
  • 14

1 Answers1

2

The request line should end with a http version, e.g.

GET http://mydomain.com/test=vts HTTP/1.1

The syntax is

Request-Line = Method SP Request-URI SP HTTP-Version CRLF

according to RFC2616.

Community
  • 1
  • 1
hlovdal
  • 26,565
  • 10
  • 94
  • 165