SendToHTTP broken (fix suggested?)
Posted: 09 Sep 2018, 11:05
I'm using the 20180908 build of ESPEasy-mega, compiling with PlatformIO: normal_ESP8266_4096.
I have noticed that SendToHTTP (in a rule) does make a TCP connection to the specified host:port, but no data is actually transmitted over TCP. The command just opens a new TCP connection (Syn, Syn-Ack, Ack), then closes the connection. There is no actual HTTP request.
Could this be due to the fact the src/Commands/HTTP.c file (line 27) should read:
instead of (the current code):
(sorry, I have no idea how to report this on github, etc).
When I change the code, recompile and test, SendToHTTP seems to work fine for me...
I have noticed that SendToHTTP (in a rule) does make a TCP connection to the specified host:port, but no data is actually transmitted over TCP. The command just opens a new TCP connection (Syn, Syn-Ack, Ack), then closes the connection. There is no actual HTTP request.
Could this be due to the fact the src/Commands/HTTP.c file (line 27) should read:
Code: Select all
if (client.connect(host.c_str(), port_int) != 0) {
Code: Select all
if (client.connect(host.c_str(), port_int) != 1) {
When I change the code, recompile and test, SendToHTTP seems to work fine for me...