Skip to content

Range request attempt WIP - #701

Closed
PVince81 wants to merge 1 commit into
cs3org:masterfrom
PVince81:range-request
Closed

PVince81 wants to merge 1 commit into
cs3org:masterfrom
PVince81:range-request

Conversation

@PVince81

Copy link
Copy Markdown
Contributor

Naive draft attempt at adding range request.
This would require the underlying data provider + storage to support range headers.

Strangely when I run this it doesn't return the "Accept-range" request.

For https://github.com/owncloud/ocis-reva/issues/12

@butonic FYI

@PVince81

Copy link
Copy Markdown
Contributor Author

Ok, I missed changing my go.mod with the replace...

So the HEAD call returns the headers.

The GET call returns the full content, which is expected because the underlying layers likely don't support the range headers yet

@PVince81

Copy link
Copy Markdown
Contributor Author

Actually the "HEAD" request should also ping the backend to find out if it "accepts ranges"...

@PVince81

Copy link
Copy Markdown
Contributor Author

seems we might need the CS3 APIs to support range requests: https://github.com/owncloud/ocis-reva/issues/12

@labkode

labkode commented May 11, 2020

Copy link
Copy Markdown
Member

@PVince81 I think we can add them to CS3APIS at some point, however what if we try the following for time being:

1) Get with Range header arrives to ocdav layer
2) ocdav will call CS3APIS:InitiateFileUpload and get the TUS server address
3) ocdav will send Range header to TUS data server
4) TUS data server will serve only the requested bytes

@PVince81

Copy link
Copy Markdown
Contributor Author

now that I'm a bit more familiar, maybe passing this through the Opaque would be enough ?

@PVince81

Copy link
Copy Markdown
Contributor Author

never mind, I just saw your proposal, doing a range request to the data provider sounds like a better approach

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