I'm getting strange numbers in the return from AT+CIPSEND, but only when using a SSL connection.
After AT+CIPSEND I get SEND OK and the first +IPD with a size, then the headers. With a non-SSL connection the headers finish with a blank line and then the html starts. With SSL connections I get a 4 digit hex number after the headers, then a blank line. It's messing up the +IPD data counts some of the time. Then at the end of the html there is another number 0 on its own line. This does not occur for smaller websites where the first +IPD size covers the headers and html data.
AT version:1.1.2.0(f045c0c - Aug 30 2018 04:20:47)
SDK version:v3.0.3
compile time:Sep 4 2018 08:57:33
Bin version(Wrover32):1.1.2
Example from google.com SSl connection
Tx AT+CIPSTART="SSL","google.com",443
Rx CONNECT
Rx
Rx OK
Tx AT+CIPSEND=42
Rx
Rx OK
Tx GET / HTTP/1.1.Host: www.google.com
Rx
Rx >
Rx Recv 42 bytes
Rx
Rx SEND OK
Rx
+IPD +IPD,1401: length 1401
Rx HTTP/1.1 200 OK.
Rx Date: Sat, 02 Mar 2019 21:21:36 GMT <- start of headers
... (headers)
Rx Transfer-Encoding: chunked
Rx <- end of headers
Rx 5afb <- what is this?????????????????????????????????????????
<!doctype html><html itemscope="" itemtype="http://schema.
... (many lines of html)
Rx </body></html>
Rx <- blank line
Rx 0 <- what is this?????????????????????????????????????????
Rx <- blank line
Strange number is AT firmware GET replies using SSL
-
- Posts: 9764
- Joined: Thu Nov 26, 2015 4:08 am
Re: Strange number is AT firmware GET replies using SSL
HTTP 1.1 uses chunked encoding by default: https://en.wikipedia.org/wiki/Chunked_transfer_encoding . If you don't want this, either turn encoding off using a header or so, or request using 'GET / HTTP/1.0'.
Re: Strange number is AT firmware GET replies using SSL
Thank you for the reply. Switching to HTTP/1.0 removed the chunks.
Also if I look in the HTTP/1.1 headers for google, I see Transfer-Encoding: chunked
Also if I look in the HTTP/1.1 headers for google, I see Transfer-Encoding: chunked
Who is online
Users browsing this forum: mikl604 and 130 guests