Searched hist:"06 fc9bebd8c9146636b53f2a04d340230bf21e29" (Results 1 – 2 of 2) sorted by relevance
/openbmc/bmcweb/http/ |
H A D | http_body.hpp | diff 06fc9bebd8c9146636b53f2a04d340230bf21e29 Wed Mar 27 21:58:11 CDT 2024 Ed Tanous <ed@tanous.net> Fix regression in http_file_body
The commit: b5f288d Make use of filebody for dump offload
Caused a minor failure in clearing responses, where open file handles wouldn't be closed in between queries, resulting in the next read to return empty content. This caused redfish protocol validator to fail.
boost::beast::http::response::clear() documentation shows that it only clears the headers, not the file body. Now normally, this doesn't matter, because bmcweb completely replaces the response body when a new response is driven, but not in the case of files.
Add response.body().clear() during the clear to ensure the response is cleared.
In addition, add encodingType to the clear() call, to ensure that it is reset as well. This is a bug, but I don't know the reproduction steps.
Tested: Redfish protocol validator now completes (with SSE failures)
Change-Id: Ice6d5085003034a1bed48397ddc6316e9cd0536f Signed-off-by: Ed Tanous <ed@tanous.net>
|
H A D | http_response.hpp | diff 06fc9bebd8c9146636b53f2a04d340230bf21e29 Wed Mar 27 21:58:11 CDT 2024 Ed Tanous <ed@tanous.net> Fix regression in http_file_body
The commit: b5f288d Make use of filebody for dump offload
Caused a minor failure in clearing responses, where open file handles wouldn't be closed in between queries, resulting in the next read to return empty content. This caused redfish protocol validator to fail.
boost::beast::http::response::clear() documentation shows that it only clears the headers, not the file body. Now normally, this doesn't matter, because bmcweb completely replaces the response body when a new response is driven, but not in the case of files.
Add response.body().clear() during the clear to ensure the response is cleared.
In addition, add encodingType to the clear() call, to ensure that it is reset as well. This is a bug, but I don't know the reproduction steps.
Tested: Redfish protocol validator now completes (with SSE failures)
Change-Id: Ice6d5085003034a1bed48397ddc6316e9cd0536f Signed-off-by: Ed Tanous <ed@tanous.net>
|