1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-02 07:54:27 +00:00

improve log (#498)

* improve log

* write header after internal server error
This commit is contained in:
Xiangyue Cai
2021-09-29 17:08:39 +08:00
committed by GitHub
parent 31c017d2c8
commit c2006c5443
2 changed files with 2 additions and 2 deletions

View File

@@ -747,12 +747,12 @@ func getBlockInfo(rsp http.ResponseWriter, r *http.Request) *appError {
blockLen := fmt.Sprintf("%d", blockSize)
rsp.Header().Set("Content-Length", blockLen)
rsp.WriteHeader(http.StatusOK)
if err := blockmgr.Read(storeID, blockID, rsp); err != nil {
return &appError{err, "", http.StatusInternalServerError}
}
sendStatisticMsg(storeID, user, "sync-file-download", uint64(blockSize))
rsp.WriteHeader(http.StatusOK)
return nil
}