Commit Graph

180 Commits

Author SHA1 Message Date
fbp2m
975e77ed7d
fix: fixed allocating if_name in client context multiple times
Do not allocate client->if_name twice in esp_http_client_init().

Signed-off-by: Harshit Malpani <harshit.malpani@espressif.com>

Closes https://github.com/espressif/esp-idf/pull/13945
2024-07-07 21:20:18 +08:00
Harshit Malpani
4e4ceba9c8
fix: reset redirect counter for using same handler
Closes https://github.com/espressif/esp-idf/issues/13633
2024-05-20 10:44:53 +05:30
Harshit Malpani
8d494a8d03
Revert "fix(esp_http_client): Call event_handler after header value is received"
This reverts commit 04ac8e43db.

Fixes https://github.com/espressif/esp-idf/issues/13497
Fixes https://github.com/espressif/esp-idf/issues/13097
2024-04-01 13:18:56 +05:30
Marius Vikhammer
bab0fa8a03 ci(test_apps): limit dependencies for misc test_apps
Only pull in direct dependencies for the test apps, reducing build time
as well making it possible for CI to determine if the test should run or not
when dependencies are changed.
2024-02-21 09:34:29 +08:00
Mahavir Jain
3549a154b0 Merge branch 'bugfix/fix_http_auth_without_qop_v5.2' into 'release/v5.2'
fix(esp_http_client): Fix http digest auth without qop (v5.2)

See merge request espressif/esp-idf!28757
2024-02-16 13:50:46 +08:00
Harshit Malpani
302661ed5f
fix(esp_http_client): Fix http digest auth without qop
Closes https://github.com/espressif/esp-idf/issues/12962
2024-01-29 11:00:58 +05:30
jim
38499caa35 esp_http_client: Fix reset errno to 0 before call esp_transport_read
Closes https://github.com/espressif/esp-idf/issues/9020
2024-01-08 15:39:07 +08:00
Harshit Malpani
e4ecfc2133
fix(esp_http_client): Fix esp_http_client async mode
Closes https://github.com/espressif/esp-idf/issues/12358
2023-11-30 12:04:31 +05:30
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
04ac8e43db
fix(esp_http_client): Call event_handler after header value is received 2023-09-25 12:27:54 +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
Mahavir Jain
bd0eac77b2 Merge branch 'feature/add_support_for_ds_peripheral_on_ota' into 'master'
feat(esp_http_client): Added support for OTA using ds peripheral for TLS

See merge request espressif/esp-idf!25713
2023-09-11 16:36:58 +08:00
Harshit Malpani
692e1a9e61
feat: ECDSA peripheral while performing http connection with mutual auth 2023-09-08 12:22:41 +05:30
David Cermak
7c012e3fe1 fix(http_client): Set common tcp config to both TCP and SSL transport
Foundation transport contained TCP properties for both TCP and SSL
transport, so it was enough to set the TCP connection properties
(keepalive, interface binding) to one transport only. After merging
5778a7c7 we have separate TCP properties for these transports and need
to set the same for both.
This commit also fixes unnecessary allocation of 1 more byte for if_name

Closes https://github.com/espressif/esp-protocols/issues/322
2023-09-07 08:33:44 +02:00
Aditya Patwardhan
4be9bc4e2e feat(esp_http_client): Added support for OTA using ds peripheral for TLS 2023-09-04 09:00:03 +05:30
Armando
7dbd3f6909 feat(ci): Enable p4 example, test_apps and unit tests CI build 2023-08-24 12:51:19 +08:00
Harshit Malpani
8d95e45c05
fix: nitpick in esp_http_client 2023-08-02 13:48:14 +05:30
KonstantinKondrashov
e72061695e all: Removes unnecessary newline character in logs
Closes https://github.com/espressif/esp-idf/issues/11465
2023-06-09 03:31:21 +08:00
Kenneth Furge
90be9cc3e8
Set state to HTTP_STATE_REQ_COMPLETE_HEADER prior to calling the
HTTP_EVENT_HEADERS_SENT callback to allow streaming of PUT data
in the callback.
2023-05-17 14:06:51 +05:30
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
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
0cc243a8cc
esp_http_client: remove dependency of esp_stubs from esp_http_client. Add esp_event stubs in linux component 2023-03-15 11:48:11 +05:30
Harshit Malpani
674fd8feb8
esp_http_client: Add support for esp_events 2023-03-15 11:48:11 +05:30
Marius Vikhammer
0be8e03907 ci: update test apps to use run_all_single_board_cases 2023-03-10 14:27:09 +08:00
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
Omar Chebib
5e5343d429 TWDT: Use the new TWDT Kconfig options in the examples and tests 2023-02-17 11:22:25 +08:00
Cao Sen Miao
94120b82c2 esp32h2: add build test 2023-01-17 10:29:04 +08:00
Harshit Malpani
a1e9a87e69 Merge branch 'bugfix/fix_ESP_LOG_to_debug' into 'master'
esp_http_client: fix debug log from LOGI to LOGD

Closes IDFGH-8892

