Skip to content

fix(ocdav): [OCISDEV-1691] return 425 from COPY while the source is in postprocessing - #808

Merged
LukasHirt merged 2 commits into
mainfrom
fix/OCISDEV-1691-copy-too-early
Nov 16, 2026
Merged

LukasHirt merged 2 commits into
mainfrom
fix/OCISDEV-1691-copy-too-early

Conversation

@LukasHirt

Copy link
Copy Markdown

Description

While a file is still in postprocessing (async uploads), the internal download that a WebDAV COPY uses to read the source returns 425 Too Early. handlePathCopy and handleSpacesCopy turned every error into 500 Internal Server Error and then also wrote the success status (http: superfluous response.WriteHeader).

This PR:

  • returns 425 Too Early from COPY when the source download returns 425. GET and HEAD already return 425 for files in processing, so clients can now treat COPY the same way and retry.
  • returns right after writing an error status instead of also writing the success code.

Related issue

How has this been tested?

  • New unit tests in ocdav_blackbox_test.go for COPY on /dav/spaces: success (201), source in postprocessing (425), and source download failing (500).
  • The 425 test fails without the fix (gets 500).

@LukasHirt
LukasHirt requested a review from a team as a code owner November 11, 2026 20:23
@LukasHirt LukasHirt self-assigned this Nov 11, 2026
@LukasHirt
LukasHirt force-pushed the fix/OCISDEV-1691-copy-too-early branch from fa9371d to 8a47f50 Compare November 11, 2026 20:23
@kw-security

kw-security commented Nov 11, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

…n postprocessing

The internal download of a COPY source that is still in postprocessing
returns 425 Too Early. COPY turned that into a 500 and then also tried to
write the success status. Return 425 instead so clients can retry, and stop
writing a second status after an error.

Signed-off-by: Lukas Hirt <info@hirt.cz>
Signed-off-by: Lukas Hirt <info@hirt.cz>
@LukasHirt
LukasHirt merged commit bb73181 into main Nov 16, 2026
14 checks passed
@LukasHirt
LukasHirt deleted the fix/OCISDEV-1691-copy-too-early branch November 16, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants