ESP=12 module can't load my website; loads others just fine ("THIS IS AWKWARD" error)

software development

#1

I’m using an ESP-12 module to try to load my index.html with AT commands.

The following request to google works fine:
AT+CIPSTART=“TCP”,“google.com”,80
AT+CIPSEND=19
GET /index.html

Requesting from my own site returns a “WELL THIS IS AWKWARD” error from Dreamhost’s servers:
AT+CIPSTART=“TCP”,“slredux.com”,80
AT+CIPSEND=19
GET /index.html

However, my site loads fine in the browser.

Thanks!


#2

What you’re sending isn’t a valid HTTP 1.1 request. (It’s being parsed as HTTP 0.9, which has been obsolete for decades, and which our servers generally do not support.) An HTTP 1.1 request must include the version number, as well as the Host header; it’s also generally a good idea to include a User-Agent, e.g.

GET / HTTP/1.1
Host: example.com
User-Agent: esp8266-thingy/0.1
 

Don’t forget the blank line at the end of the request! It’s required to let the server know when you’re done sending your request.


#3

Thanks again, Andrew! I love your brain! :slight_smile: