From 80ff08a50ca7ca3e01c88ea2d3cbbe0380c4641a Mon Sep 17 00:00:00 2001 From: Marius Date: Sat, 20 Nov 2021 16:57:20 +0100 Subject: [PATCH] Correctly use sf-boolean syntax for Upload-Incomplete --- pkg/handler/unrouted_handler.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/handler/unrouted_handler.go b/pkg/handler/unrouted_handler.go index 07fa6a5..313478a 100644 --- a/pkg/handler/unrouted_handler.go +++ b/pkg/handler/unrouted_handler.go @@ -438,7 +438,7 @@ func (handler *UnroutedHandler) PostFileV2(w http.ResponseWriter, r *http.Reques handler.sendError(w, r, ErrInvalidOffset) return } - isIncomplete := r.Header.Get("Upload-Incomplete") == "1" + isIncomplete := r.Header.Get("Upload-Incomplete") == "?1" // 1. Get or create upload resource // TODO: Create consistent ID from token? e.g. using SHA256 @@ -594,9 +594,9 @@ func (handler *UnroutedHandler) HeadFile(w http.ResponseWriter, r *http.Request) } } else { if info.SizeIsDeferred { - w.Header().Set("Upload-Incomplete", "1") + w.Header().Set("Upload-Incomplete", "?1") } else { - w.Header().Set("Upload-Incomplete", "0") + w.Header().Set("Upload-Incomplete", "?0") } }