Bump reva
This commit is contained in:
Generated
Vendored
+2
-3
@@ -291,7 +291,6 @@ func (s *Service) InitiateFileDownload(ctx context.Context, req *provider.Initia
|
||||
// TODO(labkode): maybe add short-lived token?
|
||||
// We now simply point the client to the data server.
|
||||
// For example, https://data-server.example.org/home/docs/myfile.txt
|
||||
// or ownclouds://data-server.example.org/home/docs/myfile.txt
|
||||
log := appctx.GetLogger(ctx)
|
||||
u := *s.dataServerURL
|
||||
log.Info().Str("data-server", u.String()).Interface("ref", req.Ref).Msg("file download")
|
||||
@@ -399,7 +398,7 @@ func (s *Service) InitiateFileUpload(ctx context.Context, req *provider.Initiate
|
||||
if req.Opaque.Map["Upload-Checksum"] != nil {
|
||||
metadata["checksum"] = string(req.Opaque.Map["Upload-Checksum"].Value)
|
||||
}
|
||||
// ownCloud mtime to set for the uploaded file
|
||||
// OpenCloud mtime to set for the uploaded file
|
||||
if req.Opaque.Map["X-OC-Mtime"] != nil {
|
||||
metadata["mtime"] = string(req.Opaque.Map["X-OC-Mtime"].Value)
|
||||
}
|
||||
@@ -430,7 +429,7 @@ func (s *Service) InitiateFileUpload(ctx context.Context, req *provider.Initiate
|
||||
// - it is also unassigned
|
||||
// - ends in 9 as the 409 conflict
|
||||
// - is near the 4xx errors about conditions: 415 Unsupported Media Type, 416 Range Not Satisfiable or 417 Expectation Failed
|
||||
// owncloud only expects a 400 Bad request so InvalidArg is good enough for now
|
||||
// OpenCloud only expects a 400 Bad request so InvalidArg is good enough for now
|
||||
// seealso errtypes.StatusChecksumMismatch
|
||||
case errtypes.PermissionDenied:
|
||||
st = status.NewPermissionDenied(ctx, err, "permission denied")
|
||||
|
||||
Generated
Vendored
+2
-2
@@ -1604,7 +1604,7 @@ func mdToPropResponse(ctx context.Context, pf *XML, md *provider.ResourceInfo, p
|
||||
// see everts stance on this https://stackoverflow.com/a/31621912, he points to http://tools.ietf.org/html/rfc4918#section-15.3
|
||||
// > Purpose: Contains the Content-Length header returned by a GET without accept headers.
|
||||
// which only would make sense when eg. rendering a plain HTML filelisting when GETing a collection,
|
||||
// which is not the case ... so we don't return it on collections. owncloud has oc:size for that
|
||||
// which is not the case ... so we don't return it on collections. OpenCloud has oc:size for that
|
||||
// TODO we cannot find out if md.Size is set or not because ints in go default to 0
|
||||
if md.Type == provider.ResourceType_RESOURCE_TYPE_CONTAINER {
|
||||
appendToNotFound(prop.NotFound("d:getcontentlength"))
|
||||
@@ -1638,7 +1638,7 @@ func mdToPropResponse(ctx context.Context, pf *XML, md *provider.ResourceInfo, p
|
||||
if md.Type == provider.ResourceType_RESOURCE_TYPE_CONTAINER {
|
||||
// always returns the current usage,
|
||||
// in oc10 there seems to be a bug that makes the size in webdav differ from the one in the user properties, not taking shares into account
|
||||
// in ocis we plan to always mak the quota a property of the storage space
|
||||
// in OpenCloud we plan to always mak the quota a property of the storage space
|
||||
appendToOK(prop.Escaped("d:quota-used-bytes", size))
|
||||
} else {
|
||||
appendToNotFound(prop.NotFound("d:quota-used-bytes"))
|
||||
|
||||
Generated
Vendored
+2
-2
@@ -246,7 +246,7 @@ func (s *svc) handlePut(ctx context.Context, w http.ResponseWriter, r *http.Requ
|
||||
|
||||
utils.AppendPlainToOpaque(opaque, net.HeaderUploadLength, strconv.FormatInt(length, 10))
|
||||
|
||||
// curl -X PUT https://demo.owncloud.com/remote.php/webdav/testcs.bin -u demo:demo -d '123' -v -H 'OC-Checksum: SHA1:40bd001563085fc35165329ea1ff5c5ecbdbbeef'
|
||||
// curl -X PUT https://demo.example.org/remote.php/webdav/testcs.bin -u demo:demo -d '123' -v -H 'OC-Checksum: SHA1:40bd001563085fc35165329ea1ff5c5ecbdbbeef'
|
||||
|
||||
var cparts []string
|
||||
// TUS Upload-Checksum header takes precedence
|
||||
@@ -257,7 +257,7 @@ func (s *svc) handlePut(ctx context.Context, w http.ResponseWriter, r *http.Requ
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
// Then try owncloud header
|
||||
// Then try OpenCloud header
|
||||
} else if checksum := r.Header.Get(net.HeaderOCChecksum); checksum != "" {
|
||||
cparts = strings.SplitN(checksum, ":", 2)
|
||||
if len(cparts) != 2 {
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -121,7 +121,7 @@ func (s *svc) handleTusPost(ctx context.Context, w http.ResponseWriter, r *http.
|
||||
|
||||
// r.Header.Get(net.HeaderOCChecksum)
|
||||
// TODO must be SHA1, ADLER32 or MD5 ... in capital letters????
|
||||
// curl -X PUT https://demo.owncloud.com/remote.php/webdav/testcs.bin -u demo:demo -d '123' -v -H 'OC-Checksum: SHA1:40bd001563085fc35165329ea1ff5c5ecbdbbeef'
|
||||
// curl -X PUT https://demo.example.org/remote.php/webdav/testcs.bin -u demo:demo -d '123' -v -H 'OC-Checksum: SHA1:40bd001563085fc35165329ea1ff5c5ecbdbbeef'
|
||||
|
||||
// TODO check Expect: 100-continue
|
||||
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -35,7 +35,7 @@ import (
|
||||
"github.com/opencloud-eu/reva/v2/pkg/storage/utils/templates"
|
||||
)
|
||||
|
||||
// Handler implements the ownCloud sharing API
|
||||
// Handler implements the open collaboration service sharing API
|
||||
type Handler struct {
|
||||
gatewayAddr string
|
||||
additionalInfoAttribute string
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -75,7 +75,7 @@ var (
|
||||
errParsingSpaceReference = errors.New("could not parse space reference")
|
||||
)
|
||||
|
||||
// Handler implements the shares part of the ownCloud sharing API
|
||||
// Handler implements the shares part of the open collaboration service sharing API
|
||||
type Handler struct {
|
||||
gatewayAddr string
|
||||
machineAuthAPIKey string
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -52,7 +52,7 @@ func (h *Handler) GetSelf(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// User holds user data
|
||||
type User struct {
|
||||
ID string `json:"id" xml:"id"` // UserID in ocs is the owncloud internal username
|
||||
ID string `json:"id" xml:"id"` // UserID in ocs is the username
|
||||
DisplayName string `json:"display-name" xml:"display-name"` // is used in ocs/v(1|2).php/cloud/user - yes this is different from the users endpoint
|
||||
Email string `json:"email" xml:"email"`
|
||||
UserType string `json:"user-type" xml:"user-type"`
|
||||
|
||||
Reference in New Issue
Block a user