From ec4e47e3d906af06a5540920cbd2604fb53274e4 Mon Sep 17 00:00:00 2001 From: Stefan Scheidewig Date: Fri, 27 May 2022 00:32:20 +0200 Subject: [PATCH] Setting Upload-Offset directly to response --- pkg/handler/unrouted_handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/handler/unrouted_handler.go b/pkg/handler/unrouted_handler.go index c715e9a..f63a42c 100644 --- a/pkg/handler/unrouted_handler.go +++ b/pkg/handler/unrouted_handler.go @@ -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