From 490d74d6b4f07b9e818b0c3ba23ee2754eb9e393 Mon Sep 17 00:00:00 2001 From: Myung Bae Date: Sat, 24 Feb 2024 10:50:23 -0500 Subject: Fix duplicated etag generation bmcweb generates the duplicated etags on GET and it may cause the PATCH failure if etag is used - e.g. redfishtool.. This commit is to put only one Etag on http_response on GET. Tested: - Check the duplicated Etag on GET, and check it after fix Before: ``` $ curl -v -k -X GET https://admin:${password}@${bmc}:18080/redfish/v1/AccountService/Accounts/readonly ... < ETag: "D4B30BB4" < ETag: "D4B30BB4" ``` After: ``` $ curl -v -k -X GET https://admin:${password}@${bmc}:18080/redfish/v1/AccountService/Accounts/readonly ... < ETag: "D4B30BB4" ``` Change-Id: I5361919c5671b546181a26de792bc57de2c4f670 Signed-off-by: Myung Bae --- http/http_response.hpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'http') diff --git a/http/http_response.hpp b/http/http_response.hpp index 123a7e1129..dca7682a98 100644 --- a/http/http_response.hpp +++ b/http/http_response.hpp @@ -219,11 +219,6 @@ struct Response void end() { - std::string etag = computeEtag(); - if (!etag.empty()) - { - addHeader(http::field::etag, etag); - } if (completed) { BMCWEB_LOG_ERROR("{} Response was ended twice", logPtr(this)); -- cgit v1.2.3