arduino-esp32/libraries/WebServer/examples
Tim 29455a0447
Fix issue #5507 "Constructor WebServer::WebServer(IPAddress addr, int… (#5509)
* Fix issue #5507 "Constructor WebServer::WebServer(IPAddress addr, int port) produces an unexpected result"

"The class Webserver is declared with two explicit constructors, one with signature:
WebServer::WebServer(IPAddress addr, int port)
Using this results in a server listening on the port number obtained by converting the value of the IPAddress addr argument (in host byte order) to a uint32_t and then to a uint16_t, which is manifestly not the result that would be expected.
...
As for a fix, we can assume from these results that this constructor is not being used and therefore could simply be deleted."

* Issue 5507
Reverse changes in commit bee1e7088cef913391155f096b42cd4bb89c5c6f after discussion.
Alternative fix to be done.

* Fix issue #5507 "Constructor WebServer::WebServer(IPAddress addr, int port) produces an unexpected result"

This change adds support for multi-homed servers to libraries/WiFi.  It was assumed to be there already by libraries/WebServer, but was not.
This led to unexpected results when the IP address-specific constructor of class WebServer was used (see issue 5507).

This change was tested using three concurrent instances of WebServer, one bound to the WiFi station address, one bound to the WiFi soft AP address,
and one bound to INADDR_ANY.  See libraries/WebServer/examples/MultiHomedServers for the test method.

* Fix issue #5507 "Constructor WebServer::WebServer(IPAddress addr, int port) produces an unexpected result" (cont.)
This fixes what I think might be the cause of CI failures on GitHub for the previous commit, namely the absence of an include file
in examples/MultiHomedServers.

* Fix issue #5507 "Constructor WebServer::WebServer(IPAddress addr, int port) produces an unexpected result" (cont.)

Change port numbers in examples/MultiHomedServers per pull-request comment from me-no-dev ...
"for this test to be valid, both servers should be on the same port. That is how you can make sure that the functionality works."
2021-08-23 15:51:06 +03:00
..
AdvancedWebServer Use HTTP method table from ESP-IDF's nghttp (#4900) 2021-03-05 13:40:52 +02:00
FSBrowser [2.0.0] FS::name() returns the item name as in Arduino SD (#4892) 2021-04-15 17:25:01 +03:00
HelloServer Use HTTP method table from ESP-IDF's nghttp (#4900) 2021-03-05 13:40:52 +02:00
HttpAdvancedAuth Use HTTP method table from ESP-IDF's nghttp (#4900) 2021-03-05 13:40:52 +02:00
HttpBasicAuth Use HTTP method table from ESP-IDF's nghttp (#4900) 2021-03-05 13:40:52 +02:00
MultiHomedServers Fix issue #5507 "Constructor WebServer::WebServer(IPAddress addr, int… (#5509) 2021-08-23 15:51:06 +03:00
PathArgServer Use HTTP method table from ESP-IDF's nghttp (#4900) 2021-03-05 13:40:52 +02:00
SDWebServer [2.0.0] FS::name() returns the item name as in Arduino SD (#4892) 2021-04-15 17:25:01 +03:00
SimpleAuthentification Use HTTP method table from ESP-IDF's nghttp (#4900) 2021-03-05 13:40:52 +02:00
WebUpdate Use HTTP method table from ESP-IDF's nghttp (#4900) 2021-03-05 13:40:52 +02:00