From 41aafe05ae7baab132743fe2e0b866c28c533a81 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 12 Nov 2018 10:20:30 +0100 Subject: [PATCH] Change command WebSend Change command WebSend Host header field from IP address to hostname (#4331) --- sonoff/_changelog.ino | 1 + sonoff/xdrv_01_webserver.ino | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index f664eb7a6..ce35adbe0 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -1,6 +1,7 @@ /* 6.3.0.7 20181111 * 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) + * Change command WebSend Host header field from IP address to hostname (#4331) * * 6.3.0.6 20181110 * Change GUI Configure Module by using AJAX for data fetch to cut page size (and memory use) by 40% diff --git a/sonoff/xdrv_01_webserver.ino b/sonoff/xdrv_01_webserver.ino index 74e6d32f6..6f99b30a1 100644 --- a/sonoff/xdrv_01_webserver.ino +++ b/sonoff/xdrv_01_webserver.ino @@ -1950,7 +1950,8 @@ int WebSend(char *buffer) String url = F("GET /cm?"); url += uri; 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) { url += F(" \r\n Port: "); url += port;