Commit Graph

90 Commits

Author SHA1 Message Date
Harshit Malpani
2df1ba8535
docs: Update App Utils programming guide docs for ESP32P4
Re-enable protocol and ota examples for ESP32P4
2024-02-23 12:33:11 +05:30
Harshit Malpani
d85d60b76c
fix: fix esp_http_client_example build failure
Fixed the build failure of esp_http_client_example for ESP32-C6 when
build with Wi-Fi enabled
2024-01-24 10:25:11 +05:30
Harshit Malpani
102fe3a522
fix(esp_http_client): Add test case in esp_http_client example
Add a test case in esp_http_client example to test HTTP_METHOD_HEAD
with async mode
2023-12-22 16:20:24 +05:30
Harshit Malpani
8dcdcc5831
feat: Update esp_http_client example
Added test case in esp_http_client example to test digest auth
with SHA-256 algorithm
2023-12-15 11:32:57 +05:30
Marius Vikhammer
77bb19c49e ci(build): fixed/ignored warnings from unknown symbols in sdkconfig.defaults 2023-11-01 01:14:00 +00:00
Harshit Malpani
0798691bf0
fix: Fix protocols example to build without setting target
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
2023-09-20 17:50:16 +05:30
Ivan Grokhotkov
6d87100a70
feat(examples): add local components via idf_component.yml
Specifying all the dependencies (managed and local) in the manifest
makes it easier for users to see every component the example
depends on.
2023-09-19 10:38:24 +02:00
hwqchi
ebc118b24d
fix: Fixed following issues in esp_http_client examples
1. Fix potential out-of-bounds access when calling `strlen(local_response_buffer)`
   if `content_length` is greater than or equal to the length of `local_response_buffer`
   due to missing the terminator `\0` at the last character position.
2. Fix the residual data issue when the previous request is longer than the subsequent
   request while outputting the `local_response_buffer` for each request in the
   `http_rest_with_url()` function.

Signed-off-by: Harshit Malpani <harshit.malpani@espressif.com>
2023-07-24 12:17:28 +05:30
Harshit Malpani
7645723127
fix(ci): update HTTP client example tests runner assignment
HTTP client example tests now connect with locally hosted httpbin service
for more stable results across multiple runs
2023-07-21 10:55:25 +05:30
Mahavir Jain
90290507fb
fix(mbedtls): Build issue in dynamic buffer feature
Fix build issue in mbedTLS dynamic buffer feature with
`CONFIG_MBEDTLS_DHM_C` enabled case. Also added a build
configuration for the test coverage.

Closes https://github.com/espressif/esp-idf/issues/11770
2023-06-29 13:30:30 +05:30
Mahavir Jain
8d589d758e Merge branch 'ci/fix_failures_in_esp_http_client_example' into 'master'
CI: fix esp_http_client example failures in CI. Timeout was observed in the...

Closes IDFCI-1689

See merge request espressif/esp-idf!23274
2023-06-26 11:23:45 +08:00
Harshit Malpani
20ed23bcd0
CI: fix esp_http_client example failures in CI. Timeout was observed in the logs while performing HTTP requests. Changing the endpoint when testing in CI 2023-06-23 10:32:20 +05:30
hwqchi
482f6340b9 esp_http_client: Fix unsigned integer overflow
Fix unsigned integer overflow when `content_length` is -1.
The proposed change is to modify the format specifier for content_length from PRIu64 to PRId64, which will print the signed value as a 64-bit integer instead.
2023-06-21 04:42:03 +08:00
Euripedes Rocha
4778d9b477 protocols/examples: Disable Wifi connection if not supported
- Disable Kconfig option for Wifi if not supported by the SoC
- Enable building mqtt examples when target is set to esp32h2
2023-05-30 13:26:45 +02:00
David Cermak
b2af4d9689 lwip/linux: Add lwip support for networking component under linux
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
2023-05-05 05:03:39 +00:00
Harshit Malpani
7f683f0996
Remove nvs_flash.h from protocols/linux_stubs 2023-03-31 16:42:06 +05:30
Harshit Malpani
6ca69c45d4
fix esp_http_client_linux high failures in CI. Only build the esp_http_client for Linux and do not run test in CI 2023-03-23 14:34:54 +05:30
Harshit Malpani
ae403c6210
Add test for Linux in pytest_esp_http_client.py 2023-02-27 15:12:15 +05:30
Harshit Malpani
34705c0cc4
fix esp_http_client_example to build for Linux target. Made protocol_examples_common compatible for Linux target 2023-02-27 15:12:14 +05:30
Laukik Hase
167618d6a4
examples/protocols: Added URI encoding/decoding feature
- http_server/simple: Decoding received query
  - esp_http_client: Sending encoded query
