Skip to content

Fix WebDAV upload failing when the pooled connection was closed - #661

Merged
SailReal merged 1 commit into
developfrom
feature/fix-webdav-connection-pooling
Sep 19, 2026
Merged

SailReal merged 1 commit into
developfrom
feature/fix-webdav-connection-pooling

Conversation

@SailReal

Copy link
Copy Markdown
Member

fixes #646

@coderabbitai

coderabbitai Bot commented Sep 19, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 1e67e7f2-05e7-49f7-bcf9-c968d2cd191b

📥 Commits

Reviewing files that changed from the base of the PR and between a65cf6b and 3f62231.

📒 Files selected for processing (10)
  • buildsystem/dependencies.gradle
  • data/build.gradle
  • data/src/main/java/org/cryptomator/data/cloud/webdav/WebDavImpl.kt
  • data/src/main/java/org/cryptomator/data/cloud/webdav/network/ConnectionHandlerHandlerImpl.kt
  • data/src/main/java/org/cryptomator/data/cloud/webdav/network/DataSourceBasedRequestBody.kt
  • data/src/main/java/org/cryptomator/data/cloud/webdav/network/InputStreamSourceBasedRequestBody.kt
  • data/src/main/java/org/cryptomator/data/cloud/webdav/network/WebDavClient.kt
  • data/src/test/java/org/cryptomator/data/cloud/webdav/network/DataSourceBasedRequestBodyRetryTest.kt
  • data/src/test/java/org/cryptomator/data/cloud/webdav/network/DataSourceBasedRequestBodyTest.kt
  • domain/src/main/java/org/cryptomator/domain/usecases/cloud/DataSource.kt
💤 Files with no reviewable changes (1)
  • data/src/main/java/org/cryptomator/data/cloud/webdav/network/InputStreamSourceBasedRequestBody.kt

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


Walkthrough

The WebDAV upload path now uses a repeatable OkHttp RequestBody backed by DataSource. Each write opens a fresh stream and preserves upload progress reporting. The request body passes through the connection handler and WebDAV client directly. The previous input-stream request body was removed. Tests verify repeated writes and complete uploads after a pooled connection closes. MockWebServer test dependencies were added.

Priority: ⬆️ High

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 28 functions across 7 files. (2 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: fixing WebDAV uploads when a pooled connection closes.
Description check ✅ Passed The description references issue #646, which matches the pull request objective and changeset.
Linked Issues check ✅ Passed The changes address issue #646. WebDavImpl.write now passes a repeatable DataSourceBasedRequestBody. writeTo opens a new DataSource stream for each request attempt. This allows OkHttp to resen…
Out of Scope Changes check ✅ Passed The changes stay within issue #646. The dependency addition supports the new MockWebServer tests. The request-body changes, deleted one-shot wrapper, retry tests, and DataSource.open documentation a…
Full details: Docstring Coverage

Explanation

Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 28 functions across 7 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@SailReal
SailReal merged commit b16f6e4 into develop Sep 19, 2026
3 checks passed
@SailReal
SailReal deleted the feature/fix-webdav-connection-pooling branch September 19, 2026 10:08
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.

Android 16: Built-in editor errors unless I wait 10 seconds before saving .txt

1 participant