Skip to content

Commit

Permalink
Fix event entry download
Browse files Browse the repository at this point in the history
Event entry should be downloaded with specific http header of "Accept:
application/octet-stream" or "*/*", but the default http header is set
to "Accept: application/json", so need to specify the header for event
downloading.

Refer: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/40136

Tested:
Event entry data can be downloaded with the fix.

Change-Id: Ia45123340da79a54fc4229470e6822206b8df808
Signed-off-by: Sean Zhang <xiazhang@nvidia.com>
  • Loading branch information
seanzhangseu committed Sep 27, 2024
1 parent f4e7973 commit 51feb35
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/store/modules/Logs/EventLogStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,11 @@ const EventLogStore = {
},
async downloadEntry(_, uri) {
return await api
.get(uri)
.get(uri, {
headers: {
Accept: 'application/octet-stream',
},
})
.then((response) => {
const blob = new Blob([response.data], {
type: response.headers['content-type'],
Expand Down

0 comments on commit 51feb35

Please sign in to comment.