Skip to content

Conversation

@hubimuc
Copy link

@hubimuc hubimuc commented Dec 21, 2025

Summary

Fix TypeError in Sabre CorePlugin when handling public DAV HEAD range requests by converting string bodies to streams before range handling.

Problem

Public share DAV HEAD + Range can hit stream_get_meta_data() with a string body, causing a TypeError and breaking byte‑range streaming (e.g. slow PDF load).
Related: nextcloud/server#57219

Fix

Convert string $body to php://temp stream regardless of request method.

Testing

curl -I -H "Range: bytes=0-1023" http://localhost:8080/public.php/dav/files/<token>

Before: 500 Internal Server Error
After: 206 Partial Content + Content-Range

Signed-off-by: hgrobbel <hubertus@grobbel.net>
@solracsf
Copy link
Member

Should be handled upstream?
https://github.com/sabre-io/dav/blob/master/lib/DAV/CorePlugin.php

@hubimuc
Copy link
Author

hubimuc commented Dec 28, 2025

issue is filed in sabre-io/dav#1618

Should be handled upstream? https://github.com/sabre-io/dav/blob/master/lib/DAV/CorePlugin.php

Please refer to issue: sabre-io/dav#1618

OK for me

Co-authored-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: hubimuc <hubertus@grobbel.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants