Skip to content

samples: net: http_client: Update the sample to work out-of-the-box with the net-tools scripts #92640

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rlubos
Copy link
Contributor

@rlubos rlubos commented Jul 3, 2025

  • Pull the latest fixes in the http(s)-server python scripts in net tools
  • Update the TLS configuration in the sample
  • Rework the sample to run a single TLS (TCP) session at a time. Apparently the simple HTTPs sever in python does not handle parallel TLS sessions.

rlubos added 2 commits July 3, 2025 15:03
Python HTTPS server counterpart for the sample now seems to enforce
ECDHE key exchange, so enable it in the sample.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Apparently the simple python HTTPS server the sample is interfacing,
cannot handle parallel TLS sessions (just one at a time), hence
establishing both IPv4/6 connections before sending request doesn't work
well, half of the requests are dropped. Therefore, modify the sample a
little to run only one TLS (or TCP if no TLS is used) connection at a
time.

Additionally, add a log in case HTTP client request fails, as it could
easily be overlooked if something went wrong.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
@github-actions github-actions bot added area: Sockets Networking sockets area: Samples Samples area: HTTP HTTP client/server support area: Networking labels Jul 3, 2025
Copy link

github-actions bot commented Jul 3, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
net-tools zephyrproject-rtos/net-tools@986bfeb zephyrproject-rtos/net-tools@64bf49a (master) zephyrproject-rtos/net-tools@986bfeb0..64bf49ad

All manifest checks OK

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@github-actions github-actions bot added manifest manifest-net-tools DNM (manifest) This PR should not be merged (controlled by action-manifest) labels Jul 3, 2025
jukkar
jukkar previously approved these changes Jul 3, 2025
Pull latest fixes for HTTP(s) server scripts.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
@rlubos rlubos force-pushed the net/http-client-tls-adjustements branch from 6c49975 to d3aac78 Compare July 3, 2025 15:37
@rlubos
Copy link
Contributor Author

rlubos commented Jul 3, 2025

Updated net-tools SHA

@github-actions github-actions bot removed the DNM (manifest) This PR should not be merged (controlled by action-manifest) label Jul 3, 2025
Copy link

sonarqubecloud bot commented Jul 3, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants