Change command WebSend

Change command WebSend Host header field from IP address to hostname (#4331)
This commit is contained in:
Theo Arends 2018-11-12 10:20:30 +01:00
parent c0cfdde8ac
commit 41aafe05ae
2 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,7 @@
/* 6.3.0.7 20181111 /* 6.3.0.7 20181111
* Fix wifi connection errors using wifi disconnect and ESP.reset instead of ESP.restart * Fix wifi connection errors using wifi disconnect and ESP.reset instead of ESP.restart
* Fix Sonoff Pow R2 and Sonoff S31 Serial interface hang caused by Sonoff Basic R2 driver delay implementation (and possibly core bug) * Fix Sonoff Pow R2 and Sonoff S31 Serial interface hang caused by Sonoff Basic R2 driver delay implementation (and possibly core bug)
* Change command WebSend Host header field from IP address to hostname (#4331)
* *
* 6.3.0.6 20181110 * 6.3.0.6 20181110
* Change GUI Configure Module by using AJAX for data fetch to cut page size (and memory use) by 40% * Change GUI Configure Module by using AJAX for data fetch to cut page size (and memory use) by 40%

View File

@ -1950,7 +1950,8 @@ int WebSend(char *buffer)
String url = F("GET /cm?"); String url = F("GET /cm?");
url += uri; url += uri;
url += F(" HTTP/1.1\r\n Host: "); url += F(" HTTP/1.1\r\n Host: ");
url += IPAddress(host_ip).toString(); // url += IPAddress(host_ip).toString();
url += host; // https://tools.ietf.org/html/rfc7230#section-5.4 (#4331)
if (port) { if (port) {
url += F(" \r\n Port: "); url += F(" \r\n Port: ");
url += port; url += port;