summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Zhang <xiazhang@nvidia.com>2024-09-27 11:39:50 +0300
committerSean Zhang <xiazhang@nvidia.com>2024-09-27 11:39:50 +0300
commit51feb35350eee87fc5bf1d463873feb3ccf12f1e (patch)
tree4c8da6efbde8fad40d25b4baba5143fda9fc6008
parentf4e79739d360ba47587427413dcc6e5bdf4182b7 (diff)
downloadwebui-vue-51feb35350eee87fc5bf1d463873feb3ccf12f1e.tar.xz
Fix event entry download
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>
-rw-r--r--src/store/modules/Logs/EventLogStore.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/store/modules/Logs/EventLogStore.js b/src/store/modules/Logs/EventLogStore.js
index f302dffb..469aa26c 100644
--- a/src/store/modules/Logs/EventLogStore.js
+++ b/src/store/modules/Logs/EventLogStore.js
@@ -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'],