Setting Upload-Offset directly to response

This commit is contained in:
Stefan Scheidewig 2022-05-27 00:32:20 +02:00
parent 9ef0b54c7c
commit ec4e47e3d9
1 changed files with 1 additions and 1 deletions

View File

@ -649,7 +649,7 @@ func (handler *UnroutedHandler) writeChunk(c *httpContext, resp HTTPResponse, up
// Send new offset to client
newOffset := offset + bytesWritten
resp.Headers["Upload-Offset"] = strconv.FormatInt(newOffset, 10)
c.res.Header().Set("Upload-Offset", strconv.FormatInt(newOffset, 10))
handler.Metrics.incBytesReceived(uint64(bytesWritten))
info.Offset = newOffset