See merge request espressif/esp-idf!22011
2023-01-13 15:51:23 +08:00
Harshit Malpani
3152fba654
esp_http_client: fix coverity issue. free auth_str before going out of scope 2023-01-11 16:57:04 +05:30
Harshit Malpani
6e92edd848
esp_http_client: fix debug log from LOGI to LOGD
Closes https://github.com/espressif/esp-idf/issues/10313
2023-01-11 15:55:52 +05:30
Harshit Malpani
68ded2c350
esp_http_client: fix -Werror-format compile errors for linux target 2023-01-04 11:17:28 +05:30
Harshit Malpani
1c77e13d35
esp_http_client: Update to support build for linux 2023-01-04 11:17:28 +05:30
Mahavir Jain
bbc5914e63
esp_http_client: remove "Wno-format" cflag and fix formatting errors 2022-12-21 14:14:04 +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
Mahavir Jain
960a84db47 Merge branch 'fix/esp_http_client_fix_behavior_disable_auto_redirect_enabled' into 'master'
fix: esp_http_client fix behaviour when disable_auto_redirect is enabled

Closes IDF-6136

See merge request espressif/esp-idf!20805
2022-11-04 20:38:24 +08:00
Song Ruo Jing
be0fdfa176 soc: Add a soc cap, SOC_CLK_RC_FAST_D256_SUPPORTED, for whether the target has the RC_FAST_D256 clock 2022-11-01 11:23:26 +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
Mahavir Jain
67e080471f
esp_http_client: free cached data in case connection gets closed for redirection
In case of `esp_http_client_read` based workflow, we cache data that is received
during fetch header stage. In case, there is URL redirection and we have to close
the connection on URL, port change then we must discard earlier cached data.

Closes AUD-4158
2022-10-20 12:45:06 +05:30
Mahavir Jain
a7b42be1bd
esp_http_client: fix few coverity warnings 2022-10-10 15:22:23 +05:30
Aditya Patwardhan
4904d57fd9 esp_http_client: Added support to set server common name. 2022-09-13 05:31:43 +00:00
Harshit Malpani
791d17ac7f
ci: Migrate unit-test for esp_http_client to component-test-apps 2022-08-22 16:57:32 +05:30
Ivan Grokhotkov
401c10ecfb build system: re-add -Wno-format as private flag for some components 2022-08-03 16:42:47 +04:00
David Cermak
5c383d7b73 esp_netif/lwip: Fix deps cycles to "lwip -> esp_netif -> phy-drivers"
Fix dependency tree so that lwip doesn't depend on any specific network
interface component.
Network interface drivers shall depend on esp_netif.
esp_netif shall depend on lwip (but not on any specific interface
driver) -- it optionally depends on vfs and esp_eth (need ethernet
header for L2/bridge mode)
2022-07-20 14:59:07 +02:00
Laukik Hase
7115881a97
esp_http_client/esp_https_ota: Removed errno checks
- Returned -ESP_ERR_HTTP_EAGAIN for timeout errors from
  esp_http_client whenever tcp transport layer returns
  connection timeout
- Removed redundant conditional statements as required

Co-authored-by: Shubham Kulkarni <shubham.kulkarni@espressif.com>
2022-05-31 15:04:21 +05:30
Ivan Grokhotkov
47659be5b8
build system: remove lwip from common requirements
lwip was added to common requirements list to provide "sys/socket.h"
header to all components without additional requirements specified.

However, lwip pulls in a lot of dependencies on other components.
This commit removes lwip from common requirements to reduce the number
of components in G1-only apps.

To compensate for this removal, the following changes are made:
- newlib (which is a common requirement) has a public dependency on
  lwip if lwip is present in the build. This ensures that sys/socket.h
  is available as long as lwip component is included into the build.
- lwip is now a public requirement of esp-tls since esp_tls.h includes
  sys/socket.h header.
- lwip is now a public requirement o esp_http_client because
  sys/socket.h is included from esp_http_client.h
- lwip is now a private requirement of esp_wifi for "smartconfig_ack"
- lwip is now a private requirement of mqtt for socket functions
- lwip is now a public requirement of tcp_transport because
  esp_transport_tcp.h includes sys/socket.h header.
- mbedtls checks if lwip component is present in the build. If yes,
  net_sockets.c is added to the build, along with the dependency on
  lwip. Previously lwip was a public requirement of mbedtls
  unconditionally.

system/g1_components test app is updated to reflect the changes

Default public dependencies of a component before and after this
change, except common requirements:

- esp_timer (public dependency of freertos)
- bootloader_support (public dependency of esp_hw_support)
- vfs (public dependency of lwip)
- esp_wifi (public dependency of lwip)
- esp_event (public dependency of esp_wifi)
- esp_netif (public dependency of esp_event)
- esp_eth (public dependency of esp_netif)
- esp_phy (public dependency of esp_wifi)

After:

- esp_timer (public dependency of freertos)
- bootloader_support (public dependency of esp_hw_support)

Altogether, the following components have been always added as
public requirements to all other components, and are not added now
([breaking-change]):

- lwip
- vfs
- esp_wifi
- esp_event
- esp_netif
- esp_eth
- esp_phy

Application components now need to explicitly declare dependencies on
these components.
2022-05-02 20:47:17 +02:00
Harshit Malpani
437d90c408 esp_http_client: Fix redirect by resetting auth_header before parsing 2022-04-25 05:16:49 +00:00
Shubham Kulkarni
b4456bff97 esp_http_client: Add comment for clearing location field in esp_http_client_prepare 2022-03-24 06:23:17 +00:00