2023-01-25 17:47:14 +05:30
Harshit Malpani
dd490f7915
esp_http_client example: fix potential buffer overflow while copying data recieved in HTTP response
Closes https://github.com/espressif/esp-idf/issues/10436
2023-01-20 15:05:41 +05:30
Chen Yudong
c07d237ffe examples: enable build esp32c6 for wifi and network examples 2023-01-12 14:50:06 +08:00
Harshit Malpani
5c728e94a7
Update esp_http_client example to build for linux target 2023-01-04 11:20:43 +05:30
Song Ruo Jing
7466ddfa8c ci: Make consistence between pytest_*.py and .build-test-rules.yml for esp32c6 (i.e. to pass check_test_scripts_build_test_rules.py) 2022-11-28 11:58:30 +08:00
harshal.patil
5feb4696be fix: esp_http_client fix behaviour when disable_auto_redirect is enabled 2022-10-27 14:04:54 +05:30
Fu Hanxi
c0568611dd docs: changes docs supported targets tables 2022-07-14 08:26:32 +08:00
Harshit Malpani
83ace52a36 http examples pytest migration 2022-06-03 16:00:52 +05:30
Michael (XIAO Xufeng)
f7be540222 ci: partially enable example build for esp32c2 2022-06-02 14:17:31 +08:00
Djordje Nedic
facab8c5a7 tools: Increase the minimal supported CMake version to 3.16
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.
2022-06-01 06:35:02 +00:00
Shubham Kulkarni
7059ea0895 esp_http_client example: Add cert for redirect to HTTPS example
esp_http_client_test.py: Add checks for missing example logs
2022-04-22 17:39:12 +05:30
Laukik Hase
f9da23edb9 http_client: Added explicit conversion for esp_tls_error_handle_t
- in protocols/esp_http_client example

Closes https://github.com/espressif/esp-idf/issues/8795
2022-04-22 03:42:49 +00:00
Mahavir Jain
021f545f0d examples: add dependency on cert bundle configuration
Refactor examples to build with MBEDTLS_CERTIFICATE_BUNDLE disabled. Only examples
that can work with certificate bundle disabled have been modified here.
2022-04-06 05:10:43 +00:00
Shubham Kulkarni
8199f711a2 examples/esp_http_client: Use dl.espressif.com URL for performing request with Range header
esp_http_client_test.py: Add check for range request log
2022-02-25 10:29:17 +05:30
yuanjm
a3105a950b esp_http_client: Fix memory leak in esp_http_client_example
Closes https://github.com/espressif/esp-idf/issues/8346
2022-02-09 17:35:02 +08:00
Laukik Hase
ca84d2d6c9 esp_http_client: Added event for HTTP redirect
- Allows users to manually intercept and process the HTTP redirection
 when disable_auto_redirect (from the esp_http_client handle) is set to true

Closes https://github.com/espressif/esp-idf/issues/8029
2022-01-12 11:40:32 +05:30
Roland Dobai
766aa57084 Build & config: Remove leftover files from the unsupported "make" build system 2021-11-11 15:32:36 +01:00
Shubham Kulkarni
5bf49e1cd6 esp_http_client: Support handling larger content lengths
Closes https://github.com/espressif/esp-idf/issues/6580
2021-10-29 18:14:22 +08:00
Sven Fuchs
37da873da9 Fetch headers in POST example for native requests
In the POST section of `http_native_request` headers are not fetched. thus, just commenting out the GET request example would result in a `status` and `content_length` of `0` being reported (quite confusing).

(Plus, it should log `HTTP POST Status` here, instead of `HTTP GET Status`.)

Merges https://github.com/espressif/esp-idf/pull/7696
2021-10-19 11:25:49 +08:00
Jakob Hasse
81e9266204 [examples]: removed hyphens
Replaced hyphens with underscores in examples
project definition for all examples which had
hyphens in their project name. dpp-enrollee is
an exceptions because the name matches the
project directory name while the project
directory also contains hyphens.
2021-10-09 13:58:24 +08:00
Harshit Malpani
933989125d Update example test for esp_http_client 2021-10-05 16:58:23 +08:00
Harshit Malpani
3203b42c87 Updated the root certificate of https examples 2021-10-01 13:02:48 +05:30
Akihiro YAMAZAKI
24225e5c16 examples/esp_http_client: output_buffer isn't necessarily NUL-terminated
Closes https://github.com/espressif/esp-idf/pull/6927
Closes IDFGH-5150
2021-05-10 05:45:59 +00:00
Aditya Patwardhan
f66bdf1233 esp_http_client: Enable support of crt_bundle in esp_http_client 2021-04-07 05:31:21 +00:00
Aditya Patwardhan
81b96ec06b Fix esp_http_client example: Set proper server verification by adding the postman root cert for https_async demo
test case.
2021-04-07 05:31:21 +00:00
Shubham Kulkarni
4f6e0c1d27 esp_http_client: Add config option for HTTP Digest auth 2021-03-23 11:58:35 +05:30
Mahavir Jain
d34acd0d82
examples/protocols: update www.howsmyssl.com certificate to fix test failures 2021-01-29 19:06:24 +05:30
Fu Hanxi
0146f258d7 style: format python files with isort and double-quote-string-fixer 2021-01-26 10:49:01 +08:00
Shubham Kulkarni
60749b5483 esp_http_client example: Update example to demonstrate partial HTTP downloads 2020-12-03 09:39:16 +00:00
He Yin Ling
a908174c06 test: remove fake binary size check in example test:
the binary size check in example test was removed long time ago. Now we
have updated ttfw_idf to raise exception when performance standard is
not found. These fake performance check will be regarded as error.
Remove them now.
2020-11-24 17:53:33 +08:00
Shubham Kulkarni
83f4ebf852 esp_http_client: Skip check for redirection counter if status code is success.
Set disable_auto_redirect in esp_http_client example to validate this condition in CI
2020-11-19 14:43:14 +05:30