http: fix sending error responses to rejected requests by server apps 59/42159/3
authorSemir Sionek <[email protected]>
Thu, 16 Jan 2025 14:03:41 +0000 (09:03 -0500)
committerFlorin Coras <[email protected]>
Thu, 16 Jan 2025 21:45:21 +0000 (21:45 +0000)
commitce8adec92b99c8dda9b4792173d14c3068c5d5a2
treecae109252654b611513089cf2da66af88c8e1dfa
parent8d6b2f6d7a8cd78ae42262c4de112f8301e80e18
http: fix sending error responses to rejected requests by server apps

Plugins such as http_static sometimes reject requests without reading
all of the body. http_static in that case sends an error response and
closes the connection. But the error response cannot go out due to the
connection state being HTTP_REQ_STATE_TRANSPORT_IO_MORE_DATA.
With this change, we make http_app_tx_callback give a response like
that special treatment, allowing it to go out.

Type: fix
Change-Id: I72ae74b869183f5d5921837f6ac9c52f0efc7598
Signed-off-by: Semir Sionek <[email protected]>
src/plugins/http/http.c