When a simple curl HTTPS request is made with a URL exceeding ~1500 bytes the curl connection will timeout per the application defined handle configuration.
A TLS Encrypted Alert is sent from the Sphere OS to the remote server.
After this point the curl handle no longer works on subsequent requests and will return SSL: SSL_set_session failed: unknown error number. After some testing the curl handle is in the same broken state as this other bug I submitted even though the triggering event cause is different:
Azure Sphere OS Persistent Curl Handle using TLS Enters Failure Mode That Keeps Resetting Its Own TCP Connection
https://docs.microsoft.com/en-us/answers/questions/249213/azure-sphere-os-persistent-curl-handle-using-tls-e.html
If the size of the URL request is kept below the failure threshold then the curl handle does not fail.
A non-TLS curl HTTP request URL can be much larger >6000 bytes without failing.
I have traces, logs, and a simple example program that demonstrates the problem within a minute.