While I don't see it in RFC 7230, some web services seem to deliver an
explicit t-e header even with the default identity mapping. If seen,
let it pass.
Found & fixed by M. Guenther
* Rewrite HTTPClient chunked transfer-encoding
Fixes#3029
The chunked decoder seems to have had some race conditions resulting in
lost data.
The HTTPClient::getStreamPtr returned the raw WiFiClient which included
all of the chunked block size markers, requiring the user to manually
parse the chunked encoding.
Remove the existing chunked handling, add a HTTPStream as a WiFiClient
subclass. The HTTPClient will return this HTTPStream which will always
properly cut out chunk markers when present (and pass things raw for
non-encoded streams). Use this new HTTPStream class to replace the
existing handling in HTTPClient
Update the fingerprint in the StreamHTTPSClient example because their
cert was updated.
* Astyle
* Add block write passthru
* Add other WiFiClient passthru calls
Enable use of wired Ethernet modules as first-class LWIP citizens. All
networking classes like MDNS, WebServer, HTTPClient, WiFiClient, and OTA
can use a wired Ethernet adapter just like built-in WiFi.
Two examples updated to show proper use.
Uses the Async Context support built into the Pico SDK. When running on the
Pico it will use the CYW43 async instance.
Uses modified wired Ethernet drivers, thanks Nicholas Humfrey!
Note, the classic, non-LWIP integrated `Ethernet` and related libraries
should still work fine (but not be able to use WebServer/HTTPS/etc.)
Fixes#775
* Add HTTP-parser lib to support ESP32 WebServer
* Add WebServer from ESP32. Only supports HTTP
* Separate HTTP server from the network server
Instead 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.
* Add HTTPS server
* Clean up some THandlerFunction refs
* Refactor into a template-ized WebServer/WebServerSecure
* Add DNSServer examples which need WebServer
* Fix CoreMutex infinite recursion crash
Core could crash while Serial debugging was going on and prints were
happening from LWIP/IRQ land and the main app.
* Add HTTPUpdateServer(Secure)
* Add MIME include, optimize WebServer::send(size,len)
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.
* Fix WiFiClient::send(Stream), add FSBrowser example
Remove the need to have a separate WiFiClient that's destroyed after
the HTTPClient. Let the object handle its own client, and pass through
any SSL requests.
Also supports the original ::begin methods which need a
WiFiClient(Secure) to be passed in and managed by the app.