diff options
author | Myung Bae <myungbae@us.ibm.com> | 2024-02-24 18:50:23 +0300 |
---|---|---|
committer | Myung Bae <myungbae@us.ibm.com> | 2024-02-28 12:04:00 +0300 |
commit | 490d74d6b4f07b9e818b0c3ba23ee2754eb9e393 (patch) | |
tree | ea6e38d6f7143d6210e5ac0c130dd2ebcba6e693 /http | |
parent | 6b9ac4f23ed00c3905c9b99f1d0831930acdbb1c (diff) | |
download | bmcweb-490d74d6b4f07b9e818b0c3ba23ee2754eb9e393.tar.xz |
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 <myungbae@us.ibm.com>
Diffstat (limited to 'http')
-rw-r--r-- | http/http_response.hpp | 5 |
1 files changed, 0 insertions, 5 deletions
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)); |