100 Commits

Author SHA1 Message Date
nilesh.kale ba308b6d76 fix(esp_https_ota): handle ota resumption if server dosent support range requests
This commit added check to see if server supports range requets,
and fallback to OTA without resumption accordingly.

Closes https://github.com/espressif/esp-idf/pull/17960
2026-02-09 13:48:48 +05:30
Ashish Sharma 1db7fac8da feat(esp_http_client): adds support to save response headers
Closes https://github.com/espressif/esp-idf/issues/17695
2026-01-28 10:20:47 +08:00
Ashish Sharma a7abc3b8e8 feat(esp_http_client): adds API to get transport socket 2026-01-21 17:04:13 +08:00
nilesh.kale 709b869a34 feat(esp_https_ota): Support partial downloading of OTA over single connection
This commit added support to download OTA with partial download feature
over single HTTP connection if server supports persistent connection.
2025-10-10 15:42:47 +05:30
nilesh.kale 845275c6f1 fix(esp_http_client): fix dispatching of finish event condition
This commit updates the condition for dispatching of FINISH event.
With this, FINISH event will be dispatched after complete data is read.

Closes https://github.com/espressif/esp-idf/issues/17437
2025-09-11 14:18:28 +08:00
nilesh.kale 2d437a6d9a fix(esp_http_client): fixed documentation for API esp_http_client_set_post_data()
Closes https://github.com/espressif/esp-idf/issues/17053
2025-08-28 14:55:55 +05:30
Mahavir Jain 47a659cd3e Merge branch 'contrib/github_pr_17429' into 'master'
docs(esp_http_client): document default timeout behaviour (GitHub PR)

See merge request espressif/esp-idf!41363
2025-08-25 10:21:53 +05:30
Mahavir Jain 05e149ea78 Merge branch 'feature/add_ecdsa_p384_support_and_testcases' into 'master'
feat: add ecdsa-p384 testcases and relative support for ESP32C5 ECO2

Closes IDF-13008 and IDF-12630

See merge request espressif/esp-idf!38857
2025-08-14 12:33:25 +05:30
Mahavir Jain 71d3492124 Merge branch 'fix/handle_error_and_dispatch_event_while_reading_data_from_server' into 'master'
feat(esp_http_client): handle error while reading data from server

Closes IDF-13454

See merge request espressif/esp-idf!40544
2025-08-14 11:27:36 +05:30
Richard Allen 69404c8d83 docs(esp_http_client): document default timeout behaviour 2025-08-13 10:07:38 -05:00
nilesh.kale 9984cc4aab feat(esp_http_client): added new HTTP state HTTP_STATE_CONNECTING and change state flow
This commit added new http state HTTP_STATE_CONNECTING, and made states public.
Also added public API to get current state.
Updated state flow in esp_http_client_perform()

Closes https://github.com/espressif/esp-idf/issues/16019
2025-08-12 17:30:38 +05:30
nilesh.kale dedc9889de feat: added config member to store block number for hign part of ecdsa key 2025-08-11 16:01:10 +05:30
nilesh.kale 08e781c876 feat: added new config member to provide ecdsa curve type 2025-08-11 16:01:09 +05:30
nilesh.kale 68f06a94bd feat: add ecdsa-p384 testcases and relative support for ESP32C5 ECO2
This commit adds testcases in crypto/hal and mbedtls testapps.
2025-08-11 16:01:01 +05:30
nilesh.kale 73d8ad9083 feat(esp_http_client): handle error while reading data from server
This commit updated API esp_http_cleint_perform() to handle error and
dispatched error  event if any error occured whiling reading data from server.
2025-08-11 16:39:22 +08:00
nilesh.kale 2db4bcf87d feat(esp_http_client): move partial download related code under config
This MR added an menuconfig option to enable partial download feature.
2025-08-05 17:38:10 +05:30
nilesh.kale 5cc874068d feat(esp_http_client): added event HTTP_EVENT_ON_STATUS_CODE
This commit added event HTTP_EVENT_ON_STATUS_CODE and
acquire response status code before header or data.
2025-07-08 17:45:18 +05:30
Mahavir Jain 5aff8a9d11 Merge branch 'bugfix/ota_failing_for_aws_signed_url_with_partial_download_enabled' into 'master'
fix(esp_http_client): Fix OTA failure with partial download enabled

