vishnub1626
vishnub1626

Reputation: 2093

Getting bad request response while sending data to server using the gprs connection in SIM 900

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?

Upvotes: 1

Views: 1700

Answers (1)

hlovdal
hlovdal

Reputation: 28268

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.

Upvotes: 2

Related Questions