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

http: ocdavsvc - add If-Not-Match header on PUT #4

Open
DeepDiver1975 opened this issue Feb 6, 2019 · 8 comments
Open

http: ocdavsvc - add If-Not-Match header on PUT #4

DeepDiver1975 opened this issue Feb 6, 2019 · 8 comments

Comments

@DeepDiver1975
Copy link

If-Match is implemented - https://github.com/cernbox/reva/blob/a6be57bfedc01eddf38148bb7015c2fb8a7a0058/services/httpsvc/ocdavsvc/put.go#L151

To be capable to ensure that overwrite upon creating a new file is not possible the If-Not-Match header with the special value '*' should be implemented.

How does it work:
the client sends If-Not-Match: '*' with a request which shall create a new file. The server checks if the file does not exist otherwise 412 is returned.

@labkode labkode changed the title Add If-Not-Match header on PUT http: ocdavsvc: Add If-Not-Match header on PUT Apr 29, 2019
@labkode labkode changed the title http: ocdavsvc: Add If-Not-Match header on PUT http: ocdavsvc - add If-Not-Match header on PUT Apr 29, 2019
@labkode
Copy link
Member

labkode commented Apr 29, 2019

@butonic is this still the case?

@DeepDiver1975
Copy link
Author

there is still no if-not-match in https://github.com/cernbox/reva/blob/master/cmd/revad/svcs/httpsvcs/ocdavsvc/put.go - so I guess this is still the case ....

@butonic
Copy link
Contributor

butonic commented May 15, 2019

@labkode
Copy link
Member

labkode commented May 15, 2019

@DeepDiver1975 @butonic thanks for the pointers, does ownCloud uses the ETAG as the entity or only uses the * case?

@DeepDiver1975
Copy link
Author

Both cases are used . If-None with * to make sure a new resource is created and If-Match 'etag' to make sure we do not overwrite by accident

@butonic
Copy link
Contributor

butonic commented Apr 22, 2020

@butonic butonic mentioned this issue Apr 22, 2020
@micbar
Copy link
Member

micbar commented Jun 26, 2020

@butonic if this fixed by #674 ?

@DeepDiver1975
Copy link
Author

DeepDiver1975 commented Jun 26, 2020

@butonic if this fixed by #674 ?

no - there is no If-Not-Match in the mentioned PR - also commented accordingly https://github.com/cs3org/reva/pull/674/files#r413058259

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

No branches or pull requests

4 participants