Closes IDF-12590

See merge request espressif/esp-idf!37843
2025-07-01 09:39:52 +05:30
nilesh.kale caf828dfaf fix(esp_http_client): Fix OTA failure with partial download enabled
This commit fixes an issue encountered during OTA when partial download
is enabled using an AWS signed URL restricted to GET requests.
It also adds an API to retrieve the OTA image size from the Content-Range header.
2025-06-30 11:18:26 +05:30
Richard Allen 561b325a0d docs(esp_http_client): fix chunky function name 2025-06-27 14:55:55 -05:00
Mahavir Jain a8bf745f23 Merge branch 'feat/adding_different_strategy_to_perform_tls_using_dynamic_feature' into 'master'
Add configuration to control dynamic buffer strategy in mbedtls

Closes IDF-12591

See merge request espressif/esp-idf!39469
2025-06-12 09:52:35 +05:30
hrushikesh.bhosale 5928a87aa7 feat(mbedtls): Add configuration to control dynamic buffer strategy in mbedtls
Problem:
1. In low-memory scenarios, the dynamic buffer feature can fail due to memory fragmentation.
2. It requires a contiguous 16KB heap chunk, but continuous allocation and deallocation of
the RX buffer can lead to fragmentation.
3. If another component allocates memory between these operations, it can break up the
available 16KB block, causing allocation failure.

Solution:
1. Introduce configurable strategy for using dynamic buffers in TLS connections.
2. For example, convert RX buffers to static after the TLS handshake.
3. Allow users to select the strategy via a new field in the esp_http_client_cfg_t structure.
4. The strategy can be controlled independently for each TLS session.
2025-06-05 12:43:47 +05:30
Richard Allen 30758d9beb feat(esp_http_client): Event to signal last header download
When parsing ND-JSON streams, this is needed to indicate the
point when the ND-JSON stream is considered open, which
occurs just after the last HTTP_EVENT_ON_HEADER.

ND-JSON stream clients cannot rely on the first HTTP_EVENT_ON_DATA,
since that is only triggered by an event, which are optional and
may never be sent, or only sent well after the last HTTP_EVENT_ON_HEADER.

Closes #15952
2025-05-28 08:50:28 -05:00
Mahavir Jain f229a84578 Merge branch 'contrib/github_pr_15968' into 'master'
docs(esp_http_client): update return codes for open & perform (GitHub PR)

See merge request espressif/esp-idf!39239
2025-05-21 13:23:05 +05:30
Richard Allen a0f085d012 docs(esp_http_client): update return codes for open & perform
Extend the return code section to include async return values.
2025-05-16 08:55:08 -05:00
hrushikesh.bhosale 846a5c42ae feat(esp_http_client): Allow the DER certificates in esp_http_client
- esp_http_client support just PEM ca_cert and client_cert.
- Although esp_tls supports both PEM and DER certificate. We have logic
based on cert_len and client_cert_len which decides whether given cert or client_cert
is in PEM or DER format.
- If length is 0 then it is PEM certificate and if length is passed then DER is
considered. This is true for both ca_cert and client_cert

This commits allow to pass the DER certificate in esp_http_client
2025-04-23 19:59:39 +08:00
Mahavir Jain 89a96905c4 fix(esp_https_ota): handle invalid range condition for OTA resumption case 2025-01-23 17:13:43 +05:30
Lorenzo Consolaro 30c2907962 feat(https): Get TLS errors from http client
update PR

update mr

Update components/esp_http_client/esp_http_client.c

Co-authored-by: Nilesh Kale <nilesh.kale@espressif.com>
2025-01-21 10:22:27 +05:30
Xu Si Yu 4be36fdb8b feat(tcp_transport): add an api to configure the addr family 2025-01-16 10:44:33 +08:00
nilesh.kale a0bcffcce9 fix(esp_http_client): updated defination for macro mem_check
This commit replace macro MEM_CHECK with return on failure and
updated usage of reespctive APIs' in IDF.
This also update th prototype of API esp_http_client_add_auth().

Closes https://github.com/espressif/esp-idf/issues/14463
2024-12-10 15:41:36 +05:30
nilesh.kale 0733de565f feat(esp_htttps_ota): handle case if server retured 304 not_modified during ota
This commit handles case for response code 304 (NOT_MODIFIED) during ota.

