mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-07-18 17:38:07 +08:00
fix: http2 content-length (#224)
This commit is contained in:
@ -51,6 +51,9 @@ func FsStream(c *gin.Context) {
|
||||
}
|
||||
dir, name := stdpath.Split(path)
|
||||
sizeStr := c.GetHeader("Content-Length")
|
||||
if sizeStr == "" {
|
||||
sizeStr = "0"
|
||||
}
|
||||
size, err := strconv.ParseInt(sizeStr, 10, 64)
|
||||
if err != nil {
|
||||
common.ErrorResp(c, err, 400)
|
||||
|
Reference in New Issue
Block a user