Skip to content

Commit

Permalink
Revert "Fix content disposition (cs3org#2303)"
Browse files Browse the repository at this point in the history
This reverts commit 3cba223.
  • Loading branch information
ishank011 committed Dec 7, 2021
1 parent 147c0c2 commit e155596
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion changelog/unreleased/fix-content-disposition.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Bugfix: Fix content disposition header for public links files

https://github.com/cs3org/reva/pull/2303
https://github.com/cs3org/reva/pull/2297
https://github.com/cs3org/reva/pull/2297
https://github.com/cs3org/reva/pull/2332
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,12 @@ func (s *service) translatePublicRefToCS3Ref(ctx context.Context, ref *provider.
return nil, "", nil, st, nil
}

cs3Ref := &provider.Reference{Path: path.Join("/", shareInfo.Path, relativePath)}
p := shareInfo.Path
if shareInfo.Type != provider.ResourceType_RESOURCE_TYPE_FILE {
p = path.Join("/", shareInfo.Path, relativePath)
}
cs3Ref := &provider.Reference{Path: p}

log.Debug().
Interface("sourceRef", ref).
Interface("cs3Ref", cs3Ref).
Expand Down
4 changes: 0 additions & 4 deletions internal/http/services/owncloud/ocdav/publicfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ func (h *PublicFileHandler) Handler(s *svc) http.Handler {
return
}

r.URL.Path = path.Base(r.URL.Path)
switch r.Method {
case MethodPropfind:
s.handlePropfindOnToken(w, r, h.namespace, false)
Expand Down Expand Up @@ -121,9 +120,6 @@ func (s *svc) adjustResourcePathInURL(w http.ResponseWriter, r *http.Request) bo
return false
}

// adjust path in request URL to point at the parent
r.URL.Path = path.Dir(r.URL.Path)

return true
}

Expand Down

0 comments on commit e155596

Please sign in to comment.