reva-bump-2.42.0 (#2215)

* reva-bump-2.42.0

* run e2e tests with slow mo 0.5sec

* update web-commit bing #1872
This commit is contained in:
Viktor Scharf
2026-01-26 16:34:10 +01:00
committed by GitHub
parent 6cefc94493
commit 207dada144
8 changed files with 20 additions and 10 deletions
@@ -517,13 +517,15 @@ func (s *svc) executeSpacesCopy(ctx context.Context, w http.ResponseWriter, sele
return err
}
defer httpDownloadRes.Body.Close()
if httpDownloadRes.StatusCode == http.StatusForbidden {
w.WriteHeader(http.StatusForbidden)
b, err := errors.Marshal(http.StatusForbidden, http.StatusText(http.StatusForbidden), "", strconv.Itoa(http.StatusForbidden))
switch httpDownloadRes.StatusCode {
case http.StatusForbidden, http.StatusTooEarly:
w.WriteHeader(httpDownloadRes.StatusCode)
b, err := errors.Marshal(http.StatusForbidden, http.StatusText(httpDownloadRes.StatusCode), "", strconv.Itoa(httpDownloadRes.StatusCode))
errors.HandleWebdavError(log, w, b, err)
return nil
}
if httpDownloadRes.StatusCode != http.StatusOK {
case http.StatusOK:
// ok
default:
return fmt.Errorf("status code %d", httpDownloadRes.StatusCode)
}
@@ -275,6 +275,9 @@ func handleError(w http.ResponseWriter, log *zerolog.Logger, err error, action s
case errtypes.Aborted:
log.Debug().Err(err).Str("action", action).Msg("etags do not match")
w.WriteHeader(http.StatusPreconditionFailed)
case errtypes.TooEarly:
log.Debug().Err(err).Str("action", action).Msg("file is still being processed")
w.WriteHeader(http.StatusTooEarly)
default:
log.Error().Err(err).Str("action", action).Msg("unexpected error")
w.WriteHeader(http.StatusInternalServerError)
@@ -1089,6 +1089,10 @@ func (fs *Decomposedfs) Download(ctx context.Context, ref *provider.Reference, o
return nil, nil, err
}
if n.IsProcessing(ctx) {
return nil, nil, errtypes.TooEarly("file is still being processed")
}
rp, err := fs.p.AssemblePermissions(ctx, n)
switch {
case err != nil: