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

make dataprovider send headers #3080

Merged
merged 1 commit into from
Jul 15, 2022
Merged

make dataprovider send headers #3080

merged 1 commit into from
Jul 15, 2022

Conversation

butonic
Copy link
Contributor

@butonic butonic commented Jul 15, 2022

Instead of ocdav doing an additional Stat request we now rely on the dataprovider to return the necessary metadata information as headers. As a bonus it prevents race conditions between the Stat and InitiateFileDownload calls.

related: owncloud/ocis#4153

@butonic butonic requested review from a team, labkode, ishank011 and glpatcern as code owners July 15, 2022 10:14
@butonic butonic force-pushed the tune-download branch 2 times, most recently from dd53252 to 680649a Compare July 15, 2022 10:50
@labkode
Copy link
Member

labkode commented Jul 15, 2022

@butonic what about encapsulating all this information into a JSON structure and pass that payload into one single header that can be decoded in a simpler way compared to have the information spread across multiple headers?

@butonic
Copy link
Contributor Author

butonic commented Jul 15, 2022

@labkode most of the headers are standard headers: ContentType, ContentDisposition, ETag and LastModified.

Which leaves the OC prefixed headers: OC-ETag (which in contrast to ETag remains the same, regardless of the content encoding, so clients can use it to sync), OC-FileId and OC-Checksum.

  • OC-Checksum should be deprecated in favor of Digest

  • For the other headers maybe sth like the TUS Upload-Metadata could be used. It could be Download-Metadata, CS3-Metadata or individual CS3-{property} headers.

The next question then becomes how can clients request what metadata to return, eg by providing a field mask in the get request ... again, as a header.

Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
@butonic butonic merged commit 31d88d1 into cs3org:edge Jul 15, 2022
@butonic butonic deleted the tune-download branch July 15, 2022 12:14
@butonic
Copy link
Contributor Author

butonic commented Jul 15, 2022

OC-FileId should be deprecated and split into CS3-StorageID, CS3-SpaceID and CS3-OpaqueID,
OC-ETag should be deprecated in favor of a CS3-ETag

related owncloud/ocis#3782

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.

3 participants