Tags: remy/next-http
Tags
connection: keep-alive Instead of requesting the connection: close - which it appears some ESPs will close the connection during buffering the uart data, now we request with connection: keep-alive and manually close the TCP connection when we're done. This is achieved by parsing the http headers, looking for content-length converting the value to a 32bit value, then subtracting the chunks we get from the uart until the length reaches zero. Chunked encoding is still going to be a problem because the bytes include "metadata" that says how much data we've got in a chunk so the length won't match the number of bytes coming down, but chunked encoding wasn't supported yet anyway, so it's still an open issue. This has been tested on AT versions: - 1.1.0.0 - 1.2.0.0 - 1.3.0.0 - 1.6.0.0 (which had the problem in the first place)
PreviousNext