Protocol examples used to raise an error if the target was not set
and `idf.py build` command was used. This commit fix this error
and when IDF_TARGET is not set, ESP32 is selected as default target
This commit adds support for handling multiple requests simultaneously by introducing two new functions: `httpd_req_async_handler_begin()` and `httpd_req_async_handler_complete()`. These functions allow creating an asynchronous copy of a request that can be used on a separate thread and marking the asynchronous request as completed, respectively.
Additionally, a new flag `for_async_req` has been added to the `httpd_sess_t` struct to indicate if a socket is being used for an asynchronous request and should not be purged from the LRU cache.
An example have been added to demonstrate the usage of these new functions.
Closes https://github.com/espressif/esp-idf/issues/10594
Signed-off-by: Harshit Malpani <harshit.malpani@espressif.com>
linux/lwip: Wrap some IO posix functions
* to workaourd the FreeRTOS EINTR issue (when building without lwip)
* to correctly choose the sub-system based on fd (when building with
lwip) -- passing control to either linux/system or to lwip
This commit also addapts tapio-if to provide DHCP client by default and
configurable settings for static IP
This updates the minimal supported version of CMake to 3.16, which in turn enables us to use more CMake features and have a cleaner build system.
This is the version that provides most new features and also the one we use in our latest docker image for CI.
This commit updates the visibility of various header files and cleans up
some unnecessary inclusions. Also, this commit removes certain header
include paths which were maintained for backward compatibility.
* Move filesystem mounting code into a separate file to simplify the
main source file.
* Clean up SDMMC and SDSPI related code. Move pin configuration into
Kconfig.
* Use same base_path ('/data') for either SPIFFS or SD. Remove the
check in file_server.c about the base path.
* Update README according to the changes above.
Feature note: Sets up a simple DNS server that answers all questions with the ESP softAP's IP as well as a HTTP server which redirects all requests to a captive portal welcoming page.
Triggers captive portal detection (log-in screen popup) for iOS, Android and Windows.
Includes example test for testing DNS redirect and HTTP redirect.
Closes https://github.com/espressif/esp-idf/issues/7099
Closes https://github.com/espressif/esp-idf/issues/4075
Now the uri handler gets called immediately after the handshake. In the handler we can identify that this was the handshake by checking req->method as it is still a GET from the first part of the handshake the client has sent. On a normal websocket-frame-receive (when normally a websocket uriHandler gets called) this field is set to 0
Closes https://github.com/espressif/esp-idf/issues/6597
Because this is the 'simple' server example, it is probably where users will start out to understand the HTTP Server API; and also where they might come if they are having problems.
So I think it is useful to explain to users what to do if they see "httpd_parse: parse_block: request URI/header too long", which can easily happen if they submit a POST from an HTML form (for example). That certainly would have helped me!
Merges https://github.com/espressif/esp-idf/pull/6547
Signed-off-by: Shubham Kulkarni <shubham.kulkarni@espressif.com>