Conversation
7018d98 to
fdbcb91
Compare
|
Thanks for your patch 👍 The change for the desktop client is important. I could reproduce the issue with my development setup (nginx proxy -> php container), It seems to me that nginx did not forward the post request without a body to the php container. I did some testing with the patched desktop client and the server pr.
Result: Notification: test63.txt could not be synced due to an error. I guess stream_get_line with $length = 0 is the problem here, Index: apps/dav/lib/BulkUpload/MultipartRequestParser.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/apps/dav/lib/BulkUpload/MultipartRequestParser.php b/apps/dav/lib/BulkUpload/MultipartRequestParser.php
--- a/apps/dav/lib/BulkUpload/MultipartRequestParser.php (revision 9bf69115593a9abaedd8cc8d886725253100f3c0)
+++ b/apps/dav/lib/BulkUpload/MultipartRequestParser.php (date 1688852480282)
@@ -211,7 +211,11 @@
throw new BadRequest("Computed md5 hash is incorrect.");
}
- $content = stream_get_line($this->stream, $length);
+ if ($length === 0) {
+ $content = '';
+ } else {
+ $content = stream_get_line($this->stream, $length);
+ }
if ($content === false) {
throw new Exception("Fail to read part's content.");Made it work for me. Please keep my setup with the reverse proxy in mind. We should probably test the patch without a reverse proxy. |
fdbcb91 to
88474c9
Compare
|
@kesselb |
88474c9 to
97bfd96
Compare
97bfd96 to
eb196b0
Compare
|
/backport to stable24 |
|
/backport to stable25 |
|
/backport to stable26 |
|
/backport to stable27 |
will allow uploading empty files via bulk upload Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
eb196b0 to
906a661
Compare
|
The backport to stable27 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable27
git pull origin stable27
# Create the new backport branch
git checkout -b fix/foo-stable27
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable27More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
|
/backport to stable27 |
|
/backport to stable23 |
|
Please don't forget to review the pr for 24 and check if we also need it: #39508 |
Summary
Solve long running issue with bulk upload of empty files.
Require also fixes from desktop client see nextcloud/desktop#5871
TODO
Checklist
should probably be backported to all maintained releases with bulk upload