Closes https://github.com/espressif/esp-idf/issues/14839
2024-12-02 17:23:30 +08:00
hrushikesh.bhosale 5aaa47834a feat(esp_http_client): Added ALPN feature in esp_http_client
Added the alpn field in esp_http_clinet_config_t struct. So
that user can modify from the esp_http_clinet component.
2024-11-15 14:37:28 +05:30
nilesh.kale f9961fda62 fix(esp_http_client): added initial argument checking for APIs'
This MR added checks for arguments passed in APIS' of esp_http_client.c
2024-09-27 17:05:04 +05:30
Duco Sebel 73e1085e54 feat(esp_http_client): Add function to delete all headers set by 'esp_http_client_set_header' 2024-09-27 16:57:54 +05:30
hrushikesh.bhosale 52cd89698e feat(esp_http_client): Added http method REPORT
Added support http REPORT method and tested it using local server.
Added test case for REPOPRT method in esp_http_client_example.c
The URL(httpbin.org) does not support for /report endpoint.

Closes https://github.com/espressif/esp-idf/issues/14147
2024-07-23 16:43:33 +05:30
Harshit Malpani 1987f055c9 fix: reset redirect counter for using same handler
Closes https://github.com/espressif/esp-idf/issues/13633
2024-05-07 10:27:23 +05:30
David Cermak 96069eef3b feat(http_client): Add support for using custom tcp_transport 2023-11-29 20:48:40 +01:00
David Cermak 7e22a13afe feat(http_client): Add support for TLS session tickets 2023-11-29 20:48:35 +01:00
Harshit Malpani 27681a5073 fix(esp-tls): Use TLS 1.2 and TLS 1.3 simultaneously
This commit fixes the issue with TLS 1.2 connection when TLS 1.3 is
enabled in config.
2023-10-23 16:23:10 +05:30
Harshit Malpani 96a8316e71 feat(esp_http_client): Add API to set auth data
This new API can be used to set the authentication data in the client context
when the auth data is received in the custom header

Closes: https://github.com/espressif/esp-idf/pull/12131
2023-09-25 12:27:53 +05:30
Mahavir Jain 2b3418b4a0 Merge branch 'feature/use_ecdsa_perph_while_mutual_auth' into 'master'
feat: ECDSA peripheral while performing http connection with mutual auth

Closes IDF-7390

See merge request espressif/esp-idf!25052
2023-09-11 19:41:21 +08:00
Harshit Malpani 692e1a9e61 feat: ECDSA peripheral while performing http connection with mutual auth 2023-09-08 12:22:41 +05:30
Aditya Patwardhan 4be9bc4e2e feat(esp_http_client): Added support for OTA using ds peripheral for TLS 2023-09-04 09:00:03 +05:30
Mahavir Jain bdf8f1c382 Merge branch 'contrib/github_pr_10715' into 'master'
Add user_data accessor and mutator to esp_http_client (GitHub PR)

Closes IDFGH-9337 and IDFGH-9221

See merge request espressif/esp-idf!22751
2023-03-21 14:07:31 +08:00
Andrew Clink 82cdcc5de5 Add user_data accessor and mutator to esp_http_client
Closes: https://github.com/espressif/esp-idf/pull/10715
2023-03-16 12:36:16 +05:30
Harshit Malpani 674fd8feb8 esp_http_client: Add support for esp_events 2023-03-15 11:48:11 +05:30
harshal.patil 32e78b71f3 http_client: fixed looping caused when disable_auto_redirect enabled
Closes https://github.com/espressif/esp-idf/issues/10629
2023-02-23 14:11:58 +05:30
Harshit Malpani 6de9e42122 esp_http_client: Add feature to cancel an HTTP request
Closes: https://github.com/espressif/esp-idf/issues/9892
2022-12-02 11:36:28 +05:30
Aditya Patwardhan ba43063314 esp_http_client: Add option to use secure_element
Closes https://github.com/espressif/esp-idf/issues/10071
2022-11-17 14:43:35 +05:30
Aditya Patwardhan 4904d57fd9 esp_http_client: Added support to set server common name. 2022-09-13 05:31:43 +00:00