-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(nextcloud)!: Require content-length for all WebDAV put requests #1987
fix(nextcloud)!: Require content-length for all WebDAV put requests #1987
Conversation
Signed-off-by: provokateurin <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1987 +/- ##
=======================================
Coverage 28.85% 28.85%
=======================================
Files 249 249
Lines 84111 84111
=======================================
Hits 24269 24269
Misses 59842 59842
*This pull request uses carry forward flags. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means another breaking release shortly?
@@ -146,23 +146,23 @@ class WebDavClient { | |||
/// * [putStream] for a complete operation executing this request. | |||
http.BaseRequest putStream_Request( | |||
Stream<List<int>> localData, | |||
int contentLength, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to leave this as a named parameter.
- easier to read code
- less breaking for our users
I don't like having a breaking release because this doesn't fix anything that is actually broken. Maybe it makes more sense to add an assert or print a log to inform the developers they are probably making a mistake? I'm not sure what the best way is... I'd also be open to not merge this patch at all and just add some doc comments that explain why it is important to set the parameter 🤷♀️ |
I'm fine with either way. |
Some specific setups do not like it when the content-length header is not present. The consumer of the package should always know the size of the data they are trying to upload, so enforcing the content-length is no problem.
For reference: saber-notes/saber#945 saber-notes/saber#1232