diff --git a/changelog/unreleased/fix-0-byte-upload.md b/changelog/unreleased/fix-0-byte-upload.md new file mode 100644 index 0000000000..69d92a9357 --- /dev/null +++ b/changelog/unreleased/fix-0-byte-upload.md @@ -0,0 +1,6 @@ +Bugfix: Fix 0-byte file uploads + +We fixed an issue where 0-byte files upload did not return the Location header. + +https://github.com/cs3org/reva/pull/4917 +https://github.com/owncloud/ocis/issues/10469 diff --git a/internal/http/services/owncloud/ocdav/tus.go b/internal/http/services/owncloud/ocdav/tus.go index 0851a7ecb5..c637d7bb28 100644 --- a/internal/http/services/owncloud/ocdav/tus.go +++ b/internal/http/services/owncloud/ocdav/tus.go @@ -197,6 +197,7 @@ func (s *svc) handleTusPost(ctx context.Context, w http.ResponseWriter, r *http. } switch tfRes.Status.Code { case rpc.Code_CODE_OK: + w.Header().Set(net.HeaderLocation, "") w.WriteHeader(http.StatusCreated) return case rpc.Code_CODE_ALREADY_EXISTS: