Browse Source
HTTP 1.1 server has two ways of indicating the message body length - either by providing the Content Length header, or by closing the connection when the entire body has been transmitted. The second method didn't work with Zephyr's HTTP client implementation, as EOF on a socket was treated as an error condition. Therefore, if no Content Length was provided by the server, such transfers would always end up with ECONNRESET error. In order to fix this, we need to notify the parser about the EOF on a socket when connection is closed. It is the parser role to determine whether the EOF was expected in current state (by marking end of message flag) or not (by setting an error). Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>pull/92793/head
1 changed files with 6 additions and 3 deletions
Loading…
Reference in new issue