-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Description
Something is not quite right with d1675bf, which removed the old HTTP API. The removal is causing regressions on an existing application which was already using the new API.
The following are observed regressions when using the new-style API routine http_client_send_get_req() on an nRF52 using BTLE 6lo to provide a network interface:
- Errnos -12 and -58
- Application hangs followed by usage faults
The application sends an HTTP GET, followed by a POST. The POST fails. The first bad commit was identified as d1675bf by git bisect.
Testing with the commit reverted restores the working behavior.
With extra logging enabled, the usage faults happened twice in a row (I didn't see the errno cases with a logging config. I saw both usage faults and errnos without extra net logging.). Here are details.
Logs were obtained with:
CONFIG_NET_LOG=y
CONFIG_NET_DEBUG_HTTP=y
CONFIG_SYS_LOG_NET_LEVEL=4
- Logs with d1675bf present: https://gist.github.com/mbolivar/781fe92bf28ea33c120e4bc995bfe3d3
- Logs with it reverted: https://gist.github.com/mbolivar/e8215bb618c972ab2e1c554af8bbbc90
Note the following differences in POST response status:
- Bad request with the commit: https://gist.github.com/mbolivar/781fe92bf28ea33c120e4bc995bfe3d3#file-gistfile1-txt-L132
- OK without it: https://gist.github.com/mbolivar/e8215bb618c972ab2e1c554af8bbbc90#file-gistfile1-txt-L123
Note that the host, mgmt.foundries.io, is not a real host, nor is it net-addressable. The Bluetooth device at the other end of the link is acting as a gateway to another host on the LAN. The gateway is proxying HTTP traffic to this host based a preconfigured address.
The [fota/hawkbit] lines are from the application, an Eclipse hawkBit client, some of which were deleted as not relevant. The [http] and [http/client] lines are from Zephyr. The numbers before the log domains are timestamps (based on uptime).