Skip to content

Conversation

@earlephilhower
Copy link
Owner

@earlephilhower earlephilhower commented Aug 23, 2022

Port of the ESP32 web server, with a significant refactor to allow it to work with both HTTP as well as HTTPS connections.

Started pulling in the ESP8266 examples because they included the WebServerSecure object, but there seems to be a significant API difference between the ESP8266 and ESP32 WebServer as to make it an unpleasant experience.

TODO

  • More ESP8266 compatibility
  • More examples
  • Documentation
  • Relax, once this is merged arduino-pico will be almost feature complete for most users (no comment on bugs, of course)

Insead of managing the WiFiServer/WiFiServerSecure in the same object
as the HTTP handling, split them into separate objects.  This lets
HTTP and HTTPS servers work without templates or duplicating code.
The HTTP block just gets a `WiFiClient*` and works with that to only
do HTTP processing, while the upper object handles the appropriate
server and client types.
Core could crash while Serial debugging was going on and prints were
happening from LWIP/IRQ land and the main app.
@earlephilhower earlephilhower force-pushed the webserver branch 2 times, most recently from c9faa3f to b8160d6 Compare August 23, 2022 15:05
@earlephilhower earlephilhower force-pushed the webserver branch 2 times, most recently from aca2b84 to b3577be Compare August 23, 2022 15:43
@earlephilhower earlephilhower changed the title Add WebServer and WebServerSecure, yay! Add WebServer, WebServerSecure, HTTPUpdateServer, HTTPUpdateServerSecure Aug 23, 2022
when send()ing a large buffer, the WebServer::send() call would
actually convert that buffer into a String (i.e. duplicate it, and
potential issues with embedded \0s in binary data).

Make a simple override to send(size, len) to allow writing from the
source buffer instead.
@earlephilhower earlephilhower merged commit 0edba2e into master Aug 23, 2022
@earlephilhower earlephilhower deleted the webserver branch August 23, 2022 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants