OpenBmc Redfish support etag property error
Zhang, ShuoX
shuox.zhang at intel.com
Tue Aug 31 18:09:26 AEST 2021
hi,
Etag is to check whether the json string returned by the server has changed , I plan to use MD5 encryption to generate etag , can't find etag in http request header.
Here are the steps I tested:
1, I used postman to send the first request to a URL, and added the etag property to the header of the response use hard code , then http connection function async_write respond header buffer
2, Request the same url, read the header of the request, no etag can be found.
Here are some logs:
Respond:
Jan 11 23:45:25 intel-obmc bmcweb[361]: (2021-01-11 23:45:25) [DEBUG "http_connection.hpp":683] 0x1a3e4c8 doWrite
Jan 11 23:45:25 intel-obmc bmcweb[361]: zs_debug res result : 200
Jan 11 23:45:25 intel-obmc bmcweb[361]: field : Strict-Transport-Security , /text: Strict-Transport-Security ,Value: max-age=315
36000; includeSubdomains; preload
Jan 11 23:45:25 intel-obmc bmcweb[361]: field : X-Frame-Options , /text: X-Frame-Options ,Value: DENY
Jan 11 23:45:25 intel-obmc bmcweb[361]: field : Pragma , /text: Pragma ,Value: no-cache
Jan 11 23:45:25 intel-obmc bmcweb[361]: field : Cache-Control , /text: Cache-Control ,Value: no-Store,no-Cache
Jan 11 23:45:25 intel-obmc bmcweb[361]: field : <unknown-field> , /text: X-XSS-Protection ,Value: 1; mode=block
Jan 11 23:45:25 intel-obmc bmcweb[361]: field : <unknown-field> , /text: X-Content-Type-Options ,Value: nosniff
Jan 11 23:45:25 intel-obmc bmcweb[361]: field : <unknown-field> , /text: Content-Security-Policy ,Value: default-src 'none'; img
-src 'self' data:; font-src 'self'; style-src 'self'; script-src 'self'; connect-src 'self' wss:
Jan 11 23:45:25 intel-obmc bmcweb[361]: field : Content-Type , /text: Content-Type ,Value: application/json
Jan 11 23:45:25 intel-obmc bmcweb[361]: field : ETag , /text: ETag ,Value: ba2e34ec8c7d9168cc2bf880a1674ae4
Jan 11 23:45:25 intel-obmc bmcweb[361]: field : Content-Length , /text: Content-Length ,Value: 525
Jan 11 23:45:25 intel-obmc bmcweb[361]: zs_debug response: {
Jan 11 23:45:25 intel-obmc bmcweb[361]: "@odata.id": "/redfish/v1/CertificateService/CertificateLocations",
Jan 11 23:45:25 intel-obmc bmcweb[361]: "@odata.type": "#CertificateLocations.v1_0_0.CertificateLocations",
Jan 11 23:45:25 intel-obmc bmcweb[361]: "Description": "Defines a resource that an administrator can use in order to locate all
certificates installed on a given service",
Jan 11 23:45:25 intel-obmc bmcweb[361]: "Id": "CertificateLocations",
Jan 11 23:45:25 intel-obmc bmcweb[361]: "Links": {
Jan 11 23:45:25 intel-obmc bmcweb[361]: "Certificates": [
Jan 11 23:45:25 intel-obmc bmcweb[361]: {
Jan 11 23:45:25 intel-obmc bmcweb[361]: "@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol/HTTPS/Certificates/1"
Jan 11 23:45:25 intel-obmc bmcweb[361]: }
Jan 11 23:45:25 intel-obmc bmcweb[361]: ],
Jan 11 23:45:25 intel-obmc bmcweb[361]: Certificates at odata.count<mailto:Certificates at odata.count>: 1
Jan 11 23:45:25 intel-obmc bmcweb[361]: },
Jan 11 23:45:25 intel-obmc bmcweb[361]: "Name": "Certificate Locations"
Jan 11 23:45:25 intel-obmc bmcweb[361]: }
Jan 11 23:45:25 intel-obmc bmcweb[361]: (2021-01-11 23:45:25) [DEBUG "http_connection.hpp":698] 0x1a3e4c8 async_write 997 bytes
Second Request:
Jan 11 23:45:25 intel-obmc bmcweb[361]: (2021-01-11 23:45:25) [DEBUG "http_connection.hpp":511] 0x1a3e4c8 doReadHeaders
Jan 11 23:45:25 intel-obmc bmcweb[361]: zs_debug read http_head :GET /redfish/v1/CertificateService/CertificateLocations HTTP/1.1
Jan 11 23:45:25 intel-obmc bmcweb[361]: Authorization: Basic cm9vdDowcGVuQm1j
Jan 11 23:45:25 intel-obmc bmcweb[361]: User-Agent: PostmanRuntime/7.28.4
Jan 11 23:45:25 intel-obmc bmcweb[361]: Accept: */*
Jan 11 23:45:25 intel-obmc bmcweb[361]: Cache-Control: no-cache
Jan 11 23:45:25 intel-obmc bmcweb[361]: Postman-Token: 1981d43c-7067-4959-a853-dd7f93bb04fa
Jan 11 23:45:25 intel-obmc bmcweb[361]: Host: 10.239.138.19
Jan 11 23:45:25 intel-obmc bmcweb[361]: Accept-Encoding: gzip, deflate, br
Jan 11 23:45:25 intel-obmc bmcweb[361]: Connection: keep-alive
Jan 11 23:45:25 intel-obmc bmcweb[361]:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20210831/189e271d/attachment.htm>
More information about the openbmc
mailing list