ba-archive / blue-archive-story-viewer

碧蓝档案的档案。仓库已经迁移到 monorepo,详情请看 readme。
https://github.com/ba-archive/blue-archive
GNU General Public License v3.0
118 stars 8 forks source link

[Bug] 学生页面加载时会出现超过100%的情况 #122

Closed pfjhyyj closed 1 year ago

pfjhyyj commented 1 year ago

问题描述

学生页面加载时会出现超过100%的情况 image

问题位置

https://blue-archive.io/archive

https://github.com/ba-archive/blue-archive-story-viewer/blob/c534956a262692b6a7a99845b567a4fc02f0452c/src/components/momotalk/MomotalkContainer.vue#L71-L75

复现流程

No response

pfjhyyj commented 1 year ago

progressEvent.total为0导致进度条超出100 与cloudflare使用content-encoding=br有关?

mark9804 commented 1 year ago

与cloudflare使用content-encoding=br有关?

在使用 gzip 的 https://ba-archive.github.io/ 上面也能复现的

mark9804 commented 1 year ago

We’re compressing it on the fly and don’t know what the length will be for the object when we return the headers. https://community.cloudflare.com/t/no-content-length-header-when-response-is-compressed/134475

如果这个问题比较普遍的话,我觉得干脆加载方式改成骨骼屏好了。因为 progress.total 要从 response headers 的Content-Length 获取,header 没有的话我想不出一个显示具体百分比的做法

mark9804 commented 1 year ago

也算是修了