Skip to content
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

Adding chunking capability #26368

Merged
merged 1 commit into from
Oct 21, 2016
Merged

Conversation

DeepDiver1975
Copy link
Member

@DeepDiver1975 DeepDiver1975 commented Oct 13, 2016

Description

Related Issue

refs #25682

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@ogoffart

@DeepDiver1975 DeepDiver1975 added this to the 9.2 milestone Oct 13, 2016
@mention-bot
Copy link

@DeepDiver1975, thanks for your PR! By analyzing the history of the files in this pull request, we identified @PVince81, @rullzer and @LukasReschke to be potential reviewers.

@ogoffart
Copy link

In the client I have called it OC-If-Destination-Match (with the OC- prefix)
owncloud/client@c222793
But i realized I documented it without the OC-prefix in https://github.com/cernbox/smashbox/blob/master/protocol/chunking.md

I wonder if we should or not use the OC- prefix. What's the best practice in case of custom headers?

@ogoffart
Copy link

@evert any opinion about this header?

@evert
Copy link

evert commented Oct 17, 2016

If I understand this correctly, the If header already has this functionality

@DeepDiver1975
Copy link
Member Author

If-match validates on the source. This header checks on the destination

@evert
Copy link

evert commented Oct 18, 2016

I'm talking about the If header, not If-Match. It can check lock tokens, etags and sync tokens on any arbitrary url

@evert
Copy link

evert commented Oct 18, 2016

Here's an example:

https://tools.ietf.org/html/rfc4918#section-7.5.1

@ogoffart
Copy link

@evert: thanks, that looks like exactly what we need, i did not know about it.

@DeepDiver1975 however, it seems that it's not working, because it's not rejecting erroring the MOVE in the final if i use the wrong ETAG. Is that supposed to work already?

@DeepDiver1975
Copy link
Member Author

I'm talking about the If header, not If-Match. It can check lock tokens, etags and sync tokens on any arbitrary url

Sorry - took a while until I finally understood this 🙈 - I'll look into this - THX

@DeepDiver1975
Copy link
Member Author

@DeepDiver1975 however, it seems that it's not working, because it's not rejecting erroring the MOVE in the final if i use the wrong ETAG. Is that supposed to work already?

yes - should 🙈

@ogoffart
Copy link

If i send:

MOVE /~owncloud/remote.php/dav/uploads/owncloud/4101267920/.file HTTP/1.1
Destination: /~owncloud/remote.php/dav/files/owncloud/big/file.ff
Content-Type: application/octet-stream
If: </~owncloud/remote.php/dav/files/owncloud/big/file.ff> ("garbage")
OC-Async: 1
X-OC-Mtime: 1476954084
[...]
Host: localhost

I get a 204 No Content and the file is correctly moved. I would expect an error!

@ogoffart
Copy link

Ah ok, my fault, i forgot the [ ] around the etag.

@DeepDiver1975
Copy link
Member Author

If: </~owncloud/remote.php/dav/files/owncloud/big/file.ff> ("garbage")

this works already?

@ogoffart
Copy link

I had to use square bracket around the e-tag. (Reading the spec twice helps.)

If: </~owncloud/remote.php/dav/files/owncloud/big/file.ff> (["garbage"])

Alright. It seems everithing is working with the If header, and we don't need this.

Thanks @evert

ogoffart added a commit to owncloud/client that referenced this pull request Oct 20, 2016
@DeepDiver1975
Copy link
Member Author

really awesome - I should spend more time reading the specs .....

@ogoffart we need this 82d238b for the capabilities

@DeepDiver1975 DeepDiver1975 force-pushed the if-destination-match-header-on-move branch from 82d238b to 2278d7d Compare October 20, 2016 09:46
@DeepDiver1975 DeepDiver1975 changed the title If destination match header on move Adding chunking capability Oct 20, 2016
@evert
Copy link

evert commented Oct 20, 2016

I wonder if we should throw exceptions instead of ignoring broken If headers. The code for it is written a long time ago, and I never really looked back at it too much.

@DeepDiver1975
Copy link
Member Author

@ogoffart do we agree on the capability?

@ogoffart
Copy link

yes, 👍

@DeepDiver1975 DeepDiver1975 merged commit eadcffc into master Oct 21, 2016
@DeepDiver1975 DeepDiver1975 deleted the if-destination-match-header-on-move branch October 21, 2016 09:45
elie195 pushed a commit to elie195/core that referenced this pull request Mar 23, 2017
@lock
Copy link

lock bot commented Aug 4, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants