Skip to content

Commit

Permalink
Fix capabilities response for multiple client versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ishank011 committed Nov 23, 2020
1 parent b2c4af4 commit 29c49d2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions changelog/unreleased/ocs-capabilities.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Bugfix: Fix capabilities response for multiple client versions

https://github.com/cs3org/reva/pull/1331
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ func (h *Handler) Init(c *config.Config) {
h.c.Capabilities.Files = &data.CapabilitiesFiles{}
}

// h.c.Capabilities.Files.PrivateLinks is boolean
// h.c.Capabilities.Files.BigFileChunking is boolean // TODO is this old or new chunking? jfd: I guess old

if h.c.Capabilities.Files.BlacklistedFiles == nil {
h.c.Capabilities.Files.BlacklistedFiles = []string{}
}
Expand All @@ -104,6 +101,10 @@ func (h *Handler) Init(c *config.Config) {

if h.c.Capabilities.Files.TusSupport == nil && !c.DisableTus {
// these are global capabilities
// Need to disable other chunking methods
h.c.Capabilities.Files.BigFileChunking = false
h.c.Capabilities.Dav.Chunking = ""

// TODO: infer from various TUS handlers from all known storages
h.c.Capabilities.Files.TusSupport = &data.CapabilitiesFilesTusSupport{
Version: "1.0.0",
Expand All @@ -112,6 +113,9 @@ func (h *Handler) Init(c *config.Config) {
MaxChunkSize: 0,
HTTPMethodOverride: "",
}
} else {
// Enable chunking support
h.c.Capabilities.Files.BigFileChunking = true
}

// dav
Expand Down

0 comments on commit 29c49d2

Please sign in to comment.